coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upgrading => Topic started by: jsivins on May 14, 2006, 07:13:36 PM

Title: BBCode URL not working on the thumbnail view
Post by: jsivins on May 14, 2006, 07:13:36 PM
One of the sites I maintain with CPG 1.4.5 lost the BBCode to "hot link".. Anyone know how to reactivate them in the thumbnail view?? They work fine when bring up the full image.. Any help soon would be grateful..
Title: Re: BBCode URL not working on the thumbnail view
Post by: Joachim Müller on May 14, 2006, 10:59:01 PM
I don't understand a word. Post a link to the page in question and (if needed) a non-admin test user account.
Title: Re: BBCode URL not working on the thumbnail view
Post by: jsivins on May 16, 2006, 05:05:05 AM
visit http://www.allornothingtattoo.com/gallery/ (http://www.allornothingtattoo.com/gallery/) and if you go to the album thumbnails view, the BBCode of URL is no longer active, but checking the settings BBCode is enabled. You can see that the BBCode works when you click to see the full image..
Title: Re: BBCode URL not working on the thumbnail view
Post by: Tranz on May 16, 2006, 05:23:31 AM
In include/functions.inc.php

FIND:
            $caption .= $row['caption'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['caption']))."</span>" : '';

REPLACE with:
            $caption .= $row['caption'] ? "<span class=\"thumb_caption\">".bb_decode(process_smilies($row['caption']))."</span>" : '';

@devs: I guess I've encountered and answered this question before because I have the above code in my own installation, but forgot why I had implemented it. Is there a reason why strip_tags() was used on the caption?
Title: Re: BBCode URL not working on the thumbnail view
Post by: Joachim Müller on May 16, 2006, 08:48:10 AM
none that I'm aware of.
Title: Re: BBCode URL not working on the thumbnail view
Post by: jsivins on May 16, 2006, 03:55:20 PM
That worked perfectly..  ;D

Thanks for the assist.. I can to the HTML stuff now.. LOL
Title: Re: BBCode URL not working on the thumbnail view
Post by: Tranz on May 16, 2006, 05:47:51 PM
Quote from: GauGau on May 16, 2006, 08:48:10 AM
none that I'm aware of.
Should the code in svn be updated with this change?
Title: Re: BBCode URL not working on the thumbnail view
Post by: Joachim Müller on May 17, 2006, 12:43:34 AM
hm, I'm not sure - this might have a security impact that we're not aware of right now. Could you please check the commit history of the file and check when the line in question has been changed and what the commit comment was? I'm not 100% sure that we're not going to re-open a security vulnerability there.
Title: Re: BBCode URL not working on the thumbnail view
Post by: Nibbler on May 17, 2006, 01:35:39 PM
It's not very enlightening

Quote
------------------------------------------------------------------------
r2427 | donnoman | 2005-08-07 23:55:48 +0200 (Sun, 07 Aug 2005) | 2 lines

Added strip_tags to caption_in_thumbview

------------------------------------------------------------------------
Title: Re: BBCode URL not working on the thumbnail view
Post by: Joachim Müller on May 17, 2006, 01:40:13 PM
Sent Donnoman a PM, asking him to take a look into this thread. Thanks for looking this up.

Joachim
Title: Re: BBCode URL not working on the thumbnail view
Post by: Tranz on May 17, 2006, 04:48:53 PM
I searched the forums and found where donnoman talked about the code change: http://forum.coppermine-gallery.net/index.php?topic=15639.msg72916#msg72916

So it seems to be for security reasons, due to user-contributed comments.

Thanks for finding that entry, Nibbler. I looked at the svn log but didn't see anything helpful.
Title: Re: BBCode URL not working on the thumbnail view
Post by: donnoman on June 25, 2006, 04:54:05 PM
Sorry Gaugau, for some reason I missed your PM, however the linked thread did describe why I did it.

If y'all don't think theres a problem showing the bb_decoded items then you can commit that change. I just couldn't bring myself to open it up; my paranoia got the better of me.
Title: Re: BBCode URL not working on the thumbnail view
Post by: Ardath Rekha on August 29, 2006, 01:22:53 AM
Could that maybe be an option in the Config menu, whether to allow or disallow it?  Several of my older galleries, that I'm upgrading, rely very heavily on special formatting and links in the thumbnail views. I was tearing my hair out trying to figure out why all of my formatting had stopped working until I found this thread.
Title: Re: BBCode URL not working on the thumbnail view
Post by: Joachim Müller on August 29, 2006, 08:04:46 AM
Did you read the thread Thu refered to? Do you have cpg1.4.9? Post a link to your coppermine-driven gallery.