vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Repeating an image ? (https://vborg.vbsupport.ru/showthread.php?t=148466)

wolfe 05-30-2007 08:58 AM

Repeating an image ?
 
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

1 Attachment(s)
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:
Code:

<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:
Code:

<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

Quote:

Originally Posted by wolfe (Post 1264093)
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.


All times are GMT. The time now is 07:05 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01108 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete