Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Goto page: 1 - 2 [+1]

Bottom
Tut: pnphpBB Private message links..point to Messages Module
  • Posted: 23.05.2003, 12:42
     
    3DTheory
    rank:
    Helper Helper
    registered:
     April 2003
    Status:
    offline
    last visit:
    31.03.06
    Posts:
    182
    I found it annoying that PNphpBB had it's own private messaging system.
    I went thru and changed all the links so they would point to Post Nuke's private message system. I'm currently using I-Mod's Private Message.

    Here's the changes:

    Open: /modules/PNphpBB2/groupcp.php

    Look for:

    Code

    $temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $row['user_id']);
        $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
        $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';


    Replace with:

    Code

    $temp_url = ("modules.php?op=modload&name=Messages&file=replypmsg&send=1&uname=" . $row['username']);
        $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
        $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';


    Close: /modules/PNphpBB2/groupcp.php
    -------------------------------------------------------------------------------
    Open: /modules/PNphpBB2/memberlist.php

    Look for:

    Code

    $temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$user_id");
            $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
            $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';


    Replace with:

    Code

    $temp_url = ("modules.php?op=modload&name=Messages&file=replypmsg&send=1&uname=" . "$username");
            $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
            $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';


    Close: /modules/PNphpBB2/memberlist.php
    -------------------------------------------------------------------------------
    Open: /modules/PNphpBB2/viewtopic.php

    Look for:

    Code

    $temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$poster_id");
            $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
            $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';

    Replace with:

    Code

    $temp_url = ("modules.php?op=modload&name=Messages&file=replypmsg&send=1&uname=" . "$poster");
            $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
            $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';


    Close: /modules/PNphpBB2/viewtopic.php
    -------------------------------------------------------------------------------
    Open: /modules/PNphpBB2/includes/usercp_viewprofile.php

    Look for:

    Code

    $temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=" . $profiledata['user_id']);
    $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
    $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';

    Replace with:

    Code

    $temp_url = ("modules.php?op=modload&name=Messages&file=replypmsg&send=1&uname=" . $profiledata['username']);
    $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
    $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';


    Close: /modules/PNphpBB2/includes/usercp_viewprofile.php
    -------------------------------------------------------------------------------
    I'm pretty sure that takes care of all the links.
    I will edit if I find other spots.
    Hopefully this may help others.
  • Posted: 15.07.2003, 11:54
     
    Shefik
    rank:
    Freshman Freshman
    registered:
     September 2002
    Status:
    offline
    last visit:
    11.03.04
    Posts:
    10
    Thanks for this info. I was wondering if you were also able to change the links in navigation, where it tells the user how many messages they have?
  • Posted: 15.07.2003, 19:56
     
    3DTheory
    rank:
    Helper Helper
    registered:
     April 2003
    Status:
    offline
    last visit:
    31.03.06
    Posts:
    182
    No.. I actually ended up removing that from the nav.
  • Posted: 16.07.2003, 00:07
     
    carls
    rank:
    Moderator Moderator
    registered:
     July 2003
    Status:
    offline
    last visit:
    19.01.06
    Posts:
    67
    We are wroking on a feature so that if you have the PM message system turned off in the forums, you can turn on PM liking to the PN PM system. I do not know if we will have this in place for the 1.2 release but we are working on it.
  • Posted: 16.07.2003, 01:48
     
    3DTheory
    rank:
    Helper Helper
    registered:
     April 2003
    Status:
    offline
    last visit:
    31.03.06
    Posts:
    182
    Sounds good :)
  • Posted: 16.07.2003, 11:53
     
    Antsoup
    rank:
    Freshman Freshman
    registered:
     July 2003
    Status:
    offline
    last visit:
    16.07.03
    Posts:
    4
    Thanks so very much for taking the time to "spell out" this hack. It is truly appreciated!
  • Posted: 16.07.2003, 13:31
     
    dereklande
    rank:
    Helper Helper
    registered:
     July 2003
    Status:
    offline
    last visit:
    06.04.04
    Posts:
    139
    Carls.... that would be brilliant.

    Especially if you can get it to show things like how many messages you have and things. Having two PM systems is complicating people!

    Cheers again on the great work.

    DL
  • Posted: 16.07.2003, 20:19
     
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    offline
    last visit:
    28.11.08
    Posts:
    13417
    it really did confuse me at first, still i got it sorted eventually

    --
    Regards,
    Simon

    itbegins.co.uk - Zikula Consulting

    Please read the Support Guide
  • Posted: 17.07.2003, 00:35
     
    carls
    rank:
    Moderator Moderator
    registered:
     July 2003
    Status:
    offline
    last visit:
    19.01.06
    Posts:
    67
    The other option is to not use the PN PM system in lu of the forum PM system icon_smile , Opps sorry that just slipped out icon_smile
  • Posted: 17.07.2003, 03:04
     
    carls
    rank:
    Moderator Moderator
    registered:
     July 2003
    Status:
    offline
    last visit:
    19.01.06
    Posts:
    67
    This has been added to the 1.2 code, so that if you choose to use PN PM system (In the forum config) then it will use the PN PM system, it will also display the unread posts in the herder bar icon_smile
  • Posted: 17.07.2003, 05:42
     
    Shefik
    rank:
    Freshman Freshman
    registered:
     September 2002
    Status:
    offline
    last visit:
    11.03.04
    Posts:
    10
    It will also be good to have the profile redirect to the PostNuke profile, instead of the one in the forum, if the admin chooses that option.

    Any hopes of making that setting in version 1.2?

    you should also take a look at the links that are being sent in email notification for reply posts. for some reason, the link only goes to the fourm index, instead of the forum post itself.
  • Posted: 08.09.2003, 20:44
     
    pdcom
    rank:
    Freshman Freshman
    registered:
     August 2003
    Status:
    offline
    last visit:
    08.09.03
    Posts:
    3
    hello to all!

    i have a mod for phpBB and works god,since some weeks i have the PostNuke System whith PNphpBB2. i would like to use this mod also on PNphpBB2 but it doesn't work. here are the 3 files for this mod. The admin can read with this mode all PM on the phpBB.
    my question is, should i do something on the code ore what ever else,to use this mod.

    hope somebody can help me :)

    byeee

    the 3 files for the mod!

    admin_priv_msgs_body.tpl --> modules/PNphpBB2/templates/PNLite/admin

    Code

    <!-- BEGIN statusrow -->
    <table width="100%" cellspacing="2" cellpadding="2" border="1" align="center">
            <tr>
              <td align="center"><span class="gen">{L_STATUS}<br/></span>
              <span class="genmed"><b>{I_STATUS_MESSAGE}</b></span><br /></td>
            </tr>
      </table>
    <!-- end statusrow -->


    <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
            <tr>
              <td align="left"><span class="maintitle">{L_PAGE_NAME}</span><br /><br />
              <span class="genmed">{L_PAGE_DESC}</span></td>
            </tr>
    </table>
     
    <form method="post" action="{S_MODE_ACTION}" name="sort_and_pmtype">
      <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
            <tr>
                    <td align="right" nowrap="nowrap"><span class="genmed">{L_FILTER_BY}:&nbsp;{S_PMTYPE_SELECT}</span></td>
                    <td align="center" valign="middle" rowspan="2"><input type="submit" name="submit" value="{L_SORT}" class="liteoption"></td>
            </tr><tr>          <input type="hidden" name="mode" value="{S_MODE}">
            <td align="right" nowrap="nowrap"><span class="genmed">{L_SELECT_SORT_METHOD}:&nbsp;{S_MODE_SELECT}&nbsp;&nbsp;{L_ORDER}&nbsp;{S_ORDER_SELECT}
                    </span></td>
            </tr>
      </table></form>
    <form method="post" action="{S_MODE_ACTION}" name="msgrow_values">
      <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
            <tr>
              <th height="25" class="thCornerL">{L_DELETE}</th>
    <!-- BEGIN archive_avail_switch -->
              <th class="thTop">{L_ARCHIVE}</th>
    <!-- end archive_avail_switch -->
              <th class="thTop">{L_SUBJECT}</th>
              <th class="thTop">{L_FROM}</th>
              <th class="thTop">{L_TO}</th>
              <th class="thTop">{L_SENT_DATE}</th>
              <th class="thCornerR">{L_PM_TYPE}</th>
            </tr>
            <!-- BEGIN empty_switch -->
            <tr><td colspan="7" class="row1" align="center">{L_NO_PMS}</td></tr>
            <!-- end empty_switch -->
            <!-- BEGIN msgrow -->
            <tr>
              <td class="{msgrow.ROW_CLASS}" align="center"><span class="gen">&nbsp;<input type="checkbox" name="delete_id_{msgrow.PM_ID}" onClick="JavaScript:archive_id_{msgrow.PM_ID}.checked = false;">&nbsp;</span></td>
    <!-- BEGIN archive_avail_switch_msg -->
              <td class="{msgrow.ROW_CLASS}" align="center"><span class="gen">&nbsp;<input type="checkbox" name="archive_id_{msgrow.PM_ID}" onClick="JavaScript:delete_id_{msgrow.PM_ID}.checked = false;">&nbsp;</span></td>
    <!-- end archive_avails_switch_msg -->
              <td class="{msgrow.ROW_CLASS}" align="center"><span class="genmed"><a href="#" onClick="{msgrow.U_VIEWMSG}">{msgrow.SUBJECT}</a></span></td>
              <td class="{msgrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{msgrow.FROM}</span></td>
              <td class="{msgrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{msgrow.TO}</span></td>
              <td class="{msgrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{msgrow.date}</span></td>
              <td class="{msgrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{msgrow.PM_TYPE}</span></td>
            </tr>
            <!-- end msgrow -->
            <tr>
              <td class="catbottom" colspan="8" height="28" align="center">
              <input type="hidden" name="mode" value="{S_MODE}">
              <input type="submit" value="{L_SUBMIT}" class="mainoption">
              &nbsp;&nbsp;
              <input type="reset" value="{L_RESET}" class="liteoption"></td>
            </tr>
      </table>

    <table width="100%" cellspacing="0" cellpadding="0" border="0">
      <tr>
            <td><span class="nav">{PAGE_NUMBER}</span></td>
            <td align="right"><span class="gensmall"></span><br /><span class="nav">{PAGINATION}&nbsp;</span></td>
      </tr>
    </table></form>


    lang_admin_priv_msgs.php --> language/lang_german

    Code

    $lang['Deleted_Message'] = 'Private Nachricht - %s - gelöscht.'; // %s = PM title
    $lang['Archived_Message'] = 'Private Nachricht - %s - archiviert.'; // %s = PM title
    $lang['Archived_Message_No_Delete'] = 'Private Nachricht - %s - kann nicht gelöscht werden, da sie zur Archivierung markiert ist.'; // %s = PM title
    $lang['Private_Messages'] = 'Private Nachrichten';
    $lang['Private_Messages_Archive'] = 'PN Archiv';
    $lang['Archive'] = 'Archiv';
    $lang['To'] = 'an';
    $lang['Subject'] = 'Betreff';
    $lang['Sent_Date'] = 'Datum';
    $lang['Delete'] = 'Löschen';
    $lang['From'] = 'von';
    $lang['Sort'] = 'Sortieren';
    $lang['Filter_By'] = 'Anzeigen';
    $lang['PM_Type'] = 'PN Typ';
    $lang['Status'] = 'Status';
    $lang['No_PMS'] = 'Keine Privaten Nachrichten stimmen mit den Sortierungskriterien überein.';
    $lang['Archive_Desc'] = 'Private Nachrichten, die archiviert wurden, findest du hier. User (Absender sowie Adressat) haben keinerlei Zugriff mehr auf diese Nachrichten, du jedoch kannst sie jederzeit anschauen bzw. löschen.';
    $lang['Normal_Desc'] = 'Alle Privaten Nachrichten, die auf dem Board verschickten wurden, werden hier aufgelistet. Du kannst sie entweder lesen, löschen oder ins Archiv verschieben (die User haben dann keinen Zugriff mehr auf die jeweilige Nachricht).';

    /* PM Types */
    $lang['PM_-1'] = 'alle Arten'; //PRIVMSGS_ALL_MAIL = -1
    $lang['PM_0'] = 'gelesene PNs'; //PRIVMSGS_READ_MAIL = 0
    $lang['PM_1'] = 'neue PNs'; //PRIVMSGS_NEW_MAIL = 1
    $lang['PM_2'] = 'gesendete PNs'; //PRIVMSGS_SENT_MAIL = 2
    $lang['PM_3'] = 'gespeicherte PNs (Eingang)'; //PRIVMSGS_SAVED_IN_MAIL = 3
    $lang['PM_4'] = 'gespeicherte PNs (Ausgang)'; //PRIVMSGS_SAVED_OUT_MAIL = 4
    $lang['PM_5'] = 'ungelesene PNs'; //PRIVMSGS_UNREAD_MAIL = 5

    /* Fehlermeldungen */
    $lang['Error_Posts_Text_Table'] = 'Fehler beim Zugriff auf \'privmsgs\' table.';
    $lang['Error_Posts_Table'] = 'Fehler beim Zugriff auf \'privmsgs_text\' table.';
    $lang['Error_Posts_Archive_Table'] = 'Fehler beim Zugriff auf PN-Archiv.';
    $lang['No_Message_ID'] = 'Es wurde keine PN-ID angegeben.';


    /* das folgende nicht uebersetzen! */
    $lang['ASC'] = $lang['Sort_Ascending'];
    $lang['DESC'] = $lang['Sort_Descending'];
    $lang['privmsgs_date'] = $lang['Sent_Date'];
    $lang['privmsgs_subject'] = $lang['Subject'];
    $lang['privmsgs_from_userid'] = $lang['From'];
    $lang['privmsgs_to_userid'] = $lang['To'];
    $lang['privmsgs_type'] = $lang['PM_Type'];

    ?>


    admin_priv_msgs_view_body.tpl --> templates/PNLite/admin

    Code

    <table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
            <tr>
              <th colspan="3" class="thHead">{L_PRIVATE_MESSAGES}</th>
            </tr>
            <tr>
              <td class="row2"><span class="genmed">{L_FROM}:</span></td>
              <td width="100%" class="row2" colspan="2"><span class="genmed">{FROM}</span></td>
            </tr>
            <tr>
              <td class="row2"><span class="genmed">{L_TO}:</span></td>
              <td width="100%" class="row2" colspan="2"><span class="genmed">{TO}</span></td>
            </tr>
            <tr>
              <td class="row2"><span class="genmed">{L_SENT_DATE}:</span></td>
              <td width="100%" class="row2" colspan="2"><span class="genmed">{date}</span></td>
            </tr>
            <tr>
              <td class="row2"><span class="genmed">{L_SUBJECT}:</span></td>
              <td width="100%" class="row2"><span class="genmed">{SUBJECT}</span></td>
              <td nowrap="nowrap" class="row2" align="right"> &nbsp; </td>
            </tr>
            <tr>
              <td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span></td>
            </tr>
    </table>
  • Posted: 20.09.2003, 04:03
     
    stepper
    rank:
    Helper Helper
    registered:
     May 2003
    Status:
    offline
    last visit:
    04.08.04
    Posts:
    223

    carls

    This has been added to the 1.2 code, so that if you choose to use PN PM system (In the forum config) then it will use the PN PM system, it will also display the unread posts in the herder bar icon_smile


    where do I set this? I looked in the forum admin > general config but there I could only find the old option to turn off messages completely...

    plz advise

    step
  • Posted: 20.09.2003, 04:09
     
    stepper
    rank:
    Helper Helper
    registered:
     May 2003
    Status:
    offline
    last visit:
    04.08.04
    Posts:
    223

    carls

    This has been added to the 1.2 code, so that if you choose to use PN PM system (In the forum config) then it will use the PN PM system, it will also display the unread posts in the herder bar icon_smile


    where do I set this? I looked in the forum admin > general config but there I could only find the old option to turn off messages completely...

    plz advise

    step
  • Posted: 30.09.2003, 21:11
     
    HST
    rank:
    Freshman Freshman
    registered:
     October 2002
    Status:
    offline
    last visit:
    21.02.07
    Posts:
    30
    I wrote a documentation to cover the steps for making PNphpBB2 messaging the primary messaging system for a PostNuke site.

    These instructions apply to PNphpBB2 1.2 and up.

    Read It Here

    --
    everybody's interactive!