|
|
Joined: Apr 2001
Posts: 27
Junior Member
|
Junior Member
Joined: Apr 2001
Posts: 27 |
Hi I want to change my 6.04 board so that when the first icon is picked (the default one) it then gives a random icon when the post is sent.
I'm not much of a code junkie so my own attempts at this have failed. All I need is a check when the post is sent, and if they have chosen icon1.gif then a random icon is chosen instead,,can anyone help?
I'm using the drop down message icon hack,,here's where I think the code should go,,I'd really appreciate some help with this.
[code][/code]
[ 12-13-2001 02:59 PM: Message edited by: Neil ]
|
|
|
|
Joined: Aug 2000
Posts: 335
Member
|
Member
Joined: Aug 2000
Posts: 335 |
quote: I want to change my 6.04 board so that when the first icon is picked (the default one) it then gives a random icon when the post is sent.
I don't understand why you want to do this.
However:
In ubb_lib_posting.cgi, sub create_topic, find the place where $icon_number is used to construct the string $this_icon. If you want to assume that the icon files are numbered consecutively starting with 1, you can simply set $icon_number to int(rand N) + 1, where N is the number of icons. If you don't want to make that assumption, it's messier. You could use glob() to get the icon file names into a list, select a random item from the list, then construct $this_icon from that selected item.
|
|
|
|
Joined: Apr 2001
Posts: 27
Junior Member
|
Junior Member
Joined: Apr 2001
Posts: 27 |
[code][/code]
Thanks for your help by the way.
|
|
|
|
Joined: Aug 2000
Posts: 335
Member
|
Member
Joined: Aug 2000
Posts: 335 |
[/code] could be written more simply as [code]
|
|
|
|
Joined: Apr 2001
Posts: 27
Junior Member
|
Junior Member
Joined: Apr 2001
Posts: 27 |
Thanks for that. Does anyone know which file the processing of posts is done in so I can change it to do what I want?
|
|
|
|
Joined: Apr 2001
Posts: 27
Junior Member
|
Junior Member
Joined: Apr 2001
Posts: 27 |
*bump*
Please,,,someone must know where this happens! This has been driving me nuts for months.
All I want to know is where the processing of icons is done, doesn't anyone know which file takes care of that?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 808
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|