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)
-   -   vBulletin Blog - vB Blog Stats on Forumhome (https://vborg.vbsupport.ru/showthread.php?t=158358)

Lizard King 09-20-2007 10:00 PM

vB Blog Stats on Forumhome
 
I was in need to show vBulletin Blog stats on forumhome and i prepared the following product. As i am not the perfect coder any further advise will be taken seriously for optimizing the product.

Installation Instructions :

Import the attached product via vBulletin Product Manager

Edit FORUMHOME template and search for :
Code:

                                $vbphrase[members]: $numbermembers<if condition="$show['activemembers']">,
                                        <span title="<phrase 1="$vboptions[activememberdays]">$vbphrase[within_the_last_x_days]</phrase>">$vbphrase[active_members]: $activemembers</span>
                                </if>

add right after
Code:

                                $vbphrase[forumhome_total_blogs] : <if condition="$blogstats['total_blog_users']"><a href="blog.php?$session[sessionurl]do=bloglist">$blogstats[total_blog_users]</a><else />0</if>,
                                $vbphrase[forumhome_total_blog_entries]: $blogstats[total_blog_entries],
                                $vbphrase[forumhome_todays_blog_entries]:</b>  $blogstats[entries_in_24hours]

You are ready to go

Ascor 09-21-2007 10:28 AM

Installed, thank you :)

Feckie (Roger) 09-21-2007 12:25 PM

Doesn't seem to be working

Lea Verou 09-21-2007 12:41 PM

Thanks, will install soon! :)

Lizard King 09-21-2007 01:50 PM

Quote:

Originally Posted by Feckie (Roger) (Post 1343807)
Doesn't seem to be working

What error do you receive ?

Cybertims 09-21-2007 02:11 PM

Which mod does this go with? Can you provide a link to the main mod please?

Cheers.

Milad 09-21-2007 04:26 PM

Quote:

As i am not the perfect coder any further advise will be taken seriously for optimizing the product.
For sure, this product can be optimized.

You used three queries and that's too much.

First of all you need to run a cron job to save those stats in the datastore table. use the hook cron_script_cleanup in includes/cron/cleanup.php

Then you need to get the information via the hook init_stratup in includes/init.php

PHP Code:

if (THIS_SCRIPT == 'forumhome')
{
    
$datastore_fetch[] = "'here_your_datastore_title'";


and then use $vbulletin->here_your_datastore_title to access your info.

Then you can bypass the template edits by joining your info to a variable ex: $totalposts

regards

Feckie (Roger) 09-21-2007 06:57 PM

Quote:

Originally Posted by Lizard King (Post 1343842)
What error do you receive ?

Non and it does not display totals nothing

ThreeD 09-21-2007 07:35 PM

thanks for this one :)

Feckie, check your product manager and make sure the plugin is enabled. Mine was not enabled per default after installing it.

Feckie (Roger) 09-21-2007 08:13 PM

Quote:

Originally Posted by ThreeD (Post 1344054)
thanks for this one :)

Feckie, check your product manager and make sure the plugin is enabled. Mine was not enabled per default after installing it.

Yep That Worked thanks.

1st time that as happened to me ha ha :rolleyes:


All times are GMT. The time now is 08:43 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.01162 seconds
  • Memory Usage 1,744KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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