Gossamer Forum
Home : Products : Gossamer Links : Discussions :

blacklisting

Quote Reply
blacklisting
Hi.

I saw an older thread about modifying the script to all for blacklisting of domains (ie...block people from submitting)....but that thread was for Links SQL 1.x

Anyone have a newer idea? solution?

Thanks...

Last edited by:

XPorn: Jun 10, 2004, 10:54 AM
Quote Reply
Re: [XPorn] blacklisting In reply to
Give this a go :) (just made it quickly)

It will let you list domains that you want to stop blocking (in the plugin settings).

Should work Cool

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] blacklisting In reply to
Cool. I'll give it a try...let ya know how it goes. THANKS!
Quote Reply
Re: [Andy] blacklisting In reply to
Well this is odd...I installed it....and I get a server 500 error when I click on the README link.
Soooo I clicked PluginManager > EDIT and I do get the edit screen with a blank list of blocked domains....I assume I should see a Edit Settings or something, but I don't.........am I missing something...or can I just add a text file with the domains listed?? Thanks a ton
Quote Reply
Re: [XPorn] blacklisting In reply to
Sorry, I shouldn't have put that Readme part in, as I didn't actually make one Frown

You need to goto Plugins > Plugin Manager > Edit (next to the plugin name, in the middle frame).

That should give you the option to edit BlockedDomains.

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] blacklisting In reply to

This is what I see. No where to edit (or maybe I'm blind ;-)
Thanks a ton...I need to paypal you a donation if we get this working!!!!

Thx
Quote Reply
Re: [XPorn] blacklisting In reply to
Please give the attached a go. It was a boo boo on my end, sorry :(

I've also added in a *very basic* readme. It just gives a rundown of how the rules work for blocking links with specified strings in them.

Enjoy :)

Quote:
I need to paypal you a donation if we get this working!!!!

You don't need to... but it would certainly be appreciated Angelic

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] blacklisting In reply to
yes...donation will be on way! BUT...installed....but if I try to add a banned domain I (as a user) get...

A fatal error has occured:
GT::Plugins (20152): Error running plugin PRE hook: Plugins::Block_Domains::validate_link. Reason: Can't find string terminator "|" anywhere before EOF at /home/www/freesitexxx.com/cgi-bin/xxxx/admin/Plugins/Block_Domains.pm line 70. Compilation failed in require at GT::Plugins::_load_hook line 261. at /home/www/freesitexxx.com/cgi-bin/xxxx/admin/Links/User/Add.pm line 31.

Please enable debugging in setup for more details.
Quote Reply
Re: [XPorn] blacklisting In reply to
Mmm.. how does /admin/Plugins/Block_Domains.pm look like at the end? Is it corrupt?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] blacklisting In reply to
yikes...yes it is....badly.....let me try install again.....
Quote Reply
Re: [Andy] blacklisting In reply to
something fishy going on....bottom of file looks like this even after reinstall....


sub Readme {
# -------------------------------------------------------------------
# This subroutine will get called whenever the user clicks on 'Readme' in the
# admin menu. Remember, you need to print your own content-type headers; you
# should use:
#
print $IN->header();
print q|
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<p><font face="Tahoma" size="2" color="#008000"><b>Block_Domains</b></font></p>
<p><font face="Tahoma" size="2"><i>Version:</i> v1<br>
<i>Author:</i> Andy Newby (<a target="_blank" href="http://www.ultranerds.com">Ultranerds.com</a>)<br>
<i>Email:</i> <a href="mailto:andy@ultranerds.com">andy@ultranerds.com</a></font></p>
<hr color="#000000" width="60%" align="left">
<p><font face="Tahoma" size="2"><b>Rundown;</b></font></p>
<p><font face="Tahoma" size="2">This is a pretty simple plugin.
<a href="admin.cgi?do=page&page=plugin_manager.html&plugin_man_do=edit_installed&plugin_name=Block_Domains">
You can edit the settings here.</a>&nbsp;&nbsp; All you need to do is setup a
list of domains that you want to be banned from submitting. These can be parts
of the domain, i.e &quot;test&quot; or &quot;test.com&quot
Quote Reply
Re: [XPorn] blacklisting In reply to
Looks like something got corrupt along the way of uploading/downloading :(

Attached is the latest version, which should be ok (just tried to open it from my PC, and I didn't get any errors).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] blacklisting In reply to
nice! works great now. Paypal headed your way....

Thx
Quote Reply
Re: [XPorn] blacklisting In reply to
Glad to hear its working :)

I've sent a copy over to Alex too, so he should get that up in the free download section (via Plugins > Download).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] blacklisting In reply to
Hi Andy.

Anything for "Allow DOmains" and the rest are automatically not allowed. This too would be great...

Thanks
Anup
Quote Reply
Re: [anup123] blacklisting In reply to
Hi. You should be able to just modify the following part in /admin/Plugins/Block_Domains.pm;

Code:
foreach (@list) {
if ($URL =~ /\Q$_/i) {
print $IN->header();
print Links::SiteHTML::display('error', { error => "Sorry, your domain has been banned from submitting ($URL)" } );
exit;
}
}

...with;

Code:
my $match = 0;
foreach (@list) {
if ($URL =~ /\Q$_/i) {
$match = 1; # we have a match, so it should be a good URL...
}
}

if (!$match) {
print $IN->header();
print Links::SiteHTML::display('error', { error => "Sorry, your domain is not on the list of domains that can submit ($URL)" } );
exit;
}

That should then only ALLOW the URL's in the plugin settings.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!