Author |
Message |
Dawg
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/46907b8543f928e08c8d7.gif)
Joined: Nov 07, 2003
Posts: 928
|
Posted:
Mon Jun 01, 2009 4:16 pm |
|
I really really miss....The Referrer Block.
I looked in the database for the NS referrers. I found it. It has them in ABC order. It does not log the entire link....just the domain url.
I really miss the Old Referrer Blocks. It made for really cool reading at times to see where the traffic was coming from.
Am I missing something here? Can we get the latest Referrer and the complete url from the NSreferrers?
If I am missing something....PLEASE tell me so I can go make a block to display them!
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Mon Jun 01, 2009 4:32 pm |
|
The referrers code was removed due to an outstanding security problem with inherited *nuke code.
As it was me that grabbed the 'issue' I didn't see the point in fixing up old code when it is more or less duplicated in NS (referer logging not the 'problem').
As we are now maintaining NS, they may be a chance of creating a block to display referers but I couldn't guarantee it for certain.
Personally, it would be nice to have such a block but have it cached so it only updated once an hour or something to save on DB reads. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sexycoder
Spammer and overall low life
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Feb 02, 2009
Posts: 82
|
Posted:
Mon Jun 01, 2009 6:16 pm |
|
Yeah I saw it was removed. I missed Referrer too. Instead of removing things why not make it more secure. I think referrer should come together with the last version of RN. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Mon Jun 01, 2009 6:50 pm |
|
sexycoder wrote: | Yeah I saw it was removed. I missed Referrer too. Instead of removing things why not make it more secure. I think referrer should come together with the last version of RN. |
Why keep duplicate features (short the block)? |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jun 01, 2009 7:01 pm |
|
Palbin,
That is just it. It was not a "Duplicate" feature.....a related feature maybe.
The existing NSReferrers just needs a couple features "Added" to it....
To be able to sort by time/date
Full URL not just domains
Then writing the block would be easy.
I really miss it.
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jakec
Site Admin
![](modules/Forums/images/avatars/502a2d1345d88a86ddb4a.png)
Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Tue Jun 02, 2009 12:16 am |
|
I think you may be looking in the wrong place.
Have a look at Tracked IP Menu, then Display Tracked Refers. In there you will be able to sort them by Date, Referer and Hits, either Ascending, or Descending.
I believe this log is more detailed than the Old Referers Module. ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
draxx
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Nov 19, 2003
Posts: 282
|
Posted:
Tue Jun 02, 2009 12:40 am |
|
jakec wrote: | I think you may be looking in the wrong place.
Have a look at Tracked IP Menu, then Display Tracked Refers. In there you will be able to sort them by Date, Referer and Hits, either Ascending, or Descending.
I believe this log is more detailed than the Old Referers Module. |
It does and it even shows you what pages they visited. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 02, 2009 12:56 pm |
|
I was looking in the wrong place THANK YOU. That is why I said in the orginal post....
"If I am missing something....PLEASE tell me so I can go make a block to display them! "
I will see if I can whip up a block tonight to display them.
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jakec
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 02, 2009 2:44 pm |
|
Cool, I am glad we are all on the same page now.
Looking forward to seeing your block. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sexycoder
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 02, 2009 10:30 pm |
|
WOW! I guess I didnt look well. Thanks jakec I found referals. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jun 03, 2009 10:07 pm |
|
OK....I am stuck now....
Code: $querystr = "SELECT refered_from,date FROM ".$prefix."_nsnst_tracked_ips ORDER BY date ASC LIMIT 30" ;
$result = $db->sql_query($querystr, $db)
or die ("invalid query in towndisplay");
for ($n=0; $n < sql_num_rows($result, $db); $n++)
{
list ($refered_from,$date) = mysql_fetch_row($result);
if($refered_from !="on site" AND $refered_from !="none" AND $refered_from !="local") {
echo "$refered_from - $date";
echo "<br />";
};
$tt++;
}
|
There are a couple of "Issues" with this....
#1 I keep getting referrers from my own domain....
#2 If I limit it to 30 in the sql call....by the time I ditch the on site, local and none I have like 5 left
How do I keep looping till I get 30 referrers from OTHER sites?
#3 I am sure I have screwed this all up and I am doing is ass backward.
Help? PLEASE!
Thank You for your time for us mear wannabees!
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jun 03, 2009 11:12 pm |
|
You don't those $db's for a start.
Code:
$querystr = "SELECT refered_from,date FROM ".$prefix."_nsnst_tracked_ips ORDER BY date ASC LIMIT 30" ;
$result = $db->sql_query($querystr)
or die ("invalid query in towndisplay");
for ($n=0; $n < sql_num_rows($result); $n++)
{
list ($refered_from,$date) = mysql_fetch_row($result);
if($refered_from !="on site" AND $refered_from !="none" AND $refered_from !="local") {
echo "$refered_from - $date";
echo "<br />";
};
$tt++;
}
|
I'm no SQL expert but the rest looks good to me. It seems that you are pulling only 30 results so if only 5 don't meet your exclusions (none, local and on_site) then you are only going to get 5 results returned.
Maybe you can put the exclusion in the initial query so that it returns 30 results that meet the criteria.
Code:
$querystr = "SELECT refered_from, date FROM ".$prefix."_nsnst_tracked_ips WHERE refered_from <>'local' AND refered_from<>'on_site' AND ..... ORDER BY date ASC LIMIT 30" ;
$result = $db->sql_query($querystr, $db)
or die ('No Results');
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 10:50 am |
|
I had never seen that...THANK YOU!
Code: $querystr = "SELECT refered_from,date FROM ".$prefix."_nsnst_tracked_ips WHERE refered_from <>'local' AND refered_from<>'on_site' AND refered_from<>'none' AND refered_from<>'mydomain.com' ORDER BY date DESC LIMIT 50" ;
|
Now if I can just weed out ALL the entries that come from my domain it would be RIGHT.
I tried the code above and it will remove mydomain.com but not mydomain.com/anything/anything.htm
What it needs to do is exclude any entry with mydomain.com in it?
(That would screw up things like google and someone searching for mydomain....but it is better that all mydomain.com entries)
Any ideas there?
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 1:03 pm |
|
Code:refered_from<>'mydomain.com%'
|
I think. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 1:04 pm |
|
You may want this.
Code:refered_from<>'%mydomain.com%'
|
Not sure. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 2:20 pm |
|
I tried it both ways with no love....I will keep working on it....
Thanks!
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 3:36 pm |
|
Try this
Code:refered_from NOT LIKE '%mydomain.com%'
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 3:58 pm |
|
DING DING DING.......We Have a Winner!! WOOT WOOT!
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 4:06 pm |
|
Guardian2003, Thanks can't believe I forgot the LIKE. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 4:07 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 4:31 pm |
|
I have the block working.....Just adding a few more "Features" LOL!
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 4:53 pm |
|
CLEAN UP ON AISLE 1 PLEASE!
This is the part where you show me how crappy I code!!
Thank You for Ya'lls HELP!
Dawg
Code:<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* Last referers block for phpNuke portal */
/* Copyright (c) 2001 by Jack Kozbial (jack@internetintl.com */
/* http://www.InternetIntl.com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
//Latest Referrer Block by Dawg with Help from the RN Staff
//~~~~~~~~~~~~~RavenNuke ROCKS! ~~~~~~~~~~~~~~~~
/************************************************************************/
if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}
global $prefix, $db, $admin, $admin_file;
//Add your Domain Name here with NO http:// or www
$domain= "southcarolina-offshore.com";
//Set $Showtime
// Set to 1 for for both Date/time
//Set to 2 for Date
// Set to 3 for No Date
$showtime= "3";
//How Many Referers to show?
$number= 30;
$querystr = "SELECT refered_from,date FROM ".$prefix."_nsnst_tracked_ips WHERE refered_from NOT LIKE 'local' AND refered_from NOT LIKE 'on site' AND refered_from NOT LIKE 'none' AND refered_from NOT LIKE '%$domain%' ORDER BY date DESC LIMIT $number" ;
$result = $db->sql_query($querystr, $db)
or die ("invalid query in towndisplay");
for ($n=0; $n < sql_num_rows($result, $db); $n++)
{
list ($refered_from,$date) = mysql_fetch_row($result);
if($refered_from !="on site" AND $refered_from !="none" AND $refered_from !="local") {
if(strlen($refered_from) > 30) {
$rfrom = substr($refered_from, 0, 30)."...";
} else {
$rfrom = $refered_from;
}
$content .= "<a href='$refered_from' title='$refered_from' target='_blank'>$rfrom</a>";
if ($showtime==1){
$timestamp = strftime("%D - %r",$date);
$content .= " - $timestamp";
}
elseif($showtime==2){
$timestamp = strftime("%D",$date);
$content .= " - $timestamp";
}
elseif($showtime==3){
$content .= "";
}
$content .= "<br />";
};
};
?>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 04, 2009 9:29 pm |
|
Code:
$result = $db->sql_query($querystr, $db)
|
should be
Code:
$result = $db->sql_query($querystr)
|
Code:
for ($n=0; $n < sql_num_rows($result, $db); $n++)
|
should be
Code:
for ($n=0; $n < $db->sql_numrows($result); $n++)
|
Code:
list ($refered_from,$date) = mysql_fetch_row($result);
|
should be
Code:
list ($refered_from,$date) = $db->sql_fetchrow($result);
|
You should be using ' ... ' for your stings not "....".
For example:
Code:
$content .= "<a href='$refered_from' title='$refered_from' target='_blank'>$rfrom</a>";
|
Code:
$content .= '<a href="' . $refered_from . '" title="' . $refered_from . '" target="_blank">' . $rfrom . '</a>';
|
If you do this you can not wrape variables in [ $content .= ' - $timestamp'; ] like you can do [ $content .= " - $timestamp"; ]. It needs to be[ $content .= ' - ' . $timestamp; ].
You should get out of the habit of using queries in loops.
Code:
for ($n=0; $n < $db->sql_numrows($result); $n++)
|
Should be something like:
Code:
$numrows = $db->sql_numrows($result);
for ($n=0; $n < $numrows; $n++)
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jun 05, 2009 5:22 am |
|
Palbin,
Thank You for taking the time to show me the "Right" way. If you teach me right....I will do it right.
I will have another version coming very shortly.
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jun 05, 2009 5:38 am |
|
Delete please.... |
Last edited by Dawg on Fri Jun 05, 2009 6:18 am; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|