demur
Forum Replies Created
-
Forum: Plugins
In reply to: [Document Gallery] Description below titleHi ashahmurat!
I’ve looked over Your website through the length and breadth. And I have to say I couldn’t find a single trace of Document Gallery plugin. So it’s either not installed or at least not enabled.
Please double check Your WordPress settings and if You run into any issues with DG feel free to ask, we would be happy to help You.
Forum: Plugins
In reply to: [Document Gallery] Description below titleHi ashahmurat!
We would be happy to help You.
Can You provide a link to a gallery where this is occurring?
Taking into account symptoms and that You have taxonomy-description class (which has nothing to do with Document Gallery plugin), seems Your WP has some plugin(s) that doesn’t properly match with DG.Forum: Plugins
In reply to: [Document Gallery] Displaying a link trait!Hi ClaudeB!
I saw You’ve made quite a bunch of changes to Your site.
No wonder the proposed had done nothing, it hadn’t got to the page and the question is Why.
Can You, please, paste the current configuration for Document Gallery (underDashboard -> Settings -> Document Gallery -> Advancedtextarea Options Array Dump at the bottom).BTW After last changes to Your site You are still having some errors, Developer Tools reports 2 errors for now (previously it was 5).
Forum: Plugins
In reply to: [Document Gallery] Displaying a link trait!Hi ClaudeB!
The underscore You’ve referred to is in fact styling called box-shadow (sorry can’t tell of what package this CSS rule is).
To get rid of this line beneath Document Gallery thumbnails You should paste given below CSS in the Custom CSS textbox at Dashboard -> Settings -> Document Gallery:.document-gallery .document-icon a { -moz-box-shadow: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; }I hope this would work for You.
Please don’t hesitate to let us know if You run into any further issues.PS: If You’ve found our answers and/or the plugin useful, please rate the efforts. Thanks!
Forum: Plugins
In reply to: [Document Gallery] Adding Print button next to each PDFHi Vipworks!
I assumed that such a trifle You could do by Yourself 😉
A little tweak and here You are 🙂function dg_pdf_print_prepare() { ?> <script type="text/javascript"> function dgPDFprint() { var printWindow = window.open(jQuery(this).prev('a').attr('href'), '_blank'); printWindow.onload = function() { setTimeout( function () { printWindow.print(); printWindow.onfocus = function () { setTimeout( function () { printWindow.close(); }, 100); } }, 500); } } function dgPDFbuttons() { var freshDG = jQuery('.document-gallery').not('[data-dg-pdf-print]').attr('data-dg-pdf-print', true); freshDG.find('.document-icon a[href$=".pdf"]').parent().append('<a href="javascript:void(0);" class="dg-pdf-print">🖶 Print</a>'); freshDG.find('.dg-pdf-print').on('click', dgPDFprint); } jQuery(document).ready( function() { dgPDFbuttons(); jQuery('.dg-paginate-wrapper').parent().on("DOMSubtreeModified", dgPDFbuttons); }); </script> <?php } add_action('wp_print_footer_scripts', 'dg_pdf_print_prepare');I hope this would finally work for You.
Please don’t hesitate to let us know if You run into any further issues.PS: If You’ve found our answers and/or the plugin useful, please rate the efforts. Thanks!
Forum: Plugins
In reply to: [Document Gallery] Adding Print button next to each PDFHi Vipworks!
Like Dan has mentioned that some principles are already there among provided solutions 🙂
As You know usually there is a pile of different ways to achieve desired result. I happened to have all the parts of the puzzle in Dan’s way. (Another way for instance is to use, they say good, library PDF.js; I’ve seen some people managed to print PDFs without visually opening them, if interested You can google it ;-))So, here is code that will add a print link below every PDF thumbnail element of Document Gallery. On click new tab will be opened and print dialog emerge; upon print dialog closing the tab would be closed automatically.
To use this code You should paste it to the functions.php file of Your active WordPress theme, this can be done either using
Dashboard -> Appearance -> Editor -> Theme Functions(for the active theme), or through FTP.function dg_pdf_print_prepare() { ?> <script type="text/javascript"> jQuery(document).ready( function() { jQuery('.document-icon a[href$=".pdf"]').parent().append('<a href="javascript:void(0);" class="dg-pdf-print">🖶 Print</a>'); jQuery('.dg-pdf-print').on('click', dgPDFprint); function dgPDFprint() { var printWindow = window.open(jQuery(this).prev('a').attr('href'), '_blank'); printWindow.onload = function() { setTimeout(function () { printWindow.print(); printWindow.onfocus = function () { setTimeout(function () { printWindow.close(); }, 100); } }, 500); } } }); </script> <?php } add_action('wp_print_footer_scripts', 'dg_pdf_print_prepare');I hope this would work for You.
Please don’t hesitate to let us know if You run into any further issues.PS: If You’ve found our answers and/or the plugin useful, please rate the efforts. Thanks!
Forum: Plugins
In reply to: [Document Gallery] Creating document gallery button beside “add media button”Hi architecb33!
Sounds like You are using DG a lot if one additional click matters to You that much 😉 Main idea behind current design was not to overload users with excessive controls and not to increase (typical for software world) multitude of possible ways to accomplish same task.
We’ll look into Your request, maybe we would introduce it like an option (to activate under advanced settings) for users with extensive usage of DG.For now we can suggest You to play around and test this mod.
To use this code You should paste it to the functions.php file of Your active WordPress theme, this can be done either usingDashboard -> Appearance -> Editor -> Theme Functions(for the active theme), or through FTP.function dg_specific_button_js() { ?> <script type="text/javascript"> function open_dg_tab() { if ( this.frame === undefined ) { if ( wp.media.frame !== undefined && jQuery.inArray(wp.media.frame.state().id, ['dg', 'dg-edit', 'dg-library'])<0 ) { wp.media.frame.setState('dg'); } var options = { frame: 'post', state: 'dg', title: DGl10n.dgMenuTitle, multiple: true }; this.frame = wp.media.editor.open(null, options); } else { if ( jQuery.inArray(this.frame.state().id, ['dg', 'dg-edit', 'dg-library'])<0 ) { this.frame.setState('dg'); } this.frame.open(); } return false; } jQuery(document).ready( function() { if ( typeof wp.media.collection !== 'function' ) return; jQuery('#dg-specific-button').removeAttr('disabled').click(open_dg_tab); } ); </script> <?php } function dg_check_page_type( $hook ) { if ( in_array( $hook, array( 'post.php', 'post-new.php' ), true ) ) { function dg_add_specific_button() { echo '<button id="dg-specific-button" class="button" disabled>'.__( 'Create Document Gallery', 'document-gallery' ).'</button>'; } add_action('media_buttons', 'dg_add_specific_button'); add_action('admin_print_footer_scripts', 'dg_specific_button_js'); } } add_action('admin_enqueue_scripts', 'dg_check_page_type');Hope this will bring the wanted performance.
Please don’t hesitate to let us know if You run into any further issues and feel free to give us some feedback 😉Forum: Plugins
In reply to: [Document Gallery] Thumbnails and Captions won't resizeHi Moses!
Was hard to spot You, forum no longer brings recent activities on top 🙁
Do You still need assistance?
Forum: Plugins
In reply to: [Document Gallery] Creating document gallery button beside “add media button”Hi architecb33!
Sorry it took so long for You to get a reply; was hoping to finish development of the feature enhancement prior to answer, but was too busy.
There is an Add Media button/dialog in WordPress Edit Post interface we’ve been lucky to integrate into. It’s working for both Text and Visual modes of the editor, additionally there is ability using same tools to edit Document Galleries while working in Visual mode.
For the moment there are following constraints: those tools are not suitable for adding (and editing in Visual mode) plain[dg](this is the enhancement in progress), sophisticated shortcodes withcategories,relation,include/exclude,mime_typesandid(the parent post) options also not supported now.What were Your thoughts on this issue? What were You looking for? What should that button of Yours do on click?
Forum: Plugins
In reply to: [Document Gallery] Display DWG filesHi bmsa1!
We are happy to let You know that Document Gallery is the right tool for Your task 🙂
https://thumber.co is a great helper for projects with continuously increasing collection of documents, where it would generate thumbnails for diverse file types in auto mode.
If Your budget is small or You have tiny set of documents You can spend some time (depending on the size of the set) and do it manually.So lets proceed.
I guess You’ve figured out how to enable Your WordPress instance to let You upload DWG files (by default it’s restricted).
To make DG display DWG files in galleries (which should work by default) You should make sure that value of Your mime_types atDashboard -> Settings -> Document Gallerycontains application (often web servers configured to handle DWG files as an application top level type).
Another thing to consider making DG display Your DWG files those should be attached to the engaged post (if blank[dg]is used) oridsoption is specified with required attachments (manually or with help of Visual Editor doesn’t matter).The next step is to go to
Dashboard -> Settings -> Document Gallery -> Thumbnail Managementof Your WordPress (please note You’ll find there only those attachments that already have been shown in any instance of Document Gallery). Locate there rows with needed DWG files and either Drag’n’Drop thumbnails over to the defined rows (one at a time please), or You can click onSelect Filebutton in the defined rows and select thumbnails in the emerging dialogs. (identical result can be achieved by using same uploading techniques on the Edit Media page of the required attachments, which can be found through the Media Library atDashboard -> Media).
There are lots of online services that can produce images out of DWG files (jpeg is preferred) to use those as thumbnails with Your DG galleries 😉I hope this would work for You.
Please don’t hesitate to let us know if You run into any further issues.PS: If You’ve found our answers and/or the plugin useful, please rate the efforts. Thanks!
Forum: Plugins
In reply to: [Document Gallery] Can’t use taxonomiesHi AdRock952!
The message You’ve got indicates that there is no such taxon “taxon_name” in Your WordPress instance.
If You haven’t explicitly defined taxonomy name it should be set to some default one. Generally category-related plugins use taxonomy category.Please try out:
[dg fancy=true descriptions=true category=application-forms]Hope this would help You.
Please don’t hesitate to let us know if You run into any further issues.Forum: Plugins
In reply to: [Document Gallery] Title PositionHi mliddle!
I’m terribly sorry it took so long for You to get a reply; ‘ve been quite busy lately. And thank You for the patience.
There are two ways to reach Your goal.
One is custom CSS, we’ve tried our best to do that, You can have a look here for Dan’s code, unfortunately there is no clean way to get neat and tidy result.
Another way to use templating feature of the Document Gallery 😉
To make use of this option You should paste given below code to functions.php file of Your active WordPress theme, this can be done either using Dashboard -> Appearance -> Editor -> Theme Functions (for the active theme), or through FTP.function dg_title_over_img($icon, $use_descriptions, $id) { $patterns = array('/>(\s*)<img/im', '/>\s*<span class="title">%title%<\/span>(\s*)<\/a>/im'); $replace = array('>$1<span class="title">%title%</span>$1<img', '>$1</a>'); return preg_replace($patterns, $replace, $icon); } add_filter('dg_icon_template', 'dg_title_over_img', 10, 3);Hope this will bring the wanted performance.
Please don’t hesitate to let us know if You run into any further issues.Forum: Plugins
In reply to: [Document Gallery] change href to onclickHi architecb33!
Dan’s code slightly amended should work just as You need it 🙂
function dg_href_to_onclick($icon, $use_descriptions, $id) { return preg_replace('/<a [^>]*>/', "<a onclick=\"window.open('%link%', '_system')\">", $icon); } add_filter('dg_icon_template', 'dg_href_to_onclick', 10, 3);Please don’t hesitate to let us know if You run into any further issues.
Forum: Plugins
In reply to: [Document Gallery] add custom class to linksHi architecb33!
I would suggest client-side solution:
function dg_android_links() { ?> <script type="text/javascript"> jQuery(document).ready( function() { var ua = navigator.userAgent.toLowerCase(); var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile"); if(isAndroid) { jQuery( '.document-icon a[href$=".pdf"], .document-icon a[href$=".doc"]' ).each(function(){ jQuery(this).attr('href', 'https://docs.google.com/viewer?url='+jQuery(this).attr('href')+'&embedded=true'); }); } } ); </script> <?php } add_action( 'wp_print_footer_scripts', 'dg_android_links' );Given code should be added to functions.php file of Your active WordPress theme, this can be done either using Dashboard, or through FTP.
This solution is quite flexible, lets You modify range of affected links almost effortlessly. The commented part can make code to work only for mobile Android devices if You wish.Of course there is also a server-side solution, that would be a little trickier. I’m sorry don’t have enough time to go into that now.
I hope provided solution would do the job.
Please don’t hesitate to let us know if You run into any further issues.PS: If You’ve found our answers and/or the plugin useful, please rate the efforts. Thanks!
Forum: Plugins
In reply to: [Document Gallery] Wrap text round single column document galleryHi Matthew!
I’m sorry it took so long for You to get a reply; ‘ve been quite busy lately. Thank You for the patience.
And sorry my previous message has nothing to do with Your situation.Your goal can be achieved with pure CSS, though I would recommend wrap dg shortcode with e.g.
<div class="dg-wrapper"> ... </div>
Note: Wrapper should be added in the text mode not in the visual.
So this tweak would affect only wrapped DGs and the rest (if there are any or would be in future) won’t be touched.
For neat look the width of the DG should be properly squeezed. By default DG defines the width of thumbnails maximum at 89 pixels each. Due to some constraints of HTML: width of the wrapping container should be greater than DG’s one at least by 1%. You should add in the Custom CSS textbox at Dashboard -> Settings -> Document Gallery this code:dg-wrapper { width: 90px; }You can enhance this CSS rule with float and margin properties or just introduce needed class to the wrapper (alignleft or alignright, which are accessible in the used theme) like this
<div class="dg-wrapper alignleft">
To have text flow around DG You should place DG in wrapper before desired text.I hope this will bring the wanted appearance.
Please don’t hesitate to let us know if You run into any further issues.