Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2004-05-20 13:01:07

Dean
Founder (Gone, but not forgotten)
From: Languedoc
Registered: 2004-02-14
Posts: 235
Website

Re: Using the new image gallery tags

Sounds like a plugin :-)


text*

Offline

#32 2004-05-21 18:15:30

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

Re: Using the new image gallery tags

Did I miss it or is there a way to output the caption of each image?

Offline

#33 2004-06-22 17:39:53

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

Re: Using the new image gallery tags

I tried this from the beginning and all I get is a blank page. Not sure why. When I look at the source on the page, It is the photo_page I created (absent the php tags of course) but nothing comes up.

I think I’m missing a step as to how to get the image category connected.

ugly but <a href=“http://notsotalkative.com/” target=”_blank”>Here it is</a>. Click the first article called <b>Following the instructions from a tut</b>
Help is greatly appreciated.

Last edited by Tek (2004-06-22 17:41:55)

Offline

#34 2004-06-23 17:31:34

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

Re: Using the new image gallery tags

Tek, are you using the built-in txp gallery method (<code><txp:image_index /> </code>, etc. ) or are you using a plugin?

Offline

#35 2004-06-24 00:31:42

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

Re: Using the new image gallery tags

I actually just copied the html that Dean posted above, just to see if I could get it to work. and in that html he used <b>txp:image_index</b> or <b> txp:image_display</b>

Offline

#36 2004-06-24 02:23:03

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

Re: Using the new image gallery tags

This is how I set it up (I don’t know if this is the best way but I wanted a section page that would show up in my pulldown menu)…

I have a category in my images called “Rainbow Mountain”, each has a 50×50px thumbnail. I created a section “galleries” that uses a page called “galleries”. In that page I have:

<code><a href=“http://marcia.textdrive.com/galleries?c=Rainbow%20Mountain”> &#183; Gallery: Rainbow Mountain</a><br />
<txp:image_index />
<br />
<txp:image_display /></code>

(Right now I just have one category to display). When I go to index.php?s=galleries I get the link to “Rainbow Mountain gallery”, I click that then it displays the gallery with thumbnails. I thought I’d add more categories later, and add an href for each category. I think that will work but haven’t tried it.

Offline

#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

Board footer

Powered by FluxBB