vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Random Images Anywhere (https://vborg.vbsupport.ru/showthread.php?t=94433)

jugo 08-15-2005 10:00 PM

Random Images Anywhere
 
1st of all I really love this plugin stuff.

Now for the Release. Please be gentle as this is my first release ever.

I want to thank Loneranger because I used his XML file as a template for mine. This was fun to make. I hope you guys enjoy it.

This will allow you to display random images anywhere you want.

Features:
  • Reads from a specified directory.
  • Only reads files whose filenames contain your specified text delimeter.
  • Can specify file extensions to display (GIF JPG PNG)
  • Perfect for babe of the week, etc.

See a working example here: http://www.freaks-network.com/forum/

The header images on the left will change whenever the page is refreshed.

Note: This generates a variable. Just insert the following wherever you want the random image to appear:

PHP Code:

$randpic 


Xepher 08-16-2005 01:32 PM

This hack has allowed a different asspect on our site. But you could use it for just about anything.

We diplay multiple games just to give a different look to the site...

Job well done Jugo... :ninja:

Cyricx 08-16-2005 02:10 PM

That's awesome!!!

Only thing I'd request is a way to do it based on the style rather then a global setting.

That way you can have one style that scrolls through X banners, and another style that scrolls through a whole different set.

Vizionz 08-16-2005 02:40 PM

good idea :)

jesus likes pie 08-16-2005 03:17 PM

umm you guys are forgetting to click install i think :P

Indeed it is....AWESOME.

gentle enough for ya? (:P)

Hopefully I can get this to work with the gallery.....so instead of the newest 5 showing...it gets 5 random ones. I'll try it out.

Vizionz 08-16-2005 03:20 PM

i ddidnt install it cause i have not found a use for it yet but it sounds like a good idea

jugo 08-16-2005 03:23 PM

Quote:

Originally Posted by Cyricx
That's awesome!!!

Only thing I'd request is a way to do it based on the style rather then a global setting.

That way you can have one style that scrolls through X banners, and another style that scrolls through a whole different set.


Hmmm...I'll look for the style specific hook (if there is one). Thanks all.

jesus likes pie 08-16-2005 03:23 PM

Hey do you mind if I copy some of your images on your site?

Cyricx 08-16-2005 03:23 PM

If he can make it work on a per style basis rather then a global setting, I'll most definately install it and click install :D

Vizionz 08-16-2005 03:28 PM

me too cause then i know i could use it :)

ggiersdorf 08-16-2005 11:38 PM

When you say stle specific vs global? are you talking about templates?

sorry n00b here

If you have 1 style will thsi work fine?

jugo 08-17-2005 12:20 AM

It's set up to work on any style. it will display the same group of random images on whichever style you set it up on.

What they want is a way to specify different sets of random image groups per style. (I working on it but it's a little frustrating).

MRGTB 08-17-2005 01:17 AM

Great plugin. I would image if you run a portal for example. You could just add the random varable to an empty block and it would display random images there also as well as adding the varable to your forum page.

jugo 08-17-2005 11:39 AM

Correct...that is the beauty of it. That it just creates a global variable that you can pretty much put anywhere.

bonnmac 08-17-2005 09:00 PM

will this work with flash also .swf thanks

jugo 08-18-2005 01:34 AM

In order for this to work with flash, some modifications would need to be made including the rewrite of the output code to include the oblect embed code required for flash movies.

Brinnie 08-19-2005 07:40 AM

so can i display it on an extenal page or a completly different website if I wanted?

Living in music 08-19-2005 09:11 AM

In order to works,how do I declare(means that:to view 2 or 3 image,how I fill that blank) information at Image Filename Delimeter frame for this mod?

b6gm6n 08-19-2005 10:13 AM

bloody good job!, cheers, clicks install!

-b6

GrendelKhan{TSU 08-19-2005 11:21 AM

hmm..installed but couldn't get it to work

did I do this right?
  1. for the PATH and URL to Images, I used:
    h ttp://ww w.mysitename.com/forums/images/random/
    (I created a folder called "random")

  2. then all the images I uploaded to this folder I put
    _rand_ at the beginning of the file name.

    eg: _rand_STAR.jpg

  3. then stick $randpic in wherever (whatever template) I want the image to appear.
-----------------------


all I got was an X and htt p://w ww.mysite.com/forums/images/random/ file path (notice it didn't actually find an image file :( )

what'd i do wrong? any help would be appreciated?

jugo 08-19-2005 11:52 AM

Quote:

Originally Posted by Brinnie
so can i display it on an extenal page or a completly different website if I wanted?


Ummmm...yes to the top one as long as you include GLOBAL.PHP (correct me if I am wrong Master Coders) :nervous: ..

And no to the second one because it creates the variable for the current page.

Quote:

Originally Posted by Living in music
In order to works,how do I declare(means that:to view 2 or 3 image,how I fill that blank) information at Image Filename Delimeter frame for this mod?

if your delimeter is "rand" then the filenames of your random images shoulr start or contain "rand" in it.

for example, in your images directory you have the following files:

image_01.gif
paramond.lpg
test.png
randcrazy.gif
randplay.png
collosal.gif
randjugo.jpg

Since the delimeter is "rand" the only files that will be cycled in the script are:

randcrazy.gif
randplay.png
randjugo.jpg

Quote:

Originally Posted by GrendelKhan{TSU
did I do this right?
[list=1]for the PATH and URL to Images, I used:
h ttp://ww w.mysitename.com/forums/images/random/
(I created a folder called "random")


The URL is correct BUT the PATH has to be the filesystem path as in "/home/name/public_html/forums/images/random/"

ggiersdorf 08-19-2005 12:11 PM

Can I use this in multiple locations on my site? Say one in a portal and one in a forum dedicated to a specific subject?

Almost ready to hit install :)

Cyricx 08-19-2005 01:39 PM

Thought for ya Jugo on the per style thing.

What if the delimiter was set per style?

Then as you describe it would only grab the images that started with that delimiter so if for example if you had the images

style_a_image1
style_a_image2
style_b_image1
style_b_image2

then you would set the delimiter for style a to "style_a" and similiar for style b

It may be completely off from how it would have to be done, just spitting ideas out from my insane noggin for ya as I know the style thing is giving ya a headache :)

jugo 08-19-2005 02:29 PM

Quote:

Originally Posted by ggiersdorf
Can I use this in multiple locations on my site? Say one in a portal and one in a forum dedicated to a specific subject?

Right now it just uses one variable, so it will display the same image on every page. I just paused my brain and though of it, it is definitely possible. But I'm gonna try and figure out the following request first.

Quote:

Originally Posted by Cyricx
Thought for ya Jugo on the per style thing.

What if the delimiter was set per style?

Then as you describe it would only grab the images that started with that delimiter so if for example if you had the images

style_a_image1
style_a_image2
style_b_image1
style_b_image2

then you would set the delimiter for style a to "style_a" and similiar for style b


I got the settings all set for this, except that for some reason the code is not parsing correctly....it's still using the same image for both and it's not picking up the style ID correctly...

been trying to get some help from the "Master Coders" here but two posts and no response yet....i'll wait and explore until i get it though, cause I like this idea.

ggiersdorf 08-21-2005 07:40 PM

Jugo any anwsers on my post? Or are you working on something else?

Sai01 08-28-2005 07:58 AM

i don't get this...where do i put the picture and how many picture can be rotated?

jugo 08-29-2005 12:28 PM

Quote:

Originally Posted by ggiersdorf
Jugo any anwsers on my post? Or are you working on something else?

Read the post right above yours...i answered it.

Quote:

Originally Posted by Sai01
i don't get this...where do i put the picture and how many picture can be rotated?

Put the images wherever you want...Just make sure that their names includes the "delimeter" you speify in the settings and that they are within your web accessible directories. There's no limit to the number of images (although I don't recommend having hundreds and thousands of images because that may slow down the script...

ggiersdorf 08-29-2005 02:40 PM

Jugo I have an Idea that you might be able to help with. I want to place the random image in the background of the New Thread/ Reply Box and set the Size of those boxes to a fixed size. Would you know how to accomplish this?

It would make a Unique experience. (Obvoiusly the images need to be somewhat translucent)

jugo 08-30-2005 11:43 AM

Quote:

Originally Posted by ggiersdorf
Would you know how to accomplish this?


You can use this as well. Just use the variable as your background image like this:

HTML Code:

style="background: URL($randpic);"
and that should cycle through the images and place them as the background image.

ggiersdorf 08-30-2005 12:31 PM

Quote:

Originally Posted by jugo
You can use this as well. Just use the variable as your background image like this:

HTML Code:

style="background: URL($randpic);"
and that should cycle through the images and place them as the background image.

Jugo sorry to be a twit, but how can I use this in the CSS section: I dont want to add the HTML I cant to apply it to the WYSIWYG editor in the CSS section. What command would that use?

ohgenki 08-31-2005 01:54 AM

can we have a link for the pic?

Boofo 08-31-2005 02:20 AM

I need this for headers and calendar pics? How can I use it for both since they have separate pics? ;)

jugo 08-31-2005 11:57 AM

Quote:

Originally Posted by ggiersdorf
Jugo sorry to be a twit, but how can I use this in the CSS section: I dont want to add the HTML I cant to apply it to the WYSIWYG editor in the CSS section. What command would that use?

I'm not sure if you can parse variables in the CSS, BUT if you can, then all you have to do is go to where you would set up the background color and font style (in the all style options section of the Styles section) and inset:

Code:

background: URL($randpic);
in the "Extra CSS" Sextion.

jugo 08-31-2005 11:58 AM

Quote:

Originally Posted by Boofo
I need this for headers and calendar pics? How can I use it for both since they have separate pics?


I am working on an update that you can have multiple delimeters. This way you can have more than one variable.

Thanks to you and the other people who suggested the idea.

Boofo 08-31-2005 05:51 PM

Quote:

Originally Posted by jugo
I am working on an update that you can have multiple delimeters. This way you can have more than one variable.

Thanks to you and the other people who suggested the idea.

I'll be looking forward to it. ;)

cyclical 09-07-2005 11:31 PM

just coming through... Jugo how goes the different templates thing?

jugo 09-07-2005 11:55 PM

I found the solution for the different style one and will be posting it in a couple of days.

Next i'll work on the Multiple variable version.

cyclical 09-08-2005 12:31 AM

sweet..

I had to do it the semi ghetto way... looking forward to seeing yours.

:)

Mr Peabody 10-01-2005 09:12 PM

Great hack cheers!

BradE 10-01-2005 10:09 PM

If you could add links to the images this would be a very effective and simple banner ad system for folks that don't need something fancy.


All times are GMT. The time now is 04:47 PM.

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.01353 seconds
  • Memory Usage 1,829KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete