View previous topic :: View next topic |
Author |
Message |
Viper007Bond
Joined: 15 Aug 2003 Posts: 266 Location: Portland, Oregon, USA
|
Posted: Wed Oct 22, 2003 2:20 am Post subject: refererLib Advanced Version |
|
|
I modified up Nathan's referrer hack a little. Here's some of the new stuff:
- Displays referral time.
- For recect URLs, it will now displays more than one URL per domain, but not more than one instance of each URL.
- Displays the first X characters of the referring URL, yet the link still goes to the full URL (thanks to Ciury for code).
- I think that's it...
You can get it from here:
http://files.viper007bond.com/b2/hacks/refererLib_advanced.zip
And here's it working on my stats page (just the referrer stuff, the rest is a modified version of b2stats):
http://www.viper007bond.com/stats.php
Also, unlike Nathan's version, this version requires no editing to work. You don't have to put your database information as mine pulls it from the b2config.php file. _________________ http://www.viper007bond.com
If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead.
Last edited by Viper007Bond on Wed Oct 22, 2003 5:38 am; edited 3 times in total |
|
Back to top |
|
 |
Omnipotence
Joined: 22 Oct 2003 Posts: 2
|
Posted: Wed Oct 22, 2003 3:28 am Post subject: |
|
|
Ummm... maybe I'm just dumb, but wouldn't a step by step instruction file be nice? |
|
Back to top |
|
 |
Viper007Bond
Joined: 15 Aug 2003 Posts: 266 Location: Portland, Oregon, USA
|
Posted: Wed Oct 22, 2003 5:30 am Post subject: |
|
|
I just left Nathan's instructions at the bottom of the file. However, I'll paste them here.
Quote: | Usage:
You must include the library in order to use it. Issue the include statement once on each page in which you want to use this library, before you call any of the functions. A typical include statement would be:
Code: | include("refererLib.php"); |
To log the referers visiting a given page, place this code on the page:
To show a list of 5 pages that link to the current page (ordered by most recent visit) place this code:
Code: | $list = refererList(5);
foreach ($list as $link){
print "$link<BR>";
} |
To show a list of the 5 outside links most commonly used to get to the current page:
Code: | $list = topRefererList(5);
foreach ($list as $link){
print "$link<BR>";
} |
In both cases, you can ask for a global list, i.e. a list of recent or top referers for all pages on your site that log referers:
Code: | $list = refererList(5,"global");
foreach ($list as $link){
print "$link<BR>";
} |
Or:
Code: | $list = topRefererList(5,"global");
foreach ($list as $link){
print "$link<BR>";
} |
|
Also, to create the table which you will need to do before using this file, you'll need to go to:
Code: | http://path_to_b2/refererLib.php?createTable=1 |
I just made a header for each page that has both include("refererLib.php"); and logReferer(); in it along with the top part of my pages that are all the same and then included that header file.
Then on my stats page, I used the last 2 bits of code listed there (the global ones). _________________ http://www.viper007bond.com
If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead. |
|
Back to top |
|
 |
XianghuaALPHA
Joined: 05 Aug 2003 Posts: 79 Location: Tulsa, OK
|
Posted: Wed Jan 07, 2004 5:40 am Post subject: |
|
|
Okay, sorry if I'm dumb or if this has been answered somewhere else - I just didn't find it -_-
Couple of questions -
First off - how do you call up the cool stat's and such like you have on your page? I see it listed as a feature, but am a lil slow on how to actually get it to work -_-
Second - I edited my ingore list - too late - is there anyway that comes off later or ugh. No? Here's what it's doing http://www.onedamnpixel.com/blog/ - on the right
Third - I REALLY love the google hack to like - have recent quirys or whatever shown in the bar as well.... but like - your version and the hack to do so - don't like each other -_-
Here is the google version -
http://tidakada.com/board/viewtopic.php?p=18348#top
Do you have any - hints - idea's - something - to help me be able to run both at the same time? I am a designer here, as you might see by the lavish header haha, and not a coder - so be nice and slow please I can only take so much code before my brain goes tilt -_-
THANK YOU!
**edit - I think the time thing - has something to do with - haveing the stats hack installed too or no?
Anyway I'm shooting for
a "These things got people here" with the google / search terms
a "These SE's like me" list where just SE's or yea are shown for how many times linked or yea
a "These pages link to me" where yea, it shows non SE's that are linked in...
I thought I could do it all through this, but then I got to reading closer and I think I got that wrong. Then again I don't know much -_- So yea, anything or pointing me in the right direction will be much appreciated  _________________ [ [ - - There can be only 2 or 3 - - ]]
You know what. On a quite board - you end up talking to yourself alot....
Friends don't let friends play Tekken™ |
|
Back to top |
|
 |
XianghuaALPHA
Joined: 05 Aug 2003 Posts: 79 Location: Tulsa, OK
|
Posted: Thu Jan 15, 2004 4:38 pm Post subject: |
|
|
Uhm yea. Also I've been having this problem as well -
http://cafelog.com/board/viewtopic.php?p=22391#22391
is it because I mixed referrer version code or huh? I am not really a pro at this - so any help would help.
X A _________________ [ [ - - There can be only 2 or 3 - - ]]
You know what. On a quite board - you end up talking to yourself alot....
Friends don't let friends play Tekken™ |
|
Back to top |
|
 |
Viper007Bond
Joined: 15 Aug 2003 Posts: 266 Location: Portland, Oregon, USA
|
Posted: Thu Jan 15, 2004 9:31 pm Post subject: |
|
|
XianghuaALPHA wrote: | Second - I edited my ingore list - too late - is there anyway that comes off later or ugh. No? Here's what it's doing http://www.onedamnpixel.com/blog/ - on the right |
Just edit the table that the script created in the database via phpMyAdmin or whatever. There is a line per referral.
XianghuaALPHA wrote: | Third - I REALLY love the google hack to like - have recent quirys or whatever shown in the bar as well.... but like - your version and the hack to do so - don't like each other -_-
Here is the google version -
http://tidakada.com/board/viewtopic.php?p=18348#top
Do you have any - hints - idea's - something - to help me be able to run both at the same time? I am a designer here, as you might see by the lavish header haha, and not a coder - so be nice and slow please I can only take so much code before my brain goes tilt -_- |
Haven't really messed around with that hack, but I'll look into. _________________ http://www.viper007bond.com
If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead. |
|
Back to top |
|
 |
XianghuaALPHA
Joined: 05 Aug 2003 Posts: 79 Location: Tulsa, OK
|
Posted: Thu Jan 15, 2004 9:38 pm Post subject: |
|
|
AHhh cool, okay on the entries / yea.
On the hack - yes! Thank you! I think they are both great, and I notice your running the referals and it's just showing the google addy's - so how much cooler would it be to combine / yea those? That way you could show google.com serach - blah vs the whole quiery string or whatever
X A _________________ [ [ - - There can be only 2 or 3 - - ]]
You know what. On a quite board - you end up talking to yourself alot....
Friends don't let friends play Tekken™ |
|
Back to top |
|
 |
Viper007Bond
Joined: 15 Aug 2003 Posts: 266 Location: Portland, Oregon, USA
|
Posted: Fri Jan 16, 2004 11:54 am Post subject: |
|
|
Viper007Bond wrote: | XianghuaALPHA wrote: | Third - I REALLY love the google hack to like - have recent quirys or whatever shown in the bar as well.... but like - your version and the hack to do so - don't like each other -_-
Here is the google version -
http://tidakada.com/board/viewtopic.php?p=18348#top
Do you have any - hints - idea's - something - to help me be able to run both at the same time? I am a designer here, as you might see by the lavish header haha, and not a coder - so be nice and slow please I can only take so much code before my brain goes tilt -_- |
Haven't really messed around with that hack, but I'll look into. |
I didn't like the way it did it (I want unique searches), so I'm essentially rewriting both Nathan's hack and the Google one to work together and to be much better. Stay tuned. _________________ http://www.viper007bond.com
If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead. |
|
Back to top |
|
 |
XianghuaALPHA
Joined: 05 Aug 2003 Posts: 79 Location: Tulsa, OK
|
Posted: Fri Jan 16, 2004 8:27 pm Post subject: |
|
|
: sets up base camp; awaits info from above :
X A _________________ [ [ - - There can be only 2 or 3 - - ]]
You know what. On a quite board - you end up talking to yourself alot....
Friends don't let friends play Tekken™ |
|
Back to top |
|
 |
XianghuaALPHA
Joined: 05 Aug 2003 Posts: 79 Location: Tulsa, OK
|
Posted: Tue Jan 20, 2004 1:23 am Post subject: |
|
|
Oh yea - btw - like - I'm noticing there is no "topGoogleList" call / feature I guess? So like - it just shows the most recent - and no option to have the ability to show the top referrals like the referral code does....
..Is that something you may / are fixing too?
[ hearts referral lovin ]
X A _________________ [ [ - - There can be only 2 or 3 - - ]]
You know what. On a quite board - you end up talking to yourself alot....
Friends don't let friends play Tekken™ |
|
Back to top |
|
 |
XianghuaALPHA
Joined: 05 Aug 2003 Posts: 79 Location: Tulsa, OK
|
Posted: Tue Jan 27, 2004 2:28 am Post subject: |
|
|
Yes - the need to have both recent google love and top google love = top tier! Anyway- so I thought I'd also mention this...
I was going through the hacks trying to figure out how in the hell to call a list of my last 5 entry titles up - on my b2 blog and on my first page of my site, and then also perhaps find a way to pull my last entry up on my first page - when I found a old hack I wanted to use - Random quote generator love - and like - checking it out to see if he still had it up - noticed his top reffer's list - found here -
http://www.redpointlife.com/joseph/
The links - don't go the base dir [often not the right place to send them anyway, say in search.yahoo.com cases an yea] and thus - seems alot tttt better imo. That way - when they click the 'top referrer' - yea tehy get to SEE google.com - but it goes' to the most refferred yea...
Also - like yea - I don't remember if I'd asked for it / mentioned it before - but a way to translate, like if nothing else google powered sites like Yahoo and AOL - to do the google hack to them too - would be awesome
X A _________________ [ [ - - There can be only 2 or 3 - - ]]
You know what. On a quite board - you end up talking to yourself alot....
Friends don't let friends play Tekken™ |
|
Back to top |
|
 |
Viper007Bond
Joined: 15 Aug 2003 Posts: 266 Location: Portland, Oregon, USA
|
Posted: Thu Jan 29, 2004 6:44 am Post subject: |
|
|
Sorry, haven't had much of a chance to work on this. Have another big project I was working on before you asked me to do this.
And yes, it will support top Google searches. I'm gonna rewrite a bunch of the hack and have the Google search term be stored in the database, etc. Lot of work, but I have a prior commitment. I'll get to it when I can. Sorry 'bout that. _________________ http://www.viper007bond.com
If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead. |
|
Back to top |
|
 |
XianghuaALPHA
Joined: 05 Aug 2003 Posts: 79 Location: Tulsa, OK
|
Posted: Thu Jan 29, 2004 4:02 pm Post subject: |
|
|
Bah! Don't worry bout the delay - your one of the FEW people on this board doing anything from what I've seen my friend... So yea - don't WORRY A BIT! Take your time - and have good times - we'll - or at least me heh - will look forward to getting ahold of the beauty once you do have the time!
X A _________________ [ [ - - There can be only 2 or 3 - - ]]
You know what. On a quite board - you end up talking to yourself alot....
Friends don't let friends play Tekken™ |
|
Back to top |
|
 |
Viper007Bond
Joined: 15 Aug 2003 Posts: 266 Location: Portland, Oregon, USA
|
Posted: Mon Mar 15, 2004 6:47 am Post subject: |
|
|
XianghuaALPHA - are you still interested in this? I finally finished my huge project I was busy with and can do this if you still want it.
Why you are still with b2 instead of WordPress or b2evo I don't understand though. _________________ http://www.viper007bond.com
If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead. |
|
Back to top |
|
 |
|