1
luckylin
Re: XOOPS PM(Private Message)-Hack
  • 2006/11/17 18:00

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


Quote:

Damaster wrote:
Yep, impressive !



This is a great "module".
I also tried to add some icons into the table (for example, incoming folder icon and outgoing icon) so it looks even better! Very impressed.

I have a question on the "Trash" folders - I see all deleted ones (in or out) went to trash folder, and it could be reversed back (undeleted), but can we completely purge them? I see no option for that and wonder how to.


Also, does that mean - when we delete a SENT message, is it also be gone from the receiver's folder? I want the Admin have a way to clean up PMs but not seeing any hack for this.

Thanks in advanced.
...



2
luckylin
Re: mime type png not allowed if I upload smilies
  • 2006/11/15 21:53

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


Never mind, it is a bug. I managed to fix it.

Go to
/modules/system/admin/smilies/main.php

find

'image/x-png')


(2 places)


change to

'image/x-png', 'image/png')


save, you are done!
...



3
luckylin
Re: mime type png not allowed if I upload smilies
  • 2006/11/15 21:42

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


Same here. DO you have solution yet?
...



4
luckylin
Re: Hack help: Send a notification when a user login
  • 2006/8/18 4:59

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


The position is correct, so I now am thinking it might be a VERY simple error you've made - the code somehow break into lines which will stop working in php, please carefully check the code see if there is any "hard break line" in between code, it's my guess now.


// Perform some maintenance of notification records
    
$notification_handler =& xoops_gethandler('notification');
    
$notification_handler->doLoginMaintenance($user->getVar('uid'));
    
$loginuserid $user->getVar('uid') ;
    
$userurl "http://www.yoursite.com/xoops/userinfo.php?uid=$loginuserid;
// by luckylin -- you MUST change the URL to your site 
    
if ($loginuserid != && $loginuserid != && $loginuserid != && $loginuserid != 100 && $loginuserid != 50) {
// by luckylin -- these are to opt out NO-NEED-TO-MONITOR users, you have to check the id number first
    
mail"admin1@list1.com, admin2@list2.com""User $uname Login Alert",
    
"User Login Notification:nn$uname (ID:$loginuserid) has just logged in. nn$userurlnn",
    
"From: Webmaster" ); 
    }
// by luckylin -- change your email, subject and emailbody 
    
redirect_header($url1sprintf(_US_LOGGINGU$user->getVar('uname')));
} else {
...



5
luckylin
Re: Hack help: Send a notification when a user login
  • 2006/8/17 19:42

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


Not sure if 2.0.13 and 2.0.14 matters.

Please try a very simple modification first - add a mail function:


in checklogin.php


$notification_handler->doLoginMaintenance($user->getVar('uid'));

mail("your.admin@email.com""User Login Notofication""TEST""From: Webmaster"); 

redirect_header($url1sprintf(_US_LOGGINGU$user->getVar('uname')));


Touch nothing but adding the mail line.

This SHOULD send you a simple test email whenever a user logged in. If you failed to get email, it might mean you need to tweak your mail settings..

Good luck!
...



6
luckylin
Re: Hack help: Send a notification when a user login
  • 2006/8/17 1:44

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


Quote:

JamesSAEP wrote:
Are you using 2.0.14? If so, what code did you put in the checklogin.php file? I tried your code form the thread and when I try to login, it has a blank page.


I am using 2.0.13 so I guess that should be the same... (?)

Followed the suggestion I only modified the checklogin.php,

find the latest portion and change to -


// Perform some maintenance of notification records
    
$notification_handler =& xoops_gethandler('notification');
    
$notification_handler->doLoginMaintenance($user->getVar('uid'));
    
$loginuserid $user->getVar('uid') ;
    
$userurl "http://www.yoursite.com/xoops/userinfo.php?uid=$loginuserid;
// by luckylin -- you MUST change the URL to your site 
    
if ($loginuserid != && $loginuserid != && $loginuserid != && $loginuserid != 100 && $loginuserid != 50) {
// by luckylin -- these are to opt out NO-NEED-TO-MONITOR users, you have to check the id number first
    
mail"admin1@list1.com, admin2@list2.com""User $uname Login Alert",
    
"User Login Notification:nn$uname (ID:$loginuserid) has just logged in. nn$userurlnn",
    
"From: Webmaster" ); 
    }
// by luckylin -- change your email, subject and emailbody 
    
redirect_header($url1sprintf(_US_LOGGINGU$user->getVar('uname')));
} else {


It's been working well for already a month. Good luck.
...



7
luckylin
Re: Hack help: Send a notification when a user login
  • 2006/7/20 16:15

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


Quote:


If you only want to get the email after a successful login, you could send the email near the end, e.g. after:

$notification_handler->doLoginMaintenance($user->getVar('uid'));


Update: yes it is perfectly working. I got the user name and ID in the email. Thanks for the heads-up!
...



8
luckylin
Re: Hack help: Send a notification when a user login
  • 2006/7/20 16:01

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


Quote:

Dave_L wrote:

I don't understand what you're saying.

-----

But I think you're sending the email too early; the user's info hasn't been fetched from the database yet.

I would put the added code in include/checklogin.php, instead of in user.php.

If you only want to get the email after a successful login, you could send the email near the end, e.g. after:

$notification_handler->doLoginMaintenance($user->getVar('uid'));



Yup that is what exactly I am saying, the email did not show me the username as you descirbed it is sent too early. I will give it a try with the checklogin.php instead user.php, thanks!
...



9
luckylin
Hack help: Send a notification when a user login
  • 2006/7/20 15:22

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


I have searched the forum but only seen "send a welcome PM to new user" that is close to but not what I want to. I want to have a notification whenever an registered user is logged in. To some this might be needless but it is a good way for me to catch up with my members without delay, as long as I don't really have huge users to flood my email.

I looked into the USER.php, find the lines -

Quote:


if ($op == 'login') {
include_once XOOPS_ROOT_PATH.'/include/checklogin.php';
}
exit();



add my code in-between as -


Quote:


if ($op == 'login') {
$email = "my_notifying@email.address" ;
$loginuser = $xoopsUser->getVar('uid') ;
if (isset($email)) {
mail( $email, "your subject for User Login",
"$loginuser has just logged in.",
"From: Webmaster <webmaster@mysite.com>" );
include_once XOOPS_ROOT_PATH.'/include/checklogin.php';
}

exit();




The email works. But I can't have the login username to be in place. I understand that the $loginuser should not be in the email body it won't trigger, but I can't find a way to work around, can anyone gives me a quick light of this?

Thanks in advanced.

...



10
luckylin
Re: Myalbum sorting problem with my photos
  • 2005/12/6 15:58

  • luckylin

  • Just popping in

  • Posts: 35

  • Since: 2004/3/5 2


I have the sorting problem, too, but different than yours - my version is 2.63, and the problem is only happening when I use "batch" file uploading. Basically, I always rename photos to their order which is my preferred order, too, for eaxample photo01.jpg.........photo20.jpg.


The problem is no matter how I uploaded them, one by one from #1 to #20 (yes carefully by the order), or ZIP it in one file then unzip at the Unix server end (by using Cpanel file manager), whenever it goes to batch upload from local, the final output order is wrong, I can sort it by the file name (which will become to the title) but the real file order is a mess, in the album, photo #1 (from the top navigator) could be photo12.jpg, #2 could be photo02.jpg....
it has a pattern but I could not figure out what to fix... can anyone tell me how to "sort and batch them right"?


I originally build my site under Win server + php + xoops, this never happen under the win server; after move to unix server, the problems start. It seems relate to the file sorting of OS but I have no clue.

Could anyone have the answer also cc me at "meWorkaround at gmail.com" - please change the at to the @... for anti-spam reason

Thank you!
...




TopTop
(1) 2 3 4 »



Login

Who's Online

265 user(s) are online (163 user(s) are browsing Support Forums)


Members: 0


Guests: 265


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits