Go Back   Pligg Forum > Pligg Development > Pligg Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-05-2007, 09:51 AM
lumpen5 lumpen5 is offline
Pligg Donor
 
Join Date: Mar 2007
Posts: 54
Downloads: 24
Uploads: 0
Thanks: 7
Thanked 1 Time in 1 Post
Setting anonymous comments

I checked the forum and though i found how to set anonymous submissions
(///force....._)
I could not find the right file to disable the login requirements for post comments.

I am talking specifically about allowing the posting of anonymous comments and NOT anonymous voting.

Can someone assist?
Reply With Quote
Sponsored Links
Check out the New Modules at the Pligg Pro Shop.
  #2 (permalink)  
Old 06-05-2007, 12:13 PM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,161
Downloads: 29
Uploads: 1
Thanks: 292
Thanked 267 Times in 178 Posts
lumpen5 - I will send a mail soon to you. That is a simple tweak I guess.
Reply With Quote
  #3 (permalink)  
Old 06-05-2007, 12:30 PM
lumpen5 lumpen5 is offline
Pligg Donor
 
Join Date: Mar 2007
Posts: 54
Downloads: 24
Uploads: 0
Thanks: 7
Thanked 1 Time in 1 Post
you the man!
Reply With Quote
  #4 (permalink)  
Old 06-05-2007, 03:13 PM
Genghis's Avatar
Genghis Genghis is offline
Casual Pligger
 
Join Date: Mar 2007
Posts: 59
Downloads: 15
Uploads: 0
Thanks: 9
Thanked 0 Times in 0 Posts
Thumbs up

Dollars, please count me in! Thanks....
Reply With Quote
  #5 (permalink)  
Old 06-06-2007, 01:56 AM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,161
Downloads: 29
Uploads: 1
Thanks: 292
Thanked 267 Times in 178 Posts
@Genghis, actually we did the anonymous thing for lumpen5 - hence I told I will fix it for him.

Btw: if you are interested on anonymous submissions enabling - pls foloow the steps outlined at Anonymous Posting

@lumpen5:
pls edit the file:
submit.php line 59 to
force_authentication();

this wil disable anonymous posting

And sorry for the late reply.
Reply With Quote
  #6 (permalink)  
Old 06-06-2007, 01:57 AM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,161
Downloads: 29
Uploads: 1
Thanks: 292
Thanked 267 Times in 178 Posts
Oops - you meant anonymous comments - i mistook it for anonymous submissions - will check and reply sooner.
Reply With Quote
  #7 (permalink)  
Old 06-06-2007, 08:01 PM
Genghis's Avatar
Genghis Genghis is offline
Casual Pligger
 
Join Date: Mar 2007
Posts: 59
Downloads: 15
Uploads: 0
Thanks: 9
Thanked 0 Times in 0 Posts
was just gonna say...

I think it has to do with disabling the force authentication in the code there as well. I just don't know what to disable without getting a php request error.
Reply With Quote
  #8 (permalink)  
Old 06-14-2007, 11:29 AM
lumpen5 lumpen5 is offline
Pligg Donor
 
Join Date: Mar 2007
Posts: 54
Downloads: 24
Uploads: 0
Thanks: 7
Thanked 1 Time in 1 Post
Force disable?

Hmmm.. I have tried looking for the code in:

cooment.php in libs and found this:

// does the person logged in have admin or god access?
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('god');
$canIhaveAccess = $canIhaveAccess + checklevel('admin');
if($canIhaveAccess == 1){$smarty->assign('isadmin', 1);}

But i am not sure what to change it to. If the number for the anonymous user is say 50, would I replace the 0 with 50 (yes I tried it but nothing happened) and then edit somewhere else?

Seriously, if anyone has an idea and this is not a trade secret I would really appreciate some help.
Reply With Quote
  #9 (permalink)  
Old 07-06-2007, 11:57 AM
lumpen5 lumpen5 is offline
Pligg Donor
 
Join Date: Mar 2007
Posts: 54
Downloads: 24
Uploads: 0
Thanks: 7
Thanked 1 Time in 1 Post
Posting anonymous comments

Thought I would try this again.

I am looking for the hack to allow anonymous comments.

Not:
anonymous subbissions (got that one done)

Not:
anonymous voting


I am looking for the way to set it up so that someone can comment on a submission without logging in to do so.

So I turn to the forum, any ideas?

PS > if you must flame, please do so with the private mail...
Reply With Quote
  #10 (permalink)  
Old 08-10-2007, 12:38 AM
parterburn parterburn is offline
New Pligger
 
Join Date: Feb 2007
Posts: 12
Downloads: 2
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
If you haven't already got the solution, here's what I ended up doing:

- Create an "anonymous" user & find the ID in the database
- Edit the code below:

template/Story_Center.tpl
Code:
	{if $user_authenticated neq ""}
		{include file=$the_template."/comment_form.tpl"}
	{else}
		<br/>
		<div align="center" style="clear:both;margin-left:auto;font-weight:bold;margin-right:auto;border-color:#ccc; border-style:solid; border-width:1px;width:400px;text-align:center; padding-bottom: 8px;">
			<a href="{$login_url}">{#PLIGG_Visual_Story_LoginToComment#}</a> {#PLIGG_Visual_Story_Register#} <a href="{$register_url}">{#PLIGG_Visual_Story_RegisterHere#}</a>.
		</div>
	{/if}
Take out the if..then statement so it will always display a textarea for comments:
Code:
{include file=$the_template."/comment_form.tpl"}
Story.php
Code:
	if($_POST['link_id'] == $link->id && $current_user->authenticated && $_POST['user_id'] == $current_user->user_id &&	$_POST['randkey'] > 0) {
		if(strlen($_POST['comment_content']) > 0){
			$comment->content=$_POST['comment_content'];
			$cancontinue = true;
			// this is a normal new comment
		}

		if(strlen($_POST['reply_comment_content-'.$_POST['comment_parent_id']]) > 0){
			$comment->content = $_POST['reply_comment_content-'.$_POST['comment_parent_id']];
			$comment->parent=$_POST['comment_parent_id'];
			$cancontinue = true;
			// this is a reply to an existing comment
		}

		if($cancontinue == true){
			$comment->link=$link->id;
			$comment->randkey=$_POST['randkey'];
			$comment->author=$_POST['user_id'];
			$comment->store();
			header('Location: '.$_SERVER['REQUEST_URI']);
			die;
		}
	}
}
change to:
Code:
	if($_POST['link_id'] == $link->id && $current_user->authenticated && $_POST['user_id'] == $current_user->user_id &&	$_POST['randkey'] > 0) {
		if(strlen($_POST['comment_content']) > 0){
			$comment->content=$_POST['comment_content'];
			$cancontinue = true;
			// this is a normal new comment
		}

		if(strlen($_POST['reply_comment_content-'.$_POST['comment_parent_id']]) > 0){
			$comment->content = $_POST['reply_comment_content-'.$_POST['comment_parent_id']];
			$comment->parent=$_POST['comment_parent_id'];
			$cancontinue = true;
			// this is a reply to an existing comment
		}

		if($cancontinue == true){
			$comment->link=$link->id;
			$comment->randkey=$_POST['randkey'];
			$comment->author=$_POST['user_id'];
			$comment->store();
			header('Location: '.$_SERVER['REQUEST_URI']);
			die;
		}
	} else {
		if($_POST['link_id'] == $link->id &&	$_POST['randkey'] > 0) {
			if(strlen($_POST['comment_content']) > 0){
				$comment->content=$_POST['comment_content'];
				$cancontinue = true;
				// this is a normal new comment
			}
			
			if(strlen($_POST['reply_comment_content-'.$_POST['comment_parent_id']]) > 0){
				$comment->content = $_POST['reply_comment_content-'.$_POST['comment_parent_id']];
				$comment->parent=$_POST['comment_parent_id'];
				$cancontinue = true;
				// this is a reply to an existing comment
			}

			if($cancontinue == true){
				$comment->link=$link->id;
				$comment->randkey=$_POST['randkey'];
				$comment->author=14;
				$comment->store();
				header('Location: '.$_SERVER['REQUEST_URI']);
				die;
			}
		}
You will need to change the 14 in "$comment->author=14;" to the ID of the new anonymous user. Hope this helps.
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
Allow anonymous comments netstar Pligg Mods 19 08-10-2007 12:40 AM
Reducing query count in comments revenazb Core Development 5 04-16-2007 11:37 PM
Turn OFF Anonymous Commenting sonaro General Help 2 04-05-2007 06:59 AM
TPL comments please kevin1 Suggestions 1 02-17-2007 11:53 PM
[Feature] Comments page Isabelle Hurbain Pligg Mods 0 01-27-2007 10:46 AM


LinkBacks Enabled by vBSEO 3.0.0