***********************************************************
Run the following query:
***********************************************************
ALTER TABLE forum ADD iconimg VARCHAR(100) NOT NULL AFTER displayorder
***********************************************************
Add a custom template, name it forumhome_iconimg and put the following in it:
***********************************************************
<img src="http://www.vbulletin.org/forum/images/$forum[iconimg]" border="0" alt="">
************************************************************
In forum.php (under your admin folder) add:
************************************************************
maketableheader("Category Icon</b>","",0);
makeinputcode("Icon file <i>Should be no bigger than 32x32pixels</i><br>(your default images folder is added)","iconimg");
right after:
*****************
makeyesnocode("Count posts made in this forum towards user post counts?","countposts",1);
************************************************************
Still in forum.php, replace:
************************************************************
$DB_site->query("INSERT INTO forum
(forumid,styleid,title,description,active,displayorder,parentid,
parentlist,allowposting,cancontainthreads,daysprune,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allowsmilies,allowicons,
styleoverride,allowratings,countposts,moderateattach)
VALUES
(NULL,'$styleset','".addslashes($title)."','".addslashes($description)."','$isactive','$displayorder ','$parentid',
'','$allowposting','$cancontainthreads','$daysprune','".addslashes($newpostemail)."','".addslashes($ newthreademail)."',
'$moderatenew','$aallowhtmlcode','$aallowbbcode','$aallowimgcode','$aallowsmilies','$aallowicons',
'$styleoverride','$allowratings','$countposts','$moderateattach')");
with:
****************
$DB_site->query("INSERT INTO forum
(forumid,styleid,title,description,active,displayorder,parentid,
parentlist,allowposting,cancontainthreads,iconimg,
daysprune,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allowsmilies,allowicons,
styleoverride,allowratings,countposts,moderateattach)
VALUES
(NULL,'$styleset','".addslashes($title)."','".addslashes($description)."','$isactive','$displayorder ','$parentid',
'','$allowposting','$cancontainthreads','".addslashes($iconimg)."',
'$daysprune','".addslashes($newpostemail)."','".addslashes($newthreademail)."',
'$moderatenew','$aallowhtmlcode','$aallowbbcode','$aallowimgcode','$aallowsmilies','$aallowicons',
'$styleoverride','$allowratings','$countposts','$moderateattach')");
************************************************************
Still in forum.php, add:
************************************************************
maketableheader("Category Icon</b>","",0);
makeinputcode("Icon file <i>Should be no bigger than 32x32pixels</i><br>(your default images folder is added, no need in that)","iconimg",$forum[iconimg]);
right after:
******************
makeyesnocode("Count posts made in this forum towards user post counts?","countposts",$forum[countposts]);
***********************************************************
Still in forum.php, replace:
***********************************************************
$DB_site->query("UPDATE forum
SET
styleid='$styleset', title='".addslashes($title)."', description='".addslashes($description)."',
active='$isactive', displayorder='$displayorder', parentid='$parentid', parentlist=$parentlist,
allowposting='$allowposting', cancontainthreads='$cancontainthreads', daysprune='$daysprune',
newpostemail='".addslashes($newpostemail)."', newthreademail='".addslashes($newthreademail)."',
moderatenew='$moderatenew', allowhtml='$aallowhtmlcode', allowbbcode='$aallowbbcode',
allowimages='$aallowimgcode', allowsmilies='$aallowsmilies', allowicons='$aallowicons',
styleoverride='$styleoverride', allowratings='$allowratings', countposts='$countposts',
moderateattach='$moderateattach'
WHERE forumid='$forumid'");
with:
******************
$DB_site->query("UPDATE forum
SET
styleid='$styleset', title='".addslashes($title)."', description='".addslashes($description)."',
active='$isactive', displayorder='$displayorder', iconimg='".addslashes($iconimg)."', parentid='$parentid', parentlist=$parentlist,
allowposting='$allowposting', cancontainthreads='$cancontainthreads', daysprune='$daysprune',
newpostemail='".addslashes($newpostemail)."', newthreademail='".addslashes($newthreademail)."',
moderatenew='$moderatenew', allowhtml='$aallowhtmlcode', allowbbcode='$aallowbbcode',
allowimages='$aallowimgcode', allowsmilies='$aallowsmilies', allowicons='$aallowicons',
styleoverride='$styleoverride', allowratings='$allowratings', countposts='$countposts',
moderateattach='$moderateattach'
WHERE forumid='$forumid'");
**********************************************************
Save and upload forum.php.
**********************************************************
**********************************************************
In index.php (root folder) after this:
**********************************************************
if ($userlastvisit<$forum['lastpost']) {
$forum['onoff']='on';
} else {
$forum['onoff']='off';
}
}
add this:
*****************
if ($forum['iconimg']) {
eval("\$ficonimg = \"".gettemplate('forumhome_iconimg')."\";");
}
else {
$ficonimg = '';
}
**********************************************************
Save and upload index.php
**********************************************************
open the forumhome_forumbit_level2_post and find this:
**********************************************************
<normalfont><b>$forum[title]</b></normalfont></a>
add this before it:
*****************
$ficonimg
**********************************************************
Save the template. Go into your admincp and go to Forums & Moderators and click on modify and add your icon
in the Category Icon section.
**********************************************************
Done!
__________________
شبكة قطرات
www.QaTaRaT.com