Here's a way to do this. As this involves editing newthread.php, not everyone may like this solution.
Anyways, here's what to do:
(UPDATED) In newthread.php, FIND:
Code:
$newpost['iconid'] =& $vbulletin->GPC['iconid'];
REPLACE WITH:
Code:
if($vbulletin->GPC['iconid'] != 0){
$newpost['iconid'] =& $vbulletin->GPC['iconid'];
}
else{
$icons_list = array();
$iconids = $db->query_read("SELECT iconid FROM icon");
while($row=mysql_fetch_assoc($iconids)){
array_push($icons_list, $row);
}
$newpost['iconid'] = array_rand($icons_list) + 1;
}
That should do it.
If you want to change the "No icon" text to "Random Icon" just edit the
posticons template:
FIND:
REPLACE WITH:
If anyone can implement this with a plugin, please show me how. And also let me know if the code is efficient.