Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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 < , > in the source.
</code>
If I could stop it from encoding the special characters I think I could use XHTML in the caption
Refresh Dallas and other Refreshing Cities.
Offline
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
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)
Refresh Dallas and other Refreshing Cities.
Offline
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)
Refresh Dallas and other Refreshing Cities.
Offline
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
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
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)
Refresh Dallas and other Refreshing Cities.
Offline
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
Re: [archived] txp->gallery
thanks elmar! your code works perfectly!!
Offline
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
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