vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   On/Off Boutons on sub Forums (https://vborg.vbsupport.ru/showthread.php?t=38593)

Corbu 05-13-2002 05:08 PM

On/Off Boutons on sub Forums
 
hello,

I made this request one week ago and nobody send me a response : Thread

So, I'm searching to made it myself...
But I do not understand how is it made ... How vbuelltin know if there is a new message and how he made to change on.gif by off.gif ? Is there a template for this ?

Thanks for your help

scsa20 05-13-2002 05:16 PM

the code itself is in a PHP file, don't know right now, but when I get home, I'll look it up ;)

scsa20 05-13-2002 10:28 PM

here's a block of code that I found for you:

PHP Code:

        // do light bulb
        
if ($bbuserinfo['lastvisitdate']=='Never') {
          
$forum['onoff']='on';
        } else {
                                        if (isset(
$bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
                                                
$userlastvisit=$bbforumview[$forum['forumid']];
                                        } else {
                                                
$userlastvisit=$bbuserinfo['lastvisit'];
                                        }
          if (
$userlastvisit<$forum['lastpost']) {
            
$forum['onoff']='on';
          } else {
            
$forum['onoff']='off';
          }
        }

        if ((!
$forumperms['canpostnew'] and $showlocks) or $forum['allowposting']==0) {
          
$forum['onoff'].='lock';
        } 

that can be found in index.php of the main dir.

this one can also be found in the same file:

PHP Code:

  if ($newpm['messages']==0) {
    
$lightbulb='off';
  } else {
    
$lightbulb='on';
  } 

that's all I found for now, I'll look it up some more, but that should be it ;)

Corbu 05-15-2002 05:06 PM

okayyy,

soo, I think, I can apply it into the sub forum index... hum hum...

Thank You very much


All times are GMT. The time now is 06:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01000 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete