vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - User CP Referral ID and Referrer/Referrals in Profile for vB 4 (https://vborg.vbsupport.ru/showthread.php?t=243455)

Boofo 09-17-2010 09:59 AM

referrerid='$usersid'

should be

referrerid='$userid'

the_ace 09-17-2010 10:15 AM

Quote:

Originally Posted by Boofo (Post 2099545)
referrerid='$usersid'

should be

referrerid='$userid'

oh. Isnt it supposed to be $usersid since in the first line it says :
$usersid=$this->post['userid'];

I'm not a php coder at all but I thought that line assigns the userid to $usersid ?
Please feel free to correct me. I'm sure to learn something new here.

BTW, setting it to referrerid='$userid' in the where clause didint work either. :(

Boofo 09-17-2010 10:31 AM

My bad. I didn't look close enough, I guess.

Look at the other queries in the mod. The should give you an idea of how to run it.

Boofo 09-17-2010 10:46 AM

Try changing your hook location for your query to the postbit_display_complete.

the_ace 09-17-2010 11:07 AM

Quote:

Originally Posted by Boofo (Post 2099558)
Try changing your hook location for your query to the postbit_display_complete.

Thanks! that did the trick! It works now. :D

For anyone interested Here's the plugin : (Admin CP -> Plugins & Products -> Plugin Manager -> Add New Plugin )
Product : Vbulletin
Hook Location : postbit_display_complete
Titile : Referrals in Postbit
Execution Order : 5
Plugin PHP code :
Code:

$usersid = $this->post['userid'];
        $refcount = mysql_query("SELECT username FROM " . TABLE_PREFIX . "user WHERE referrerid='$usersid'");
        $referrals = mysql_num_rows($refcount);
        $template_hook['postbit_userinfo_right_after_posts'] .= '<dt>Referrals</dt><dd> '.  $referrals.'</dd>';

Plugin is Active : yes


Like Boofo said, this adds a query for every post.

catfish_pete 09-29-2010 04:18 AM

Nice mod - thanks!

StarBuG 10-25-2010 02:49 PM

Thank you. *installed*

The link to the Profile AboutMe Tab in the UserCP Box does not work for me.
Just a note ;)

pom 11-03-2010 01:44 AM

hey i just noticed that every profile have my referral id...i mean they all have admin referral id not theirs why is that so and that additional.css where can i find that...and if i have to add then where should i add...

also please help me for this referral link...they all have same referral link which is ending up with my id number....

try to help me asap...

regards

pom 11-03-2010 11:56 PM

sorry to bother you but its working now...

regards

Boofo 11-04-2010 06:58 AM

Quote:

Originally Posted by StarBuG (Post 2113997)
Thank you. *installed*

The link to the Profile AboutMe Tab in the UserCP Box does not work for me.
Just a note ;)

It will only work if there is at least one referreral name to link to.


All times are GMT. The time now is 09:19 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.03692 seconds
  • Memory Usage 1,741KB
  • 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_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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