Svarrers Gallery and html in titel

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
bastingse
Posts: 308
Joined: Fri Jun 06, 2008 9:38 pm
Location: Netherlands
Contact:

Svarrers Gallery and html in titel

Post by bastingse » Sun Jan 24, 2010 8:51 am

Using Michael Svarrers Gallery-Plugin It would be cool if you could type html in the titel of a photo. So that visitors could visit a website releated to the photo when they see the lgihtbox version of it and clicking then on the titel.
As a admin I did go to the details from a photo and then where you type the titel and did type this:

if you want to see more of this just click <a target="_blank" href="http://www.more.com">here</a>.

Now, when i see the thumbnailpage i see the following below the thumbnail:

here." class="picture">

When i click on the thumbnail and i get the lightbox photo i do see the correct text on the bottom left.
How can i get this away on the thumbnailpage?

Any help is much appreciated!!!

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Svarrers Gallery and html in titel

Post by Holger » Mon Jan 25, 2010 8:51 am

Hi Emile,
bastingse wrote:How can i get this away on the thumbnailpage?
There is a setting in the configuration to hide the title on the thumbnail-page:

show title thumb [true/false] If titles are enabled, "false" will hide the titles on the thumb page


Holger

bastingse
Posts: 308
Joined: Fri Jun 06, 2008 9:38 pm
Location: Netherlands
Contact:

Re: Svarrers Gallery and html in titel

Post by bastingse » Mon Jan 25, 2010 8:59 am

Hi Holger, thanks for repley! I didn't explain enough what i mean. I indeed set the configuration to show no title on the thumbnail-page and that works perfect, it shows no title above the thumb. But because (i think) i use html in the title it shows here." class="picture"> under the thumb.

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Svarrers Gallery and html in titel

Post by Holger » Mon Jan 25, 2010 9:05 am

Ah, I see.

I remember that we had some postings on that in the past.
So I'll have a closer look on it tonight.
Coming back ASAP.

Holger

bastingse
Posts: 308
Joined: Fri Jun 06, 2008 9:38 pm
Location: Netherlands
Contact:

Re: Svarrers Gallery and html in titel

Post by bastingse » Mon Jan 25, 2010 9:07 am

cool! Thanks... having late shift today so i read about it tonight when i get home :-)

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Svarrers Gallery and html in titel

Post by Holger » Mon Jan 25, 2010 9:09 am

bastingse wrote:cool! Thanks... having late shift today so i read about it tonight when i get home :-)
Hope that I'll get it.

Holger

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Svarrers Gallery and html in titel

Post by Holger » Mon Jan 25, 2010 9:54 pm

Hi Emile,

I've made some tests and found the problem:

The thumbnail itself is covered by a link. Let's say like

Code: Select all

<a href='imageblah" ....><img source="blah" alt="blah" class="picture" /></a>
Now you put your code into the "alt" of the image-tag.
This will result in a code like this:

Code: Select all

<a href='imageblah" ....><img source="blah" alt="<a target="_blank" href="http://www.more.com">here</a>" class="picture" /></a>
This code will brake after the first </a> of course.

So there's no chance - beside coding - to get what you want.
It will work in some browsers when you write your link without double quotes, because the title is saved with htmlspechialchars().

Code: Select all

<a target=_blank href=http://www.more.com>here</a>
But this will cause validation errors and may not work with every browser.

WBR
Holger

bastingse
Posts: 308
Joined: Fri Jun 06, 2008 9:38 pm
Location: Netherlands
Contact:

Re: Svarrers Gallery and html in titel

Post by bastingse » Mon Jan 25, 2010 11:07 pm

Holger wrote: It will work in some browsers when you write your link without double quotes, because the title is saved with htmlspechialchars().

Code: Select all

<a target=_blank href=http://www.more.com>here</a>
But this will cause validation errors and may not work with every browser.

WBR
Holger
Well, that did the trick!! Thanks Holger!!! Good job. It is working in Firefox and also on IE !!!! :P :P :P
Thanks a lot!!!! :!:

Post Reply