Member
Member
nummell   12-12-2011, 20:04
#1

Hello,

Does anyone knows out to show image descriptions and/or other custom fields in the slimbox?

When I click on a image slimbox opens very nice and shosws only image name and image 1 out of 6... I need to put a description there and a some other extra fields.

Thx in advance

Member
Member
nummell   12-12-2011, 20:14
#2

I don´t know what happened post came blank!!!

Here´s my question again,

Anyone knows how to show the imagem description inside the slimbox?

I can only show the image name, image count (1 of 8) and the close button.
I need to show the image description there and also some icons to link to facebook and other networks.

Anyone got it working?

Thx in advance

Administrator
Administrator
acrylian   12-12-2011, 20:21
#3

No it did not come blank, it was moderated. Which should have been noted right on the forum you used to post. You even should have clicked to acknowledge that.

I think it is not possible to show the description in the slimbox. You will have to do modifications to that. Also note that FB etc buttons will not work as using these boxes there is no page to link to.

Member
Member
nummell   12-12-2011, 20:32
#4

Thanks acrylian,

too bad it doesn´t work, the theme is awsome with that option available it would be perfect.

I´m customizing a site that uses zenphoto with effervescence+ with a lot of modifications and I would love to use that function... Too bad it´s not possible.

About the moderation issue, I´m sorry about that, I did noticed the warning but the post was shoing blank in the forum so I presumed there was some error, didn´t understant the the post would be blank until moderation...

Once again I´m sorry

Best regards

ZenPhoto Rocks

Member
Member
sbillard   12-12-2011, 22:07
#5

If you look at the album.php script where the slimbox is setup you will find a call on annotateImage. It is the output of this function that shows in the "caption" of the slimbox. So you either change the line or change the function depending on how much you want changed.

Always remember. If you are going to modify a theme you should do so from a copy so that future ZP updates do not wipe out your changes.

Member
Member
nummell   13-12-2011, 12:37
#6

Thx sbillard,

I´ve tried and the only thing I´ve managed to do is in functions.php

function annotateImage() {
global $_zp_current_image;
if (!$_zp_current_image->getShow()) {
$tagit = "\n".gettext('The image is marked not visible.');
} else {
$tagit = 'THIS IS A TEST';
}
return sprintf(gettext('View the image: %s'),GetBareImageTitle()).$tagit;
}

text appears fine in the slimbox but I still can´t put in the image description there, and if I try to put a text link there it will show up on the album page and not on the slimbox.

This is all i´ve managed to do so far...

Administrator
Administrator
acrylian   13-12-2011, 13:05
#7

As said above if you use an kind of *box for image display only you cannot link to the individual images (except you want to use the full image).

On how to get the image desc I recommend to rewiew the object model and theming tutorials.

Member
Member
nummell   13-12-2011, 17:38
#8

Progress...

I´ve managed to show the image description inside the slimbox.
In functions.php

REPLACED:
function annotateImage() {
global $_zp_current_image;
if (!$_zp_current_image->getShow()) {
$tagit = "\n".gettext('The image is marked not visible.');
} else {
$tagit = '';
}
return sprintf(gettext('View the image: %s'),GetBareImageTitle()).$tagit;

}

WITH:
function annotateImage() {
global $_zp_current_image;
if (!$_zp_current_image->getShow()) {
$tagit = "\n".gettext('The image is marked not visible.');
} else {
$tagit = "\n".getImageDesc('');
}
return sprintf(gettext('View the image: %s'),GetBareImageTitle()).$tagit;

}

Halfway trough the desired result...
To show only text just type the desired description

And the result I was after...
Type the folowing in the description box:

And you get the link working in the slimbox...

It would be nice if someone who realy understands php to clean up the code or maybe even turn this idea into a plugin or something.

I´m using this as a links page for a custumer, I know it isn´t the cleanest code and not a fully function plugin but I´m just a designer who does a little bit of freelance work to some friends. In this case it´s for a tattoo studio and I was asked to leave the links page as if it was a gallery page so this is the best I can do.

I hope someone grabs this idea and turn it into a "real" function of zenphoto.

Thanks for the help

Member
Member
nummell   13-12-2011, 17:47
#9

Acrylian I forgot to coment the href to put inside the description so it´s showing as a link...

Can you edit or delete the post please?

Sorry about that... Newbie typing :P and I´m not used to write in forums

Administrator
Administrator
acrylian   13-12-2011, 17:48
#10

Great if you got this working for your purpose. Doing a plugin for htis would mean you have to make a slimbox one first.

I don't think we will do as we ship actually Colorbox which is more or less the same based on jQuery instead of Motools (it is in Eff+ actually for legacy reasons I think).

But of course maybe someone else will.

Btw, I removed your link as I saw nothing Zenphoto related there actually (more a placeholder)

Member
Member
nummell   13-12-2011, 18:07
#11

Thanks acrilyan, the link was just to show how to write the description so it would become a link...
something like:

href='http://zenphoto.org.com'>CLICK HERE TO VIEW THE SITE

Member
Member
nummell   13-12-2011, 18:08
#12

Sorry... Can´t figure out how to block the links... please delete it

Administrator
Administrator
acrylian   13-12-2011, 19:01
#13

It is pretty simple: either use oder `backticks

Member
Member
sbillard   13-12-2011, 19:07
#14

Slimbox is indeed legacy code in Effervescence+. But no plans to change it--"If it is not broke...."

Member
Member
nummell   14-12-2011, 12:31
#15

Acrylian:
Once again... sorry for the mistake and thanks for your pacience with newbies.

Sbillard:
Effervescence+ is awsome, don´t change anything about it. I only needed to make this change because it was requested, because in my opinion slimbox is perfect as it is... clean and simple.
A sugestion (If I´m allowed) for a next release, maybe use jquery to show album description over the thumbnail when hovered.

Keep it up

Administrator
Administrator
acrylian   14-12-2011, 12:50
#16

No problem, just wanted to point out how to do it..;-)

For suggestions best use the bugtracker, otherwise it tends to be forgotten in the stream of forum posts.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.