Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#265 2006-01-28 04:25:41
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
nudder question: would catfield="category1"
work?
Offline
#266 2006-01-28 04:30:14
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
I don’t actually use it like that. Anyone else?
Offline
#267 2006-01-29 16:42:50
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
First post – been lurking here for a while as I gradually learn this whole Textpattern thing, and I must say what a bunch of cool people y’all are. And Rob, this is a top plugin. Just what the TxpDoctor ordered.
Couple of things, unless I’m being thick (highly likely)…
1) If using clickonly=“1” the text above the pic still says “Mouse over a thumbnail to view”. I made a small mod to get round it, thus: (changes are line 2 and a bit of the last line, can’t figure out how to highlight them: noob posting blues)
<code>
$events = ($clickonly) ? ‘onclick=“return showPic(this)”’ : ‘onmouseover=“return showPic(this)” onclick=“return showPic(this)”’;
$eventdesc = ($clickonly) ? ‘Click a thumbnail to view’ : ‘Mouse over a thumbnail to view’;
…
…
$divimg = ‘<div id=“fullsize”><div id=“desc”>’.$eventdesc.’</div><img id=“placeholder” src=”’.$blankimg.’” alt=”“ />’ ;
</code>
Nothing drastic.
2) I’m having the same issue as nardo with Txp 4.0.3 and rss_thumbpop 0.6.1; namely with the following code:
<code>
txp:rss_thumbpop usearticle=“1” catfield=“gallery_categories” mode=“float” limit=“6” cols=“3” showcaption=“0” jpop=“1” clickonly=“1” fullontop=“0” showfullcaption=“1”
</code>
I get all images shown, even though I’ve set up custom_10 as “gallery_categories”. In the article that I want to show the photo gallery, I populated the custom field with the name of an image category. I tried using “custom_10” as the arg to catfield with the same result. Further, clicking an image doesn’t display the fullsize. Instead, the page refreshes (odd in itself because jpop is 1), I get the same first few thumbs shown and the fullsize pic is always the last one in the list. Plus, the Next/Prev page buttons don’t appear.
Not a show-stopper for me, coz for now I can just duplicate the article/form a few times and hardcode a different image category in each. I’m going to try some other random options in case I’m just being dense and have a squint through the code to see if I can spot what’s going on, but don’t hold yer breath cos I haven’t quite got my head round plugins yet. I’ll shout if I find something.
Textpattern rocks, and so does this community.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#268 2006-01-29 20:32:04
- theonlydrew
- Member
- Registered: 2006-01-10
- Posts: 21
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Im also not getting usearticle to work under 4.0.3 and rss_thumbpop 0.6.1
I made a customfield called “gallery”, and in that field i put in the image category name.
MY CODE.
txp:rss_thumbpop usearticle=“1” catfield=“gallery” mode=“table” limit=“12” cols=“4”
Ive tried it on two different hosts, and on one I get back a long load time with a blank main page, and on the other, I get no images found, this is one is on dreamhost. The other is a home server.
Offline
#269 2006-01-30 23:36:16
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
No closer to finding out why I can’t get usearticle/catfield to work in v0.6.1. Perhaps it’s a plugin clash? More digging in progress…
Have made another minor edit if anyone else requires it: when using showblank=“1” to display a blank image and you also have showfullcaption=“1”, the caption from the most recent photo gets shown beneath the blank image. D’oh! I hacked it by finding this line of code:
<code>
$blankimg = ($showblank) ? $blankimg : $full;
</code>
and adding this beneath it:
<code>
$finalcap = ($showblank) ? “ ” : $caption;
</code>
and then just before the next <code>else</code>, changing the ‘caption’ to ‘finalcap’ thus:
<code>
$divimg .= ($showfullcaption) ? ‘<div id=“jpopcap”>’.$finalcap.’</div></div>’ : ‘</div>’;
</code>
No doubt someone with better PHP skills than me can improve upon it. Tested in Firefox 1.5.0.1, Opera 8.5 and IE 6 (spit) under SP2. My Mac’s asleep so Safari will have to wait.
BTW, the <code> </code> is necessary (in IE at least) so the DOM can get a handle on the object to modify the caption; an empty string or a space just won’t cut it.
Last edited by Bloke (2006-01-31 00:52:06)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#270 2006-01-31 13:00:16
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Hello there.
I have a little request that is not directly related to this great plugin.
In this site I’m building, I need a two-stage article, one mainly built over the article itself (meaning, mainly text and only 4 to 5 thumbnails) and the other focusing on the visual aspect (a bunch of photos and only a preview of the text) – where a full-grown gallery will be displayed.
Since I can’t use rss_thumbpop to build two galleries using the same pictures and the “articlethumbs” tag (I can only classify a picture once, and an article also has a unique id), I decided to simulate a small gallery-like div using the inbuilt txp:thumbnail tag.
After managing to get that small gallery-like “thing” working (thank you all!!).
I realised that this pop-up window delivered by the txp:thumbnail function is really ugly (with scrollbars and all!!).
So I decided to copy the instructions built in this plugin and replace the one included in the taghandlers.php file, under the txp:thumbnail function.
I’ve been messing with the code of both functions (maintaining the original, of course) and trying to understand it, but so far it’s been a catastrophe – I have no programmer skills… at all!
Can someone help-me transforming the txp:thumbnail function so that it outputs a pop-up window similar to the one rss_thumbpop does.
Thanks.
Last edited by patchwork (2006-01-31 14:51:23)
Offline
#271 2006-02-04 14:03:54
- MrsAgentSmith
- New Member
- From: Japan
- Registered: 2006-02-04
- Posts: 2
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Thanks for the awesome plugin. I am replying really quickly as I have been having the same problem as nardo, bloke, et. al. with the usearticle and catfield attributes.
For your reference I’ve included the tag I was trying to create —
<code> <txp:rss_thumbpop mode=“table” orderby=“date asc” showcaption=“0” showalt=“0” divpop=“1” cols=“5” showfullcaption=“1” clickonly=“0” usearticle=“1” catfield=“ImageCat” /></code>
- if you put attributes (and others like clickonly — didn’t test them all tho) in front of “mode” funny things begin to happen.
- for me when I put usearticle / catfield in front of “mode” the (div)pop images will not show but I will get the thumbs… all of them
Last edited by MrsAgentSmith (2006-02-04 15:17:25)
Offline
#272 2006-02-08 05:53:04
- theonlydrew
- Member
- Registered: 2006-01-10
- Posts: 21
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Strange Behavior.
I did get the usearticle/catfield to function. Kind of. It kept showing images from all my categories, and not the one designated in catfield=“custom_field”. So, after playing around I found out that when I made showpagelinks=“0” then the appropriate images from the designated category in my customfield showed! And no other images from any other categories! Woopee! Hoorah! BUT, theres always a but, while looking at the page in debug mode I noticed that there was a tag error:
————
tag_error {txp:rss_thumbpop mode=“table” usearticle=“1” catfield=“custom_9” limit=“8” orderby=“datedesc” pagepop=“1” showpagelinks=“0” cols=“4” showcaption=“0” padwidth=“50” padheight=“50” label=“Images” /} -> Notice: Undefined variable: numPages on line 194
————
Wierd, huh? But if I made showpagelinks=“1”, then no tag error, but then every image from all categories would display!
So, you can see my current tag in the tag error above. I’d like to work this problem out with some folks, but I’m not much of a coder.
Last edited by theonlydrew (2006-02-08 05:56:22)
Offline
#273 2006-02-11 23:02:31
- panik
- Member
- From: Bonn, Germany
- Registered: 2005-08-13
- Posts: 13
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
I had the same problem with the usearticle and catfield attributes. I’m using the following tag in an article-form and it’s working.
<code>
<txp:rss_thumbpop mode=“float” jpop=“1” clickonly=“1” cols=“6” showpagelinks=“0” usearticle=“1” catfield=“custom_1” addpermlink=“0” fullontop=“0” orderby=“dateasc”/>
</code>
Last edited by panik (2006-02-11 23:03:01)
Offline
#274 2006-02-12 07:52:07
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
theonlydrew and panik – I’m having the same troubles with usearticle and catfield. I can’t seem to make it work at all! I’m getting every img in the system dumped out to the screen. I’m using catfield custom_1 and have tried panik’s code – no dice :( Any suggestions?
I’m new to textpattern and still wrapping my head around all of it… Any help would be great! Thanks
I’ve tried a bunch of different attribute combinations, currenlty this is what I’ve got: <code><txp:rss_thumbpop mode=“float” showpagelinks=“0” usearticle=“1” catfield=“custom_1”/></code>
Last edited by rbe (2006-02-12 07:57:30)
Offline
#275 2006-02-12 08:30:06
- panik
- Member
- From: Bonn, Germany
- Registered: 2005-08-13
- Posts: 13
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
rbe, did you put your tag in an article form or in your page template?
my tag is only working in an article form and i had to use <code>addpermlink=“0”</code> to link the thumbnails to the full size image and not to the article again.
Offline
#276 2006-02-12 09:09:58
Re: [plugin] [ORPHAN] rss_thumbpop - Thumbnail Image Gallery w/ popups
Ahaaaaaaaa!
Think I’ve found the bug. It intrigued me that theonlydrew and panik got it to work so I did some digging to find out what was different between their implementations and mine. At first I thought it was the order you specify the arguments (didn’t make sense but I tried it anyway). It didn’t help that I was being a pillock in the first place and using the name I’d assigned to my article as the catfield argument (catfield=“gallery_images” is wrong, it should be catfield=“custom_n” where n was the number of the custom field I was using… what a dumbass mistake, d’oh).
Anyway, after much experimentation, the “trigger” argument appears to be showpagelinks="1"
; as theonlydrew found. I dug around in the code and lo and behold there’s a small bug in the part that handles paging. Go to your (v0.6.1) plugin code, scroll down to just above the halfway point to where it says “// DO PAGING”. On the last line before the } else {
statement, change it from:
$results = safe_rows('*', 'txp_image', $categories.$obfield.' LIMIT '.$offset.','.$limit);
to:
$results = safe_rows('*', 'txp_image', $categories.$artcat.$obfield.' LIMIT '.$offset.','.$limit);
Adding that little .$artcat
to the line appears to make the pagelinks work with usearticle=“1”. Haven’t tested it fully yet but it works for me so far. Hope it works for you guys.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline