Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-04-04 23:27:05

Drew
Plugin Author
From: Red pillar box, Baker St.
Registered: 2004-02-15
Posts: 53
Website

[plugin] [ORPHAN] dru_recent_referers

A plugin to generate a list of recent referers from your TXP logs. Obviously, I can only test on the systems I have available to me, so use cautiously and any feedback is welcomed.

<txp:dru_recent_referers limit="10" break="li" wraptag="ul" />

It basically works just the same way as recent_articles. If you log all hits and not just referers, it should only return referers – confirmation of this would be good ;)

Download dru_recent_referers.txt.tgz


drew mclellan

Offline

#2 2004-04-05 03:23:16

schussat
Plugin Author
Registered: 2004-02-24
Posts: 101
Website

Re: [plugin] [ORPHAN] dru_recent_referers

I gave it a quick test, Drew — worked great for me! When I turned on logging of all hits, I got a couple of empty bullets at the top of the list, which seems to make sense, I guess, since there’s not actually a referring site. (Although I’m not sure I’d want blank entries in a list of referrers that’s actually displayed to anybody but me…)

All this plugin development is really exciting.


-Alan

Offline

#3 2004-04-05 06:18:47

Drew
Plugin Author
From: Red pillar box, Baker St.
Registered: 2004-02-15
Posts: 53
Website

Re: [plugin] [ORPHAN] dru_recent_referers

Hmm, I guess I need to check for blank entries too. I’ll add this.

Thanks


drew mclellan

Offline

#4 2004-04-05 10:33:00

Drew
Plugin Author
From: Red pillar box, Baker St.
Registered: 2004-02-15
Posts: 53
Website

Re: [plugin] [ORPHAN] dru_recent_referers

i’ve updated the plugin – same location as above.

Does this clear up the empty bullets, Alan?

update: bugger – i think it’s broken. hold fire :)
update: Should be fixed now.

Last edited by Drew (2004-04-05 10:52:57)


drew mclellan

Offline

#5 2004-04-05 11:14:17

Jennifer
Member
From: Michigan
Registered: 2004-02-25
Posts: 74
Website

Re: [plugin] [ORPHAN] dru_recent_referers

Ok, so how do we easily remove the paris-hilton-sex-tape links, etc? Sometimes, my referrers fill up with spam like that… I obviously don’t want to link to them from my site, even if I do block search engines!

Offline

#6 2004-04-05 11:40:19

Dean
Founder (Gone, but not forgotten)
From: Languedoc
Registered: 2004-02-14
Posts: 235
Website

Re: [plugin] [ORPHAN] dru_recent_referers

Last I checked the paris-hilton-sex-tapes crap was coming from one or two visitor IP addresses. You could Disallow these with htaccess, yes?


text*

Offline

#7 2004-04-05 11:52:50

Drew
Plugin Author
From: Red pillar box, Baker St.
Registered: 2004-02-15
Posts: 53
Website

Re: [plugin] [ORPHAN] dru_recent_referers

Yes – I reckon so, Dean. Ultimately you’ll gain the most satisfaction from preventing these sites going into your logs rather than trying to prevent them coming out.

But yes, Jennifer, I see your concern! :)

See the apache docs for Deny syntax.


drew mclellan

Offline

#8 2004-04-05 13:16:50

Drew
Plugin Author
From: Red pillar box, Baker St.
Registered: 2004-02-15
Posts: 53
Website

Re: [plugin] [ORPHAN] dru_recent_referers

Well, no output is better than an error ;)

Are other plugins working ok for you?


drew mclellan

Offline

#9 2004-04-05 13:43:05

mwexler
Member
Registered: 2004-03-25
Posts: 11

Re: [plugin] [ORPHAN] dru_recent_referers

I also get no results. More importantly, the isnull is the right idea, but still seems to return empty fields. I edited the query to become:

select refer, time as ref_time from txp_log where (refer not like ‘$mydomain’) and (not isnull(refer)) and char_length(refer)<>0 order by time desc limit 0,$limit

That is, if the length is 0, its a blank referrer and should be ignored. (IMHO, this should be covered by the isnull function, but I am not a mysql expert.)

So, this query seems right, but I am still getting no output. More digging to commence. I am logging all hits, if that matters.

Offline

#10 2004-04-05 13:49:19

mwexler
Member
Registered: 2004-03-25
Posts: 11

Re: [plugin] [ORPHAN] dru_recent_referers

Ok, well, whaddaya know, ya read a thread, ya learns something. I looked at lib/admin_config.php based on mdtp’s post, and saw that plugins were turned off. I turned them on (convert the 0 to a 1, last line of the file), and bang, I got my list!

Thanks for sharing this plugin; I look forward to more of them from all of us in the future…

Thanks again,

Michael

Offline

Board footer

Powered by FluxBB