PDA

View Full Version : user.php makeyesnocode problems


centerius
08-22-2002, 05:40 PM
Hi, I have hacked up my VBB and IMAP/MTA to integrate our webmail and forum. More specifically, I use the forum usernames/passwords for authentication for webmail.

I modified the PHP code for the on/off switch to activate mail accounts and a search function. For this I just added a yes/no option to add a user, and to edit a user.
Example:
http://www.egbt.us/webmailforum/activate.jpg

I also added some search options to use while searching for users, so you can display which users have webmail and which don't. There is also an option to display Yes/No if users have webmail if the results return multiple users (on by default)
Examples:
Looking for users with or without webmail:
http://www.egbt.us/webmailforum/search1.jpg

If you come up with multiple users (e.g. Listing all users, or searching for something that would turn up multiple users)
http://www.egbt.us/webmailforum/searchfinal.jpg

Now users can login into Webmail (the Cyrus IMAP daemon handles the webmail requests) with their forum username and password.


The problem I am having is that when I goto edit a user, it comes up as the default "no" option even though webmail is activated in the database. How do the other options know if they are on/off?
Here is a patch file (made from diff)
http://www.egbt.us/zone/user.php.patch
and attached...

P.S. if anyone has the same idea and wants to implement this on their (linux) webserver... mail me centerius@hotmail.com and I'd be glad to give you my docs I made during the process and help you out.
Thanks,
-Centerius

(Edit: Right click and save the file, then open it, if you goto the link directly, it parses the html code :/ )

centerius
08-22-2002, 05:41 PM
Oh yeah, I use the variable "mail" for my new option.

centerius
08-22-2002, 07:14 PM
-sigh-
fixed it..... stupid me!

I had
makeyesnocode("Activate Webmail","mail",$mail[mail]);

then this makes it work:

makeyesnocode("Activate Webmail","mail",$user[mail]);


damn typos... had "$mail" where "$user" should have been ;/

eXtremeTim
08-22-2002, 10:53 PM
Glad you got it fixed. :)

Don't we all hate typos and hack bugs. ;)