Textpattern Forum

You are not logged in. Register | Login | Help

#31 2005-01-31 18:27:15

larf
Plugin Author
Registered: 2005-01-31
Posts: 159
Website

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

#32 2005-01-31 18:52:09

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

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

#33 2005-02-02 03:22:22

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

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.

Details and Example

Download rss_thumbpop 0.4

Offline

#34 2005-02-02 14:35:27

theturninggate
Member
Registered: 2004-11-07
Posts: 185
Website

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

#35 2005-02-02 16:42:50

jbrew
Member
From: Imperial Beach, California
Registered: 2004-03-04
Posts: 78
Website

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

#36 2005-02-02 17:00:10

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

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

#37 2005-02-02 17:22:13

jbrew
Member
From: Imperial Beach, California
Registered: 2004-03-04
Posts: 78
Website

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

#38 2005-02-04 20:07:43

theturninggate
Member
Registered: 2004-11-07
Posts: 185
Website

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

#39 2005-02-04 21:09:33

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

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

#40 2005-02-04 21:27:49

theturninggate
Member
Registered: 2004-11-07
Posts: 185
Website

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

Board footer

Powered by FluxBB