Stand alone entry forms without being logged in
Posted: 16 November 2007 08:50 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  165
Joined  09-29-2007

Stand-alone entry forms are great for allowing members to enter and edit entries from the front-end of your site.  however, they can also be used for collecting information from site visitors, such as feedback, suggestions, enquiries etc. 

unfortunately, the stand-alone entry form tag in the weblog module requires that the user is a logged in member, otherwise the form is not shown and cannot be submitted.  i have seen people use the freeforms module as a work-around, and although this is a reasonable solution, i was determined to do it with weblogs.

so i developed a plugin that allows you to automatically log a site visitor in from any template without having to collect details from them.  the idea is you set up a guest user account and assign it to any member group that has weblog posting priveleges to the weblog you want to submit the SAEF to.  in the template where your SAEF is, you just check if the user is logged in.  if not then you log them in automatically as the guest user.

{if member_id == "0"}
  {exp
:logmein:now username="priveleged_guest"}
{
/if}

you can find the plugin and more info here

 Signature 

* Get the Sitemap Module and improve your site’s SEO

More Add-ons: Multi Language, iWebApp, Stand-Alone Image Editor, Landing Page, LogMeIn, Loop Plugin, Session Variables

Profile
 
 
Posted: 20 November 2007 07:10 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002

Simple, effective… brilliant!

Cheers ben!

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 20 November 2007 08:46 AM   [ Ignore ]   [ # 2 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6603
Joined  04-15-2006

Hi Ben,

Sounds like simplicity itself!! grin
I needed this on a site I was building or at least I thought I did. In the end I went with having people register as I did want them to have to do so first although I can think of quite a few places where this will come in handy in the future. Fantastic addition.

Will try it out as soon as possible.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 20 November 2007 08:56 AM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6088
Joined  08-04-2002

This could be very handy…Thanks Ben

Profile
 
 
Posted: 23 November 2007 03:35 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  165
Joined  09-29-2007

if anyone is wondering why the conditional if statement in the following code does not work, it is because plugins are processed before conditional statements in templates.

{if member_id == "0"}
  {exp
:logmein:now username="priveleged_guest"}
{
/if}

this means that the visitor is logged in as priveleged_guest even if they are already logged in.

i may add a parameter in the plugin to handle this problem, will let you know.

 Signature 

* Get the Sitemap Module and improve your site’s SEO

More Add-ons: Multi Language, iWebApp, Stand-Alone Image Editor, Landing Page, LogMeIn, Loop Plugin, Session Variables

Profile
 
 
Posted: 28 February 2008 01:43 PM   [ Ignore ]   [ # 5 ]  
Grad Student
Rank
Total Posts:  96
Joined  11-11-2006

Hi Ben, the 1 day expiry set in the plugin doesn’t seem to be respected, it looks like once you are logged in it stays that way. exp_last_activity and exp_last_visit are being set 6 months in advance.

I’m just saying what I see, I don’t understand it :(

Profile
 
 
Posted: 11 March 2008 06:53 AM   [ Ignore ]   [ # 6 ]  
Grad Student
Rank
Total Posts:  96
Joined  11-11-2006

I’m using logmein to login a user called disclaimer who is in the members group. I also have a template with access restricted to another group called projects.

Problem is the disclaimer user (in the members group) can strangely access the the template that’s restricted to the projects group.

Profile
 
 
Posted: 11 March 2008 07:03 AM   [ Ignore ]   [ # 7 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6603
Joined  04-15-2006

Hi there,

I don’t think that this has anything to do with the plugin here though unless you have the plugin code on the template that shouldn’t be accessible?

The fact that you have a user called disclaimer means nothing to this plugin. Instead the plugin is used to allow non-logged-in members (guests) to be able to post items but all get logged into the same member group set in the plugin variable username=“privileged-guest” so it will seem as though one person posted all the entries.

What code do you have on the template that is not supposed to be viewable by the disclaimer user?

Also this thread (depending on your answer) may need splitting off because if it isn’t the plugin that is causing this then this won’t be relevant here but we can get one of the admin to do that if that is so.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 11 March 2008 12:01 PM   [ Ignore ]   [ # 8 ]  
Grad Student
Rank
Total Posts:  96
Joined  11-11-2006

Hi Mark, thanks for taking the time to reply, it’s much appreciated. The disclaimer user is in the members group and the plugin automatically logs this user in when they hit the page with the plugin code on - so the I think the user does mean something to the plugin. But your reply did help me understand my problem. I know it’s the wrong place, but could you give me any advice on how to setup a disclaimer from which people have to accept before getting access to content.

Thanks
Lee

Profile
 
 
Posted: 11 March 2008 12:37 PM   [ Ignore ]   [ # 9 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6603
Joined  04-15-2006

Lee perhaps you could post this question into a new forum thread so that we don’t detract from the original one?

I will find that thread once you have posted and pop in there. Please re-explain the whole matter in the new thread though in case other people come across it too.

Thanks.

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 12 May 2008 03:00 AM   [ Ignore ]   [ # 10 ]  
Summer Student
Avatar
Total Posts:  10
Joined  01-09-2008

Hey!

I’m trying to use this plugin with the Simple Commerce plugin but can’t get the email templates to work after a purchase anyway. I added a user called “shop” in the Guests member group and gave that group access to the Simple Commerce plugin under “Module Access Privileges” as Ben wrote in the comments on his page.

I’m thinking that I might have to edit the mod.simple_commerce.php file to send the customer email to the address supplied by PayPal instead of getting it from the EE member database?

Anyone that have gotten LogMeIn to work with the Simple Commerce email templates?
Thanks!

Regards,
Christofer

 Signature 

Christofer
Republic Factory | Sandin Design

Profile
 
 
Posted: 21 June 2008 12:04 AM   [ Ignore ]   [ # 11 ]  
Grad Student
Rank
Total Posts:  43
Joined  03-04-2005

Wonderful plugin, ben c! But how to defend from spammers? Any ideas about Captcha using?, but in standart SAEF captcha is absent.

Profile
 
 
Posted: 25 July 2008 08:27 PM   [ Ignore ]   [ # 12 ]  
Summer Student
Total Posts:  17
Joined  10-18-2007

Hey Ben,

Excellent plugin by the way, I am super glad you put this together as it has solved a major, and common issue with stand alone entry forms. That being said, we are having one issue. I am using the logmein plugin along with a stand alone entry form (obviously) and your image editor plugin to allow users to upload images along with a form. The issue I am seeing is if I log someone in automatically as a guest or member user group account they cannot upload images. I am positive the file upload preferences are correct, and all the information they enter in the form gets enter into the database, but the file does not get uploaded. Any Ideas?

I have been able to get it to work if I automatically sign the user in as a super admin, probably not most advisable, but it makes me think it is a permissions issue I am missing somewhere.

Thanks,

—Chris

Profile
 
 
Posted: 07 August 2008 03:58 PM   [ Ignore ]   [ # 13 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  194
Joined  10-12-2003

Ben,

I’m wondering if this issue has been resolved? I’m anxious to use the plugin but if it logs every member in as a ‘guest’ then it can’t really work for me. Is there any way I could fix this myself with my minor understanding of php?

Thanks!

ben c - 23 November 2007 03:35 AM

if anyone is wondering why the conditional if statement in the following code does not work, it is because plugins are processed before conditional statements in templates.

{if member_id == "0"}
  {exp
:logmein:now username="priveleged_guest"}
{
/if}

this means that the visitor is logged in as priveleged_guest even if they are already logged in.

i may add a parameter in the plugin to handle this problem, will let you know.

 Signature 

Peter Dinesen
Dinesen-Schacht
http://iSawYou.com

Profile
 
 
Posted: 22 September 2008 10:17 PM   [ Ignore ]   [ # 14 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1593
Joined  01-05-2007

Would an embedded template help?

{if member_id == "0"}
  {embed
="_inc/.logmein"}
{
/if}

then in the embedded template -

{exp:logmein:now username="priveleged_guest"}

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65063 Total Logged-in Users: 44
Total Topics: 82196 Total Anonymous Users: 23
Total Replies: 441740 Total Guests: 243
Total Posts: 523936    
Members ( View Memberlist )
Newest Members:  1nvidiousjaris1skinnygirlaexermk1979Andrew_IDmdutahDanielJ8Forward GearCBlalock