PDA

View Full Version : Overlay Round Image for Photopost vBgallery


Lizard King
08 Jan 2006, 13:38
I was looking for this kind of modification for a long time. Last night i worked on it and figured out a way to do this.

Upload overlay-round.gif to your style's misc folder.

Open adv_gallery_imagebit
find :
<div align="center" style="margin-top:5px;margin-bottom:5px">
<a href="showimage.php?$session[sessionurl]i=$images[imageid]$adv_sorturl"><img alt="$images[title]" border="0" src="$images[url]" /></a>
</div>


replace with :

<div align="center" style="background-repeat: no-repeat; background-position: center; background-image: url($images[url]);" class="alt1">
<a href="showimage.php?$session[sessionurl]i=$images[imageid]$adv_sorturl"><img alt="$images[title]" border="0" src="$stylevar[imgdir_misc]/overlay-round.gif" /></a>
</div>

Optional :

If you like to add any background color you shall use the following code instead of the one above
<table width="105" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="105" align="center" style="background-repeat: no-repeat; background-position: center; background-image: url($images[url]); background-color: #000;">
<a href="showimage.php?$session[sessionurl]i=$images[imageid]$adv_sorturl"><img alt="$images[title]" border="0" src="$stylevar[imgdir_misc]/overlay-round.gif" /></a>
</td>
</tr>
</table>

In order to change the background color just change #000 to any color you like. I added a screenshot for the background color.

You are ready to go.

Demo (http://www.ayyas.com/galeri/)

* You need to have Photopost vB gallery installed for this mod.

Stangsta
08 Jan 2006, 14:53
Nice mod.....but it doesnt automatically fit the thumbnails. :( Ill attach a screenshot in a sec.

Lizard King
08 Jan 2006, 15:05
Nice mod.....but it doesnt automatically fit the thumbnails. :( Ill attach a screenshot in a sec.

What is your thumbnail size in your gallery settings ?

Stangsta
08 Jan 2006, 15:11
What is your thumbnail size in your gallery settings ?it was 125, i tried 100 and the same thing happens.

Lizard King
08 Jan 2006, 15:15
it was 125, i tried 100 and the same thing happens.

Did you rebuild your thumbnails ? after changing to 100 ?

i checked with opera , firefox and internet explorer and the code is working.

Edit : can you try this :
<div align="center" width="105" height="105" style="background-repeat: no-repeat; background-position: center; background-image: url($images[url]);" class="alt1">
<a href="showimage.php?$session[sessionurl]i=$images[imageid]$adv_sorturl"><img alt="$images[title]" border="0" src="$stylevar[imgdir_misc]/overlay-round.gif" /></a>
</div>

Stangsta
08 Jan 2006, 15:25
Did you rebuild your thumbnails ? after changing to 100 ?

i checked with opera , firefox and internet explorer and the code is working.

Edit : can you try this :
<div align="center" width="105" height="105" style="background-repeat: no-repeat; background-position: center; background-image: url($images[url]);" class="alt1">
<a href="showimage.php?$session[sessionurl]i=$images[imageid]$adv_sorturl"><img alt="$images[title]" border="0" src="$stylevar[imgdir_misc]/overlay-round.gif" /></a>
</div>Hmmmm. I rebuilt the thumbnails and that didnt help much. I tried the above code, also a no go. It must be a setting on my end, I just dont know which one :(

EDIT: I think if you could make it so the .gif conforms to the thumbnail sizerather than a static size....we would be golden!

Lizard King
08 Jan 2006, 15:33
Hmmmm. I rebuilt the thumbnails and that didnt help much. I tried the above code, also a no go. It must be a setting on my end, I just dont know which one :(

EDIT: I think if you could make it so the .gif conforms to the thumbnail sizerather than a static size....we would be golden!

This is just a simple solution. In order to do what you must ask we need a java to resize the background image. i'll check that.

b6gm6n
08 Jan 2006, 17:31
nice hack, photopost of course has had these for about a year!... :)

-b6

Snake
08 Jan 2006, 20:09
Nice mod!

lazyseller
08 Jan 2006, 21:36
how would i go about adding this to the profile picture ? i thinkt hat would be a nice addition...

Barakat
09 Jan 2006, 09:52
great work thank .

Lizard King
09 Jan 2006, 11:03
how would i go about adding this to the profile picture ? i thinkt hat would be a nice addition...

I will try to add a java so the background image will autosize. Without it i think it will not be so good for profilepictures since every profile picture will have a different size.

lazyseller
10 Jan 2006, 01:28
thanks... and you are right... i tried messing with this but its to complicated for me

GoTTi
17 Mar 2009, 02:28
whatever happened with the auto resize?

also, is there a way for the image to load ontop of the pulled graphic for background?