![]() |
Installed in my Forum (Vbulletin 3.5 Gold)
Great Job! |
Excellent work!
|
Is there a way to have the image have a link to it???
Thanks, Itworx4me |
Awesome Plugin Jugo!! Thanks.
Can this Plugin be used multiple times, i mean more than one directory? Suppose on forumhome i want to use one directory ie. thumbnail from gallery and also on that same page i want to fetch images from another directory. ie. images gaming arcade images directory. That would be quite wonderful. Thanks |
Quote:
|
Does the hack auto size or thumbnail an image? Also has anyone used this in CMPS?
|
Great hack. Works like a dream.
EDIT: Actually, it doesn't. Tunrs out if you use it in your header, and the board is closed, it won't work. |
2 questions
could a random background image be inserted by using HTML rather than css ... ie. background="$randpic"? |
Quote:
|
n00b question....
I have just installed this, and I have three different banners saved in a file. I'm pretty sure that I have the relative path correct, and I know that I have the URL correct, however I do not know where or how to place the $randpic variable. I tried just replacing the title image path in the AdminCP -> Style Manager -> StyleVars with the variable name, however when I do that I just get the default link to appear, and no image at all. Can someone provide some clear instructions on how to do this? TIA - Justin |
very nice :)
Click install ;) i'm a prob, look please: My code actual: Code:
<td class="alt1" width="100%"> Code:
<td class="alt1" width="100%" style="background: url($randpic);"> |
What if I wanna do this for my imagecash gallery how would I make it read all the files in a gallery? Or for another site?
|
Quote:
Is anyone using this with vb 3.5.0? If so, could you tell me where to place the variable in order to make this work? I'm lost.... - Justin |
Quote:
<tr> <td>$randpic</td> </tr> Something like that where ever you want it on your board. You will need to modify the template. |
Quote:
Can you tell me the name of the template that needs to be modified to add this? - Justin |
Can this be modified (or is there another hack) so I can put random quotes on my forum? So I need it to work with text not images, with some kind of text manager.
(...and yes I realise I could use some kind of JS code in the forum header...I'm just asking if there's a specific VB hack). Cheers. |
That's cool - thx a lot. Works great. Use it for my coppermine gallery and i can change width and height from the pictures in the plugin-system. :nervous:
|
Can this be also included in signatures?
|
Is there any way to make the image clickable?
i.e. I specify a url for each image, and it allows you to click on the image and go there? |
Quote:
Sorry I haven't been around...I'll get toi most of these questions...BUT this one specifically, I'll create soon. I have something like this running at this site: http://www.miworldwide.com Look at the bottom right and refresht he page.... |
Quote:
|
Quote:
If you're daring enough you can modify it to only generate the actual image url OR I can modify the release a bit more and make it generate TWO variables... $randpic which will generate the full "<img" tags as normal and $randpicurl which will only generate the image's url |
Quote:
This hack does not create thumbnails or autosize anything. It just displays the image in it's full glory. It should work in CMPS as it is called in the global_start hook. |
Quote:
Experiment with this on a test style. (I have a separate style set up in vB that I turn on when I want to test stuff like this and then I turn it off once I am done. If things work, then I go and change the live styles for the users.) 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> Code:
<td align=center><a href="$vboptions[forumhome].php$session[sessionurl_q]">$randimg</a></td> If anyone else can chime in on this with confirmation or corrections, that would be great. |
I am looking at this product for a type of picture banner.
The challenge that I have is that I want the banner to be made up of many different pictures. Is it possible to replicate the part of the xml file to generate several variables? Perhaps $randpic1 $randpic2 $randpic3 etc.... for as many as I wanted to have lined up in the banner? |
I decided to take a run at making the changes myself and it worked out okay after a bit of trial and error.
I checked with jugo before posting this. All I did was add code into the xml file to generate more variables. From this: Code:
$rand = mt_rand(0, $i); Code:
$rand1 = mt_rand(0, $i); In my case I wanted to use it to display a different row of pictures everytime a page loaded. You can see how it came out at www.moparnuts.com I want to tweak things a bit to make it dsiplay a little cleaner. Maybe add a resize function or fix up the justification to get things centered and fill up the white space. I would like to suggest another idea as well. I'm not sure if I'll be able to figure this one out. Is there a way to have the name of the file show up as a tooltip when a user hovers their mouse over the picture. It would be great if you could parse out the prefix and file extension too. With this new idea, I'd like to have the filenames represent the user that owns the car. That way, when someone hovers over the picture, they get a tooltip that tells who owns the car... Thanks again, jugo, for a great tweak! |
Quote:
Thx again. Nice work and very useful. |
Quote:
|
Quote:
I'm not sure how valuable it is to everyone else, but it at least serves as an example of some changes that can be added. I'll leave it to jugo to decide if it should be added to the product. For the record, I got the parsing code from an example in the PHP online manual and adjusted things to suit my needs. I added a function and a couple of working variables at the top of the PHP code in the xml file: Code:
function remover($string, $sep1, $sep2) Sending "some text (a note) some more text" with "(" and ")" as $sep1 and $sep2 would return "a note". I added in the strlen call so that it would strip out whatever is used for the delimiter. And then I use another variable and assign the results of the function to it. Then the variable gets used in the building of the value for randpic# which is the variable that you can then use anywhere you want the picture to show up. Code:
$randpic1 = $imgurl.$files[$rand1]; The only trick to this is to make sure that whatever you use for the banner prefix delimiter, it should be unique in the entire url of the file. Otherwise the remover function will stop on the first instance of the delimiter and you'll get whatever is left of the url as a tooltip. So, using "banner" as your delimiter wouldn't work if you put all of your files in a directory called banner..... "/images/banner/bannerimage1.jpg" would give you "/bannerimage1" as the alt text... not really a problem, but that's not what I was after. I wanted to see "image1" come up. You could easily solve this by adding another character in the file name after banner and making that your delimiter. "/images/banner/bannertimage1.jpg" and a delimiter of "bannert" would work just fine. Thanks again to jugo for the great work. I would not have been able to get this banner thing working without the headstart that his product provided. |
Quote:
Code:
"<img src=\"".$randpic."\" border=\"0\" alt=\"\" />"; Code:
"<a href="http://www.website.com" target="_blank"><img src=\"".$randpic."\" border=\"0\" alt=\"\" />"; If it's the original image file, that might not be too hard as I think the information necessary is already part of the product. If it's something else, then I think you're pretty much looking at hard coding it right into the code example above or generating the links in some other way. I might take run at this and link my banner pics to the user's profile. I'll post my results here with jugo's permission of course. I may not get to this until next week, though. |
I must be a complete noob because I cannot get this to work at all.. my big question is what template and where do you add $randpic???
|
Well, really, you can put it wherever you want the picture to show up.
In my case, I edited the header, and put the variables right under the logo. All you have to do is put the variable in where you want it. You can format it if you want, too. I have mine in a table like this: Code:
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center"> |
still ain't working... below is my header code...
where do i put the code you suggested? <!-- logo --> <a name="top"></a> <table border="2" bordercolor=#3E5C92 bgcolor=#738FBF width="$stylevar[outertablewidth]" cellpadding="2" cellspacing="2" align="center"> <tr> <td align="center"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td> <td align="$stylevar[right]"> </td> </tr> </table> <!-- /logo --> <!-- content table --> $spacer_open $_phpinclude_output |
<!-- logo -->
<a name="top"></a> <table border="2" bordercolor=#3E5C92 bgcolor=#738FBF width="$stylevar[outertablewidth]" cellpadding="2" cellspacing="2" align="center"> <tr> <td align="center"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td> <td align="$stylevar[right]"> </td> </tr> </table> <!-- /logo --> $randpic <!-- content table --> $spacer_open |
still not working... i know i have my paths set correctly for the images but they are not showing up...
|
just figured it out... i didn't have the trailing front slash for the paths... thnx fellas...
|
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']; |
can't seem to get this working for me, no matter where i put the $randpic it still doesn't show. I've tried all kind of different paths and it still hasn't worked.
|
make sure there are no trailing slashes on your paths.... that's what screwed me up...
Quote:
|
Quote:
|
All times are GMT. The time now is 04:17 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|