Page 2 of 2

Posted: Thu Apr 29, 2004 10:08 pm
by Scarah
That works perfectly! Thanks again. :)

Posted: Fri Apr 30, 2004 4:51 am
by tbartold
I'm almost done with the second phase: adding the chat profile fields to the forum profile. I didn't realize how much trouble this would prove to be with all the files that need to be editted. But It's almost there. I'm trying to make sure that it works through EasyMOD, so it won't be too bad to add this.

The next step will be designing a Bot so it can watch for changes in the profiles in the chatrooms and send those back to the forums. That''s likely to be a more time consuming project, but I'm sure it's possible.

The last phase will be selecting an icon before going in, and saving it. But, as I've learned, the Bot cannot see icons, so there's no way to keep up to date on incon changes.

I should be posting next version of the MOD on Saturday, along with a demo account.

'Til then!

Posted: Sat May 01, 2004 3:26 pm
by tbartold
I have my beta current version up and running now, but it does not have all the features I plan on having yet. The main thing lacking is the ability to choose an icon from phpBB, but I'm working on an idea of how to do that (similar to how you can select smilies).

The other thing mossing is the Bot in the chat rooms that will pass changed information back to the forum. That should be easy enough to create, but the problem is how to keep the bot running. My host won't let me run any java servlets, so it has to be run on someone's home machine (or dedicated server?). Since I don't have 24/7 access, it won't run constantly. This is a problem for me, but it might not be for you. In any case, if a user changes their profile, they should just need to type the command '/save' and the Bot will send whatever updated info it can get back to the forum.

The integration with the "who's online" will be dependant on the Bot also.

Any other features anyone can think of, please let me know. If you see problems or bug, let me know also. I'll be updating the zip file later today to include all the chat fields in the profile. The demo is at:
http://forums.palladium-megaverse.com/chat.php user:test pass:test

You can upload the latest version from the link I posted before. As of May 1st, this is version 0.1.4.

Please let me know how it works.

Posted: Sat May 01, 2004 10:52 pm
by Scarah
As long as the users had a phpbb interface to edit all their profile info, I don't see why you couldn't just disable the guest's ability to change their profile in Digichat? Then you wouldn't need the bot for the profile stuff.

Sarah

Posted: Sun May 09, 2004 4:53 pm
by tbartold
Scarah wrote: As long as the users had a phpbb interface to edit all their profile info, I don't see why you couldn't just disable the guest's ability to change their profile in Digichat? Then you wouldn't need the bot for the profile stuff.

Sarah


I'd like to agree with you, but it seems users would rather update their profile in the chats and then save it from there. But the point is moot anyway.

I built a simple Bot that would look at profiles and save them, but the problem is that the Bot cannot see the Icon nor the ExitMessage when it looks at profiles. There is no way to get the icon image, although it could probably wait for and trap an exit message from the user. However, there must be a Bot in every room then. So I've given up on this feature, as it really doesn't help.

The Chat profile can be changed in the Forum Profile, and that should be good enough. I still have to work out a way of picking icons, which I'm planning on patterning after the Emoticon picker in the phpBB code.

The current version from the link at the top is 0.1.5 which is the version I have installed on our forum.

Posted: Wed May 12, 2004 12:30 am
by Scarah
I had to replace all instances of "mesage" with "message" in the addfields.txt ;) also, this chat.php caused an error, something to do with the select statement relating to the usergroup. But I used my old chat.php and just replaced the relevant sections, and that works fine.

I never got the radio button options working for gender or blockprofile, but I didn't really need those anyway so I didn't try, I just took them out of the .tpl.

Username, realname, age, comments, exitmessage and icon are all working really nice, and so is the selection of chatmaster.js for the Chat Moderators group. I can give you the url if you'd like to check it out.

Thanks! :)
Sarah

Posted: Wed May 12, 2004 10:20 pm
by tbartold
Sorry for the problems. I must have put in a buggy copy of the zip on the server. I've corrected the "mesage" problem, and the problem with the SQL (apparently I moved a block of code to be before a variable was set instead of after it).

Thanks for the update. I'm glad it's working out for you. I still have to find time to do the icon picker, but that may not be worth the trouble now. I learned that there is no way to get the iconID numbers automatically. I think filling a database with the icon numbers is just too much work for the admin.

Posted: Wed Aug 25, 2004 10:38 pm
by [D]J
BUMP, any news on this? I'm looking for a solution to show the number (and possibly names) of users in chatrooms on my index page... I tried writing something but didn't work :( I'd be very grateful to anyone who can help me with this as my site is going online in 2 days. Thank you!

Posted: Mon Sep 06, 2004 2:05 pm
by [D]J
Hmm, I found a problem in the mod, some Macintosh users of my Forum get their nicknames screwed up when they try to login into Digichat. I noticed that this happens only to users who have special chars like "à" "è" "ì" "ò" "ù" "©" "®", etc. in their usernames. Is there any way to solve this issue? Thank you!

Posted: Wed Mar 07, 2007 4:52 am
by Zahtevnik
Hey all,

My knowledge of PHP (and mods) isn't all that grand. I've managed to install a few properly, but this just isn't one of them. I have two test forums up right now - one I manually installed this mod on, the second one I put EasyMod onto then installed it through that - both are coming up with glitches (one of which is the same glitch). Could I beg help from anyone?

First off, when registering a profile, after clicking save this screen comes up:
Could not insert data into users table

DEBUG MODE

SQL Error : 1054 Unknown column 'realname' in 'field list'

INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, realname, age, gender, exitmessage, comments, blockprofile, iconid, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (3, 'Nikki Ti', 1173240270, '5ec8d9ef35bd6cb03a21b3dfe5a993e0', 'email@hotmail.com', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 0, '', '', '', 1, 1, 0, 1, 1, 0, 1, 1, 0, 'D M d, Y g:i a', 'english', 1, 0, 1, 1, '')

Line : 655
File : usercp_register.php


It's the same problem for both my manual and EasyMod installation. I used MyPHPAdmin in the cpanel to make changes to the MySQL database. chat_realname is what the mod called for, and that's what I tossed in. Do I need to change that to user_realname or have both chat_realname and user_realname in the database?

I also get the following message when I click on the http://www.zahtevnik.com/sheets/chat.php page:

Code: Select all

Warning: include(./language/lang_english/lang_chat.php) [function.include]: failed to open stream: No such file or directory in /home/insomni/public_html/sheets/chat.php on line 51

Warning: include(./language/lang_english/lang_chat.php) [function.include]: failed to open stream: No such file or directory in /home/insomni/public_html/sheets/chat.php on line 51

Warning: include() [function.include]: Failed opening './language/lang_english/lang_chat.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/insomni/public_html/sheets/chat.php on line 51

Warning: Cannot modify header information - headers already sent by (output started at /home/insomni/public_html/sheets/chat.php:51) in /home/insomni/public_html/sheets/includes/page_header.php on line 485

Warning: Cannot modify header information - headers already sent by (output started at /home/insomni/public_html/sheets/chat.php:51) in /home/insomni/public_html/sheets/includes/page_header.php on line 487

Warning: Cannot modify header information - headers already sent by (output started at /home/insomni/public_html/sheets/chat.php:51) in /home/insomni/public_html/sheets/includes/page_header.php on line 488
The chat.php file is up. Line 51 is the following:

Code: Select all

include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_chat.' . $phpEx);
As for the header information, how do I point it at one or the other so they don't conflict?

Any help at all would be appreciated. Thanks in advance.

Posted: Fri Aug 31, 2007 8:43 pm
by tbartold
Zahtevnik wrote:Hey all,

It's the same problem for both my manual and EasyMod installation. I used MyPHPAdmin in the cpanel to make changes to the MySQL database. chat_realname is what the mod called for, and that's what I tossed in. Do I need to change that to user_realname or have both chat_realname and user_realname in the database?
Looks like I had a bad file in my archive. I'm very sorry. The addfields.txt file was incorrect. Specifically line 415. The fields you added are fine, but you'll need to fix the line in includes/usercp_register.php that's messed up, or get the (now) updated version of addfields.txt from the archive and start over.

The fix is simple (although messy). Find the lines in includes/usercp_register.php which read

Code: Select all

			$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', realname = '" . str_replace("\'", "''", $realname) . "', age = '" . str_replace("\'", "''", $age) . "', gender = '" . str_replace("\'", "''", $gender) . "', exitmessage = '" . str_replace("\'", "''", $exitmessage) . "', comments = '" . str_replace("\'", "''", $comments) . "', blockprofile = '" . str_replace("\'", "''", $blockprofile) . "', iconid = '" . str_replace("\'", "''", $iconid) . "', user_custom_title = '" . str_replace("\'", "''", $custom_title) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_ou_sig = $user_ou_sig, user_ou_avatar = $user_ou_avatar, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_topics_per_page = '" . str_replace("\'", "''", $user_topics_per_page) . "', user_posts_per_page = '" . str_replace("\'", "''", $user_posts_per_page) . "', user_hot_threshold = '" . str_replace("\'", "''", $user_hot_threshold) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
				WHERE user_id = $user_id";
These are lines 604-606 in my version.

Edit the second line to add chat_ to the start of the seven chat field names. So it'll then look like the following;

Code: Select all

				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', chat_realname = '" . str_replace("\'", "''", $realname) . "', chat_age = '" . str_replace("\'", "''", $age) . "', chat_gender = '" . str_replace("\'", "''", $gender) . "', chat_exitmessage = '" . str_replace("\'", "''", $exitmessage) . "', chat_comments = '" . str_replace("\'", "''", $comments) . "', chat_blockprofile = '" . str_replace("\'", "''", $blockprofile) . "', chat_iconid = '" . str_replace("\'", "''", $iconid) . "', user_custom_title = '" . str_replace("\'", "''", $custom_title) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_ou_sig = $user_ou_sig, user_ou_avatar = $user_ou_avatar, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_topics_per_page = '" . str_replace("\'", "''", $user_topics_per_page) . "', user_posts_per_page = '" . str_replace("\'", "''", $user_posts_per_page) . "', user_hot_threshold = '" . str_replace("\'", "''", $user_hot_threshold) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
Zahtevnik wrote: I also get the following message when I click on the http://www.zahtevnik.com/sheets/chat.php page:

Code: Select all

Warning: include(./language/lang_english/lang_chat.php) [function.include]: failed to open stream: No such file or directory in /home/insomni/public_html/sheets/chat.php on line 51
The chat.php file is up. Line 51 is the following:

Code: Select all

include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_chat.' . $phpEx);
The problem is simply that it can't find the lang_chat.php file.

/home/insomni/public_html/sheets/language/lang_english/lang_chat.php

Is the file there? Maybe the path is not right?
Zahtevnik wrote: As for the header information, how do I point it at one or the other so they don't conflict?
I believe the header complaint is only a result of the missing file first error, and it will fix itself.

Posted: Fri Aug 31, 2007 9:10 pm
by tbartold
[D]J wrote:BUMP, any news on this? I'm looking for a solution to show the number (and possibly names) of users in chatrooms on my index page... I tried writing something but didn't work :( I'd be very grateful to anyone who can help me with this as my site is going online in 2 days. Thank you!
I have not actually tried to do this. I think in order to do this you'd need a bot in DigiChat that could execute a php script in the forum that would update the database with current chatter names.
[D]J wrote:Hmm, I found a problem in the mod, some Macintosh users of my Forum get their nicknames screwed up when they try to login into Digichat. I noticed that this happens only to users who have special chars like "à" "è" "ì" "ò" "ù" "©" "®", etc. in their usernames. Is there any way to solve this issue? Thank you!
I'm guessing that DigiChat does not support those characters, but phpBB does?

You'd need to modify the chat.php script to do some sort of translation on the nickname. Notice that at line 156 the variable $nickname is being passed to DigiChat as a parameter. If you pre-process that variable before adding it to the $params string, you can do whatever you want to it. I imagine you could add as many lines as you want like the following to the script, based on what characters are causing the problems.

Code: Select all

$nickname= str_replace("à", "a", $nickname);  
$nickname= str_replace("è", "e", $nickname);  
$nickname= str_replace("©", "(c)", $nickname);