Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
[AJAX] Websites who have referred today (in the last 24 hours) Details »»
[AJAX] Websites who have referred today (in the last 24 hours)
Version: 1.62, by RedTyger RedTyger is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.6.8 Rating:
Released: 01-27-2007 Last Update: 11-18-2007 Installs: 424
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Websites who have referred today (in the last 24 hours)


Description:
Lists all websites who have sent you visitors in the last day.

Each time a person arrives at your forum by clicking on a link from another website, the website URL they arrived from is listed on the index page of your forum in the same manner as members who are logged in. Screenshots at the foot of this post.


Options: (AdminCP > vBulletin Options > Websites who have referred today)
Turn it on or off
Mod goes on, mod goes off. Mod goes on, mod goes off.

Enable display for UsergroupIDs
Enter the IDs of the usergroups you wish to be able to view referring links, separated by commas (,). (i.e 1,2,3). Leave blank to display referring links to everyone.

Enable referrer page title? (https://vborg.vbsupport.ru/attachmen...0&d=1170326535)
Choose Yes to store the page title of the referrer, which will be used as the link text. If this is not enabled or not available, a trimmed version of the URL will be used.

This may incur a slight penalty on page-load time when a visitor first arrives from a referrer or possibly be problematic where referring pages time out or redirect.

Trim URL variables?
Choose Yes to remove variables from the end of URLs to shrink listing repeats. (i.e. Set to No, every different search from Google will add a new www.google.com referral to the listings. Set to yes, all will be compressed into one listing but the search terms will be lost.)

Blockword List:
Enter character strings to be prevented from being added to the URL database, separated by commas (,). You may use any part of domains (www.xxx or xxx or www.xxx.com or .com).

Highlight arrivals from a referrid link?
Choose Yes to highlight in italics referrers using a forum member's referral link.

For this to work, you must have "Trim URL variables" to No.

Highlight domain list
Enter domains to be highlighted using the markup belowe, separated by commas (,). You must use the format domain.ext, exclude the http://(www.) part. (i.e. redtyger.co.uk)

Opening tag for highlighted domain markup
Enter HTML and/or text that will be placed before the domain name.

Closing tag for highlighted domain markup
Enter HTML and/or text that will be placed after the domain name.


Additional Features:
AJAX inline moderation (https://vborg.vbsupport.ru/attachmen...2&d=1170095586)
Click on the X next to any domain to remove it from the database. No page loads, no waiting.

Scheduled Task (Cron)
All domains are cleared at midnight daily. You can edit the Scheduled task to have the database cleared when and as often as you like. All scheduled clearances are logged and phrased. Like any other vBulletin Scheduled task you must have activity or the scheduled task will not run.

Manual database clearance
As well as removing any individual domain, you can clear the referral database at any time using a link from the index page.

Queries:
This modification adds one very small query for every arrival from an external link. One additional larger query is used on the index page to construct the list.


Installation Instructions:
1. Go to AdminCP > Plugins & Products > Manage Products > Add/Import Product.
2. Upload the websites_who_have_referred_today.xml file.
3. Upload the wwhrt.php file to the includes/cron folder of your forum directory.
4. Open AdminCP > Styles & Templates > (Your Theme) Edit Templates > Forumhome templates > FORUMHOME.
5. FIND:

Code:
<!-- end logged-in users -->
</if>

BELOW, ADD:

Code:
<if condition="$vboptions[referrers_onoff] AND is_member_of($bbuserinfo, $referrers_usergroupids) OR !$vboptions[referrers_usergroupids]">
<!-- websites who have referred today -->
<thead>
	<tr>
		<td class="thead" colspan="2"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('referrers_today')"><img id="collapseimg_referrers_today" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_referrers_today].gif" alt="" border="0" /></a>
			$vbphrase[referrers_today]: $url_count <if condition="$url_count >= $vboptions[referrers_last_x_referrers] AND $vboptions[referrers_last_x_referrers]"><phrase 1="$vboptions[referrers_last_x_referrers]"> ($vbphrase[referrers_last_x_count])</phrase></if>
			<if condition="$bbuserinfo['usergroupid'] == '6'"> (<a href="index.php?$session[sessionurl]do=kill_all_referrers">$vbphrase[referrers_kill_all]</a>)</if>
		</td>
	</tr>
</thead>
<tbody id="collapseobj_referrers_today" style="$vbcollapse[collapseobj_referrers_today]">
	<tr>
		<td class="alt2">
			<img src="$stylevar[imgdir_misc]/stats.gif" alt="$vbphrase[referrers_today]" border="0" />
		</td>
		<td class="alt1 smallfont">
			$referrers
		</td>
	</tr>
</tbody>
<!-- end websites who have referred today -->
</if>

And save the template. Done!


Donations

If you have a pressing wish to donate money to me (and of course, you do) to say thank you and to possibly encourage more future work then you can do via the link below. Also, you will go to heaven.

http://redtyger.co.uk/donations.php

Don't panic! The donations link is only hosted on my website so it can be encrypted and not open my email address to spammers.


Changelog

v1.1 Added AJAX inline moderation (Yay!) and ability to clear the list via a link on the index page without waiting from the Scheduled Task to do it. Admins only may do either task.
v1.1 Changed the screenshot to show the inline deletion links.
v1.1 Fixed incorrect cron timing (Scheduled Task) and phrased it.
v1.1 Fixed issue with domains that sometimes had www. and sometimes did not. This also now shortens any URL which I was meaning to do anyway, so www.google.com will appear in the list as google.com. Smartens things up and gives a bit more room too.
v1.1 Changed URL encoding to avoid problems with domains that contained hypens.
v1.1 Fixed blockwords not working. They are still only checked when a domain is first added, but inline moderation means you can now take care of it yourself afterwards if necessary..
v1.1 Minor optimisations.

v1.5 Added Archive referral recording.
v1.5 Added Usergroup display controls.
v1.5 Added option to record and use referring page title as link text instead of trimmed domain. (https://vborg.vbsupport.ru/attachmen...0&d=1170326535)
v1.5 Added option to highlight referrals that have arrived from a forum member's referral link.
v1.5 Added option to highlight with custom markup any domains of your choice.
v1.5 Fixed workaround for apparent PHP bug where a letter would occasionally be removed from the beginning of URLs
v1.5 Fixed issue with multiple blockwords, I swear to God it's fixed this time. Probably.
v1.5 Fixed issue with AJAX inline moderation only deleting the last URL in the list.
v1.5 Changed minor optimisations.

v1.51 Fixed bug where multiple versions of the same forum URL were used for access.

v1.6 Added option to limit number of recent URLs displayed
v1.6 Added option to trim referrer additions to the domain name only to further limit repeat listings
v1.6 Added URL sorting, referrers are now listed in reverse order (last addition first)
v1.6 Fixed catch for https and ftp URLS.
v1.6 Fixed bug where a w would be trimmed off the beginning of URLS.
v1.6 Fixed blockwords not working (Oh please, oh please, oh please)
v1.6 Minor optimisations

v1.61 Added compatiblity with vBulletin 3.5.x
v1.61 Probably fix to possible referrer text exploit.

v1.62 Added securing of HTML tags as a security measure.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #262  
Old 10-30-2007, 07:14 AM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question, One of my members noticed something very weird in my [AJAX] Websites who have referred today (in the last 24 hours) box below our forums, you will notice very large text. Yes they were links. No, to my knowledge no-one clicked them. I also went into my admincp to see if any of my admins did this, I saw nothing regarding this in our logs. Can you tell me what would cause this to happen & what I can do to prevent it from happening again? I have [AJAX] Websites who have referred today (in the last 24 hours) dis-abled for now pending comments here. Thanks, Tim





Note, This Particular Site is vb3.6.5
Reply With Quote
  #263  
Old 10-30-2007, 07:43 AM
RedTyger's Avatar
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Location: UK
Posts: 1,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, the screenshot makes all the difference, thank you. This looks to me like Referer spoofing. Since the modification looks at the page the visitor came from and adds it to the database, if the visitor fakes that information then whatever they change it to will be added just the same.

They could also do it (if you have the "Use page titles" option enabled) by creating a webpage with the title "Hello, you've just been hacked" and adding a link to your forum in the page. When they click on the link, the modification will read the "Hello, you've just been hacked" title and add it.

It isn't hacking, its just a slightly crummy trick. I may add one or two tests to try and guess if a referrer is genuine but its not possible to be 100% sure and its not possible to check with page titles at all. If the blocklist isn't functioning properly then I'll try and fix that, because that is the best way to deal with it. Otherwise, just delete them. No harm done.
Reply With Quote
  #264  
Old 10-30-2007, 09:30 AM
momo2 momo2 is offline
 
Join Date: Feb 2007
Posts: 327
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for update... I love this and keeps me alert...
Reply With Quote
  #265  
Old 10-31-2007, 04:19 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RedTyger View Post
Ah, the screenshot makes all the difference, thank you. This looks to me like Referer spoofing. Since the modification looks at the page the visitor came from and adds it to the database, if the visitor fakes that information then whatever they change it to will be added just the same.

They could also do it (if you have the "Use page titles" option enabled) by creating a webpage with the title "Hello, you've just been hacked" and adding a link to your forum in the page. When they click on the link, the modification will read the "Hello, you've just been hacked" title and add it.

It isn't hacking, its just a slightly crummy trick. I may add one or two tests to try and guess if a referrer is genuine but its not possible to be 100% sure and its not possible to check with page titles at all. If the blocklist isn't functioning properly then I'll try and fix that, because that is the best way to deal with it. Otherwise, just delete them. No harm done.

Thank you for the info...
Reply With Quote
  #266  
Old 10-31-2007, 04:34 PM
TrIn@dOr TrIn@dOr is offline
 
Join Date: Nov 2006
Location: South Bend, IN
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TrIn@dOr View Post
I can't see the deletion of all referrals or of individual...
I can't delete individuals or all of them, why?
Reply With Quote
  #267  
Old 10-31-2007, 04:53 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Look at my SS above , you will see remove all referals just above the box.
Reply With Quote
  #268  
Old 10-31-2007, 05:03 PM
TrIn@dOr TrIn@dOr is offline
 
Join Date: Nov 2006
Location: South Bend, IN
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by blind-eddie View Post
Look at my SS above , you will see remove all referals just above the box.
Nope, i don't see the [X] no where.

The group admin need to be primary group or secondary?

EDIT//

Yep, if the Admin group is secondary on a user, he can't remove referrals, fix?
Reply With Quote
  #269  
Old 11-01-2007, 05:49 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TrIn@dOr View Post
Nope, i don't see the [X] no where.

The group admin need to be primary group or secondary?

EDIT//

Yep, if the Admin group is secondary on a user, he can't remove referrals, fix?
Same here. I even tried to mess with the code.
Reply With Quote
  #270  
Old 11-01-2007, 08:05 PM
mystic10 mystic10 is offline
 
Join Date: Sep 2007
Posts: 298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PROBLEM IS THAT WEBSITE REFERR DOSENT HAVE A BOX OF ITS OWN PLEASE SEE LINK AND PIC TO BETTER UNDERSTAND WHAT I MEAN..THANKS FOR UR HELP
http://tinypic.com/view.php?pic=67d2urt&s=1

Reply With Quote
  #271  
Old 11-03-2007, 11:00 AM
Wulfnoth Wulfnoth is offline
 
Join Date: Aug 2006
Location: Bremen, Germany
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get the following error on my page:

Code:
Warnung: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /index.php(537) : eval()'d code (Zeile 66)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05897 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete