Indexhibit
Index + Exhibit

Login:

Created by
Daniel Eatock
Jeffery Vaska
And You

title of the image in a random image format

 

Indexhibit version: 2.0
Thread is resolved.

yvidal
ISRAEL
2 year(s) ago
Permalink Post

can not see the title of the image in a random image format.
yoramvidal.com

Best Answer!
arsondpi
GREECE
2 year(s) ago
Permalink Post

edit the random image plugin, find line 45 and replace it with:

$s .= "<img src='" . $OBJ->vars->images[0][$rand]['media_path'] . "' /><p class='random_img_title'>" . $OBJ->vars->images[0][$rand]['media_title'] . "</p>";

then in your style.css add a css rule for the title
.random_img_title { ... }

yvidal
ISRAEL
2 year(s) ago
Permalink Post

thanks, now it is working

drhyt
UNITED STATES
2 year(s) ago
Permalink Post

Thanks, arsondpi, but now I'm wondering: How to get the caption also to show up?

drhyt
UNITED STATES
2 year(s) ago
Permalink Post

Also, to make the code validate on W3C I had to add alt='' to it, i.e.

  1. $s .= "<img src='" . $OBJ->vars->images[0][$rand]['media_path'] . "' alt='' /><p class='random_img_title'>" . $OBJ->vars->images[0][$rand]['media_title'] . "</p>";
matthewsstuart
UNITED KINGDOM
2 year(s) ago
Permalink Post

Hi Yvidal and Arsondpi,

I've done the code for the random image plugin although not sure what I need to put in the CSS Style page. Please can you advise?

Thanks

Stuart

stuartmatthews.eu

arsondpi
GREECE
2 year(s) ago
Permalink Post

The css class is .random_img_title

matthewsstuart
UNITED KINGDOM
2 year(s) ago
Permalink Post

Thanks for your response Arsondpi.
I'm still struggling were to put the .random_img_title code in the style .css (line number) Do I need to also enter any of the code that I put on line 45 in the random image plugin?

Will this then allow me to switch on and off the captions with indexhibit backstage?

Thanks for you help.
Have a good New Years!

Stuart

arsondpi
GREECE
2 year(s) ago
Permalink Post

- put this anywhere on your style.css
- yes
- no titles will always be visible.
You can duplicate format.random_image.php with your ftp application and rename the duplicate to format.random_image_with_titles.php and work on that file.

matthewsstuart
UNITED KINGDOM
2 year(s) ago
Permalink Post

Thank you very much Arsondpi!

Best

Stuart

Showing 1 - 10 of 10 posts in Forum » Customize » title of the image in a random image format
 

This thread has been closed, thank you.