Version: , by (Guest)
Developer Last Online: Jan 1970
Version: Unknown
Rating:
Released: 10-23-2001
Last Update: Never
Installs: 4
No support by the author.
I have no idea if this hack is already submitted, but here how i hacked a alternative forum icon in place for the on/off.gif icon.
How does it like ?
The Forum:
The Admin:
files to edit : index.php, forumdisplay.php, admin/forum.php
Edit index.php and forumdisplay.php
Old: look for this code
PHP Code:
// do light bulb
if ($bbuserinfo['lastvisitdate']=='Never') {
$forum['onoff']='on';
} else {
if ($bbuserinfo['lastvisit']<$forum['lastpost']) {
$forum['onoff']='on';
} else {
$forum['onoff']='off';
}
}
New: replace with this code
PHP Code:
if ($forum['icon']==1) {
$forumicon = $forum['iconname']."_";
if ($forumicon == "_") $forumicon = "";
} else {
$forumicon = "";
}
// do light bulb
if ($bbuserinfo['lastvisitdate']=='Never') {
$forum['onoff']=$forumicon.'on';
} else {
if ($bbuserinfo['lastvisit']<$forum['lastpost']) {
$forum['onoff']=$forumicon.'on';
} else {
$forum['onoff']=$forumicon.'off';
}
}
File: admin/forum.php (i placed those options in style part)
Old: Search this code.
PHP Code:
maketableheader("Style Options");
makechoosercode("Custom style set for this forum","styleset","style",1);
makeyesnocode("Override users custom styles<BR>(will force this forums specified colors)","styleoverride",0);
New: replace with this code
PHP Code:
maketableheader("Style Options");
makechoosercode("Custom style set for this forum","styleset","style",1);
makeyesnocode("Override users custom styles<BR>(will force this forums specified colors)","styleoverride",0);
makeyesnocode("Enable forum icon","auseicon",0);
makeinputcode("Name of the icon (only shows on enable forum icon 'yes')","iconname");
Old: Search this code.
PHP Code:
maketableheader("Style Options");
makechoosercode("Custom style set for this forum","styleset","style",$forum[styleid]);
makeyesnocode("Override users custom styles<BR>(will force this forum's specified colors)","styleoverride",$forum[styleoverride]);
New: Replace with this code.
PHP Code:
maketableheader("Style Options");
makechoosercode("Custom style set for this forum","styleset","style",$forum[styleid]);
makeyesnocode("Override users custom styles<BR>(will force this forum's specified colors)","styleoverride",$forum[styleoverride]);
makeyesnocode("Enable forum icon","auseicon",$forum[icon]);
makeinputcode("Name of the icon (only shows on enable forum icon 'yes')","iconname",$forum[iconname]);
WARNING: this code may not be the same as yours, so check only what changes and add it to your code.
Old: This line can be different from your code
Search this code.
PHP Code:
$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,icon,iconname)
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')");
New:
PHP Code:
$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,icon,iconname)
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','$auseicon','$iconname')");
Old:
PHP Code:
$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'");
New:
PHP Code:
$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', icon='$auseicon', iconname='$iconname'
WHERE forumid='$forumid'");
Mysqltable:
[QUOTE]Mysql> ALTER table forum add icon smallint not null default"0", add iconname char(50) not null;
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
hehe, thanks,
never saw such a hack come up in the new version, neither in the older version, (maeby i didn't see) so i posted it
and i knew some ppl would appriciate this hack
Could have done more fancy stuff but i was little lazy! :P
And guys from vbb, keep up with the good work! there are some lazy stuff but hehe