vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   e-steki Referrer Statistics (https://vborg.vbsupport.ru/showthread.php?t=101000)

Lea Verou 11-16-2005 10:00 PM

e-steki Referrer Statistics
 
This hack displays the referrers and the members they referred in a separate page. Also for registered members it displays their referrer link.

Features:
-Fully phrased
-WOL location so that it doesn't show up as Unknown location
-Usergroup permissions
-Ability to count statistics from a specific date - great for referrer contests
-Highly customizable look of the page from the admincp
-Ability to exclude specific usergroups from the statistics (eg banned users)
-Pages in the results (results per page is customizable)
-Formatted nicknames
-Ability to display post count next to each username

Installation
1. Upload the file referrers.php to your forum root directory
2. Import the product product-michelle_referrers.xml
3. Done! :) The link for the page would be like www.yoursite.com/forum/referrers.php. Place it wherever you feel it fits. :)

Do not forget to click INSTALL!!!

Changelog
version 1.1
-bugfix (when there are no results)
-new feature(postcount next to username, can be turned off via admincp)


Credits
  • Psionic Vision
  • Conqsoft
Notice: The current hack attached in the right will cut both referrals AND referrers that have registered before the cut-off date. Most people seem to only want it to cut the referrals so, if you too want that, you can replace the referrers.php in the zip with the one attached here.

ConqSoft 11-17-2005 12:46 PM

Very nice! Installed!

http://www.fireblades.org/forums/referrers.php

Found two problems though:
If you are using the File System for avatars, you get a broken link at the top left. Also, on the right, it looks like their needs to been 1 added to the colspan in the header.

Keep up the good work!

Lea Verou 11-17-2005 12:52 PM

Quote:

Originally Posted by ConqSoft
Very nice! Installed!

http://www.fireblades.org/forums/referrers.php

Found two problems though:
If you are using the File System for avatars, you get a broken link at the top left. Also, on the right, it looks like their needs to been 1 added to the colspan in the header.

Keep up the good work!

Thanks a lot Conqsoft! I had started to get disapointed cause there were no replies and this hack is the one I put most effort in than all my other hacks :o

I see no problem with the colspan. Maybe you are referring to the welcome panel? Cause guests can't see that... Maybe a test login would be useful :)

Also feel free to suggest any ideas that come to mind! :)

ConqSoft 11-17-2005 12:54 PM

Yes, the Welcome Panel.

It had:
Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('usercp_reflink')"><img id="collapseimg_usercp_reflink" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_usercp_reflink].gif" alt="" border="0" /></a> <phrase 1=$bbuserinfo[username] 2=$vboptions[bbtitle]>{$vbphrase[refstats_welcome]}</phrase></td>
</tr>
</thead>
<tbody id="collapseobj_usercp_reflink" style="$vbcollapse[collapseobj_usercp_reflink]">
<tr>
<td rowspan="2" class="alt2">
<img src="image.php?u=$bbuserinfo[userid]" border="0"></td>
<td class="alt1" align="center" colspan="7">$bbuserinfo[avatar] <b>$vbphrase[refstats_invite]</b> <br />
  <a href="register.php?referrerid=$bbuserinfo[userid]">$vboptions[bburl]/register.php?referrerid=$bbuserinfo[userid]</a></td>
</tr>
</tbody>
</table>

Removing the bold parts seems to have corrected it.

ConqSoft 11-17-2005 12:56 PM

And the above could have just been caused by the image not being displayed, since I use the file system for avatars. Any ideas on that part?

Lea Verou 11-17-2005 12:59 PM

Oh, did I forget the rowspan there? :o
I was planning to add another line but I didn't and the rowspan remained there.
I'm going to fix it thanks :)

I'll see what I can do about the avatar. Any help from a coder is really appreciated on that part.

Do you also have usernames that should be formatted but aren't? I was trying to find what causes that the whole night but no luck... :(

ConqSoft 11-17-2005 01:00 PM

Usernames seem to be formatted correctly from what I can tell.

trancetopia 11-17-2005 01:27 PM

I've been waiting for this :D Thanks, going to install!!

Lea Verou 11-17-2005 01:27 PM

Quote:

Originally Posted by ConqSoft
Usernames seem to be formatted correctly from what I can tell.

shouldn't yours for example be red?

ConqSoft 11-17-2005 01:29 PM

Quote:

Originally Posted by Michelle
shouldn't yours for example be red?

Ah yes, I was only looking in the other column. :D

ConqSoft 11-17-2005 01:31 PM

Also, I added this above the table:
Code:

<if condition="$pagenav">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
        <td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>

And changed this at the bottom:
Code:

<br/>
$pagenav

To this:
Code:

<if condition="$pagenav">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="bottom">
        <td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>

Just to keep it consistent with the rest of vBulletin. ;)

Lea Verou 11-17-2005 01:33 PM

Ah yes I hadn't thought of adding it above the table as well :)
Thanks a lot.
I think I also found a solution for the avatar problem! :)

ConqSoft 11-17-2005 01:35 PM

I decided to just pull the avatar out of the display anyway, so I'm all set.

Lea Verou 11-17-2005 01:55 PM

Product updated:
-Applied Conqsoft's fixes
-Removed the avatar

To update just re-import the product XML

Lea Verou 11-17-2005 02:06 PM

zip file updated. The problem with the formatted usernames in the referrer column is fixed! Hooray!!! :D
Just overwrite the php file :)

ConqSoft 11-17-2005 02:08 PM

Yep, that fixed it on mine.

Thanks

ConqSoft 11-17-2005 07:37 PM

Kinda related to this, has any seen a hack to allow users to edit the referral field via their User CP? A lot of my users were brought over from another system, so they weren't able to give credit to the person that referred them.

Lea Verou 11-17-2005 07:41 PM

I don't think there exists one cause only those like us who have switched from another forum system need it and I don't think that's the majority :(

Snake 11-17-2005 08:54 PM

Thank you very much! :D

G-Force 199 11-18-2005 01:08 PM

Thanks much.
Clicked Install

Lea Verou 11-18-2005 01:11 PM

Quote:

Originally Posted by G-Force 199
Thanks much.
Clicked Install

Thank you! :)

Btw I don't see any bugs reported... Is that because there aren't any ore because you don't post them? Please, all of you, post any bugs here so that it eventually gets out of beta ;)
Thanks a lot :)

Annie^.^ 11-18-2005 02:21 PM

GreaT Job!!!!! Now for addon someone could make a stat for top refferal in a 30 days , 7day, 24 hour and over all that way we could have a contest.

ConqSoft 11-18-2005 02:23 PM

It has a setting already that may help you with that:

Quote:

Date cutoff
This is useful for referral contests. Any referrers or referrals that joined before this date will be excluded from the Statistics. The date must be entered in format DD-MM-YYYY. If you set it to 0 it will display all results.

Lea Verou 11-18-2005 02:53 PM

Exactly what Conqsoft is saying ;)
If you want I could make the setting to accept hour as well and not only date. It's very easy, I just thought it is pointless and this is why I didn't incorporate it. :)

TygerTyger 11-18-2005 04:28 PM

I gave it a try, works perfectly. Great stuff, thanks, not a man :D

But since I always try to offer a suggestion when using someone's mods, perhaps when you're changing permissions for the mod in the AdminCP, usergroups should be separated with a comma (,) not a space in keeping with how it's done elsewhere in vBulletin.

Snake 11-18-2005 05:27 PM

Yep it's working all good. Looks like there aren't any bugs to report so far. ;)

nestoras 11-18-2005 05:38 PM

Nice hack Michelle!thanks!i click install!!

Ελλαδαρα ρε!!!!

Lea Verou 11-18-2005 05:50 PM

Quote:

Originally Posted by TygerTyger
I gave it a try, works perfectly. Great stuff, thanks, not a man :D

But since I always try to offer a suggestion when using someone's mods, perhaps when you're changing permissions for the mod in the AdminCP, usergroups should be separated with a comma (,) not a space in keeping with how it's done elsewhere in vBulletin.

I thought that but it would require much more code for no reason cause you don't know if a user leaves a space or not after the comma. So I'd have to make my code check whether or not there is a space and then put the userids in the array. So much more code for no actual reason as the functionality will be the same :)

nestoras χεχε, φχαριστώ :D Ελλαδάρα, ελλαδάρα αλλά μόνο εγώ κι άλλος ένας έλληνας, φτιάχνουμε hacks εδώ. Οι περισσότεροι έλληνες είναι εγωιστές και τα κρατάνε για τον εαυτό τους :( :mad:

Guys when do you think that I should get it out of beta if no other bugs are found?

TygerTyger 11-18-2005 05:58 PM

I only mentioned it because it's very easy to do, stripping whitespace is a common form function.

http://uk2.php.net/trim

I just think consistency is helpful *shrug*

Seems a popular mod already by the way :D

nestoras 11-18-2005 06:01 PM

im getting this:
Quote:

Warning: Invalid argument supplied for foreach() in /referrers.php on line 93

Warning: Invalid argument supplied for foreach() in /referrers.php on line 100

Warning: Invalid argument supplied for foreach() in /referrers.php on line 113

Warning: Invalid argument supplied for foreach() in /referrers.php on line 120

Warning: Invalid argument supplied for foreach() in /referrers.php on line 133

Warning: Invalid argument supplied for foreach() in /referrers.php on line 149

Warning: Invalid argument supplied for foreach() in /referrers.php on line 156

Warning: arsort() expects parameter 1 to be array, null given in /referrers.php on line 162

Warning: Invalid argument supplied for foreach() in /referrers.php on line 163

what i did wrong??????

Snake 11-18-2005 06:09 PM

Well I suppose you can do it right now as the mod is working just fine. ;)

Lea Verou 11-18-2005 06:39 PM

Quote:

Originally Posted by nestoras
im getting this:



what i did wrong??????

nestoras: Do you have any referrers to be displayed? Can you give me a link of where you have it?

Tygertyger: Hmmm I could possibly trim the whitespace and use as a separator the commas to store the values in the array! I knew the function trim but I just thought of that! I could also use str_replace for that... Thanks for the idea :D It will be included in the next version.
Popular mod already?? It only has 19 installs :(

Aftermath, then probably the next version will be Gold of no errors are found till then :)

nestoras 11-18-2005 06:54 PM

ok!i get it!

zappsan 11-19-2005 12:18 AM

Lovely hack.
Thanks a lot^^

/me clicks install

gspot 11-19-2005 03:41 AM

This Hack Was Already Created... Michelle Changed Some Of The Layouts And Coding Then Turn Around And Called It Hers... But Cant Give Credit...

Good Job U Sooo Called Coder.... I Hate People Like You.... Stay In Greece....

ConqSoft 11-19-2005 03:43 AM

This hack looks NOTHING like the one you did.

Lea Verou 11-19-2005 08:15 AM

gspot, this hack is completely different. If you can't determine if a code is or is not similar to yours then that's not my problem.
I got my idea from ExtProof's thread in Modification Requests some months ago, and when I learned php I made it. Simple as that. Do you really think your idea was soooo unique that it is not possible that someone else made the same thing without being aware of your hack? ;)

Btw how is "Stay In Greece...." an insult? :p

Oh and about the title "Coder" that I have: I never said that I'm a php expert. I have been learning php for only some days (or weeks) and I have to struggle most of the times to make something that an advanced coder would make in minutes. And because of this I am so certain that my code has nothing to do with yours, even before I looked at yours. Cause my code does not "comply to standards" as I don't know how to make it to do so. My code is not super-optimized cause I can't make it super-optimized. In fact my code is quite messy -as I said before- but, it works and that's enough for me to publish it :) . But if the vb.org admins have decided that someone like me should have a Coder title, well, I won't deny it :)

PS: Look at my other hacks. I always give credit when I have to. But I will NEVER give credit when I don't have to. Being a spoiled brat is not a reason to receive credits.

Lea Verou 11-19-2005 09:18 AM

Hack out of beta.
Added Tygertyger's suggestion and the usergroupids are now separated by commas. :)
To upgrade overwrite the product XML and the php file. :)

RMS-Chef 11-21-2005 11:12 PM

The date cutoff does not seem to be working right for me.

I am running a contest and you can see the referrer numbers generated from the ACP and the numbers with the same cutoff displaying nothing like it. See attached. I entered the format correctly and stuff. I am running v3.5.1 on a Linux box.

Any ideas?

Lea Verou 11-21-2005 11:31 PM

That's really strange...
Do you have any other hacks installed? Especially any that have to do with referrals?

PS: Wow, you must have a really active community!! So many referrals in just one week! Wow!!


All times are GMT. The time now is 06:30 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.01594 seconds
  • Memory Usage 1,831KB
  • 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
  • (4)bbcode_code_printable
  • (8)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
  • (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