vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Referrers On Forumhome v.1.3 (https://vborg.vbsupport.ru/showthread.php?t=101324)

Ncturnal 11-22-2005 07:47 PM

Nice. Any chance of getting this for vBAdvanced CMPS? Nice hack.

G-Force 199 11-23-2005 05:32 AM

May I show it on my vBAdvanced CMPS homepage ?

Dollah 11-23-2005 06:49 AM

There seems to have been a problem with the OneWorldOneHood database.
Please try again by clicking the Refresh button in your web browser.

An E-Mail has been dispatched to our Technical Staff, whom you can also contact if the problem persists.

We apologise for any inconvenience.

dont know what i'm doing wrong pleas advise

tnguy3n 11-23-2005 08:49 AM

@ Dollah: what version of MySQL you run on your server?

tnguy3n 11-23-2005 08:57 AM

For those who want to shows it on CMPS, try this add-on. However, I don't guarantee it'll work properly as I didn't get to test it on a live site, and I just wrote it based on some existing mods at vbadvanced.com.

To install, just simply import the topreferrers.module file,
then create a new template named adv_portal_topreferrers with following content:
HTML Code:

<tr>
<td class="$bgclass">
$showreferrers
</td>
</tr>


Vizionz 11-23-2005 11:54 AM

not valid module file to upload it

tnguy3n 11-23-2005 04:43 PM

Sorry, I don't run CMPS on my site nor have it installed on my PC, so I got no idea what format it is valid and what not. However, you can try this new approach.

NOTE: THIS INSTALLION IS FOR CMPS ONLY.

1. create a php file named topreferrers.php with the content:
PHP Code:

<?php
// by tnguy3n @ vbviet.org

// number of top xx referrers to show
$num 5;

$referrals $db->query_read("SELECT COUNT(*) AS totalref, user.username, user.userid, user.usergroupid, usergroup.usergroupid, usergroup.opentag, usergroup.closetag FROM " TABLE_PREFIX "user AS users LEFT JOIN " TABLE_PREFIX "user AS user ON (users.referrerid = user.userid) LEFT JOIN " TABLE_PREFIX "usergroup ON (usergroup.usergroupid = user.usergroupid) WHERE users.referrerid != 0 GROUP BY users.referrerid ORDER BY totalref DESC LIMIT 0,$num");
$numref $db->num_rows($referrals);
if(
$numref == '0')
{
    
$showreferrers "No referrer found!";
}
while(
$referral $db->fetch_array($referrals))
{
    
// display referrals on forumhome
    
$showreferrers .= "<a href=\"member.php?$session[sessionurl]u=$referral[userid]\" title=''>$referral[opentag]$referral[username]$referral[closetag]</a> ($referral[totalref])<br />;";
}

eval(
'$home[$mods[\'modid\']][\'content\'] = "' fetch_template('adv_portal_topreferrers') . '";');

unset(
$referrals$numref$num);

?>

2. create a new template named adv_portal_topreferrers with content:
HTML Code:

<tr>
<td class="$bgclass">
$showreferrers
</td>
</tr>

3. In your CMPS block manager, create a new module of PHP file that print results of topreferrers.php.

MThornback 11-23-2005 05:17 PM

I'd love to use this...but something is wrong with the plugin...atleast for me... its not registering the fact that it has " . TABLE_PREFIX . " in the query....and its giving me an SQL error on the forum home...any thoughts?

SnowBot 11-23-2005 05:36 PM

LOOKING GOOD AGAIN MATE :) iNSTALLING

Bounce 11-23-2005 10:51 PM

Great stuff..before I install is there a way it can EXCLUDE admins ??


All times are GMT. The time now is 08:07 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.02193 seconds
  • Memory Usage 1,745KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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