Forum Replies Created

Viewing 15 replies - 481 through 495 (of 1,016 total)
  • Plugin Author Dan Rossiter

    (@danrossiter)

    A dumb question that has to be asked for the sake of completeness:
    You have associated all of the attachments you want included with a category called “General Topics” (including correct capitalization of the category)?

    My next recommendation would be to uninstall Document Gallery and reinstall. In this circumstance I actually do not believe it will help, but it can’t hurt and it rules out a couple of unlikely issues.

    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Chris,

    I just went to verify against my own setup and what you’re using definitely looks correct. I’m using [dg descriptions=true category="New York Times" images=true] on one of my galleries.

    Do you have logging enabled (Dashboard -> Settings -> Document Gallery -> Advanced tab)? If not, can you try enabling that and viewing the page where you have the gallery setup?

    To be honest, I’m a bit stumped. What you are doing *should* be working. I’ll ponder on this a bit…

    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Chris,

    Almost correct. This is actually the topic of an enhancement request (using taxon slugs in place of names), but for the moment you’ll want to use the c category name instead of its slug (be sure to use quotes if the name has spaces.

    Let me know if that works for you!
    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Chris,

    There definitely is a way to include the same document in galleries on multiple posts. Depending on what specifically your use case is, you can use a couple of different methods.

    1. If it is a logical grouping of documents that are all repeated in multiple places then you can use taxonomies to do what you want, as documented on the Installation tab) under the “Categories/Custom Taxonomy Option” header. The categorization of attachments is outside the scope of Document Gallery, but I discuss some plugins that will do this for you [here](https://wordpress.org/support/topic/categories-for-media-files).

    2. If you build your gallery through the “Create Document Gallery” dialog integrated into the Media Manager (shown on the Screenshots tab) then you can use any attachments you like in creating your gallery — you’re not limited to just those on the current post.

    -Dan

    PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! πŸ™‚

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi runseven,

    This is definitely a bug. I’ve just confirmed the issue. What is curious is that it appears to have been present for quite some time without anyone reporting it.

    We’ll work on getting this patched ASAP, however is should not prevent you from using the plugin. It is just a warning and should only ever appear in the admin side when viewing the thumbnail management tab.

    Were you experiencing any issues beyond this warning?

    Thanks,
    Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi ghislaine,

    attachment_pg=false means that the links will point directly to the attachment file rather than a WordPress page for that file. What your browser does with the link is platform-dependent.

    In your case, you said it is an image, so most browsers will simply open the image directly rather than prompting to download. With other files like MS Word documents that a browser generally cannot open directly the browser will give a download prompt. This functionality is completely outside of Document Gallery’s control.

    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi ghislaine,

    Try [dg attachment_pg=false].

    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Fantastic! Glad you got it working! πŸ™‚

    Yeah, I think a UI for configuring the icon template is a good idea — I was actually thinking that as I was falling asleep. I’ll add that to the issue tracker and hopefully we’ll get that in in the not-too-distant future.

    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Julien,

    The way I wrote the filter, you’ll only get the extended output if descriptions is enabled, so you’ll want to include descriptions=true in your shortcode. Also be sure that you have your child theme set as your active theme.

    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Julien,

    You have found where the logic exists for this functionality, but you definitely do not want to modify the plugin directly. That’s why we’ve build filters in πŸ™‚

    Basically, a filter allows you to change the plugin output without changing the plugin itself. In this case, I believe you’ll want something like below:

    add_filter('dg_icon_template', 'dg_icon_details_mod', 10, 3);
    
     function dg_icon_details_mod($icon, $descriptions, $id) {
    	if ($descriptions) {
    		$icon =
    		'<div id="document-gallery-1" class="document-icon-wrapper descriptions">' .
    		'   <div class="document-icon">' .
    		'	  <a href="%link%" target="%target%"><img src="%img%" title="%title_attribute%" alt="%title_attribute%"></a>' .
    		'   </div>' .
    		'   <strong>Titre:</strong> %title%<br>' .
    		'   <strong>Legende:</strong> %description%<br>' .
    		'   <strong>Nom du fichier:</strong> ' . basename( get_attached_file( $id ) ) . '<br>' .
    		'   <strong>Taille:</strong> %size%</p>' .
    		'</div>';
    	}
    
    	return $icon;
     }

    Now, where this code goes is a bit more tricky. If you have a custom theme where you aren’t likely to get updates, you can put this into a “functions.php” file in the root of your theme’s directory. The more likely case is that you are using a theme from somewhere else. If that’s the case, you won’t want to modify that theme’s functions file because then changes will be lost whenever you get an update. What you’ll want to do instead is create a child theme. This process is documented here, and is very easy to setup πŸ™‚

    If you have any questions, please feel free to ask!

    -Dan

    PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! πŸ™‚

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Julien,

    What you want is definitely possible. You will want to take a look at the dg_icon_template PHP filter documented on the Installation tab. It allows for you to customize the output of individual icons and exposes a number of markup fields which are replaced with dynamic content by DG.

    The fields currently available are:
    %link%: The URL that will be loaded when the user clicks the icon.
    %target%: The target attribute for the anchor tag (e.g.: _blank, _self).
    %img%: The URL pointing the the image that will be displayed.
    %title%: The human-readable title of the attachment.
    %title_attribute%: The escaped title (above), safe for using HTML tag attributes.
    %description%: The attachment description (only present when rendering descriptions).
    %extension%: The document file extension.
    %size%: The human-readable file size formatted by size_format.
    %path%: The system path pointing to the document.

    If I have some time later I’ll try to put together an example of how to replicate the output you are looking for, but the functionality is definitely available.

    -Dan

    PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! πŸ™‚

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi andremalenfant,

    You make a valid point. The thought when the functionality was added is that users would prefer to work with human-readable names rather than slugs, but I see your point in the potential for the name to change.

    Let me think on this as I don’t want to unnecessarily break existing usages of the name in converting to slugs.

    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Anthony,

    Yes, you will need to use the dg_icon_template filter documented on the Installation tab in order to get the customized appearance you are looking for.

    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi John,

    What exactly do you mean “lost everything”? Uninstalling will only delete cached thumbnails and a few DG-specific settings. If you reinstall it should just take a min or two to re-do the settings the way you had them — less if you didn’t have them customized at all.

    -Dan

    Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Anthony,

    If I understand correctly, you’ll likely want to use the dg_icon_template to customize the template as documented in the Installation tab, but can you clarify what exactly you are trying to do?

    -Dan

Viewing 15 replies - 481 through 495 (of 1,016 total)