Merhaba!
Ben SquirrelMail'i phpnuke'a entegre etmek istiyorum. Yani kullanici uye olundugu zaman kullanici adi ve shifresiyle maile de girish yapa bilsin. Boyle bir shey mumkunmu. Eger kucukde olsa bu konuda bilgisi olan varsa yardim etsin. Belki devamini kendim olushtura bilirim.
Yardiminiz ichin shimdiden teshekkurler!
Kayıt: Jan 02, 2006 Mesajlar: 1660 Konum: Diyarbakır
Tarih: 2006-06-23, 17:41:25 Mesaj konusu:
Sımdı sen kullanıcıya mail werecek isen bunu cpanel'den yapacan hem her kullanıcıyada mail veremessin kı mail'lerinde cpanel'de limiti vardır benim 200 tane mesela
Kayıt: May 25, 2006 Mesajlar: 208 Konum: PV Ankara
Tarih: 2006-06-23, 21:10:29 Mesaj konusu:
Bunun için phpnuke modülü var ama squirel mail mi horde mu neo mu kullanır bilmiyorum.
Modül adı: CPMail aynen bu google da ararsan örnek siteler görebilirsin. copyright bak birinde hangi sitenin ürünü olduğunu öğren ve o siteden indir kur sitene isteyen mail alabilsin.
Ama arkadaş hem üyelik hemde mail hizmetini tek seferde halletmek istiyor.E buda biraz zor neden dersen nuke de nuke_user tablosu tutuyor bunları peki öbür sitem nerde tutyor başka bi sql de yani olayı tek sql e taşımak gerekiyor e buda biraz uzaman işi oluyor SquirrelMail tablolarını nuke_user a addapte etmek yani olayı biraz yeniden kodlamak gerek.
Evet amoki arkadashin dedigi gibi yapmak istiyorum.
Mesela FlashChat'i isterseniz ayri kuruyorsunuz, isterseniz php-nuke ve ya bashka bir cms'ye entegre bir shekilde kuruyorsunuz ve chata ayrica uye olmadan phpnuke uye adi ve shifrenizi yazarak girish yapa biliyorsunuz. Bunu da aynen oyle yapmak mumkunmu acab onu dushunuyorum.
http://www.messin.net/ diye bir site buldum bu konuyla ugrashan, o da shimdi Drupal kullandigi ichin artik phpnuke ichin destek vermiyor.
Arkadaşlar ben ve arkdaşlarım yeni bişey bulduk ilkbaş cpanel den bir mail açıyoruz mesala@gencclup.net bunu msn den açılacak şekilde yapıyoruz sonra o üyenin msn den açılabilen bir maili oluyor ama mailine gelen mesajlara bakamıyor. Çünkü cpanel den açılan mail i siliyoruz Ayrıca arkadaşım www.messin.net açılmıyor.
Merhaba arkadaşlar! Bu konu hakkında bir yazı buldum! Sizinle paylaşmak istedim. Ben daha birşeyler yapamadım. Belki php-den daha iyi anlayanlar çözer.
Alıntı:
I am currently running PHPNuke 7.8 (heavily modded of course ). I am working on a mod that will semi-integrate Squirrelmail's (a PHP based webmail system) user/password MySQL database with PHPNuke's user database. The way it works follows. hMailServer has its tables named hm_*whatever* in the database called nuke. One of these is called hm_accounts. It stores account names, passwords, inbox max size, etc for a given user. It uses the same MD5 hashing as the password stores of PHPNuke. Hence the stored password hash for a user in PHPNuke is the same as a stored password hash for a user on hMailServer. I created the following lines of code to be used at around line 150 in the Your_Account/index.php file:
Kod:
#Mod for hMailServer integration - insert new user
$inboxsize = "25"; //size in MB of account inbox
$getuserid = $db->sql_fetchrow($db->sql_query("SELECT user_id from ".$user_prefix."_users where username='$username'"));
$storeduserid = stripslashes($getuserid['user_id']);
$getuserpw = $db->sql_fetchrow($db->sql_query("SELECT user_password from ".$user_prefix."_users where username='$username'"));
$storeduserpw = stripslashes($getuserpw['user_password']);
$db->sql_query("INSERT INTO hm_accounts VALUES ($storeduserid, 1, 0, '{$username}@crashanime.com', '$storeduserpw', 1, 0, '', '', $inboxsize, 0, '', '', 2)");
#End of hMailServer mod to insert new user
These lines of code effectively add a user into the hm_accounts table using the same information the user provided at the time of signup on the site (this chunk of code is in function activate section of the file). This code comes into play just after the user is fully activated and just before the users information is taken out of nuke_users_temp. So for example...
User A comes along and registers on the site with a username of coolguy33 with a password of "temporary" (temporary = d5197d93c063a2b1e22d1630a39b7aef after it is thrown through md5 hashing). Even though the function of user_id in nuke_users in NULL, which means it takes the next available number in a sequence, we can get this number by using these 2 lines:
Kod:
$getuserid = $db->sql_fetchrow($db->sql_query("SELECT user_id from ".$user_prefix."_users where username='$username'"));
$storeduserid = stripslashes($getuserid['user_id']);
Now that we have the user_id tag we have 3 pieces of info:
user_id, username, and userpassword (md5 of course). Lets just say that the user_id was 500. The following line....
... inserts a new user into the hm_accounts table with the same user_id as the PHPNuke user's that was just added. It also adds the username as username@domain.com (where domain.com can be changed to whatever the site's domain is and username is the username coolguy33 in this ex). So in this case it adds the account name of coolguy33@crashanime.com. Finally, the variable $storeduserpw is the MD5 hash of the user's password and it is stored as the password for that user in hmail (So now above and beyond a new PHPNuke user we also have a new e-mail address for him with the same password as his PHPNuke account). The next part of the mod is to make it so that when the user changes his password in Your_Account it changes his hMailServer account password too. This is accomplished at around line 1250 of Your_Account/index.php with the following lines of code:
Kod:
#hMailServer account password update mod
$getuserpw = $db->sql_fetchrow($db->sql_query("SELECT user_password from ".$user_prefix."_users where username='$username'"));
$storeduserpw = stripslashes($getuserpw['user_password']);
if ($ccpass == $storeduserpw) {
} else {
$db->sql_query("UPDATE `hm_accounts` SET accountpassword='$storeduserpw' WHERE accountid='$user_id'");
}
#End hMailServer account mod
Header("Location: modules.php?name=$module_name");
Note: the final line ( Header("Location: modules.php?name=$module_name"); ) had to be moved to the end or else it wouldn't work for quite obvious reasons (it would get redirected before ever crunching my code). The variable $ccpass is a variable made available to us at the beginning of the profile page form. It holds the MD5 hash of the user's PHPNuke account password, regardless of whether or not we update the password of the account. Furthermore, this variable stays at what the user's password's MD5 hash was before submitting account info updates. So in other words even after updating nuke_users accountpassword with a new hash this variable will contain the password hash that existed before the newly updated password was put into the table. $storeduserpw variable just holds whatever the password is at the end of all updates. So simply put the if statement compares the passwords before and after user profile updates and if the password was changed, it executes the SQL commands to update the hm_accounts record for that user.
Now, all seems to be going smoothly right? Well..it is...except one thing. We have to disable or update all password changing systems in PHPNuke and Squirrelmail to update both the hm_accounts password and the nuke_users password. In Squirrelmail this is easily remedied by just redirecting the user to modules.php?name=Your_Account&op=edituser, which if you remember was just modified to change both passwords. The final brick in the block is the Forums (bb2nuke) profile page. We cannot just simply disable it because that would prevent users from using the avatar upload system. The simplest solution to me seems to be to delete the code that shows the Registration Information chunk at the top of the profile page. This section includes the username, email, and of course the password changing section. If we were to just delete the code that displays those password boxes we could remedy the situation (by virtue of disabling password changing capabilities). The problem is that I cannot find the location of the code within the forums module that displays these boxes. Does anyone know the location of this code so that I could modify or delete it? Also, if I were to successfully get this project finished, would anyone be interested in actually using it on their site? If I get enough "yes" responses from people I might host it on my site and improve upon the design (EX: add code to autologin to squirrelmail when the user is already logged into PHPNuke). The only drawback to this is that it is specifically coded for hMailServer e-mail server. The design approach could be applied to any SQL based mail server, it would only take a few modifications.
Newest piece of code in. Even though it's only one line of code I finally figured out where the update function was in the scripting of the forum's (bb2nuke) profile page was. I found the update function and added my code:
#hMailServer account password update mod
if (isset($new_password)) {
$db->sql_query("UPDATE hm_accounts SET accountpassword='$new_password' WHERE accountid='$user_id'");
}
#End hMailServer account mod
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
} else {
The line in between the commented lines (The commented lines are the ones that say hMailServer account password update mod and the one that says End hMailServer account mod) is the added code. This is around line 520 of the file includes/user_cpregister.php. Integration is going well and the next thing up to fix is the password changer within SquirrelMail. It, like the Your_Account and Forums modules, must be updated with code to update the nuke_users user_password field and the hm_accounts accountpassword field at the same time. Once that is complete I will work on fixing ease of skinning/theming of the system. As is I'm having a hard time locating the code for the login error page of squirrelmail. The login page has been figured out and was easily re-coded to a theme. After all is done on modifying the main code I'll start on a theme system for the login/error page. The current theme system that SquirrelMail uses for itself will remain intact. If anyone out there knows where the code that renders the SquirrelMail login error page resides (what file, what lines, etc) please mail me at admin@crashanime.com.
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız