[BETA] Jabber IM MoD 1.1.2

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
nE0sIghT
Registered User
Posts: 27
Joined: Thu Mar 10, 2005 11:05 am
Contact:

[BETA] Jabber IM MoD 1.1.2

Post by nE0sIghT » Fri Jul 15, 2005 8:51 pm

MOD Title: Jabber IM MoD
MOD Description: This MoD adds Jabber IM support to the board: Jabber support for profiles, all kinds of notifications, which are usually made by e-mail, account activation via JabberIM, Jabber messaging via board etc. This features can be combined with standart e-mail features but this MoD adds optional ability to totally disable e-mail functionality.
MOD Version: 1.1.2

MOD Download: http://clanctl.narod.ru/JabberIM_MoD.zip

Demo boards: not available now
ScreenShots(russian lang): http://clanctl.narod.ru/phpBB_Jabber.zip

Russian forum threads:
Обсуждение на русском::
http://forum.jrudevels.org/viewtopic.php?t=1370

This MoD is tested with public Jabber server jabber.org(tested only SSL connection, BUT plain text auth should work well) and on a private JabberD server(SSL and plain auth)

This MoD EasyMod compliant(tested with versions 0.2.1a and 0.3.0)

This MoD tested only on clear phpBB 2.0.22 installation, BUT should work well(maybe with minor changes) on 2.0.10-2.0.21 versions

Code: Select all

############################################################## 
## MOD History:
##
##   2007-03-02 - Version 1.1.2, "One more step"
##      - fixed error that prevents messages to be sent if there extended
##             characters in JID
##      - group approvement messages now sent well;
##      - fixed wrong jabber templates names that lead to errors;
##      - activation link in Jabber account activation message now right;
##      - check_jabber_messages(): correct last connect time SQL query place;
##      - check_jabber_messages(): added empty Jabber server check;
##      - UCP: jid_reuse=0 ignored for ADMINS
##      - UCP: new options "Show JID", "Receive part of post";
##      - ACP: new option "Jabber post lenght";
##      - viewtopic: hiding JID icon if user set up profile so;
##      - viewprofile: fixed Jabber URI
##      - viewtopic:viewprofile: xmpp URI format;
##      - updated russian translation file;
##
##   2007-02-20 - Version 1.1.1, "Aagh, how can my code be buggy??! :)"
##      - more changes in emailer class: all jabber templates now reads
##            from separate directory "jabber" under lang dir;
##      - fixed wrong JID parsing with combination
##            english board lang + extended JID characters (like cyrilic);
##      - fixed wrong sql queries in groupcp.php and privmsg.php
##      - all required jabber templates now comes with MoD (including russian);
##      - added modcp removal of jabber notify DB rows, when deleting topic;
##      - fixed wrong display_avatar_gallery() call;
##      - some minor structure and MoD-file syntax changes;
##      - updated russian translation file;
##      - MoD file lines count has exceeded three thousand!!!! Man, it's huge :)
##
##   2007-02-17 - Version 1.1, "Too close to light"
##      - created separate admin category for Jabber settings;
##      - added Checking for MoD's requrements;
##      - added ability to activate account with Jabber;
##      - added ability to totally switch off board e-mail functions;
##      - added ability to test Jabber server settings in ACP;
##      - added ability to register Jabber account in ACP;
##      - all Jabber ID's now validating by user;
##      - added more JabberID checks: "already-in-use", ban check;
##      - added ability to ban JabberID via e-mail ban;
##      - added ability in ACP to allow to user reuse already registered JIDs;
##      - this forum features now using user's JabberID if present:
##            retrieve password, all group actions, registration,
##            private message notification, admin activation;
##      - totally rewrited Jabber notification, it seems now working well and
##            provide all notification features;
##      - rewrited Jabber messaging mechanism - it now integrated in
##            emailer class and using phpBB templates;
##      - tweaked class.jabber.php for phpBB: commented all stuff that MoD
##            not used, removed useless delays and sleeps, some changes
##            in socket class;
##	- removed unused lang strings;
##
##   2007-02-12 - Version 1.0, "In validating we trust!"
##	- some encoding changes in usercp_jabber.php
##	- two lines removed from russian lang
##	- some search changes in MoD's lang files
##	- wrong lang string fixed
##	- nasty "EM COMPATIBLE" line in MoD file moved to notes section
##	- REALY, i do not remember if there is some else...
##
##   2006-07-03 - Version 0.0.5
##	- added all losted code for notifications on JID
##      - added language check when sending messages
##	- added ''LITE`` version of iconv()
##	- optimized some parts of the mod
##
##   2006-07-02 - Version 0.0.4
##      - added SSL support
##	- fixed posibly ban issues
##	- using of iconv() now optional 
##	- other that i forgot
##
##   2005-07-16 - Version 0.0.3 
##      - fixed some errors in MoD syntax
##      - add russification MoD
##
##   2005-07-16 - Version 0.0.2 
##      - fixed some errors in MoD syntax
##      - this MoD now EasyMod compliant
##
##   2005-07-15 - Version 0.0.1 
##      - first public release
## 
############################################################## 
## TODO:
##      - ACP: add Jabber timeouts and delays;
##      - ACP: sync new options with UCP;
##      - board: complete email hide from all remained pages,
##            if "disable email" option is on;
##      - board: add Jabber icons to remained pages;
##      - usercp_sendpasswd.php: simplify changes;
##
##############################################################
Last edited by nE0sIghT on Tue Dec 18, 2007 1:55 pm, edited 23 times in total.

nmtdr
Registered User
Posts: 46
Joined: Tue Mar 28, 2006 4:41 am
Location: New Mexico

iconv()

Post by nmtdr » Wed May 10, 2006 1:49 am

I use godaddy and get an error about iconv(). I don't require a language besides english, is there a way to do this without using the non-english encoding?

nmtdr
Registered User
Posts: 46
Joined: Tue Mar 28, 2006 4:41 am
Location: New Mexico

Post by nmtdr » Wed May 10, 2006 3:16 am

1 Warning(s) reported by the SQL Parser

1. Non-portable syntax option(s) "TYPE=MyISAM", ignored, statement: 8, table: "phpbb_topics_jwatch"


_______________________________________
phpbb 2.0.20
Had to shorten the search lines in usercp_register.php to execute correctly. This error is in the Proposed database alterations stage.

nmtdr
Registered User
Posts: 46
Joined: Tue Mar 28, 2006 4:41 am
Location: New Mexico

Post by nmtdr » Wed May 10, 2006 3:32 pm

In working with this mod I am having a couple questions.
I'm installing with easymod to phpBB 2.0.20. No other mods are installed.

I had to make the following changes to the mod.mod file in order for it to precede through the script.

In the file: includes/usercp_register.php

line 745
#
#-----[ FIND ]------------------------------------------
#
$strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');

changed to:

#
#-----[ FIND ]------------------------------------------
#
$strip_var_list = array('email' => 'email',

line 979
#
#-----[ FIND ]------------------------------------------
#
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);

changed to:

display_avatar_gallery($mode, $avatar_category,

and in file: includes/usercp_viewprofile.php

line 1038

#-----[ FIND ]------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

changed to: $search = '<a href="' . $temp_url

The script then executes successfully but gives the following warning message in the "Proposed database alterations portion":

1 Warning(s) reported by the SQL Parser

1. Non-portable syntax option(s) "TYPE=MyISAM", ignored, statement: 8, table: "phpbb_topics_jwatch"

I can configure the mod in ACP and click the jabber icon for a window to type a message, when I click "send" I get the error about iconv(). I'm wondering if these two lines with iconv() are for the language change in jabber, why can't jabber use the language that the board is configured to? I was able to edit out the iconv() conversion and successfully execute (now I'm getting a connect failure (different issue I think) the mod. I don't know what iconv() does but my hosting company (godaddy) must not support it, as might be true with other hosting co's. The method that the phpBB forum uses to select language works ok.

Do you have any suggestions about the database issue?

Thanks

User avatar
dnakata
Registered User
Posts: 7
Joined: Mon May 08, 2006 2:40 am
Contact:

Post by dnakata » Thu May 11, 2006 5:29 am

iconv converts text between codepages.

so, iso8859-1 => ascii, or ascii => utf-8, or (for the realy raving lunatics) koi-r => euc-jp

personally, i would comment it out too. and run everything in utf-8, done.

--

those are some crazy FINDs.

you can actually safely remove the 'type=xxxx' from a create table line without any ill-effects.

--

i'll get back to you in about 20 mins after i set it up on my own board.

nmtdr
Registered User
Posts: 46
Joined: Tue Mar 28, 2006 4:41 am
Location: New Mexico

Post by nmtdr » Thu May 11, 2006 2:23 pm

I did that and kept trying, couldn't get it to connect. (the other issue). Put it on my home server and walla, it worked. It appears no connect from a godaddy server...bummer.

"Type-XXXX" Deleted, exactly what I did and it worked fine.

nE0sIghT
Registered User
Posts: 27
Joined: Thu Mar 10, 2005 11:05 am
Contact:

Post by nE0sIghT » Wed May 24, 2006 7:28 pm

At last, after a long-long time some people interesting in Jabber features :) I did many changes in this mod such as SSL support, so in a week or two i try to release a 2.20-compatible mod with all changes

2 nmtdr
1) iconv() support not necessary, if u use only english, so i think next release of mod will optional use this function
2) the problem with connections can be because of some limitations of ur hoster...

P.S.: yep, my english is bad ;p

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3368
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer » Sat Jul 01, 2006 8:24 pm

Are you still working on this?
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

nE0sIghT
Registered User
Posts: 27
Joined: Thu Mar 10, 2005 11:05 am
Contact:

Post by nE0sIghT » Sat Jul 01, 2006 9:08 pm

Yes, but i do not have much time :(
A mod-file is ready, but i need more time for testing

nE0sIghT
Registered User
Posts: 27
Joined: Thu Mar 10, 2005 11:05 am
Contact:

Post by nE0sIghT » Sat Jul 01, 2006 9:10 pm

New 2.0.21-compatible version is here :) Head changed

nE0sIghT
Registered User
Posts: 27
Joined: Thu Mar 10, 2005 11:05 am
Contact:

Post by nE0sIghT » Mon Jul 03, 2006 3:48 pm

Version 0.0.5 is released.
With this version i done all features, that i want and that i don't want, but made.
So i think after a short time of testing, i will submit it to MoDDB

nE0sIghT
Registered User
Posts: 27
Joined: Thu Mar 10, 2005 11:05 am
Contact:

Post by nE0sIghT » Tue Jul 04, 2006 2:43 pm

Demo board is up: http://jabber-mod.byethost22.com

Admin login: test
Admin pass: test

This hoster doesn't support socket functions, so jabber-messaging there doesn't work

nE0sIghT
Registered User
Posts: 27
Joined: Thu Mar 10, 2005 11:05 am
Contact:

Post by nE0sIghT » Wed Jul 05, 2006 12:12 pm

Another Demo board with working Jabber-messaging:

http://jabber-mod.exofire.net/

Login: test
Password: test

thunder88
Registered User
Posts: 158
Joined: Wed Dec 03, 2003 7:38 am

Post by thunder88 » Thu Jul 06, 2006 5:48 pm

I can almost get this to work but not quite. A lot of the code in usercp_register.php is different or missing. This isn't in my file anywhere nor is there anything close:

Code: Select all

#
#-----[ FIND ]------------------------------------------ 
#
VALUES ($user_id, '" . str_replace("\'", "''", $username)
#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
'" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "'
# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
, '" . str_replace("\'", "''", $jid) . "'
#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
$notifyreply
# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
, $jnotifyreply
#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
'" . str_replace("\'", "''", $user_lang) . "'
# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
, '" . str_replace("\'", "''", $user_jabber_lang) . "'

nE0sIghT
Registered User
Posts: 27
Joined: Thu Mar 10, 2005 11:05 am
Contact:

Post by nE0sIghT » Thu Jul 06, 2006 6:07 pm

It seem, that your installation of phpBB 2.0.21 is not clear(maybe some mods changes this line)
In a clear phpBB 2.0.21 installation this line:

Code: Select all

VALUES ($user_id, '" . str_replace("\'", "''", $username)
have a number 623


This is a full block of code:

Code: Select all

			//
			// Get current date
			//
			$sql = "INSERT INTO " . USERS_TABLE . "	(user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, 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 ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
			if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
			{
				$user_actkey = gen_rand_string(true);
				$key_len = 54 - (strlen($server_url));
				$key_len = ( $key_len > 6 ) ? $key_len : 6;
				$user_actkey = substr($user_actkey, 0, $key_len);
				$sql .= "0, '" . str_replace("\'", "''", $user_actkey) . "')";
			}
Try to search something simillar

Post Reply

Return to “[2.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 12 guests