Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2001
Posts: 27
Junior Member
Junior Member
Offline
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 ]

Sponsored Links
Joined: Aug 2000
Posts: 335
Member
Member
Offline
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
Offline
Joined: Apr 2001
Posts: 27
[code][/code]

Thanks for your help by the way.

Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
Code
[/code]
could be written more simply as
[code]

Joined: Apr 2001
Posts: 27
Junior Member
Junior Member
Offline
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?

Sponsored Links
Joined: Apr 2001
Posts: 27
Junior Member
Junior Member
Offline
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?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1948
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 12
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)