Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
Tizwit
Involved
Involved



Joined: Aug 29, 2004
Posts: 324
Location: New Mexico

PostPosted: Wed Jan 03, 2007 11:47 pm Reply with quote

I am wondering if there is a way to limit link submissions to members only. Getting a little tired of deleting those "Viagra" links

_________________
Brian [ Only registered users can see links on this board! Get registered or login! ]
Helping the Children in the NM Children's Hospital 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Thu Jan 04, 2007 12:59 am Reply with quote

Assuming you made the changes to modules/Web_Links/index.php to provide the necessary protection, you should be able to configure $links_anonaddlinklock in modules/Web_Links/lconfig.php

Here's the simple fix for the protection

Code:


FIND


function Add($title, $url, $auth_name, $cat, $description, $email) {
   global $prefix, $db, $user;

REPLACE WITH

function Add($title, $url, $auth_name, $cat, $description, $email) {
   global $prefix, $db, $user, $links_anonaddlinklock;
   if (!is_user($user) AND $links_anonaddlinklock != 1) die();

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
Tizwit







PostPosted: Thu Jan 04, 2007 1:23 am Reply with quote

What changes to "modules/Web_Links/index.php?

Also I went and looked in the Iconfig file and found a way to set it to lock out unregistered:

Code:
$links_anonaddlinklock:      Lock Unregistered users from Suggesting New Links? (0=Yes 1=No)


Would that do the same?

evaders99 wrote:
Assuming you made the changes to modules/Web_Links/index.php to provide the necessary protection, you should be able to configure $links_anonaddlinklock in modules/Web_Links/lconfig.php

Here's the simple fix for the protection

Code:


FIND


function Add($title, $url, $auth_name, $cat, $description, $email) {
   global $prefix, $db, $user;

REPLACE WITH

function Add($title, $url, $auth_name, $cat, $description, $email) {
   global $prefix, $db, $user, $links_anonaddlinklock;
   if (!is_user($user) AND $links_anonaddlinklock != 1) die();
[/code]
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Thu Jan 04, 2007 6:40 am Reply with quote

Tizwit, you definitely need to set the values in l_config.php, but what Evaders is referring to is that even with those set, there is still a "backdoor" way of getting around it. He is presenting the fix for that.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Tizwit







PostPosted: Fri Jan 05, 2007 11:06 am Reply with quote

ah Ok I understand. Thank you

I will try to put that fix into place on my next day off.

Thank you Evaders and Montego
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©