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 07-04-2010 02:44 AM

You would have to run the query for it globally, which I wouldn't recommend as it will add a query to every page.

sergioloporto 07-11-2010 12:21 PM

Hello Boofo,
thank you for this nice plugin! I have an idea to improve it more, I hope you like it and you can do it...

I think it would be an excellent feature to have your plugin do the following:

-Show something somewhere showing something like "Suggest this page to your friends";
-People clicking there are redirected to a page, where there is explained that the friends will receive the referrer link, so if they register the database is updated and their "referred friends" counter will increase;
-In this page there are fields like "name" "email" of the referrer and the text boxes for the email addresses of the friends;
-Friends will receive an email using the internal email system, eg. SNMP (if configured) and in the email text there will be the referrer link!

I would help many many people to "publicize" their sites...

What do you think? Is it feasible?

vidan 07-21-2010 03:48 PM

Quote:

Originally Posted by Boofo (Post 2064145)
You would have to run the query for it globally, which I wouldn't recommend as it will add a query to every page.

do you mind to share to query for running it in all pages
Thx boofo

Boofo 07-21-2010 07:03 PM

Quote:

Originally Posted by vidan (Post 2072497)
do you mind to share to query for running it in all pages
Thx boofo

It would be the same query that is already used, but in a different hook that is global.

PankajKumar 07-24-2010 07:18 AM

Nice plugin and will be helpful for me in next contest. Installed and marked.

sempoi 08-01-2010 09:00 AM

may i know where exactly the additional.css file locate?
i can't find the file.

Boofo 08-01-2010 10:19 AM

Quote:

Originally Posted by sempoi (Post 2077542)
may i know where exactly the additional.css file locate?
i can't find the file.

It's a template. ;)

silent angel 08-18-2010 05:01 PM

when i install it it dont accept and it shows this..

{ The following dependencies were not met:

1. This product is not compatible with version 4.0.0 Beta 4 of vBulletin. (Compatible starting with 4.0.0)
}

Boofo 08-18-2010 05:25 PM

Quote:

Originally Posted by silent angel (Post 2085868)
when i install it it dont accept and it shows this..


{ The following dependencies were not met:

1. This product is not compatible with version 4.0.0 Beta 4 of vBulletin. (Compatible starting with 4.0.0)
}


It is compatible. You will need to edit the xml file and remove 4.0.0 from this line:

Quote:

<dependency dependencytype="vbulletin" minversion="4.0.0" maxversion="" />

Make sure to click install after you install it.

silent angel 08-22-2010 05:41 PM

Quote:

Originally Posted by Boofo (Post 2085875)
It is compatible. You will need to edit the xml file and remove 4.0.0 from this line:




Make sure to click install after you install it.

thanks it is installed now but i m confused in some things it is not showing reffrer no on my profile..

where i find this option ? additional.css i did not find it plz do guide me step by step.
and
what about this code ? what to do with it .. ?

Code:

if ($mark_as_installed != 'clicked')
{
        $you_get = 'squat';
}
else
{
        $you_get = 'support';
}


gsmlover4u 08-23-2010 09:19 AM

there is no option to save additional.css template
Code:

#referrallink {
border: {vb:stylevar usercp_nav_blockbody_border};
padding: 0px 0px 6px 6px;
}
#referrallink legend {
font: {vb:stylevar navbar_font};
color: {vb:stylevar link_color};
padding: 3px;
margin-left: 4px
}


Boofo 08-23-2010 10:03 AM

Quote:

Originally Posted by silent angel (Post 2087922)
thanks it is installed now but i m confused in some things it is not showing reffrer no on my profile..

where i find this option ? additional.css i did not find it plz do guide me step by step.
and
what about this code ? what to do with it .. ?

Code:

if ($mark_as_installed != 'clicked')
{
        $you_get = 'squat';
}
else
{
        $you_get = 'support';
}


The additional.css is a template. You need to edit that in the admin cp. The referrer info will be under the About Me tab (at the bottom) in the user's profile.

You don't need to do anything with the $mark_as_installed code.

sas forum 08-24-2010 12:52 AM

I am running VB 4.0.6 PL! and I clicked "installed" for this mod.

I imported the product and added the additional CSS, but nothing shows in the User's CP. This is a pretty straight-forward install, too easy, so I thought maybe something got boogered up when In uploaded the file.

I uninstalled and tried again, still, nothing shows. Any ideas?

Thanks for this. I have no idea why VB seems to leave stuff like this out of their design.

Boofo 08-24-2010 10:39 AM

There is no 4.0.6 PL version. ;)

Also, are you using a custom skin?

sas forum 08-24-2010 08:17 PM

Quote:

Originally Posted by Boofo (Post 2088774)
There is no 4.0.6 PL version. ;)

Also, are you using a custom skin?

sorry bro, I boogered it up, I guess I was tired or something when I posted that.

I am running 4.0.6.

I got the PL 1 from the little text at the top of the admin area that says:

"Latest version available: 4.0.6 Patch Level 1" and links to the vbulletin members area for the download.

I have not done the patch yet. Too lazy I guess, or maybe i am sick of updating VB and just need a few days off from it :)

I am running a modifieid version of the default template that I created using that new template designed in VB 4. Basically, the only stuff that was changed was the colors.

Boofo 08-24-2010 08:49 PM

Quote:

Originally Posted by sas forum (Post 2089033)
sorry bro, I boogered it up, I guess I was tired or something when I posted that.

I am running 4.0.6.

I got the PL 1 from the little text at the top of the admin area that says:

"Latest version available: 4.0.6 Patch Level 1" and links to the vbulletin members area for the download.

I have not done the patch yet. Too lazy I guess, or maybe i am sick of updating VB and just need a few days off from it :)

I am running a modifieid version of the default template that I created using that new template designed in VB 4. Basically, the only stuff that was changed was the colors.

Ah, ok, you're running just the forums then. The suite doesn't have that upgrade.

You don't get the referral link box at the top of the page when you click on Settings in the header? If not, then you might not have the template hook this uses in your new template. Also, the referral names will be under the About Me tab in the profile.

sas forum 08-24-2010 09:26 PM

Don't really know. I just clicked on the link in the admin cpanel and it lets you move a dot around on some colors to get the colors you need, then it allows you to save it.

right now I have been telling people how to make their own referral link by finding out their member number and adding it to the link like:

forum/index.php?referrerid=(insert number here)

I just figured this would make it so much easier for them

Thanks man, I will try it on the default template that came with it and see if it works.

Boofo 08-24-2010 09:44 PM

Actually, unless you've changed it, this:

forum/index.php?referrerid=(insert number here)

should be this:

forum/forum.php?referrerid=(insert number here)

Let me know if it works with the default template and if you want, I can take a look at it and see what we need to fix it for you. PM the login details for the admin cp if you want me to look at it for you.

sas forum 08-24-2010 10:40 PM

Quote:

Originally Posted by Boofo (Post 2089073)
Actually, unless you've changed it, this:

forum/index.php?referrerid=(insert number here)

should be this:

forum/forum.php?referrerid=(insert number here)

Let me know if it works with the default template and if you want, I can take a look at it and see what we need to fix it for you. PM the login details for the admin cp if you want me to look at it for you.

Don't know, they both worked. I even tried them with different member numbers at the end and they both inputted the data into the referred by section in the registration form. I will just keep trying to get this mod to work, because it would be a lot easier and require a lot less work on the member's part. Let me check the default template, see what it does and get back with ya. Thanks.

Boofo 08-24-2010 10:58 PM

Quote:

Originally Posted by sas forum (Post 2089087)
Don't know, they both worked. I even tried them with different member numbers at the end and they both inputted the data into the referred by section in the registration form. I will just keep trying to get this mod to work, because it would be a lot easier and require a lot less work on the member's part. Let me check the default template, see what it does and get back with ya. Thanks.

If you are just running the forums, it might work with index.php. I'm not sure how that is set up, to be honest.

Let me know if it works with the default template and we can go from there. Since I run the default skin, that is what it was written on.

sas forum 08-24-2010 11:36 PM

Quote:

Originally Posted by Boofo (Post 2089095)
If you are just running the forums, it might work with index.php. I'm not sure how that is set up, to be honest.

Let me know if it works with the default template and we can go from there. Since I run the default skin, that is what it was written on.

It shows the referred members at the bottom of the about me like it did before, but no info box with their referral link at the top. I tried it on the default (stock) template that came with VB and also again on the one that I changed the colors on that we use right now.

Maybe there is a conflict with a current mod I have installed?

I currently have the following installed:

BBR - Google Analytics Addon
CT second_post_Ads
EveryWhere Sidebar
GlowHost - Spam-O-Matic
User CP Referral ID and Referrer in Profile
vBH - Add new tabs 1.2

Boofo 08-24-2010 11:55 PM

Are you sure you are going to the right page?

/forums/usercp.php

sas forum 08-25-2010 12:44 AM

Quote:

Originally Posted by Boofo (Post 2089111)
Are you sure you are going to the right page?

/forums/usercp.php

Ah, that is it.

For some reason I was trying to view my profile and edit my profile and everything. Never clicked "settings" to get to the usercp. Man, you are smart :) Thanks for the help, sorry for being a thorn in the side of this mod. It is a great mod and makes it a lot easier for the members to refer people. If you have a donation button, I will be happy to donate some money towards the dev of new mods as I have done with others.

Thanks for the help

Boofo 08-25-2010 01:44 AM

There is a support developer link (for donating) under my avatar in the first post. ;)

No problem. Glad all is ok now. ;)

sas forum 08-25-2010 10:07 AM

Quote:

Originally Posted by Boofo (Post 2089143)
There is a support developer link (for donating) under my avatar in the first post. ;)

No problem. Glad all is ok now. ;)

Did it, thanks.

Boofo 08-26-2010 01:04 AM

Quote:

Originally Posted by sas forum (Post 2089284)
Did it, thanks.

And it is appreciated. Thank you. ;)

karlm 09-06-2010 02:38 AM

Works :)

Thanks :))

the_ace 09-17-2010 05:24 AM

is there anyway to get the number of referrals to show in the postbits ?

Boofo 09-17-2010 07:45 AM

Quote:

Originally Posted by the_ace (Post 2099472)
is there anyway to get the number of referrals to show in the postbits ?

Not without adding a query for every post.

the_ace 09-17-2010 09:48 AM

Quote:

Originally Posted by Boofo (Post 2099516)
Not without adding a query for every post.

Thats fine. Thats not an issue for me.
I tried this as a plugin that hooks in to the posrbit_display_start:
(slightly modified from the plugin thats in vb 3.8.x
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>';

But i soon realized that I'm in way over my head with this :o

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 01:04 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.01523 seconds
  • Memory Usage 1,840KB
  • 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
  • (5)bbcode_code_printable
  • (20)bbcode_quote_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
  • (40)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