Go Back   Pligg Forum > Pligg Development > Pligg Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-22-2007, 09:05 PM
jsolomon jsolomon is offline
New Pligger
 
Join Date: Apr 2007
Posts: 5
Downloads: 2
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Remove registration

Hello everyone,

I'm looking for a way to remove all registration/user account features. I want anonymous users to have full access to voting/posting without any log in requirements. I would limit multiple votes by IP address. I've been trying to manually go through the code and remove all the log in requirements, but I keep running into fatal errors. What would be the best way to go about accomplishing this? Thanks in advance.

-JSS
Reply With Quote
Sponsored Links
Check out the New Modules at the Pligg Pro Shop.
  #2 (permalink)  
Old 04-22-2007, 10:02 PM
beatniak's Avatar
beatniak beatniak is offline
Pligg Dev/MB creator
 
Join Date: Apr 2006
Location: NL - 52.100863;5.108356
Posts: 310
Downloads: 32
Uploads: 0
Thanks: 14
Thanked 77 Times in 48 Posts
frontend:
remove the {if $user_authenticated ne true} and the trailing {/if} of the stuff you want to show To your users.

submitting:
- The tpl files of the submit pages don't have {if $user_authenticated ne true}, so you don't have to touch those
- why not remove these lines in submit.php (line 29 and 30)? Guess that should work.
Code:
// make sure user is logged in
force_authentication();

editing their own submitted stories:
I really don't know. Probably just don't fix that and don't give them that feature.

commenting:

Dude, you don't want that to be open!
__________________
Like my work? Donations are welcome if you would like to support my work!
Finger pliggin' good sites of mine: receptencocktail.nl / numarketing.nl / goboz.com

Last edited by beatniak : 04-22-2007 at 10:06 PM.
Reply With Quote
  #3 (permalink)  
Old 04-22-2007, 11:31 PM
jsolomon jsolomon is offline
New Pligger
 
Join Date: Apr 2007
Posts: 5
Downloads: 2
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the response beatniak. I did what you recommended, and stumbled upon an error. If I try to submit a story without being logged in, I can get past the first step. But on step 3 (before submission), I get the error: "Incorrect key." After doing some detective work, I found this in submit.php:

PHP Code:
    if($_POST['randkey'] !== $linkres->randkey) {
        
$main_smarty->assign('submit_error''badkey');
        
$main_smarty->display($the_template '/submit_errors.tpl');
        
$error true;
    } 
That code seems to be referring here in submit_errors.tpl:

PHP Code:
{if $submit_error eq 'badkey'}
    <
class="error"><strong>{#PLIGG_Visual_Submit3Errors_BadKey#}</strong></p>
    
<br/>
    <
form id="thisform">
        <
input type="button" onclick="window.history.go(-1)" value="{#PLIGG_Visual_Submit3Errors_Back#}" class="submit" />
    </
form>
{/if} 
If I delete the entire if statement in submit.php, I get the following error instead:

Fatal error: Call to a member function on a non-object in /home/jssolomo/public_html/Secrets/libs/link.php on line 339

Line 339 in link.php is
PHP Code:
$smarty->assign('use_title_as_link'use_title_as_link); 
And this is where I am...stumped and confused. Anymore help would be greatly appreciated. Thanks in advance.
Reply With Quote
  #4 (permalink)  
Old 04-23-2007, 02:51 AM
beatniak's Avatar
beatniak beatniak is offline
Pligg Dev/MB creator
 
Join Date: Apr 2006
Location: NL - 52.100863;5.108356
Posts: 310
Downloads: 32
Uploads: 0
Thanks: 14
Thanked 77 Times in 48 Posts
Deleting the if($_POST['randkey'] !== $linkres->randkey) function is not the solution. Removing the errorchecking won't help ---you must make sure there are no errors.

EDIT: Just found out there's some php code in submit_step_3.tpl that is the reason for the randkey error:

Code:
        if($linkres->votes($current_user->user_id) == 0 && auto_vote == true) {
            $linkres->insert_vote($current_user->user_id, '10');
            $linkres->store_basic();
            $linkres->read(FALSE); 
        }
and after that:
Code:
        if (link_errors($linkres)) {
            return;
        }
I guess it can't find an username and email errorcheck in submit.php >>>> if($_POST['username'] = '') { somecode } <<<<, so it just displays the first error it finds.

Also the stuff that will/might give you an error in submit.php:

in function do_submit1()
line 89:
Code:
global $main_smarty, $db, $dblang, $current_user, $the_template;
line 152:
Code:
$linkres->author=$current_user->user_id;
in function do_submit3()
line 243:
Code:
$trackres->author=$linkres->author;
__________________
Like my work? Donations are welcome if you would like to support my work!
Finger pliggin' good sites of mine: receptencocktail.nl / numarketing.nl / goboz.com

Last edited by beatniak : 04-23-2007 at 03:13 AM. Reason: forgot the php code in submit_step_3.tpl
Reply With Quote
  #5 (permalink)  
Old 04-24-2007, 12:22 PM
jawanda jawanda is offline
New Pligger
 
Join Date: Apr 2007
Posts: 9
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
One random thought on this, what about automatically logging everyone in with a default username/pass anytime they try to do a user-based action?

Then perhaps you can edit out the instances of the username based text in the text file and possibly achieve a similar effect?

-P
Reply With Quote
  #6 (permalink)  
Old 04-24-2007, 12:33 PM
kbeeveer46's Avatar
kbeeveer46 kbeeveer46 is online now
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,579
Downloads: 62
Uploads: 6
Thanks: 255
Thanked 651 Times in 515 Posts
This technique may still work in current versions.

Anonymous Posting
__________________
I accept donations for my time helping users like you on the forum and IRC.

FREE and premium Pligg Web Hosting (NO ads, Includes MySQL, PHP, PHPMyAdmin, and Control Panel) - PM me for discounts on premium packages or if you would like a custom-made package. Paypal accepted.
Reply With Quote
  #7 (permalink)  
Old 04-25-2007, 02:27 PM
jsolomon jsolomon is offline
New Pligger
 
Join Date: Apr 2007
Posts: 5
Downloads: 2
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
That little hack worked wonders. A much better technique that removing registration all together. Thanks so much!
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

vB code is On
Smilies are On
[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
Remove "about Pligg box" in sidebar yom23 General Help 9 11-21-2006 05:20 PM
Remove Story Details seantrades Pligg Mods 0 10-13-2006 02:59 PM
Is Moderated Registration possible? djdrue General Help 7 10-10-2006 06:36 PM
Registration and voting not working stephencarr Installation and Upgrade Help 3 10-08-2006 06:57 PM


LinkBacks Enabled by vBSEO 3.0.0