vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Statistics Modifications - [AJAX]ChangUonDyU - Advanced Statistics (https://vborg.vbsupport.ru/showthread.php?t=190167)

spitb19 09-05-2008 10:00 PM

[AJAX]ChangUonDyU - Advanced Statistics
 
ChangUonDyU - Advanced Statistics
version 2.2
AJAX

FEATURES
-Latest Posts
-Top (Newest member, top poster, top thanked, most viewed threads, most popular forum)
-Latest posts for a specific forum (by Menu)
-Choose Results to view (by Menu)
-Auto refresh (set second in vb options)
-Include Permission with group
-Set forum not allow to show
and many options

Set
Latest posts for a specific forum
-In
Latest posts for a specific forum text area
enter by grammar
Separate each option with a new-line. Separate title and forumids with |. Separate forum ids with commas
example:
Quote:

Oder1 title|1,2,5
Oder2 title|21,15,7
Oder3 title|14


Set list of result
List of result (separate with commas)
not null
example: 10,20,50,100
If you don;t want user choose result set 1 value,
example: 10

INSTALL

-Import Product.
-Edit template FORUMHOME
Find
PHP Code:

$navbar 

Add below
PHP Code:

$changtop 

P/S: this stat can show on all page
if you want to show on all page, add $changtop in navbar, header or footer template

macc 09-06-2008 12:44 PM

install and have one question .. in some of your hack - tempates i found this
PHP Code:

<tr>
<
td nowrap="nowrap" title="$cmosttnamefull"><span class="smallfont"><a href="showthread.php?t=$cmostviewid">$cmosttname<a></span>&nbsp;</td>
<
td nowrap="nowrap" align="right"><span class="smallfont">$cmostviewcount</span>&nbsp;</td>
</
tr

in template changuondyu_mostview and just will ask is this part of code
PHP Code:

$cmosttname<a></span

is ok? mean this <a> or it must be </a> ?

regards

very nice and usefull hack!
macc

spitb19 09-06-2008 12:58 PM

@macc: Thank u very much :D
i fixed and reupload .xml

saviola8x 09-06-2008 01:21 PM

?i, b?c chang hay ai đ? đem hẳn mod n?y sang đ?y rồi thế :D
( Teenv.Net =) )

Stoebi 09-06-2008 01:27 PM

Thank you very much. :)

macc 09-06-2008 01:47 PM

in new product you have one <a> in lastpost_bit template ...


reg

macc

FreshFroot 09-07-2008 02:59 AM

how is this different or better than CYB's top stats hack?

choccyclaire 09-07-2008 02:05 PM

^ Seems to me coz it has a drop down method instead of having all the stats there on first look, you can separate them and get the user to chose which they want to see.

spitb19 09-08-2008 02:06 PM

Quote:

how is this different or better than CYB's top stats hack?
-AJAX, change result, latest posts for specific forums (All on FORUMHOME)
-Select method is flexible

Worse than Cyb
-Beta version: have some error
-miss some top....(coming soon)

eTiKeT? 09-08-2008 03:15 PM

Thanks ;)

goyo 09-15-2008 11:26 PM

Seems like a more flexible concept compared Cyb's statistics. Are you planning to update this plugin ? Latest blogs option would be great...

mad@Max 09-16-2008 01:30 AM

Nice hack! Thank you!

vietfancy 09-17-2008 12:03 PM

Quote:

-Top (Newest member, top poster, top thanked, most viewed threads, most popular forum)
This can't be disable bro. I tried to disable this, and its still showing.

mad@Max 09-18-2008 03:07 PM

Few fix for validation:
Code:

<form action="" name="getmenu">
Code:

<script language="JavaScript" type="text/javascript">
<!--
function hshow()
{
if (hsb.handler.readyState == 4 && hsb.handler.status == 200)
        {
        document.getElementById('changcontent').innerHTML = hsb.handler.responseText;
document.getElementById('tdtprogress').style.display="none";
        }
}
function changstats()
{
document.getElementById('tdtprogress').style.display="inline";
  hsb = new vB_AJAX_Handler(true);
  hsb.onreadystatechange(hshow);
  fcmenu = document.getmenu.chooseview.value;
  fcresult = document.getmenu.choosekq.value;
  hsb.send('ajax.php?do='+fcmenu+'&result='+fcresult);
}
changstats();
<if condition="$vboptions[top_autorefresh] > 0">
autoref=setInterval("changstats()", 1000*$vboptions[top_autorefresh]);
</if>
//-->
</script>

Code:

<br />

mad@Max 09-19-2008 12:04 AM

You forgot cache templates: changuondyu_advancedtop, changuondyu_choosekq, changuondyu_chooseview.

spitb19 09-19-2008 07:25 AM

parse_templates ~ cache_templates :D

@vietfancy: i don't know. i tested well :-?? (ne^u' la` nguoi` Vietnam thi` lien he^. Ym cho tje^n. :D )

mad@Max 09-19-2008 02:44 PM

I did so...

z3rol0ve 09-23-2008 03:45 AM

I got a problem that if the nickname has ' sign or \ sign post the new post, the statistic won't work. I used firebug, a addon of firefox and found out the code went wrong at
PHP Code:

Invalid SQL:

SELECT userid,usergroupid,displaygroupid FROM user WHERE username 'p3'hi3u'' LIMIT 1;

MySQL Error   You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL

 server version 
for the right syntax to use near 'hi3u'' LIMIT 1' at line 1 

so I try to fix it.

Go to plugin Chang - Advanced Top - Get Data
find
PHP Code:

$qinfo $db->query_first("SELECT userid,usergroupid,displaygroupid FROM "TABLE_PREFIX ."user WHERE username = '$clastposter' LIMIT 1"); 

replace by
PHP Code:

$qinfo $db->query_first("SELECT userid,usergroupid,displaygroupid FROM "TABLE_PREFIX ."user WHERE username = '".addslashes($clastposter)."' LIMIT 1"); 

find
PHP Code:

$clastposter htmlspecialchars($clastposter); 

replace by
PHP Code:

// $clastposter = htmlspecialchars($clastposter); 


qbn720 10-14-2008 12:34 AM

What should I do if I would like this to appear on my vB Advanced Home Page? By adding "$changtop", it really doesn't do anything. It seems to work on other pages, by any chance is there a method around this?

Edit: Also, I was wondering if you guys could include "Latest Blogs" as an item, but I mean that'll have to wait until another upgrade or when you guys fine-tune this product.

Neo_obs 11-13-2008 02:14 PM

can we get the cache templates fixed?

Also I have an blank drop down... do I have to put custom forums?

ok I created a new plugin

Hook location: Cache_templates

Title: Chang - Advanced Top - Cache Templates

Execution Order: 5

PHP Code:
PHP Code:

$globaltemplates array_merge($globaltemplates, array('changuondyu_advancedtop''changuondyu_alltop''changuondyu_choosekq''changuondyu_chooseview''changuondyu_latestpost''changuondyu_latestpostinforum''changuondyu_latestpost_bit''changuondyu_mostpopular''changuondyu_mostview''changuondyu_newestmember''changuondyu_topposter''changuondyu_topthank')); 

How can I make it so it will only cache them if the hack in enabled?
Answered my own question and added this code to all plugin's
PHP Code:

if ($vbulletin->options['top_turn'])
        {
###PUT ORIGINAL CODE HERE###



linhhon2003 12-13-2008 03:41 AM

version 3.0.1 (newer): https://vborg.vbsupport.ru/showthread.php?t=198750

LjNux 01-22-2009 10:09 AM

Good mod.Thanks ChangUonDyU

kotkerk 01-29-2009 05:35 AM

if $_REQUEST['result'] == 10
PHP Code:

$query $some_query
while(
$bla_bla $fetch_bla($query)) 

   
$code;
   
$more_code;
   
$query_first($query_1); 
   
$query_first($query_2); 
   
$query_first($query_3); 
   
$query_first($query_4); 
   
$query_first($query_5); 
   
$more_code_2;


response (on my local comp, separate page):
vBulletin Debug: Page generated in 0.05116 seconds with 57 queries

if $_REQUEST['result'] == 20
response:
vBulletin Debug: Page generated in 0.10254 seconds with 110 queries

if $_REQUEST['result'] == 50
response:
vBulletin Debug: Page generated in 0.20894 seconds with 260 queries
etc...
!!!!!


All times are GMT. The time now is 05:27 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.02372 seconds
  • Memory Usage 1,791KB
  • 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
  • (3)bbcode_code_printable
  • (12)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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