Go Back   Pligg CMS Forum > Pligg Help > Customization Assistance

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-01-2008, 11:51 AM
New Pligger
 
Join Date: Feb 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
how to restrict domain submission?

Hello

I'm looking for a way to restrict domain submission to european only (.de, .it, .es, .ro etc). Can somebody tell me how to do that?

Thanks
Reply With Quote
  #2 (permalink)  
Old 08-04-2008, 09:31 AM
New Pligger
 
Join Date: Feb 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by mett View Post
Hello

I'm looking for a way to restrict domain submission to european only (.de, .it, .es, .ro etc). Can somebody tell me how to do that?

Thanks
come on, guys, nobody can tell me how to do that? At least a hint...
Reply With Quote
  #3 (permalink)  
Old 08-04-2008, 01:07 PM
magpie2419's Avatar
Casual Pligger
 
Join Date: Jun 2007
Location: Libya
Posts: 61
Thanks: 15
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by mett View Post
come on, guys, nobody can tell me how to do that? At least a hint...
I am not aware of a way to restrict the domain type, probably the best way to do it would be through htaccess file and to ban country by IP. That works if you want to ban complete areas look at this site for an easy way to do it.

block a country, block by ip address, deny access by country
__________________
www.geordies.net
Reply With Quote
The Following User Says Thank You to magpie2419 For This Useful Post:
  #4 (permalink)  
Old 08-04-2008, 03:50 PM
rubber2002's Avatar
Pligg Donor
 
Join Date: Jul 2007
Posts: 252
Thanks: 30
Thanked 7 Times in 6 Posts
Quote:
Originally Posted by magpie2419 View Post
I am not aware of a way to restrict the domain type, probably the best way to do it would be through htaccess file and to ban country by IP. That works if you want to ban complete areas look at this site for an easy way to do it.

block a country, block by ip address, deny access by country
Thanks for sharing the resources. This is really good & simple trick to block a country specific traffic.
Reply With Quote
  #5 (permalink)  
Old 08-07-2008, 02:30 AM
New Pligger
 
Join Date: Feb 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
thanks, but i would like to restrict domains instead of users. I think i should manage $url variable from submit.php file, but i don't know how
Reply With Quote
  #6 (permalink)  
Old 08-08-2008, 05:53 PM
New Pligger
 
Join Date: Feb 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by mett View Post
thanks, but i would like to restrict domains instead of users. I think i should manage $url variable from submit.php file, but i don't know how
Ok, i think i solve it. For anyone interested, I add this code in /submit.php, after $url = html_entity_decode($url);

Code:
$ext = substr(strrchr($url, "."), 1);
if ($ext == 'de' || $ext == 'it' || $ext == 'eu')  { //add more extensions here
$url == "";
} else {
echo "Your domain doesn't belong to European countries";
return;
}
Please test it on localhost first
Reply With Quote
  #7 (permalink)  
Old 08-21-2008, 01:59 PM
New Pligger
 
Join Date: Feb 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Unfortunately, it doesn't work ok. If url doesn't end with desired extension, i get error (for example, an url like this: http://www.story.eu/great-stories cannot be submited)

I'm still looking for help..
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
ICANN approves domain name big bang chuckroast Off-topic 2 06-26-2008 11:30 PM
root domain issue johnchandler General Help 2 02-22-2008 11:30 PM
Problem with new domain now with google pacek General Help 1 01-31-2008 06:07 PM
Stylesheet not pulling in add on domain elindbloom General Help 0 10-10-2007 02:14 PM


Search Engine Friendly URLs by vBSEO 3.2.0