Using <wpg2> in blog entry only displays album highlight photo

scottkct

Joined: 2007-05-20
Posts: 9
Posted: Tue, 2007-11-06 15:26

This is at least the trend I've seen. No matter what image I select in the MCE image chooser, only the highlight photo is displayed. When I change the highlight photo for a blog entry already published, the photo changes in the blog too.

My question is is there a way to change this function so that when <wpg2> is used it uses the selected image? I have all my images in blog entries linking to the parent album. I want to keep that but choose whatever image I want.

I know that if I select the insert option under "Press button to insert checked image(s)" it insert an HTML link which gives me more control but I don't know where to edit the predefined HTML code that is insert by selecting this. I don't want to have to go into the code of the blog entry and modify the link code with the same mods every time.

Scott
http://www.karieandscott.com

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Tue, 2007-11-06 17:55

With the current backend, we cannot make a <wpg2> tag for an album display anything other than the highlight. This is because we're still using the ImageBlock module for rendering WPG2 tags and that's all it can do. That's why the G2Image chooser only says "Insert a WPG2 tag for the current album:" and does not have an option in the dropdown for a WPG2 tag for the image with a link to the album.

In WPG2 3.1, we're going to drop ImageBlock and build our own HTML, like G2Image already does. This will allow us to do things like what you're asking for. But short of the two weeeks work that I have ahead of me porting the code from g2image into wpg2, it's not possible now.

In the "How to Insert Image" dropdown, there is already an option for "Thumbnail with link to parent album" which does what you want to do.

The code for generating the HTML links is in g2image/jscripts/functions.js

And it was cool to see that you got to go up into the Leaning Tower of Pisa. When I was there in 1999, they had it closed for stabilization. Good to see that it's open again.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
scottkct

Joined: 2007-05-20
Posts: 9
Posted: Tue, 2007-11-06 21:10

awesome thanks. I'm pretty sure as long as I can mod the HTML link code to mimic what is inserted by <wpg2> then I'm set.

Yes I remember the whole ordeal spent on keeping the tower from falling over. I wanted to climb it while I could now that they are letting people back up.

Scott
http://www.karieandscott.com

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2007-11-06 21:59

Yeah I am disappointed I also missed climbing it but my Mate went recently and got some pretty good shots from the Tower which just makes me want to go back and climb it :)

We have a few features in mind for albums, once we move away from the limitations of the Gallery2 Imageblock it will allow us to be more creative with some pretty cool sideshow scripts etc..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation