Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2004-06-24 08:23:52

pwg
Member
From: *sunny* Melbourne, Au
Registered: 2004-02-24
Posts: 14
Website

Re: Using the new image gallery tags

I’m using the standard tags, too.

Like everyone else, it seems, I wanted to display the description with the main image. Unfortunately I wasn’t able to figure out the PHP to pull it from the Txp database. So I’m using a little scrap of javascript to display the ‘ALT’ data instead.

I have <txp:image display /> wrapped in a div with and id of ‘image’. So the following javascript that I place at the location where I want the ALT text to display is:

<code><script language=“javascript”>var myAlt = document.getElementById(‘image’).getElementsByTagName(‘img’)0.alt;
document.write(myAlt);</script></code>

I’d really rather have the in-line PHP to grab the description, however. Can someone help me with that?

Last edited by pwg (2004-06-24 08:26:16)


Peter Gallagher — www.petergallagher.com.au — inquit pty ltd

Offline

#38 2004-06-24 15:36:25

Tek
New Member
Registered: 2004-06-03
Posts: 5

Re: Using the new image gallery tags

I guess where I’m missing understanding is with this part
“a href=“http://marcia.textdrive.com/galleries?c=Rainbow%20Mountain”>

Last edited by Tek (2004-06-24 17:37:14)

Offline

#39 2004-06-24 18:13:59

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

Re: Using the new image gallery tags

To refer back to what Dean wrote originally:

Then to call the gallery page (provided it is in the section ‘photo’), use:

your-txp-site.com/photo/?c=IMAGECATEGORY

You would have to write the link yourself Textpattern doesn’t generate the links for you.

Also, this only works if you are using “Clean URL” mode.

Last edited by tinyfly (2004-06-24 18:17:11)

Offline

#40 2004-06-24 18:53:29

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

Re: Using the new image gallery tags

I’ve got image names (alt tag) and captions displaying, pulled from the database:

<p>&lt;span class=“sidebar_head”>gallery&lt;?php</p> $imgid = $_GET[

Last edited by nimnix (2004-06-25 16:19:52)


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

Offline

#41 2004-06-24 18:57:13

Tek
New Member
Registered: 2004-06-03
Posts: 5

Re: Using the new image gallery tags

Yep, Now I got it!
Thanks for your help! Sometimes it’s a reach to make the connections.

Offline

#42 2004-06-24 19:17:57

trailgirl
Member
Registered: 2004-06-04
Posts: 68
Website

Re: Using the new image gallery tags

Very cool, nimnix, thanks!

Offline

#43 2004-06-24 19:31:08

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

Re: Using the new image gallery tags

thanks :)
If anyone uses it, let me know if there are problems (don’t need bugs running around on a client site LOL)


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

Offline

#44 2004-06-25 15:52:13

Benoit
Member
From: Montreal, QC
Registered: 2004-05-23
Posts: 26
Website

Re: Using the new image gallery tags

Nimnix, using the code above I get a parse error: blog-cafe/textpattern/publish.php(793) : eval()’d code on line 28

I also noticed you changed the page since putting up the link above. Any code change as well?

I take it that the span is only to define the CSS layout of the index part?

Offline

#45 2004-06-25 16:18:55

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

Re: Using the new image gallery tags

interesting, can you send me the link so I can see the error? or better, the code for the page (unless you removed the code already)

The changes to the page I made were
1. some basic style changes
2. the images in the gallery
3. functionality changes – when you’re in the “gallery” or “about liquidfire” sections, I have some articles with the categories “code” and “design”. Normally, in those sections you see the gallery or the static text I made for the about section. When you click on “code” or “design” (on the right under “notes”), it switches the display to show those articles, instead of the gallery image or static code.

4. I also made a small change to the gallery code to pull the category name, instead of “gallery”.

Actually, the span tag in that code is for the text – “gallery – image name”

The index code (containing the thumbnails) is in a block of code above the span tag:

The full code (without the category name and article changes):

&lt;div id=

Last edited by nimnix (2004-06-25 16:23:04)


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

Offline

#46 2004-06-25 16:30:24

trailgirl
Member
Registered: 2004-06-04
Posts: 68
Website

Re: Using the new image gallery tags

Benoit, did you copy and paste the code from the forum? If so, the forum displays quotation marks as smart quotes and you have to change them to straight quotes. If you are on a Mac, there’s a nifty little Mac OS X Service that will do this for you, unfortunately I can’t remember at the moment where I got it :-(

Offline

#47 2004-06-25 16:57:58

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

Re: Using the new image gallery tags

good to know, next time I’m using text files LOL


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

Offline

#48 2004-06-25 18:44:26

Benoit
Member
From: Montreal, QC
Registered: 2004-05-23
Posts: 26
Website

Re: Using the new image gallery tags

Trailgirl, bless you. That is precisely what I had done. It works perfectly now. I just have to mess with the formatting so it suits my needs.

Nimnix, thanks for sharing that code!

Offline

Board footer

Powered by FluxBB