Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

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.

Comments
  #2  
Old 10-24-2001, 03:01 PM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wicked hack man, but do the "funny fourm icons" have on or off capablitys or are they just one type?
Reply With Quote
  #3  
Old 10-24-2001, 03:09 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Aq.
ftp/copy {name}_on.gif / {name}_off.gif in the forum images
Reply With Quote
  #4  
Old 10-24-2001, 03:22 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow never thought to have a hack that does this. bad @$$
Reply With Quote
  #5  
Old 10-24-2001, 04:48 PM
Bane's Avatar
Bane Bane is offline
 
Join Date: Oct 2001
Posts: 411
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack Aq
Reply With Quote
  #6  
Old 10-24-2001, 05:03 PM
Aq.
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #7  
Old 10-24-2001, 05:58 PM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL! Thanks FireFly, wow, shows how much I don't pay attention in the morning!
Reply With Quote
  #8  
Old 11-30-2001, 11:52 AM
Dark Blaze's Avatar
Dark Blaze Dark Blaze is offline
 
Join Date: Nov 2001
Location: World Wide Web
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awsome hack

Exactly what I needed for my forum.

I'm going to install it very soon indeed. As soon as I'm back online, this hack will be part of my vB scripts
Reply With Quote
  #9  
Old 11-30-2001, 04:28 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Hack, Thanks Aq
Reply With Quote
  #10  
Old 12-01-2001, 11:58 PM
philphee's Avatar
philphee philphee is offline
 
Join Date: Nov 2001
Location: boca raton, fl
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice one, I like it.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:37 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05112 seconds
  • Memory Usage 2,352KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (10)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (8)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete