Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
> wilshire wrote:
> The p tags are probably coming from your article itself. When you write an article and do not specify otherwise it will wrap your line of text in the p tag. I think you escape this in textile using a double space.
That was exactly the hint that was missing! Just to add that the double white space must be addded BEFORE “txp:rss_thumbpop category…”.
>You could also use the new feature that was recently added to automatically show article galleries. In this case you would add the call to the plugin to your article form and it would only display the thumbnails if you had a category called “article-”+articleID
I didn’t understand that quite right. Nevermind, it’s working right now with the hint above, but if you find the time, maybe you can point me to some more in-depth documentation. I’ve startet learning Textpattern today, so everything is still quite new to me…
Thank you very much for your help!
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
That feature is new in version 0.3. If thats what you have, the documentation is included with the plugin or check page 1 of this thread.
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
A new version (0.4) is available now with some major updates based on suggestions by jbrew, theturninggate, ddsoul, vituvius and others.
- The dependency on dca_pop has been removed although the popups still function the same.
- Popups can now contain an image and its caption using an external script called thumbpop.php (included in the download).
- Padding can be specified on the width and height of the popup window.
- Images can now be ordered by name, caption, date asc or date desc.
The thumbpop.php script should be placed in your textpattern installation directory. Edit the inline stylesheet to alter the display. By default, the alt text is used as the page title and the caption is shown below the image. Check for an example on my site that uses the new popup style and window padding options.
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Superb! I can’t wait to try it (but will have to until after work today)!
Thank you!
Last edited by theturninggate (2005-02-02 14:35:45)
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Wilshire…. amazing. This thing is sweet!!! I tested it out last night and it works great.
One question: Is there a way to not have the caption display on the popup but still below the thumb?
Let me know.
To even the least of these…
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
jbrew – You can remove the caption display by editing the thumbpop.php file.
Find line 24 which reads
<code>
<?php echo ‘<img src=”’ . $pfr.$img_dir.’/’ . $id . $ext . ‘” alt=”’.$alt.’” /><p>’ . $caption .’</p>’; ?>
</code>
and change it to
<code>
<?php echo ‘<img src=”’ . $pfr.$img_dir.’/’ . $id . $ext . ‘” alt=”’.$alt.’” />’; ?>
</code>
By the way, on this page you have access to any of the attributes of the image. So if you wanted you could display the alt text, height, width, etc.
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Oh, man. That is so sweet! You really thought this on thru!
Thanks so much!
To even the least of these…
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Could the tag you use to call image captions in the pop-up windows be used elsewhere in Textpattern, like in pages or Textile fields, to call images w/ captions into an article?
How could we do that?
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
The plugin isn’t really meant for that. Don’t know if this is exactly what you’re looking for but take this code and place it in your taghandlers.php. You could also just pasted it at the end of any plugin file. Just call <code><txp:article_image_caption /></code> from an article form. It will work the same as the article image tag does. This would be classified as a “brut force” and is by no means ideal, but it should work.
<code>
function article_image_caption($atts)
{
global $thisarticle,$pfr,$img_dir;
if (is_array($atts)) extract($atts);
$theimage = ($thisarticle[‘article_image’]) ? $thisarticle[‘article_image’] : ‘’;
if ($theimage) {
if (is_numeric($theimage)) {
$rs = safe_row(“*”,‘txp_image’,“id=’$theimage’”);
if ($rs) {
extract($rs);
return $caption;
}
} else {
return ‘’;
}
}
}
</code>
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Well, I’m not quite sure what I did wrong, but that didn’t work. I couldn’t get the regular article_image tag to show either. Is there a specific way you have to enter the url? I tried:
http://www.domain.com/images/17.jpg
www.domain.com/images/17.jpg
domain.com/images/17.jpg
images/17.jpg
17.jpg
None of them worked.
And anyway, I’d like to have the ability to call in more than one image w/ caption per article. And it would have to be fairly simple, because I’m not the only person who will be posting to the site, and the others aren’t code proficient at all. Simplicity is key on this project.
As for what exactly I’d be looking for, it doesn’t exist, but I imagine it would go something like this:
txp:image id=“17” showcaption=“1” /
Something like that would be beautiful. I would imagine it would be fairly simple for someone to do, along the lines of the chh_article_custom plugin, only for images instead. But I don’t know the first thing about coding PHP, so I could very easily be way off base there.
What really baffles me is why it wasn’t included in the release to begin with. :(
Cheers.
Last edited by theturninggate (2005-02-04 21:30:54)
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
The article image id is entered under the advanced options menu when you’re writing an article. The article tag and the caption tag above would have to be place on your article form. They would show the image thats associated with the article but you can only have one per article.
I just found this which might be what you’re looking for: glx_image
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Wilshire, that’s exactly what I’ve been looking for! You are a god! Thank you!
Offline
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
… and with a small hack to the dca_pop plugin in combination with glx_image plugin you can open not the larger versions of your images self, but within the thumbpop.php file from wilshire’s rss_thumbpop package! Isn’t that cute? :)
My dca_pop version you can find here.
Offline
#44 2005-02-05 12:52:02
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
I’m lost on how to use this plugin
So far:
1. article ID=3
2. Made an Image Category called article-3
3. Then in the page template that displays article 3 I put:
<code><txp:rss_thumbpop mode=“table” articlethumbs=“1” label=“My Pictures” pagepop=“1” /></code>
Problem is no thunbnails show up.
What am I doing wrong here?
Thanks, Lee
Edit:
Got it working.
Used:
<code><txp:article form=“thumb_pop” /></code>
instead of
<code><txp:output_form form=“thumb_pop” /></code>
Last edited by lee (2005-02-05 15:41:29)
Offline
#45 2005-02-05 22:43:03
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Is it poss to make the caption below the thumb clickable?
Thanks
Lee
Offline