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)

DefenceTalk 11-29-2005 03:35 PM

Quote:

Originally Posted by c0rupted
nope.

Nice hack. You know what would be cool? Turn this into a random thumb rotator for forum images (category image) hack out here somewhere.

concepts 12-10-2005 04:27 PM

How do I put this into a module? for my CMPS?

DA KING 12-14-2005 02:44 AM

its not working for me! HEEEEEEEEEEEELP!

I have tried everything!

my site is "www.dawire.net"

the PATH for my site is "public_html/forums/images/randompics/"

My delimiter is "random" and I even went a inserted that in all my pics in that directory.

I even put the "$randpic" code in the header template and I get is a big red X. Can someone help me please?

dodgechargerfan 12-15-2005 10:34 PM

Has anyone figured out if certain browsers or I don't know what might cause the variable to not work?

I have one user that cannot see the images on his home computer, but can on his work computer.

I got a copy of the source grabbed from View Source in IE and the IMG code that would normally get placed where the $randpic# variable is in the code is simply not there at all.

It's like his browser doesn't process the variable.

So instead of this:
Code:

<td align="center"><img src="http://www.moparnuts.com/forums/images/banner/qnutsbobs70gtx2.jpg" border="0" alt="bobs70gtx2" width=200 /></a></td>
his browser has this:
Code:

<td align="center"></a></td>

dodgechargerfan 12-15-2005 10:47 PM

Quote:

Originally Posted by DA KING
its not working for me! HEEEEEEEEEEEELP!

I have tried everything!

my site is "www.dawire.net"

the PATH for my site is "public_html/forums/images/randompics/"

My delimiter is "random" and I even went a inserted that in all my pics in that directory.

I even put the "$randpic" code in the header template and I get is a big red X. Can someone help me please?

I'm not sure what the fix is , but I can see what's going on.

You're generating this for the images:
Code:

<img src="attachment.php?attachmentid=35&stc=1&thumb=1" border=0 align="center">
The variable should be generating something more like a url.
Code:

<img src="http://www.moparnuts.com/forums/images/banner/qnutsbobs70gtx2.jpg" border="0" alt="bobs70gtx2" width=200 />

dodgechargerfan 12-18-2005 12:10 PM

Quote:

Originally Posted by dodgechargerfan
Has anyone figured out if certain browsers or I don't know what might cause the variable to not work?

I have one user that cannot see the images on his home computer, but can on his work computer.

I got a copy of the source grabbed from View Source in IE and the IMG code that would normally get placed where the $randpic# variable is in the code is simply not there at all.

It's like his browser doesn't process the variable.

So instead of this:
Code:

<td align="center"><img src="http://www.moparnuts.com/forums/images/banner/qnutsbobs70gtx2.jpg" border="0" alt="bobs70gtx2" width=200 /></a></td>
his browser has this:
Code:

<td align="center"></a></td>

I have now seen this problem on my own computer with a portal page that I am building. The banner shows up fine on the regular forum pages, but not in the banner. When I look at the generated source, I see everything but what would have replaced the variable - like the second code example above.

dodgechargerfan 12-18-2005 12:55 PM

Quote:

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

I've been looking at this one and am about to test it on a drupal portal.

I think there's two ways to go about this.

1. drupal's index.php is pretty simple and has a couple of includes. Adding another would be pretty simple.

2. one of the includes that drupal has is common.inc which has a bunch of functions that get used by various modules of drupal. I am going to try and add the function from your xml file into that include file and see how it goes.

I would suspect that any other portal solution would have similar architecture that one could take advantage of.

Does anyone see any issues with either of these approaches?


I guess that including global.php would be a good thing to do if there were other functions/features that we could take advantage of in the portal.
I just started the portal stuff 3 days ago, so I have no idea if there is anything in global that would be beneficial.

MSheraz86 12-18-2005 09:00 PM

Quote:

Originally Posted by dodgechargerfan

Look for:
Code:

<td align=center><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
CHANGE to:
Code:

<td align=center><a href="$vboptions[forumhome].php$session[sessionurl_q]">$randimg</a></td>

Correction is as follows :D
Code:

<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]">$randpic </a></td>
It's $randpic not $randimg :)

Some TOUGH mod to figure out at start but thanks to you i've managed to get there :nervous:.

It's just what i was looking for ;) Great mod!

Dsyn11 01-13-2006 05:43 PM

this works fine EXCEPT on index.php home page. What's going on?

matt_turpin 01-18-2006 11:53 AM

I installed this on my FFXI message board, and it's a huge hit. I have about 107 game screenshots from my game group. Only having one show at a time, randomly, on the frontpage is a fun way to keep everyone's interest. Some members have claimed to just sit clicking refresh to see all the pics. For being a vBulletin newbie, I didn't have too much trouble getting it to work. Installing the plugin was pretty easy. I had a little trouble figuring out what the plugin wanted for the directory location (not the directory URL). The hardest part for me was making a table that looked like a vBulletin table and putting it on the page in a way that didn't break formatting or anything. But, as I mentioned, I'm still learning. It's a really cool plugin though - the first modification other than a style change I've done so far.

Big_Ern 02-03-2006 06:53 PM

Quote:

Originally Posted by concepts
How do I put this into a module? for my CMPS?

has anyone figured out how to do this?

Dsyn11 02-13-2006 12:35 AM

Ditto on the CMPS thing. it doesn't work.

Dsyn11 02-18-2006 04:31 AM

Is this thread abandoned? CMPS, anyone?

jugo 03-10-2006 01:44 PM

Quote:

Originally Posted by fabriceg
Hi,

Sorry for this silly question, but? where did you set vars (the path, etc.) ?

$folder = $vbulletin->options['randimg_path'];
$imgurl = $vbulletin->options['randimg_url'];
$exts = $vbulletin->options['randimg_types'];


In the vBulletin Options.

jugo 03-10-2006 01:45 PM

Quote:

Originally Posted by Dsyn11
Is this thread abandoned? CMPS, anyone?


Sorry, been very busy lately.

This should enable the variable in any template for any vB Powered page which includes the global_start hook.

I will investigate if this is not the case and fix it.

again, sorry for the absence.

Giray 03-19-2006 11:50 AM

Does the $randpic variable work only in templates or also in phrases?

snowman872 03-21-2006 01:48 AM

I've installed this hack and use it to display a random photo of certain forum members at the top of each page. Everyone likes this feature, but multiple people have asked if there is a way I can identify the person in the picture. At present I just a static (generic) "Forum Member" description under it.

It would be a awesome enhancement to this hack, if each image in the random pool could be associated with a particular short line of text for a description. The description could display under the image.

Thanks!

Giray 03-21-2006 02:27 AM

Worst case scenario, why not add the text to the 'image' itself? Just add a little band at the bottom and write you caption in Photoshop... Just a thought :knockedout:

KevinL 03-28-2006 12:45 PM

This works great! Just what I was looking for!

dodgechargerfan 03-30-2006 12:07 AM

Quote:

Originally Posted by snowman872
I've installed this hack and use it to display a random photo of certain forum members at the top of each page. Everyone likes this feature, but multiple people have asked if there is a way I can identify the person in the picture. At present I just a static (generic) "Forum Member" description under it.

It would be a awesome enhancement to this hack, if each image in the random pool could be associated with a particular short line of text for a description. The description could display under the image.

Thanks!

I wanted something similar - I wanted the tool tip to have the username in it when you hovered your mouse over the picture.

I managed to get it done.
https://vborg.vbsupport.ru/showpost....3&postcount=69

I suppose you could tweak that to put the name underneath the picture using just some html.

The trick is that the text is part of the filename.

Another thing: that function looks for .jpg and strips it out. So, it messes up this name support for other file types. The random picture code will still work but the name will say "filename.gif" instead of "filename"

HobbiesPR 03-31-2006 11:35 PM

Quote:

Originally Posted by DA KING
its not working for me! HEEEEEEEEEEEELP!

I have tried everything!

my site is "www.dawire.net"

the PATH for my site is "public_html/forums/images/randompics/"

My delimiter is "random" and I even went a inserted that in all my pics in that directory.

I even put the "$randpic" code in the header template and I get is a big red X. Can someone help me please?

I had this problem for some hours until I discovered that the relative PATH in my case have to be c:\Inetpub\dir\dir\etc\images because I run on Windows 2003 Server. Finally got it to work.

finn snor 04-22-2006 01:36 PM

Where do i put the $randpic in this header ?

Quote:

<!-- logo -->
<a name="top"></a>
<div align="center" class="element_outer_border">
<div align="center" class="element_inner_border">
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" class="element_header_bg">
<tr>
<td align="$stylevar[left]" valign="top" height="112"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<!-- /logo -->

jugo 05-24-2006 09:21 PM

Anywhere you want it to show up.

ggiersdorf 05-24-2006 09:24 PM

I really would like a time setting for the image to rotate so I can set it to change images every X seconds or hours.

ThomasR 06-23-2006 11:47 AM

Jugo: bcause it still not possible to use a different set of randem image for each template, then, is it possible to install this product twice, with, for each, different parameters ?

Thanks!

PoetJA-1975 12-03-2006 11:10 AM

Thanx!

Jacquii.

Krieg 01-15-2007 11:56 AM

Quote:

Originally Posted by c0rupted (Post 835628)
nope.

c0rupted, your 'PATH to images' is wrong, it should be something more like /kunden/homepages/htdocs/forums/images/random

Krieg 01-15-2007 12:14 PM

Quote:

Originally Posted by Big_Ern (Post 889555)
has anyone figured out how to do this?

When you use the CMPS tables as a new template, its content should look like this :

Code:

<tr>
<td class=alt1>
$randpic
</td>
</tr>

at least mine looks like this ;)

burntire 05-18-2007 07:00 AM

Great Mod.

snake-boy 06-16-2007 03:18 AM

Will this work in 3.6.x generation? (Fingers crossed).

CodeRed 01-06-2008 11:21 PM

First off, this is a great little plugin... props to jugo!

one quick question...

is anyone else having an issue with the images not being random in FireFox?

It refreshes everytime and changes the image in Internet Explorer but in Firefox the same image remains time and time again.

Just checking thanks!

Rob Hephner 04-01-2008 09:52 PM

Quote:

Originally Posted by Krieg (Post 1159731)
When you use the CMPS tables as a new template, its content should look like this :

Code:

<tr>
<td class=alt1>
$randpic
</td>
</tr>

at least mine looks like this ;)

OK, I have messed with this for an entire day and cannot get it to work on a CMPS page.

I can get a box that looks as if it is collapsed, but that's it. (It is not collapsed, just small)

The box will show with random pictures using the preview button in the module edit section, but does not work on any page.

I am on vB 3.6.8 and I am wondering if that is where my problem lies??

Any help?

theOZer 04-02-2008 07:27 PM

A 'Heads Up' to people testing vB370RC2. This hack appears to still be working correctly/properly in vB370RC2.
Great hack.
Easy to set up.
Works.

todosbaneados 04-06-2008 04:31 PM

It works with 3.6?

theOZer 04-06-2008 06:43 PM

Try it. I had written my own randomizer for 36x but it doesn't work in 37x so I tried this hack in 37x and, voilĂ , this hack worked in 37x.
Remember to use the (default) _rand_ as a file prefix for your pics (jpgs, gifs, pngs).
~OZ

MoviePropCollec 09-27-2008 07:33 AM

How do you use this?

Where are the instructions?

theOZer 10-01-2008 05:33 PM

Copy your pics you want displayed into Images/Misc, adding prefix _rand_ to the jpeg filenames.
Here's an example of adding $randpic to the Header template:
<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]
<else />
$randpic
</if>
~OZ

MoviePropCollec 01-03-2009 05:43 PM

Huh?

domainmagick 01-22-2009 02:38 AM

tested/working on 3.8?

thecore762 04-26-2009 04:41 AM

Hmm, is it possible to incorporate this with vBadvanced?


All times are GMT. The time now is 04:21 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.01656 seconds
  • Memory Usage 1,839KB
  • 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
  • (11)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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