vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Mini Mods - New Posts on Forum-Link (https://vborg.vbsupport.ru/showthread.php?t=193833)

Coroner 10-16-2008 10:00 PM

New Posts on Forum-Link
 
What does it do ?
It will show a new statusicon for forums created as a link when new posts inside.

How does it works ? (let me give an explanation)
First, create a new forum called testcategory as a category and then some others as a normal forum inside.
In your forum search for the forumid for the new category testcategory maybe (forumdisplay.php?f=34).



Back in AdminCP edit testcategory again. You now have two options:
  • set "displayorder" to 0
  • set "forum is active" if NO
testcategory doesn't appears on forumdisplay, now.
Next is to create another forum called link to testcategory. As link you enter:
forumdisplay.php?f=34

What happend, when a user creates a thread in one of the forums inside testcategory ?
Nothing !!! vBulletin ignore forums they are inactive or displayorder is 0.

Instructions now (there are NO hooks):
open "includes/function_forumlist.php".

search for:
PHP Code:

$forum['statusicon'] = fetch_forum_lightbulb($forumid$lastpostinfo$forum); 

and add below:
PHP Code:

   if ($forum['statusicon'] == 'link')
   {
    
$f intval(substr(strstr($forum['link'], '='), 1));
    if (
$f != AND !empty($vbulletin->iforumcache["$f"]))
    {
     foreach(
$vbulletin->iforumcache["$f"] AS $link_forumid)
     {
      
$new_forum fetch_foruminfo($link_forumid);
      
$lastpinfo = array('lastpost' => $new_forum['lastpost']);
      
$linkicon fetch_forum_lightbulb($link_forumid$lastpinfo$new_forum);
      if (
$linkicon == 'new')
      {
       
$linkicon '_test';
       
$forum['statusicon'] .= $linkicon;
       break;
      }
     }
    }
   } 

See the code above. I use _test and not _new.
Next is to create a new statusicon for each style called:
forum_link_test.gif

Now, when users create a post the statusicon will shows you, that you will have new posts inside.

There is NO demo. Just test it and feel free to experience with it.

Regards
Coroner

P.S. deutschen Support gibt es auch bei your-vb

Ohiosweetheart 10-17-2008 06:47 AM

hmmmm... interesting.

Coroner 10-17-2008 04:11 PM

I've changed the code - 'cause if you haven't some forums it will generate an error.

The code above, doesn't do it.


All times are GMT. The time now is 10:00 PM.

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.01041 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)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