View Full Version : Repeating an image ?
wolfe
05-30-2007, 08:58 AM
is it possible to repeat an image thats not in the database
example if a user has 10 posts i want this image to repeat once and if they have 20 i want it to repeat twice etc
any ideas.
WetWired
05-30-2007, 01:12 PM
Well, you'd probably need a custom plugin to do what you want normally. If you use the image as a background, you can do it by changing the size of the container. For example:
<if condition="$postsbarwidth=$post['posts']/10">
<div style="background-image:url(images/myrepeatingimage.gif);background-repeat:repeat-x;height:15px;width:{$postsbarwidth}px;padding:0px ;"><img src="$vboptions[cleargifurl]" alt="" height="15" width="$postsbarwidth" /></div>
</if>
This will show 1 px of width for every 10 posts for a images/myrepeatingimage.gif up to 15 px high. If you want to show full images, you can upload the attached plugin to allow use of intval, then change the conditional to something like:
<if condition="$postsbarwidth=intval($post['posts']/10)*15">where 15 is the width of the image.
I'm sorry, I'm affraid that this is pretty complicated...
wolfe
06-08-2007, 12:28 PM
thx m8 but i was woundering if it was possible to repeat the same image again and again every xx posts
like pip1.gif = 0 posts then pip1.gif x 2 = 25 posts etc
thx inadvance
nexialys
06-08-2007, 12:33 PM
something like Ranking for Images in Posts... hum, strange... lol
wolfe
06-08-2007, 12:34 PM
whys it strange m8
nexialys
06-08-2007, 12:51 PM
nothing personal wolfe, it's just the "reason why it would be useful"... i'd like to have your reason here, so maybe we can have a more precise code to offer... you explain what you intend to do, but not the reason why...
programming is about reasons/targets, not means... :)
wolfe
06-08-2007, 01:24 PM
m8 i released a hack https://vborg.vbsupport.ru/showthread.php?t=148482 which i want to make smaller using image repeat
WetWired
06-09-2007, 01:56 PM
thx m8 but i was woundering if it was possible to repeat the same image again and again every xx posts
like pip1.gif = 0 posts then pip1.gif x 2 = 25 posts etc
thx inadvance
That's what I explained how to do.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.