Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 12-04-2001, 09:28 PM
LanciaStratos's Avatar
LanciaStratos LanciaStratos is offline
 
Join Date: Oct 2001
Location: somewhere you're not
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this working with 2.2.x?
Reply With Quote
  #13  
Old 12-24-2001, 02:08 AM
DelusionalMind's Avatar
DelusionalMind DelusionalMind is offline
 
Join Date: Dec 2001
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

damn fine work there! will be installing it later tonight
Reply With Quote
  #14  
Old 12-24-2001, 02:21 AM
nafae's Avatar
nafae nafae is offline
 
Join Date: Nov 2001
Posts: 240
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, can it be used for 2.2.1/2.2.x? Also... can you make an .txt file with the instructions?
Reply With Quote
  #15  
Old 01-17-2002, 10:14 AM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like the Idea but it doesn´t work for my 2.2.1g

There is no error only the gif is not displayed!

The db entries are correct and if I change a forum it´s in right in the db but it´s not displayed!

Any suggestions?

Greetings

StarBuG
Reply With Quote
  #16  
Old 02-05-2002, 08:37 AM
Arathorn Arathorn is offline
 
Join Date: Nov 2001
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works on 2.2.1 and 2.2.2 for me. Check your //do light bulb bit of code. Make sure it's:

$forum['onoff']=$forumicon.'on';

and not

$forum['onoff']='on';
Reply With Quote
Reply


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 02:18 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.04491 seconds
  • Memory Usage 2,319KB
  • Queries Executed 20 (?)
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
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (6)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