Recent Topics

1 Mar 08, 2007 14:10    

My b2evolution Version: Not Entered

Hello,
I'd like to use an image as a link to view the rest of a post, basically to replace the "Click here to read more"-type text you see when you use the teaser function.

However, I want the image to be different based on the post it's linking to.

Since I'm the only one who will be using this blog, and I won't be using this feature very often, it's okay if it's a pretty sloppy hack.

I first thought about putting the "more" tag inside of an "a href" tag that's around an image, but that obviously won't work (for one the more tag would come before the image, and two, the more tag creates a link, not just the address of the post).

I tried to find where in the source code the more tag gets translated into a link to the post, but I had no luck. It'd be awesome if I could pass the tag the address to the image when I'm composing my post, and have it use that instead of the normal text.

Anyone have any ideas about what I can do or where I should look?
Thanks in advance.

-James

P.S. Version 1.9.2

2 Mar 08, 2007 17:07

I might be getting close. I've figured out how to use $Item->get('...') to pull certain info about the post into the HTML (which I could then use to create a unique file name for each image).

However, the value I really want to pull up is post_ID (as it's referred to in the database) but I'm not sure where to find the variable.

I'm extremely new to all this (I have general programming experience) and am learning a lot, but am still missing a lot of pieces. How can I add my own property to the "item" class and fill it with the post_ID?

4 Mar 08, 2007 17:52

That's the page I was looking at. I found $Item->get('title') and used it to do what I wanted, but I had to name pictures the same as titles, which could get messy with spaces/odd characters. I couldn't find $Item->ID anywhere, but that's just what I was looking for! Thanks.

5 Mar 08, 2007 17:56

Damn, that's the first time I've been on the same page as anybody!

¥


Form is loading...