91
migoe
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/5 19:34

  • migoe

  • Just popping in

  • Posts: 68

  • Since: 2003/4/2 9


Hi wanikoo,

i wish you and the other here a happy new year 2005

Quote:
wanikoo wrote on 2005/1/4 15:12:53

I know it's complicated...and moreover..these processes and calculation for de/en-cryption are all up to you.
Therefore...if you are not good at PKI and feel no necessity of secret PM, Please just ignore this function.


this things are interesting and you are right: very complicated. I do not need it for my side and hope you can make it optional for setting it up in the pm-coniguration because it diverts my visitors an make them confused.

i'm using on my site the module "pm-block" witch shows the newest pns in a block on the homepage. my problem is, that with your modifications ist not more possible to select a pn directly, because i do not know the syntax - how can i make a link to the latest pn?

migoe, who know about his bad english

92
krobi
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/6 0:39

  • krobi

  • Quite a regular

  • Posts: 290

  • Since: 2003/12/21


hey wanikoo

i have just tested the actually version and i must say that hack have really many features

first of all one chance is that i dont like, when you want to send a pm to a user i cant select them anymore from the drop-down menu, i must go to that members search and so on

that a long way for a pm to one user, i like the old methode more.

second
i also think that a pm modul would be better, because of the many function your hack has. when you have a modul you can but that admin thinks into the admin site, you have better control over all thinks. and then you could give the admin the option to switch features on and off.

would be great

93
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/6 10:25

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

migoe wrote:
hope you can make it optional for setting it up in the pm-coniguration because it diverts my visitors an make them confused.

krobi wrote:
first of all one chance is that i dont like, when you want to send a pm to a user i cant select them anymore from the drop-down menu,
i must go to that members search and so on
that a long way for a pm to one user, i like the old methode more.

^^;;
In the next version,
I will finally add the function of PM system config which enables you to set default values of PM policy and PM-environment for your system.
It means you(admin) can set default PM policy(default box_max limit,default GroupPM policy) and default PM-environment(On/Off of each function..maybe--;;) of your system.
so....
maybe you can see what you suggested above...in the next version.
Umm...maybe...^^;;

Quote:

krobi wrote:
i must say that hack have really many features

I know...
but...
In the end...of this PM hack project,
I plan to release three or four different versions of this PM hack.
I mean....
default version(just sort and search function)
type1(default+pm config)
type2(default+pm config+grouppm)
type3(??)....etc.....
^^;;
Quote:

migoe wrote:
i'm using on my site the module "pm-block" witch shows the newest pns in a block on the homepage.

den1662 wrote:
This what i have tried 'Module PM' but getting errors:
'Errors None' by getHtmlErrors. Where did i go wrong?

Umm...
I have never used other PM-hacks( pm-block you mentioned, pm-modules etc)--;;
so...I can't help you without more detailed explanation....sorry--;;

94
krobi
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/6 17:07

  • krobi

  • Quite a regular

  • Posts: 290

  • Since: 2003/12/21


hm when you look at the cvs from XOOPS 2.0.10 then you see that in the next version many features get an extra modul.

so i still think that a separatly pm-modul will be the best solution for the future because:

you dont need to develope 4 versions
you can simple do all the setting via the administration
it will be more user/admin friedlier
with a modul you can do all the things (optical) via template, so users/admins can easily modifiing the optic.

in the future when the core devs will move the pm to a separatly modul you dont need to make a new hack, i think that is it the time to talk to some core devs and work with them on a pm-modul.

maybe a modul is not yet the best solution but in the future i think it will be the best solution.

95
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/11 15:34

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Upgraded to Ver4.0


------Ver4.0-------(2005/1/12)
>>PM System-Policy function added!(configpmsg.php, pmhackconfig.php and others related.)
With this function,you(Admin) can set the PM System-Policy of your system.
#PM System-Policy#
You can set the followings.
=> the default values of PM-Policy,GroupPM-Policy.
(It means new member has these as his/her default PM-Policy,GroupPM-Policy.)
=> ON/OFF(or Selection) of each function prepared for PM-users in this PM system.
(1, PM partner search mode -> Old User-Select-Mode(0), PM Partner Search Popup(Not ReadOnly)(1), PM Partner Search Popup(ReadOnly)(2)
(2, PM Config Function -> OFF-Mode(Not Use)(0), ON-Mode(Use)(1) //To prevent users from accessing PM Config Page(configpmsg.php). [Exception:Admin]
(3, GroupPM(GPM) Function -> OFF (0), ON (1) //To disable GroupPM(GPM) Function [No G-send,GFW button, No access to pmgrouplite.php ]
(4, PM UserKey(PKI) Function -> OFF(0), ON(1) //To disable PM-UserKey(PKI) Function [No Public Key,UserKey button, No access to userkeysearch.php ]
(5, PM Type Function -> OFF(0), ON(1) //To disable PM Type Function [No PM Type Selection in pmlite.php and pmgrouplite.php]
(6, PM Backup Function -> OFF(0), ON(1) //To disable PM Backup Function [No Backup buttons and links, No access to pmbackup.php ]
(7, PM Print Function -> OFF(0), ON(1) //To disable PM Print Function [No Print button, No access to pmprint.php ]
(8, PM Help Function -> OFF(0), ON(1) //To disable PM Help Function [No Popup-Help(overlib_mini.js) ]
(9, PM PDF Function -> OFF(0), ON(1) --not supported yet, maybe next version
(10, PM Buddy Function -> OFF(0), ON(1) --not supported yet, maybe next version
(11, PM Post/Receive Box -> OFF(0), ON(1) --not supported yet, maybe next version
(12, PM Send -> OFF(0), ON(1) --not supported yet, maybe next version
(13, PM Policy(something related with filtering) -> OFF(0), ON(1) --not supported yet, maybe next version
(14, PM-Group Policy -> OFF(0), ON(1) --not supported yet, maybe next version
#How To Set#
1, Access the menu,"Set PM System Policy(Admin Only)" [configpmsg.php?op=editpmsystempolicy]
2, Set Each value in every field and Click Save-Button.
(This will make or upgrade html/cache/pmhackconfig.php. ) [configpmsg.php will include-once this file.]
3, Copy(Not Move) pmhackconfig.php to Root directory( ex: /html/pmhackconfig.php ) [Others(except for configpmsg.php) will include-once this file.]
4, set /html/pmhackconfig.php ReadOnly. [To prevent attacker from overwriting it.]
(I recommend you set also html/cache/pmhackconfig.php ReadOnly. But when edit/set, it must be Writable^^;;)

>>PM Help Function Added.(overlib_mini.js and others related.)
This Function will provide users with Popup-Help[Tip] like Mambo CMS.
(You can/have to write your own Help/Tip...[Sorry^^for my laziness.please edit pmsg.php]
>>Image-Files(related with PM type) redisposed (to prevent collision with other modules such as newbb)
( /html/images/subject ==> /html/images/pmsubject )

-----------------------------
How to upgrade 3.9->4.0
1, No change on PM DB^^No touch^^
2, Open this file(/html/language/{yourlanguage}/pmsg.txt[or pmsg_upgrade3x-40.txt])
Add the upgraded contents( under//WANISYS.NET PM HACK4.0) of pmsg.txt to pmsg.php.
3, Overwrite All files into proper directories!!
[Notice]
-You must copy pmhackconfig.php to both directories[/html and /html/cache])
-Image-Files(related with PM type) redisposed (to prevent collision with other modules such as newbb)
( /html/images/subject ==> /html/images/pmsubject )
4, That'a all! Enjoy this new PM system4.0!!
------------------------------
How to install[new install]

1, Open this file(/html/wanipmhack.sql) and execute the sql query on the file^^
( Use phpmyadmin...if you are DB-novice!!Please, watch out table prefix[xoops_])
2, Overwrite All files into proper directories!!
(You must back-up original files...before this hack!!!!)
3, Open this file(/html/language/{yourlanguage}/pmsg.txt[and pmsg_upgrade3x-40.txt if it exists])
Add the contents of pmsg.txt to pmsg.php.
4, Open this file(/html/footer.txt)
Add the wanipmhack section(I mean ////////////////WANIPMHACK3.0) of footer.txt to footer.php.
5, That's all!! Enjoy this new PM system!!
-----------------------------
How to uninstall

1, Replace all changed files with your original files.
(html/viewpmsg.php,readpmsg.php,pmlite.php,footer.php)
(html/kernel/privmessage.php)
(html/language/{yourlanguage}/pmsg.php)
2, Delete all new files.
(html/ configpmsg.php, printpmsg.php, backuppmsg.php, pmgrouplite.php, usersearch.php, userkeysearch.php, pmhackconfig.php, overlib_mini.js)
(html/cache/ pmhackconfig.php)
(html/kernel/ privmessageconfig.php, pmuserkey.php)
(html/images/ inbox.gif, readbox.gif, rsavebox.gif, rtrashbox.gif, outbox.gif, sentbox.gif, psavebox.gif, ptrashbox.gif, pmhelp.png)
(html/images/icons/ backuppm.gif, forwardpm.gif, gforwardpm.gif, printpm.gif, pmuserkey.gif, pmcheck.gif)
(html/images/pmsubject/pm_normal_u.gif, pm_normal.gif, pm_normal_e.gif, pm_re_u.gif, pm_re.gif, pm_re_e.gif, pm_fw_u.gif, pm_fw.gif, pm_fw_e.gif, pm_gpm_u.gif, pm_gpm.gif, pm_gfw_u.gif, pm_gfw.gif)
3, Open this file(/html/wanipmhack_uninstall.sql) and execute the sql query on the file^^
( Use phpmyadmin...if you are DB-novice!!Please, watch out table prefix[xoops_])
4, That's all!! Very simple^^;;
----------------------------

Demo:

http://kjw0815.codns.com/wanisys/japanese/xoops/html/modules/news/

Downloads:
-Stable Version => Ver2.85(default)
http://www.wanisys.net/data/wanipmhack.zip
-Test Version => Ver4.0(+pmconfig+GroupPM+etc)
http://www.wanisys.net/data/wanipmhack40.zip
-DB-toolkit for DB-novice(only for New install/uninstall)
http://www.wanisys.net/data/wanipmhack_dbtoolkit40.zip


2005/1/12

From wani[wani@wanisys.net]

the most educational site, wanisys.net [ http://www.wanisys.net ]

96
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/12 11:16

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


PM Help Function (/html/overlib_mini.js) upgraded!!

The upgraded version of this script will provide you with more stability and compatibility.

If you have never seen this message before,
please replace your old overlib_mini.js with this new overlib_mini.js
http://www.wanisys.net/data/overlib_mini.js
Or
please redownload Ver4.0!!
http://www.wanisys.net/data/wanipmhack40.zip

btw,
If you want to customize this Popup Help/Tip for your system,
please visit the author's site below.
(You can get also the latest version of this script here. Just download and rename it^^[ overlibmws.js => overlib_mini.js ] )
------------
overlibmws DHTML Popup Library
http://www.macridesweb.com/oltest/
(maintained by Foteos Macrides at Macrides Web Services)

2005/1/12

From wani[wani@wanisys.net]

the most educational site, wanisys.net [ http://www.wanisys.net ]

97
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/12 12:22

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

I mentioned before like this:
With this function,you(Admin) can set the PM System-Policy of your system.
#PM System-Policy#
You can set the followings.
=> the default values of PM-Policy,GroupPM-Policy.
(It means new member has these as his/her default PM-Policy,GroupPM-Policy.)


This section of pmhackconfig.php is correspondent to the default value of PM(GroupPM) Policy.
---------------
$Config_pm['filter_ok'] = "0";
$Config_pm['filter_word'] = "sex,drug";
$Config_pm['reject_ok'] = "0";
$Config_pm['reject_reason'] = "";
$Config_pm['blacklist'] = "devilboy,devilgirl";
$Config_pm['pmsort'] = "0";
$Config_pm['pmorder'] = "0";
$Config_pm['pmlimit'] = "10";
$Config_pm['trashbox_ok'] = "0";
$Config_pm['popup_ok'] = "0";
$Config_pm['mail_ok'] = "0";
$Config_pm['rbox_max'] = "5000";
$Config_pm['pbox_max'] = "5000";

$Config_gpm['grouppm_adminok'] = "0";
$Config_gpm['grouppm_mygroupok'] = "0";
$Config_gpm['grouppm_rusergroupok'] = "0";
$Config_gpm['pmgroup_list'] = "";
$Config_gpm['grouppm_limit'] = "5";
-----------------
Here is more detailed explanation^^
(please, look at the menu."Set PM System Policy(Admin Only)" [configpmsg.php?op=editpmsystempolicy]
$Config_pm['filter_ok'] => No filtering(0), Filtering(1)
$Config_pm['filter_word'] => ex> "sex,fight,drug"
$Config_pm['reject_ok'] => No reject(0), Reject(1)
$Config_pm['reject_reason'] => ex> "I am busy now"
$Config_pm['blacklist'] => ex> "devilboy,devilgirl"
$Config_pm['pmsort'] => msg_time(0), subject(1)
$Config_pm['pmorder'] => ASC(0), DESC(1)
$Config_pm['pmlimit'] => 10 (10 pms Per Page)
$Config_pm['trashbox_ok'] => No show(0),Show(1)
$Config_pm['popup_ok'] => No popup(0),Popup(1)
$Config_pm['mail_ok'] => No mail notification(0), Mail notification(1)
$Config_pm['rbox_max'] => 5000 (PM user Receive box max-limit)
$Config_pm['pbox_max'] => 5000 (PM user Post box max-limit)
$Config_gpm['grouppm_adminok'] => Allow GroupPM to Admin Group-> Not Allow(0),Allow(1)
$Config_gpm['grouppm_mygroupok'] =>Allow GroupPM to My Groups-> Not Allow(0),Allow(1)
$Config_gpm['grouppm_rusergroupok'] => GroupPM to Registered Users Group -> Not Allow(0),Allow(1)
$Config_gpm['pmgroup_list'] => ex> "1,2" GroupID
$Config_gpm['grouppm_limit'] => 5 GroupPM limit(Per Month)


<>
------------
=> ON/OFF(or Selection) of each function prepared for PM-users in this PM system.
------------
It is correspondent to this section of pmhackconfig.php
((please, look at the menu."Set PM System Policy(Admin Only)" [configpmsg.php?op=editpmsystempolicy])
$Config_pmfunction['pmpartnersearch'] = "2";
$Config_pmfunction['pmconfig_ok'] = "1";
$Config_pmfunction['grouppm_ok'] = "1";
$Config_pmfunction['pmuserkey_ok'] = "1";
$Config_pmfunction['pmtype_ok'] = "1";
$Config_pmfunction['pmbackup_ok'] = "1";
$Config_pmfunction['pmprint_ok'] = "1";
$Config_pmfunction['pmpdf_ok'] = "1";
$Config_pmfunction['pmbuddy_ok'] = "1";
$Config_pmfunction['pmhelp_ok'] = "1";
$Config_pmfunction['pmprbox_ok'] = "1";
$Config_pmfunction['pmlite_ok'] = "1";
$Config_pmfunction['pmpolicy_ok'] = "1";
$Config_pmfunction['grouppmpolicy_ok'] = "1";
----------

btw,
someone asked me why I chose File-Config instead of DB-Config(xoops_config table)
Umm...
At my first thought, I planed DB-Config...but...changed my mind...
because....I thought File-Config is better in this stage considering the modularization of this PM-Hack.

2005/1/12

From wani[wani@wanisys.net]

the most educational site, wanisys.net [ http://www.wanisys.net ]

98
Anonymous
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/12 19:10

  • Anonymous

  • Posts: 0

  • Since:


Maybe I missed something in this discussion, but I have an annoying bug in your (wonderful) hack.

All automatic notifications are in my sent-box. This behaviour seems to spread, since other users have the same problem and they are NOT admins.

Any clues for me?

99
wanikoo
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/12 21:03

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

Maybe I missed something in this discussion, but I have an annoying bug in your (wonderful) hack.
All automatic notifications are in my sent-box.

^^;;
Quote:

I've mentioned like this before[Read Page1]^^:
If you hate the congestion of OUTBOX/SENTBOX, you can post a PM with from_delete=1....It means... you post and delete a PM at the same time.
And still your partner can receive your PM because still to_delete=0^^
So you can solve this problem if you use $pm_handler->setFromdelete($pm) at the same time when you post a PM($pm_handler->insert($pm)).

Umm...I think it's not a bug of this PM hack.
As you know, I've tried to escape collision with(and not to bother) other modules or XOOPS core functions[such as PM function related with auto notification].
So... PMs(sent by System or other modules) are all exceptional in the PM policy of this PM hack.
Anyway...
I think you can easily solve this trouble by adding some codes to /html/class/xoopsmailer.php.
$pm_handler->setFromdelete($pm)[after $pm_handler->insert($pm)]
^^;;(Not test yet...but..it may work^^)

/html/kernel/notification.php
case XOOPS_NOTIFICATION_METHOD_PM:
            
$xoopsMailer->usePM();
            
$config_handler =& xoops_gethandler('config');
            
$xoopsMailerConfig =& $config_handler->getConfigsByCat(XOOPS_CONF_MAILER);
            
$xoopsMailer->setFromUser($member_handler->getUser($xoopsMailerConfig['fromuid']));
            foreach (
$tags as $k=>$v) {
                
$xoopsMailer->assign($k$v);
            }
            break;

/html/class/xoopsmailer.php
// private
    
function sendPM($uid$subject$body)
    {
        global 
$xoopsUser;
        
$pm_handler =& xoops_gethandler('privmessage');
        
$pm =& $pm_handler->create();
        
$pm->setVar("subject"$subject);
        
// RMV-NOTIFY
        
$pm->setVar('from_userid', !empty($this->fromUser) ? $this->fromUser->getVar('uid') : $xoopsUser->getVar('uid'));
        
$pm->setVar("msg_text"$body);
        
$pm->setVar("to_userid"$uid);
        if (!
$pm_handler->insert($pm)) {
            return 
false;
        }
        return 
true;
    }

100
Anonymous
Re: XOOPS PM(Private Message)-Hack
  • 2005/1/12 22:15

  • Anonymous

  • Posts: 0

  • Since:


Forgive me my impertinence, but I don't understand where to put the code you mention. What to insert into notification.php?

Thank you for quoting my question, but this was not the complete quote.

Quote:
This behaviour seems to spread, since other users have the same problem and they are NOT admins.


For me this is definitely a bug. Why do other users (non-admins) have Automatic Notifications in their SENT-Box? I thought that the admin sent the notifications and not the users?

Ouch! I can't resist (please don't feel offended): What about inserting some paragraphs in your thread and not using ^^ so often? This would make reading easier.

Sorry, I said I couldn't resist...

Login

Who's Online

195 user(s) are online (98 user(s) are browsing Support Forums)


Members: 0


Guests: 195


more...

Donat-O-Meter

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

Latest GitHub Commits