coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: will on February 27, 2006, 10:07:21 PM

Title: Loading Image
Post by: will on February 27, 2006, 10:07:21 PM
Hi all

I wanted to add this to the background of the picture when loading and the picture loads over the top, where do I add it?

Title: Re: Loading Image
Post by: lordprodigy on February 27, 2006, 11:56:27 PM
It has been previously done as part of a larger mod, but you can take the code that applies to your request (Loading... bg image). Find it here

http://forum.coppermine-gallery.net/index.php?topic=13718.msg63430#msg63430

As far as I know, it is not tested for 1.4.x so report back if you get it to work.
Title: Re: Loading Image
Post by: will on February 28, 2006, 12:38:52 AM
I have tried to change theme.php with the following:

In your /themes/{theme_name}/theme.php find this:

Code:
$template_thumbnail_view = <<<EOT

In this block find
Code:
{THUMB}

change it to
Code:
<div id='photoholder'>{THUMB}</div>

find
Code:
$template_display_picture = <<<EOT

in this block find
Code:
{IMAGE}

and replace it with
Code:
<div id="photoholder">{IMAGE}</div>

I'm using Rainy Day theme and I cannot find any of this code that i need to replace in my theme.php file ???
Title: Re: Loading Image
Post by: lordprodigy on February 28, 2006, 12:42:41 AM
if you dont have $template_thumbnail_view in the theme you are using, then copy it from the theme.php provided in the sample theme. Same goes for $template_display_picture. If you still have problems, be patient for a Dev to give you advice...
Title: Re: Loading Image
Post by: will on February 28, 2006, 01:00:40 AM
Sorted that part now, thanks

Where do I add the following to template.html

#photoholder {
                  url('/themes/rainy_day/images/loading.gif') 50% 50% no-repeat;
}
Title: Re: Loading Image
Post by: lordprodigy on February 28, 2006, 07:05:38 AM
that goes in your theme's css file.
Title: Re: Loading Image
Post by: lordprodigy on February 28, 2006, 06:23:32 PM
I tested it and it works. However you have to make few updates to bring the code up to date to 1.4.x:

instead of:$template_display_picturelook for $template_display_media

oh and the url was wrong. use this path url('images/loading.gif') 50% 50% no-repeat;
as the css file and the images folder are in the same place.

make sure your bg image is really really small in kb otherwise it wont surve you well...
Title: Re: Loading Image
Post by: will on March 03, 2006, 10:52:58 PM
Done that but it still isn't working ???
Title: Re: Loading Image
Post by: lordprodigy on March 06, 2006, 10:11:11 PM
try again, and pay attention to the different steps involved. I did exactly what was said in the thread and it worked fine ...