vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Home Enhancements - [AJAX] Websites who have referred today (in the last 24 hours) (https://vborg.vbsupport.ru/showthread.php?t=137792)

RedTyger 01-27-2007 10:00 PM

[AJAX] Websites who have referred today (in the last 24 hours)
 
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.

NaughtyStud 01-28-2007 09:32 PM

Just installed and it looks like a great mod.Thanks :D

snakeair 01-28-2007 10:14 PM

I just installed this and looks great. Just have to wait for someone to stop by now. :)

Staxed 01-28-2007 11:23 PM

could you add a feature to this that instead of showing on the main page...it will show in the Admin Panel Home Page?

sebbe 01-28-2007 11:36 PM

Great hack, will take a look at this tomorrow probably.

rolliet 01-29-2007 12:08 AM

is there a way to make this viewable by select groups?

TheBlackPoet 01-29-2007 03:57 AM

yes... select groups... that is what i came back to see......

rantrave 01-29-2007 04:31 AM

I'm having a small issue with this program. It seems that it's adding my own website as a referrer every time someone navigates the forum, for example domain.com/forum/online.php, /forum/logout.php, etc... I have added my own URL to the blacklist with no resolution.

Also, turning off the search strings creates a referral of "Array".

Any reasons this could be happening?

RedTyger 01-29-2007 07:02 AM

Change this line in the template modification:
Code:

<if condition="$vboptions[referrers_onoff]">

to this
Code:

<if condition="$vboptions[referrers_onoff] AND is_member_of($bbuserinfo, 1,2,3)">

Change 1,2,3 to whatever usergroups you want to allow to see the list.




Your forum is down but I have a suspicion it's because I forgot to account for URLs with hypens. :rolleyes: Might be a setting issue though, can you tell me exactly what you have entered in AdminCP > vBulletin Options> Site URL > Forum URL.

Blocked words work by blocking entries from being made in the first place, NOT from them being added if they're already there. So once the domain containing the keywords is removed, it won't be added again but it will continue to count up until then. This was done to keep the recording of referrers very quick. I'm looking to add an inline-delete for the next version to make this more usable.

Hornstar 01-29-2007 07:23 AM

Okay thanks for the above, however is there a way to show this on a seperate page instead of down there, so that way not only can I set which usergroups can see it, but I can also put it in a location where I wont have to see it all the time.

Thanks.

RedTyger 01-29-2007 07:25 AM

You will have to edit the plugin to do that.

Veer 01-29-2007 10:12 AM

Thanks, Installed :)

projectego 01-29-2007 11:35 AM

Great hack. Thank you, RedTyger! ;)

RedTyger 01-29-2007 11:39 AM

Glad people like it. :)

But there's a couple of problems at the moment, I have removed the zip so people don't install something they'll only have to replace 5 minutes later. Subscribe to this thread if anyone is interested, I'll be releasing a fixed version ASAP. Sorry everyone.

rantrave 01-29-2007 11:49 AM

Quote:

Originally Posted by RedTyger (Post 1169586)
Your forum is down but I have a suspicion it's because I forgot to account for URLs with hypens. :rolleyes: Might be a setting issue though, can you tell me exactly what you have entered in AdminCP > vBulletin Options> Site URL > Forum URL.

http://www.rant-rave.com/forum


Quote:

Originally Posted by Redtyger
Blocked words work by blocking entries from being made in the first place, NOT from them being added if they're already there. So once the domain containing the keywords is removed, it won't be added again but it will continue to count up until then. This was done to keep the recording of referrers very quick. I'm looking to add an inline-delete for the next version to make this more usable.

I am going to remove the permissions from this so that you can see what I'm talking about. Please visit my homepage again to see the 143 different referrals that are my site.

Staxed 01-29-2007 12:04 PM

Quote:

Originally Posted by Irisfire (Post 1169386)
could you add a feature to this that instead of showing on the main page...it will show in the Admin Panel Home Page?

are you thinking about adding that feature?...

RedTyger 01-29-2007 12:05 PM

Quote:

Originally Posted by rantrave (Post 1169722)
I am going to remove the permissions from this so that you can see what I'm talking about. Please visit my homepage again to see the 143 different referrals that are my site.

Yes, I see it now. The problem is that while your forum URL has been defined as http://www.rant-rave.com/forum/, for some reason there are a lot of people using a version without the www. part. Since the incoming URL doesn't match the forum URL, the plugin thinks it's a different site.

I believe I have this fixed for the next version.

Quote:

Originally Posted by Irisfire (Post 1169734)
are you thinking about adding that feature?...

No, sorry. If you don't want to look at it all the time, collapse it (next version, forgot to add that bit of the template edit this time).

rantrave 01-29-2007 12:39 PM

Quote:

Originally Posted by RedTyger (Post 1169735)
Yes, I see it now. The problem is that while your forum URL has been defined as http://www.rant-rave.com/forum/, for some reason there are a lot of people using a version without the www. part. Since the incoming URL doesn't match the forum URL, the plugin thinks it's a different site.

I believe I have this fixed for the next version.

Gotcha! I've disabled this for now and have cleared the database urls. Thanks for the quick response, it's something you don't always get here! I look forward to your update.

acegames 01-29-2007 01:18 PM

Download Now

No files uploaded.

Where is the download ?

vwdforum 01-29-2007 01:34 PM

read the previous page, he's updating it. Subscribe to thread for further news

laskos 01-29-2007 02:13 PM

can this work for 3.5.4

RedTyger 01-29-2007 04:29 PM

Ok, let's try this again shall we? The new version of the product has been uploaded, all of it has changed so you must UNINSTALL the version you have, then upload this plugin, upload the includes file and redo the template edit.

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.
- Changed the screenshot to show the inline deletion links.
- Fixed incorrect cron timing (Scheduled Task) and phrased it.
- 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.
- Changed URL encoding to avoid problems with domains that contained hypens.
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..
- Minor optimisations.

rantrave 01-29-2007 04:52 PM

It's working perfectly RedTyger, thanks a million. Excellent MOD!

laskos 01-29-2007 04:58 PM

will this work on 3.5.4 before i install it ?

RedTyger 01-29-2007 05:36 PM

Quote:

Originally Posted by laskos (Post 1169914)
will this work on 3.5.4 before i install it ?

Install the plugin linked below first and it should do, yes.

https://vborg.vbsupport.ru/showthread.php?t=134603

Mecho 01-29-2007 09:55 PM

Quote:

Originally Posted by RedTyger (Post 1169586)
Change this line in the template modification:
Code:

<if condition="$vboptions[referrers_onoff]">

to this
Code:

<if condition="$vboptions[referrers_onoff] AND is_member_of($bbuserinfo, 1,2,3)">

Change 1,2,3 to whatever usergroups you want to allow to see the list.

i could not find it !! any idea ??

p.s. thanks for u great hack :) :up:

RedTyger 01-29-2007 09:58 PM

Quote:

Originally Posted by Mecho (Post 1170089)
i could not find it !! any idea ??

p.s. thanks for u great hack :) :up:

It's the first line of the code you have to add in the instructions.

Lord Kirken Mor 01-30-2007 12:59 AM

great but how do i add a title above it saying Referalls: i attached what shows up right now.

Shazz 01-30-2007 01:26 AM

Very interesting, It started saying my sites name 10 times and couldn't take if off :(

Lord Kirken Mor 01-30-2007 02:11 AM

ok i seen where its at, above the members logged in. This is how i have it.

Code:

<!-- websites who have referred today -->
<tbody>
<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="$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>


BigJimTheLug 01-30-2007 04:45 AM

This modification is great!
Works nicely.
Come see for yourself!
http://forums.puremarketprofits.com

RedTyger 01-30-2007 06:44 AM

Quote:

Originally Posted by Shazz (Post 1170241)
Very interesting, It started saying my sites name 10 times and couldn't take if off :(


Link please? I need some details if I'm going to know what I or you have to fix. ;)


Quote:

Originally Posted by Lord Kirken Mor (Post 1170263)
ok i seen where its at, above the members logged in. This is how i have it.

Code:

<!-- websites who have referred today -->
<tbody>
<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="$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>



You've done the template edit wrong. :p Remove it all and try again.


Quote:

Originally Posted by laskos (Post 1169914)
will this work on 3.5.4 before i install it ?

I take back what I said earlier, according to this thread it will not with pre-3.6 versions, as it uses cron.


Quote:

Originally Posted by MARKETPROFITS (Post 1170342)
This modification is great!
Works nicely.
Come see for yourself!
http://forums.puremarketprofits.com

It appears to be removing the first letter in any domain that begins with a "t". :confused:

BigJimTheLug 01-30-2007 12:58 PM

This mod removes the letter "T" from websites starting with "T".

Something is wrong, help please.

StarBuG 01-30-2007 01:00 PM

Quote:

Originally Posted by RedTyger (Post 1170384)
It appears to be removing the first letter in any domain that begins with a "t". :confused:

It does the same on my site.

I have a site called www.patientenfragen.net

Every referrer from my site patientenfragen.net is listed as atientenfragen.net without the p at the beginning.

RedTyger 01-30-2007 01:39 PM

Do either of you have access to your forum databases? It would be very helpful if you could look at the referrers > url rows and see if the URLs are being stored with or without the first letter.

BigJimTheLug 01-30-2007 01:52 PM

Quote:

Originally Posted by MARKETPROFITS (Post 1170520)
This mod removes the letter "T" from websites starting with "T".

Something is wrong, help please.


This mod also removes the letter "P"

lol.

something is up..lol..

BigJimTheLug 01-30-2007 01:52 PM

Quote:

Originally Posted by RedTyger (Post 1170537)
Do either of you have access to your forum databases? It would be very helpful if you could look at the referrers > url rows and see if the URLs are being stored with or without the first letter.

Yes I have access.

RedTyger 01-30-2007 01:58 PM

Quote:

Originally Posted by MARKETPROFITS (Post 1170544)
Yes I have access.

It doesn't matter! I just remembered I have a domain I can test on. I can't think of a reason why it should be only removing the first T or P at the moment, please bear with me... :confused:

Guest210212002 01-30-2007 02:33 PM

[high]* Guest210212002 clicks install
[/high]

One thing that would be nice would be the ability to shorten the URL to the TLD only. For example I have a few instances of things like "by119fd.bay119.hotmail.msn.com (2)" that look a little strange.

Also, I'd like to remove the full link to the referrer, at the very least for normal users. It's also stripping the letter H for me as well.

Great mod, cheers. :)

Guest210212002 01-30-2007 02:57 PM

Quote:

Originally Posted by rolliet (Post 1169408)
is there a way to make this viewable by select groups?

Add the red:

Code:

<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6))">
<!-- websites who have referred today -->

And:

Code:

<!-- end websites who have referred today -->
</if>

Basically just wrapping the actual call to it in FORUMHOME inside an if condition. Change the 5,6 to whatever usergroup numbers you would like to see it.


All times are GMT. The time now is 09:28 AM.

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.02994 seconds
  • Memory Usage 1,872KB
  • 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
  • (10)bbcode_code_printable
  • (18)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