Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/abledesi/domains/abledesign.com/public_html/navfiles/log.php on line 126

AbleDesign - Support Forum

AbleDesign Forum Index AbleDesign

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
AbleDesign Forum Index
MyCalendar Discussion
I don't want validate information
Post new topic   Reply to topic

Post new topic   Reply to topic    AbleDesign Forum Index -> MyCalendar Discussion
View previous topic :: View next topic  
Author Message
Yamilka
Lurker
Lurker


Joined: 06 Sep 2004
Posts: 4
Location: Mexico

PostPosted: Fri Nov 12, 2004 10:36 am    Post subject: I don't want validate information Reply with quote

Hi Dan

I have a doubt about the calendar; if I don
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Sun Nov 14, 2004 3:58 am    Post subject: Reply with quote

Hi,

I'm afraid I don't understand the question particularly well. Are you asking if you can validate submissions, or something specific to private networks, or...?

Quote:
what would you recommend I change in your code in order to do so? Because what I am changing makes send me error.

I need more information to be able to address that, i.e. what you have changed, what the errors are, and what you're trying to accomplish.

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
btravis427
Lurker
Lurker


Joined: 21 Jul 2005
Posts: 6

PostPosted: Thu Jul 21, 2005 12:01 pm    Post subject: allowing anonymous submissions WITHOUT admin approval cycle? Reply with quote

I'm guessing this was the original question. In any case, it is what I want to do -- i.e. allow anyone, without logging in, to make/change/delete entries. Easy??

Thanks.
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Thu Jul 21, 2005 12:16 pm    Post subject: Reply with quote

You can allow anonymous submissions, but do you really want to allow anyone to make edits? It could be done by removing the user id checks, but I would strongly recommend against it.

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
btravis427
Lurker
Lurker


Joined: 21 Jul 2005
Posts: 6

PostPosted: Thu Jul 21, 2005 1:08 pm    Post subject: well.... Reply with quote

my thinking was, if I allow anonymous (unchecked by admin) submissions, I probably need to also allow those people to edit/remove the same entries, right? So, perhaps one idea is to have an 'anonymous' userid (aka default user for those not logged in) in the 'user' (or some new alternative) group, with defined privs?

Thanks,
Bob
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Thu Jul 21, 2005 2:28 pm    Post subject: Reply with quote

Ok, that makes some sense.

I haven't tested this, but a quick addition might do the trick. In index.php, after session_start() at the top, try adding:

Code:
if (!isset($HTTP_SESSION_VARS['user_id'])) {
   $HTTP_SESSION_VARS['user_id'] = '0'
}

The idea being to set a default user id if they aren't logged in, with '0' being what anonymous submissions get entered as. Hopefully, that will trigger the necessary authorizations for editing/deleting.

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
btravis427
Lurker
Lurker


Joined: 21 Jul 2005
Posts: 6

PostPosted: Thu Jul 21, 2005 2:54 pm    Post subject: nope... :-) Reply with quote

Didn't seem to affect the 'edit' behavior. But it did manage to completely disable login from that browser! Not sure why (had to switch to IE to let myself log in again)..... and this was after resetting index.php to its pristine state. Some cookies, I deleted the ones I could find, but didn't help?

Last edited by btravis427 on Thu Jul 21, 2005 3:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Thu Jul 21, 2005 3:02 pm    Post subject: Reply with quote

I was worried that would happen... Let's try tweaking it a bit to:

Code:
if (!isset($HTTP_SESSION_VARS['user_id']) && ($go != "do_login")) {
   $HTTP_SESSION_VARS['user_id'] = '0'
}

and move that to just after the header() lines near the top of index.php.

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
btravis427
Lurker
Lurker


Joined: 21 Jul 2005
Posts: 6

PostPosted: Thu Jul 21, 2005 4:00 pm    Post subject: Reply with quote

No, it still doesn't think anonymous (or any other, of course) entries are editable/deletable by unlogged in user. But in any case, what would I change/set to allow anonymous additions without admin/moderator validation?

Thanks for all the quick responses, too!

/bob
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Thu Jul 21, 2005 4:45 pm    Post subject: Reply with quote

Ah, I just found one more thing that needs to be changed. Near the top of lib.php, in the valid_int() function, you'll see:

if (is_integer($num) && ($num > 0)) {

That needs to be changed to:

if (is_integer($num) && ($num >= 0)) {

in order for the '0' user id override to have any effect.

Quote:
in any case, what would I change/set to allow anonymous additions without admin/moderator validation?

It's one of the settable options when you're logged in as admin (admin footer links).

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
btravis427
Lurker
Lurker


Joined: 21 Jul 2005
Posts: 6

PostPosted: Thu Jul 21, 2005 4:51 pm    Post subject: Reply with quote

Thanks -- I'll try the enhanced =0 stuff in a bit. But I don't see any relevant admin footer item for submission validation -- just the entry to go see if there are any needing validation....
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Thu Jul 21, 2005 5:04 pm    Post subject: Reply with quote

It's under "Set Variables" at the bottom of that same dropdown menu: "Allow Anonymous"

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
btravis427
Lurker
Lurker


Joined: 21 Jul 2005
Posts: 6

PostPosted: Fri Jul 22, 2005 10:14 am    Post subject: Reply with quote

Yes, but when allowed all those submissions still need admin approval before they show up on the calendar, right?
Back to top
View user's profile Send private message
Dan
Admin / Developer
Admin / Developer


Joined: 19 Feb 2001
Posts: 2057

PostPosted: Fri Jul 22, 2005 3:13 pm    Post subject: Reply with quote

This thread might be of help:

http://abledesign.com/forum/viewtopic.php?t=230

Cheers,
Dan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AbleDesign Forum Index -> MyCalendar Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2002 phpBB Group


Home | Services | Pricing | Portfolio | About Us | Contact
Support | Programs | Purchase | Tutorials | Site Map

© 1999-2025 AbleDesign.com - Web Design that Can!