Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) [new mod] Random pic tag for template.html (Read 6344 times)
cae
Senior Member
****
Offline


No risk, no fun

Posts: 337
Joined: Jul 19th, 2001
Gender: Male
[new mod] Random pic tag for template.html
Sep 26th, 2001 at 4:01pm
Print Post  
Description: This gives you two new YaBB tags for the template.html to display a random pic.
Installation:
1. FIRST creat a directory called "randpics" (all lowercase!) WITHIN you avatars directory
2. Install the mod as usual
Now you can place as many pics as you want in the "randpics" dir.
In your template.html you can use these new tags:
Code
Select All
<yabb randpic>
 


  --> will be replaced with: <img src="$facesurl/randpics/[random.pic]">
Code
Select All
<yabb randpicname>
 


--> will be replaced with the URL to the random pic only. This can be used like that:
Code
Select All
<img border=10 src="<yabb randpicname>">
 


for example.
Download: http://www.cae-home.com/random_pic_tag.zip
Background: I'm just creating a board together with a friend and wen can't decide which one's logo to put on the board... Roll Eyes now we have multiple logos and, one of them displayed randomly and everybody is happy Grin

Please test it and report Wink
  



Back to top
ICQ  
IP Logged
 
Jalapeno
Full Member
***
Offline


Whoever dies with the
most toys wins!

Posts: 222
Joined: Jul 3rd, 2001
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #1 - Sep 26th, 2001 at 6:51pm
Print Post  
Great idea.

Great mod.

Works just fine.

Look here: www.salsashark.de/cgi-bin/YaBB.pl
  

Webmaster of www.salsashark.de
Back to top
WWWICQ  
IP Logged
 
killa-b
Senior Member
****
Offline



Posts: 350
Joined: Aug 5th, 2001
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #2 - Sep 27th, 2001 at 1:09am
Print Post  
if i may suggest... put an option in the admin center so the random pic folder's path can be selected like all the other directories and make a variable like $randdir, that way, users can put it wherever they want and name it whatever they want...
  
Back to top
WWW  
IP Logged
 
cae
Senior Member
****
Offline


No risk, no fun

Posts: 337
Joined: Jul 19th, 2001
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #3 - Sep 27th, 2001 at 1:58am
Print Post  
I could... but i didn't for that reason: This is quite a simple mod. Adding an option to the admin-center could lead to conflicts with other mods, which I wanna avoid. Creating a new dir within YaBBImages/avatars may not the the most ellegant way, but works for sure without having to know the absolute path and stuff.
  



Back to top
ICQ  
IP Logged
 
killa-b
Senior Member
****
Offline



Posts: 350
Joined: Aug 5th, 2001
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #4 - Sep 27th, 2001 at 2:22am
Print Post  
yeah, i see that... just a suggestion Smiley
  
Back to top
WWW  
IP Logged
 
cae
Senior Member
****
Offline


No risk, no fun

Posts: 337
Joined: Jul 19th, 2001
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #5 - Sep 27th, 2001 at 3:52am
Print Post  
Sure, I'm always open of any idea what to change Wink
  



Back to top
ICQ  
IP Logged
 
Jalapeno
Full Member
***
Offline


Whoever dies with the
most toys wins!

Posts: 222
Joined: Jul 3rd, 2001
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #6 - Sep 27th, 2001 at 5:54pm
Print Post  
Well, if that's the case, here we go:

I have the random pic right at the top left part of my template. ( www.salsashark.de/cgi-bin/YaBB.pl ) Now, my members asked if it was possible to have different random pictures for the different boards. For example:

There's a board which deals with the NBA (basketball in the US).
There's a board which deals with the BBL (basketball in Germany).

My members asked if it was possible that on the NBA board, the random pics are chosen from a dir called, for example, "NBApics", which only contains pictures concerning the NBA, while on the BBL Board, the pics are chosen from a dir called "BBLpics" which contains a different set of pics.

Get it?
Possible?

(I told my members no, not possible, but I still thought I'd ask).
  

Webmaster of www.salsashark.de
Back to top
WWWICQ  
IP Logged
 
cae
Senior Member
****
Offline


No risk, no fun

Posts: 337
Joined: Jul 19th, 2001
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #7 - Sep 27th, 2001 at 6:45pm
Print Post  
Got it Wink
I just look at the code and it should be possible. But I'm too lazy to write a configuration screen for that, so you'll have to hard code stuff if you don't mind Roll Eyes
Will get back later and post the instructions.
I'll be out tonight, so maybe tomorrow.
  



Back to top
ICQ  
IP Logged
 
Jalapeno
Full Member
***
Offline


Whoever dies with the
most toys wins!

Posts: 222
Joined: Jul 3rd, 2001
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #8 - Sep 27th, 2001 at 6:52pm
Print Post  
Great. Thanks. As long as you tell me exactly what to do I don't mind modifying the files manually.  Smiley
  

Webmaster of www.salsashark.de
Back to top
WWWICQ  
IP Logged
 
Stewart Gilray
Full Member
***
Offline


Help me Obi-wan...

Posts: 196
Joined: Jul 9th, 2002
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #9 - Nov 6th, 2002 at 12:57pm
Print Post  
Ok well this doesn't work for me...

The mod I mean, it mods with ZERO problems. BUT when I access my YaBB I get an empty browser window, so I view source and I get this...

Code
Select All
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15"></HEAD>
<BODY></BODY></HTML>
 



As you can see, some stuff is missing Sad

FYI. I'm using YaBB "1 Gold - SP 1.1"
  
Back to top
 
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #10 - Nov 13th, 2002 at 5:49pm
Print Post  
This mod is for YaBB 1 Gold - Release and will never work on your SP1.1. This is the wrong board for SP1.1 mods.
  

The Administrator.
Back to top
WWW  
IP Logged
 
GWP
New Member
*
Offline


I love YaBB 1G - SP1!

Posts: 38
Joined: Sep 7th, 2002
Re: [new mod] Random pic tag for template.html
Reply #11 - Jan 9th, 2003 at 7:03pm
Print Post  
Quote:
This is the wrong board for SP1.1 mods.


Sorry, I don't understand.
Is this the right board for SP1.1? if not, where is the board for SP1.

I don't want to try and install mods for Gold Smiley
  
Back to top
 
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: [new mod] Random pic tag for template.html
Reply #12 - Jan 9th, 2003 at 7:39pm
Print Post  
Usually mods for SP1 install in SP1.1 too so all mods for it can be found in the SP1.1 board. whowever might still use SP1, I strongly suggest to update.
  

The Administrator.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint