You are not logged in.
> 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
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
A new version (0.4) is available now with some major updates based on suggestions by jbrew, theturninggate, ddsoul, vituvius and others.
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
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
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
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
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
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
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