vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Home Enhancements - Welcome Panel Template Rewrite (https://vborg.vbsupport.ru/showthread.php?t=118385)

masons 05-19-2007 01:07 PM

fantastic add-on! A top asset to the site and community!

The Scriblerian 05-19-2007 08:13 PM

It's working great.

Small question though, for some reason where it reads "Welcome back (Insert name)!" It has a strange (AVC) after it. Like

"Welcome back The Scriblerian! (AVC)" What is this?

EDIT: Stupid me...I should really read back before I post these kind of things. I believe I saw the answer at the top of the page.

King Kovifor 05-20-2007 02:01 PM

Quote:

Originally Posted by The Scriblerian (Post 1250973)
It's working great.

Small question though, for some reason where it reads "Welcome back (Insert name)!" It has a strange (AVC) after it. Like

"Welcome back The Scriblerian! (AVC)" What is this?

EDIT: Stupid me...I should really read back before I post these kind of things. I believe I saw the answer at the top of the page.

That (AVC) would be (Avatar Center) I believe... I added that for testing purposes.

Philipaclayton 05-20-2007 03:08 PM

installed. great hack

King Kovifor 05-20-2007 03:24 PM

Quote:

Originally Posted by Philipaclayton (Post 1251459)
installed. great hack

Thanks... The original code was by Zero Tolerance.

random1 05-20-2007 08:23 PM

thank you and thank Zero, this is great!!!! i would rather it be at the bottom of the page but untill i figure out how to do this stuff, i'll be happy i got it running!

thanks agian!

King Kovifor 05-20-2007 09:30 PM

Quote:

Originally Posted by random1 (Post 1251672)
thank you and thank Zero, this is great!!!! i would rather it be at the bottom of the page but untill i figure out how to do this stuff, i'll be happy i got it running!

thanks agian!

The plugin replaces $navbar with $navbar fetch_template('forumhome_welcomepanel_' . $style);

so it's hard coded at the top.

UncoderMom 05-20-2007 10:40 PM

Quote:

Originally Posted by King Kovifor (Post 1251705)
The plugin replaces $navbar with $navbar fetch_template('forumhome_welcomepanel_' . $style);

so it's hard coded at the top.


Is there a way to get rid of that? I have stuff that Id like to put before it and I cant..so Ive been just dealing ;)

But I would love to turn off the hook and do the edit manually! :D

How could I do this?:cool:

King Kovifor 05-20-2007 11:05 PM

Well... UncoderMom, you could modify the plugin to use a variable for the template... I'll whip up the code for you.

PHP Code:

if ($vbulletin->userinfo['userid'] > && $vbulletin->userinfo['userid'] != '' || !$vbulletin->userinfo['userid'])
{
    require_once(
DIR '/includes/functions_user.php');
    
$vbulletin->userinfo['avatar_build'] = fetch_avatar_url($vbulletin->userinfo['userid']);

    if (empty(
$vbulletin->userinfo['avatar_build']) || !is_array($vbulletin->userinfo['avatar_build']))
    {
        
$vbulletin->userinfo['avatar_build'] = array($vbulletin->options['wp_forumimagelink'] . 'noavatar.gif');
    }

    
$vbulletin->userinfo['avatar_build'] = '<img src="' $vbulletin->userinfo['avatar_build'][0] . '"'.iif($vbulletin->userinfo['avatar_build'][1],$vbulletin->userinfo['avatar_build'][1],'').'border="0" alt="Edit Your Avatar" />';

    
$postsin = array();
    
$gp      $db->query_read("SELECT p.threadid, t.forumid FROM " TABLE_PREFIX "post p LEFT JOIN " TABLE_PREFIX "thread t ON(t.threadid = p.threadid) WHERE p.userid = {$vbulletin->userinfo['userid']}");
    while (
$gpb $db->fetch_array($gp))
    {
        if (!
$postsin[$gpb['forumid']])
        {
            
$postsin[$gpb['forumid']] = 1;
        }
        else
        {
            
$postsin[$gpb['forumid']]++;
        }
    }

    
$active = array(0);

    if (
is_array($postsin) && is_array($vbulletin->forumcache))
    {
        foreach (
$postsin as $forumid => $pi)
        {
            if (
$pi $active[0])
            {
                
$active = array($pi$forumid);
            }
        }
    }

    if (!empty(
$active[1]))
    {
        
$vbulletin->userinfo['active'] = array($vbulletin->forumcache[$active[1]], $active[0]);
    }
    else
    {
        
$vbulletin->userinfo['active'] = false;
    }

    
$exec_totalposts str_replace(','''$totalposts);

    if (
$exec_totalposts 1)
    {
        
$exec_totalposts 1;
    }

    
$vbulletin->userinfo['posts'] = vb_number_format($vbulletin->userinfo['posts']);
    
$jointime = (TIMENOW $vbulletin->userinfo['joindate']) / 86400;

    if (
$jointime 1)
    {
        
$vbulletin->userinfo['postsperday'] = $vbulletin->userinfo['posts'];
    }
    else
    {
        
$vbulletin->userinfo['postsperday'] = vb_number_format(str_replace(','''$vbulletin->userinfo['posts']) / $jointime2);
    }

    
$vbulletin->userinfo['postpercent'] = vb_number_format(((str_replace(','''$vbulletin->userinfo['posts']) / $exec_totalposts ) * 100),2);

    
$vbulletin->userinfo['newposts'] = $db->query_first("SELECT COUNT(*) AS newposts FROM " TABLE_PREFIX "post WHERE dateline >= '{$vbulletin->userinfo['lastvisit']}' AND visible = '1'");
    
$vbulletin->userinfo['newposts'] = vb_number_format($vbulletin->userinfo['newposts']['newposts']);

    
$vbulletin->userinfo['newthreads'] = $db->query_first("SELECT COUNT(*) AS newthreads FROM " TABLE_PREFIX "thread WHERE dateline >= '{$vbulletin->userinfo['lastvisit']}' AND visible = '1' AND sticky in(0,1)");
    
$vbulletin->userinfo['newthreads'] = vb_number_format($vbulletin->userinfo['newthreads']['newthreads']);

    
$vbulletin->userinfo['lastvisit'] = vbdate($vbulletin->options['timeformat'], $vbulletin->userinfo['lastvisit']) . ', ' vbdate($vbulletin->options['dateformat'], $vbulletin->userinfo['lastvisit']);

    
$exec_lastposts $db->query_first("SELECT COUNT(*) AS lastposts FROM " TABLE_PREFIX "post WHERE visible = 1 AND dateline >= ".(TIMENOW 86400));
    
$exec_lastposts vb_number_format($exec_lastposts['lastposts']);

    
$welcomepanel $vbulletin->templatecache['forumhome_welcomepanel_' $vbulletin->options['wp_style']];


Try that... Just place $welcomepanel in your template...

UncoderMom 05-21-2007 02:53 AM

Okay.. I did that but its not rendering now... No mater where I place it ..dunno...


All times are GMT. The time now is 01:16 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.01507 seconds
  • Memory Usage 1,799KB
  • 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
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete