Topic: Private Messaging for 1.2.x

New Topic http://punbb.org/forums/viewtopic.php?pid=53711



##
##
##        Mod title:  Private Messaging System (PMS)
##
##      Mod version:  1.2.1
##   Works on PunBB:  1.2, 1.2.1, 1.2.2
##     Release date:  2005-03-01
##  Original Author:  David 'Chacmool' Djurbäck (chacmool@spray.se)
##           Author:  Connorhd (connorhd@mypunbb.com)
##
##      Description:  Private Messaging System for PunBB
##
##   Affected files:  admin_options.php
##                    footer.php
##                    header.php
##                    include/functions.php
##                    profile.php
##                    viewtopic.php
##
##       Affects DB:  New table:
##                       'messages'
##                    New options:
##                       'o_pms_enabled'
##                       'o_pms_messages'
##                       'o_pms_mess_per_page'
##
##            Notes:  Written with minimum changes to the original PunBB-files.
##                    When upgrading to newer versions of PMS you should only
##                    need to replace the old PMS-files (unless something else
##                    is stated in the download).
##
##        Upgrading:  To upgrade  from 1.1.5 make all the edits to your files 
##                    and upload the new PM files but DO NOT run the 
##                    install_mod.php to upgrade from PM mod 1.2.0 just replace
##                    all the old PM mod files, you do not need to make any edits
##
##   Using diff to install:
##                    1. Access your webserver via shell/ssh access
##                    2. Enter your punbb-directory
##                    3. patch -p2 < /location/to/PM-1.2.0.diff
##                    4. Run install_mod.php
##                    5. Delete install_mod.php
##                    6. Upload any additional languages
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

All seems ok, people who installed the beta just need to overwrite the files with the new one, no need to run the mod install, it now works on postgresql, avatars work, it deletes the cache automatically, and if you had 1.1.5 with the PM mod, then upgrade to 1.2.1, just install this mod WITHOUT running the install_mod.php and it will work with all your old messages

Download Here

2 (edited by Widell 2005-02-19 16:51)

Re: Private Messaging for 1.2.x

Very nice, I have one small problem.. when i add "require(PUN_ROOT.'include/pms/header_new_messages.php');" in header it a bit fucked up.

        $tpl_temp .= "\n\t\t\t".'</ul>'."\n\t\t\t".'<ul class="conr">'."\n\t\t\t\t".'<li><a href="search.php?action=show_new">'.$lang_common['Show new posts'].'</a></li>'."\n\t\t\t\t".'<li><a href="misc.php?action=markread">'.$lang_common['Mark all as read'].'</a></li>'."\n\t\t\t".'</ul>'."\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';
    // MOD: MARK TOPICS AS READ - 2 LINES NEW CODE FOLLOW
    else if (basename($_SERVER['PHP_SELF']) == 'viewforum.php')
        $tpl_temp .= '</ul>'."\n\t\t\t".'<p class="conr"><a href="misc.php?action=markforumread&id='.$id.'">'.$lang_common['Mark forum as read'].'</a></p>'."\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';
    else if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] == 'action=show_new')

I have a mod there, any suggestion where i shall put it?

edit: seems to work now. i put it one row up over "if (basename($_SERVER['PHP_SELF']) == 'index.php')"

Re: Private Messaging for 1.2.x

just above

$tpl_temp .= "\n\t\t\t".'</ul>'."\n\t\t\t".'<ul class="conr">'."\n\t\t\t\t".'<li><a href="search.php?action=show_new">'.$lang_common['Show new posts'].'</a></li>'."\n\t\t\t\t".'<li><a href="misc.php?action=markread">'.$lang_common['Mark all as read'].'</a></li>'."\n\t\t\t".'</ul>'."\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';

Re: Private Messaging for 1.2.x

Connorhd wrote:

just above

$tpl_temp .= "\n\t\t\t".'</ul>'."\n\t\t\t".'<ul class="conr">'."\n\t\t\t\t".'<li><a href="search.php?action=show_new">'.$lang_common['Show new posts'].'</a></li>'."\n\t\t\t\t".'<li><a href="misc.php?action=markread">'.$lang_common['Mark all as read'].'</a></li>'."\n\t\t\t".'</ul>'."\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';

didnt work.. it worked over "if (basename($_SERVER['PHP_SELF']) == 'index.php')"

Re: Private Messaging for 1.2.x

oh yeh thanks i'll fix the readme wink

6 (edited by Azakur4 2005-02-19 17:03)

Re: Private Messaging for 1.2.x

hey connorhd i have installed in my forums the beta version and i want upgrade the beta version to the final version.

are many the changes between these two versions?

El Mejor Lugar de la Red - Corporación Azakur4

Re: Private Messaging for 1.2.x

yeah thanks!! works great!

Re: Private Messaging for 1.2.x

Azakur4 wrote:

hey connorhd i have installed in my forums the beta version and i want upgrade the beta version to the final version.

are many the changes between these two versions?

just message_list.php and message_send.php, upoad the new ones and thats all you need to do really

Re: Private Messaging for 1.2.x

ok thanks men

El Mejor Lugar de la Red - Corporación Azakur4

Re: Private Messaging for 1.2.x

uploaded swedish language pack, thanks Widell

Re: Private Messaging for 1.2.x

hey connorhd in the spanish lang have a error tongue you put private menssages and is private messages tongue

El Mejor Lugar de la Red - Corporación Azakur4

Re: Private Messaging for 1.2.x

no, menssages is messages in spanish hmm (or so i think)

edit: ok so i might be wrong, but they are not my translations tongue

13 (edited by gezz 2005-02-20 00:42)

Re: Private Messaging for 1.2.x

For people who have Richards Easy BBCode and also want the same function for the PMS mod then follow these instructions:

#
#---------[ 1. OPEN ]---------------------------------------------------------
#

message_send.php

#
#---------[ 2. FIND (line: 208) ]---------------------------------------------
#

                <label><strong><?php echo $lang_common['Subject'] ?></strong><br /><input class="longinput" type='text' name='req_subject' value='<?php echo $subject ?>' size="80" maxlength="70" tabindex='<?php echo $cur_index++ ?>' /><br /></label>

#
#---------[ 3. AFTER, ADD ]---------------------------------------------------
#

                <?php require(PUN_ROOT.'mod_easy_bbcode.php'); ?>
-gezz

Re: Private Messaging for 1.2.x

That doesnt work tongue

Indocron
$theQuestion = (2*b) || !(2*b);

15 (edited by gezz 2005-02-20 01:04)

Re: Private Messaging for 1.2.x

I think I also found a visual bug of some sort I dont know if anyone else has the same problem.

http://www.greasyspoon.org/images/style_error.JPG

"Switch to Sent" gets cut off and is out of place on the next line. Im not exactly sure how to fix this so please help out. smile

-gezz

16

Re: Private Messaging for 1.2.x

Gary13579 wrote:

That doesnt work tongue

You have to have Richards Easy BBCode. Secondly, it does work, my forum is proof. tongue

-gezz

Re: Private Messaging for 1.2.x

it won't work in this version but i know why and it will work in the next version,
you need to replace line 180 in message_send.php

    $form = '<form method="post" action="message_send.php?action=send" onsubmit="return process_form(this)">';

with

    $form = '<form method="post" id="post" action="message_send.php?action=send" onsubmit="return process_form(this)">';

Re: Private Messaging for 1.2.x

gezz wrote:
Gary13579 wrote:

That doesnt work tongue

You have to have Richards Easy BBCode. Secondly, it does work, my forum is proof. tongue

no the buttons don't actually do anything unless you replace the lines i said

as for the visual bug, i'll look into it, for now make your window bigger tongue

Re: Private Messaging for 1.2.x

for the visual bug in message_list.php find

<div class="linksb">

line 361
replace with

<div class="postlinksb">

20

Re: Private Messaging for 1.2.x

bravoooooooooooooooo !
connorhd
smile

21

Re: Private Messaging for 1.2.x

you are big man !

22

Re: Private Messaging for 1.2.x

tnx

Re: Private Messaging for 1.2.x

lol ok zoksso

czech language pack added, thanks sejrac

24

Re: Private Messaging for 1.2.x

i'm added serbian language...

25

Re: Private Messaging for 1.2.x

Connorhd: Thanks a lot.

-gezz