Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2004-05-29 06:37:52

elmar
Member
From: Southern Germany
Registered: 2004-03-22
Posts: 24
Website

Re: [archived] txp->gallery

tinyfly,
why do you want xhtml in the image captions? If you just want to style it, you can set up a container with an id, then use the txp gallery tag descID=“your_id” to replace it. I will fiddle around and see if xhtml works, but I think this would be the way to do it.

Offline

#14 2004-05-29 16:38:45

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [archived] txp->gallery

I am doing a portfolio site for a sculptor and I have information like the title, material, dimensions, and a short description. I would like to be able to markup each of those properties independently of the others.

<code>
right now if I put something like <h3> in the caption it strips the < > and changes it to &lt , &gt in the source.
</code>

If I could stop it from encoding the special characters I think I could use XHTML in the caption

Offline

#15 2004-05-30 09:13:10

elmar
Member
From: Southern Germany
Registered: 2004-03-22
Posts: 24
Website

Re: [archived] txp->gallery

The problem is, the caption is stored in the “title” property of the image tag. I don’t think you can put xhtml there, but I could certainly be wrong.

What about a different approach? Make each piece of sculpture an article and use excerpts and the <txp:thumbnail id=“image_number”> tag for the index. That’s what I did for my gallery page. The thumbnail tags are not in yet (g1.19 I hope) but Dean describes the code here. Then you can set up each piece any way you like. I made a form that shows the excerpt and title and links back to the article. It would certainly do what you want, but might be a bit more work.

Last edited by elmar (2004-05-30 09:22:23)

Offline

#16 2004-05-30 16:24:23

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [archived] txp->gallery

Thanks elmar,

I will try the approach you suggested, it will probably look better anyway.

By the way, I really like your site. Nice work!

Last edited by tinyfly (2004-05-30 16:24:57)

Offline

#17 2004-06-01 19:03:03

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [archived] txp->gallery

> I wrote earlier:

Is there a way that I can change the plugin so that it accepts xhtml tags in the caption of the image?

An example would be the uploaded links in TP. You can put XHTML in the Description to format it. I would like to do this with image captions.

Last edited by tinyfly (2004-06-01 19:04:09)

Offline

#18 2004-06-03 22:36:50

jennycheuk
Member
Registered: 2004-03-15
Posts: 15
Website

Re: [archived] txp->gallery

Can anyone kindly provide an example (xhtml/ css code) of the usage of imageID and descID? I just cannot figure out what should i put inside the tag in order to change my layout , as I want the big image float right of the thumbnails and flollows with the description(image caption).

Offline

#19 2004-06-04 05:43:22

elmar
Member
From: Southern Germany
Registered: 2004-03-22
Posts: 24
Website

Re: [archived] txp->gallery

Here is a samle of the tags from my site:

img id=“img” src=”/images/29.jpg”
div style=“text-align:center” txp:gallery category=“chichihuistan” wraptag=“div” break=” “ imageID=“img” descID=“desc” usethumbs=1 /div br=“clearboth” /

span id=“desc”>Sabine’s horse, Rancho Chichi /span (I can’t get the code to work with Textile here…)

This puts the thumbnails under the picture and then a caption. You will need to play with the css to get you thumbnails on the side, a float:left in the div should do it. Import is to identify the image and caption and then use imageID and descID to replace them. Good luck!

Last edited by elmar (2004-06-04 05:50:01)

Offline

#20 2004-06-04 12:59:39

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [archived] txp->gallery

elmar wrap your code in the < code> < /code tags> (without the extra spaces I added) then textile won’t mess with your formatting.

Last edited by tinyfly (2004-06-04 13:00:15)

Offline

#21 2004-06-04 15:45:46

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [archived] txp->gallery

I have installed everything as per your instructions and I am getting the following error:

Parse error: parse error, unexpected T_STRING in /homepages/24/d100711248/htdocs/evolutiondesigns.org/textpattern/publish.php on line 30

This is what my file looks like:

include txpath.’/lib/txplib_db.php’; include txpath.’/lib/txplib_html.php’; include txpath.’/lib/txplib_forms.php’; include txpath.’/lib/txplib_misc.php’; include txpath.’/lib/admin_config.php’;

include txpath.’/publish/taghandlers.php’; include txpath.’/publish/log.php’; include txpath.’/publish/comment.php’; include $txpcfg[‘doc_root’].’/plugin_gallery.php’ ob_start();

And if I leave the space between the includes and the ob_start line then I get the same error, but on line 31.

Any thoughts?
I’m sure it’s something silly, but I’m pretty new at this php thing.

Thanks for any assistance in advance.

Offline

#22 2004-06-04 20:01:20

jennycheuk
Member
Registered: 2004-03-15
Posts: 15
Website

Re: [archived] txp->gallery

thanks elmar! your code works perfectly!!

Offline

#23 2004-06-04 20:10:04

elmar
Member
From: Southern Germany
Registered: 2004-03-22
Posts: 24
Website

Re: [archived] txp->gallery

soulship,

mine publish.php file looks different: max say to put the include after ob_start, like this:

include txpath.’/lib/txplib_db.php’; include txpath.’/lib/txplib_html.php’; include txpath.’/lib/txplib_forms.php’; include txpath.’/lib/txplib_misc.php’; include txpath.’/lib/admin_config.php’;

include txpath.’/publish/taghandlers.php’; include txpath.’/publish/log.php’; include txpath.’/publish/comment.php’;

ob_start();

//GALLERY include $txpcfg[‘doc_root’].’/plugin_gallery.php’;

maybe that will help.

Offline

#24 2004-06-05 00:00:39

nimnix
Archived Plugin Author
Registered: 2004-05-26
Posts: 63
Website

Re: [archived] txp->gallery

my database has a custom prefix before the table, so when I first installed the gallery it didn’t work. Nothing would show up from the gallery tags.

I had to do a quick-fix for it…

for the line
“select * from txp_image”,

I had to change it to
“select * from “.PFX.“txp_image”,

I’m not sure if anyone else had this problem, but I thought you should know.

Cool plugin though :)
Works great!


textpattern.org :: find and share Textpattern resources
textpattern.net :: TextBook – Textpattern wiki

Offline

Board footer

Powered by FluxBB