fourlightsweb
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Gallery Custom Links] One image – multiple URLs?The link is saved as a meta field with the image, so it can only store one link per image. I’m not sure there would be a way to save multiple links per image; to my knowledge, WordPress doesn’t create a unique gallery ID or anything when a gallery is created to be able to distinguish which link goes where. But it may be added in the future if I can figure out a way to do so. In the meantime, it’s one link per image, sorry.
What if you made each user’s links custom fields, then edited the page template you’re using to display the user’s info by putting each user’s links around fixed images in the template instead?
Alternately you could upload a new copy of the images for each user, although that’s not ideal. Just some suggestions.
Forum: Plugins
In reply to: [WP Gallery Custom Links] Can't make links workThis turned out to be settings-related: the homepage gallery had ‘link=”none”‘ on the gallery shortcode, so none of the images had links on them, and the other page had preserve onclick events set to true, so it was attempting to open the link in a shadowbox (and not succeeding).
Forum: Plugins
In reply to: [WP Gallery Custom Links] stopped working when updatedMarking this resolved as the poster has had no further information for several weeks.
Originally, the plugin did not set a target on all links, only _blank when new window was set to true. Then a situation came up (you may have seen my rambling comment if you were looking at the code) where a user had a theme with a custom gallery that opened all images in a new window by default, which made the plugin appear “broken” because “same window” (i.e. don’t change the target) was still opening in a new window. I’m not sure how many themes out there are like that, but I modified the plugin so instead of not touching the target by default, it set it to open in the same window by default via _self. If you did read my rambling code comment, you are probably aware of how iffy I felt about doing so, but the user’s alternative in that situation was to hack their theme’s code, which isn’t ideal, so I was trying to solve it for them (and possibly other users) nicely, while also worrying about backwards-compatibility for existing users.
Long story short, I may work in a “Theme Default” or “Nothing” option like you suggest (and like it was before) to give users an option to leave it untouched in a future release. Thanks!
Forum: Plugins
In reply to: [WP Gallery Custom Links] Code from FAQ #6Ah, that would be a html/browser issue – link hrefs should either start with a “/” or “./” or “../” or a folder/filename if it’s an internal link, or “http” or “https” or “//” if it’s an external link, otherwise the browser gets confused about what to do with it (it’s probably looking for a folder under your page called “www.google.com”). Glad it was a simple fix!
Forum: Plugins
In reply to: [WP Gallery Custom Links] Code from FAQ #6Try taking a look at this discussion from another user and see if that helps (code is from his theme’s functions.php file):
http://wordpress.org/support/topic/wont-work-syntax-error?replies=3
Forum: Plugins
In reply to: [WP Gallery Custom Links] Can't make links workIt looks like the custom link is being swapped in correctly, but your link is missing the class attribute that should be getting set when that happens. The class that gets added is what is used to disable the shadowbox, which why the shadowbox is still coming up. However, I’m not exactly sure how it could be failing to add the class to the link, as it’s correctly adding a target to the link, and it uses the same pattern matching to add both.
Can you try disabling your other plugins (particularly the shadowbox) to see if that affects it at all? It may be conflicting. I suspect it might be something else, but that’s a fairly easy thing to check first, and I’d need access to your admin/code to look into it further (you can contact me at info@fourlightsweb.com).
Forum: Plugins
In reply to: [WP Gallery Custom Links] Images not opening on same pageGlad you got it working!
This plugin only changes links in the [gallery] shortcode – it isn’t designed to change your gallery image sizes or affect any other pages (e.g. the attachment page). In order to accomplish these things you will likely need to alter your theme settings. Also, [none] removes links from gallery images by design (added after a request from a user who didn’t want links on their gallery images).
Forum: Plugins
In reply to: [WP Gallery Custom Links] Plugin having no effectSorry I wasn’t able to respond sooner – if you take a look at this support thread (and my response), it may give you a better idea of what to look for to modify in your functions.php code:
http://wordpress.org/support/topic/wont-work-syntax-error?replies=2
If that doesn’t work out for you, I’d suggest either contacting the theme author and requesting their gallery support the “post_gallery” filter (best solution), or contact me at info@fourlightsweb.com to possibly work something else out in terms of customizing your theme to support it.
Forum: Plugins
In reply to: [WP Gallery Custom Links] Won't work – syntax errorSorry I wasn’t able to respond sooner – it looks like your gallery’s attributes variable is named slightly differently than in WordPress core. Try adding this inside the “public function gallery($attributes){}” function, just above “extract(shortcode_atts(array(“:
$output = apply_filters('post_gallery', '', $attributes); if ( $output != '' ) return $output;Forum: Plugins
In reply to: [WP Gallery Custom Links] Can't make links workSorry I wasn’t able to respond sooner – looking at your page now, I’m actually not seeing any links at all around those images. What value do you have for the custom link? It’s possible the plugin just isn’t finding the link url to swap in the custom link, if the theme is not linking those images for some reason.
Forum: Plugins
In reply to: [WP Gallery Custom Links] How to apply "nofollow" to gallery links?Something like this (haven’t tested this in actual code, and may need to be tweaked depending on your theme):
<script>jQuery('.gallery-item a').attr('rel','nofollow');</script>Forum: Plugins
In reply to: [WP Gallery Custom Links] Images not opening on same pageWhen you say “new window” do you mean a Lightbox popup, or a new browser window/tab?
Forum: Plugins
In reply to: [WP Gallery Custom Links] disabling link to image file on image page?I’m not sure I entirely understand your setup – once you’re on a page that’s not a [gallery], it’s outside the scope of anything this plugin controls. If you’re linking to a WordPress page, you should be able to add the image to that page’s content directly with (you can put a link around a standalone image in page content without it affecting it in the gallery, or have no link at all). If you’re linking to the attachment page for the image, that’s something you’d probably have to modify in the attachment page code.