PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#26 2007-08-14 15:17:06

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Private Messaging System 1.2.x 1.2.3

Eh?

Installing the latest version is always best. Bugfixes won't magically happen to existing code.


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#27 2007-08-15 09:00:48

hsl
Member
Registered: 2006-07-16
Posts: 36

Re: Private Messaging System 1.2.x 1.2.3

I made a really cool notofication modification :-)

username: punbbtest
password: puntest

forum: http://www.macminds.net

Just send yourself a private message by filling in your own name here:
http://www.macminds.net/message_send.php

and than go to the forum index:
http://www.macminds.net/index.php?p=forum

:-)

Offline

 

#28 2007-08-15 12:12:24

FSX
Member
Registered: 2006-09-14
Posts: 593
Website

Re: Private Messaging System 1.2.x 1.2.3

That...is a very cool notification! Are you going to release it? I'm Interested big_smile. And how did you do that "Je hebt 1 nieuw bericht" message?

Offline

 

#29 2007-08-15 12:14:53

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Private Messaging System 1.2.x 1.2.3

Here my New PM Modification....

-- removed---

By the way... cool pop up notification can you post your code here?

Last edited by doki (2008-01-08 05:05:31)

Offline

 

#30 2007-08-15 12:24:38

StevenBullen
Moderator
Registered: 2005-09-13
Posts: 300
Website

Re: Private Messaging System 1.2.x 1.2.3

Erm does it work on all browsers?

I didnt see nout. sad

Off-Topic

Did you notice that you have image flicker on your site in ie6?


Blog - Follow Me and FluxBB on Twitter

Offline

 

#31 2007-08-16 00:24:57

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Private Messaging System 1.2.x 1.2.3

doki wrote:

Did you notice that you have image flicker on your site in ie6?

What did you mean by image flicker on IE6? I tested it once on IE6 and seems to behave normally. I'll check it  again later...

thanks

Offline

 

#32 2007-08-16 14:52:50

hsl
Member
Registered: 2006-07-16
Posts: 36

Re: Private Messaging System 1.2.x 1.2.3

StevenBullen wrote:

Erm does it work on all browsers?

I didnt see nout. sad

Ah I think it doesn't work in ie versions prior to 6.0

Offline

 

#33 2007-08-16 16:18:39

mman
Member
Registered: 2007-08-10
Posts: 16

Re: Private Messaging System 1.2.x 1.2.3

could someone post some update on the latest 1.2.3 version please? doki, hsl ??

Offline

 

#34 2007-08-17 20:36:33

spider
New member
From: UK
Registered: 2007-08-17
Posts: 4

Re: Private Messaging System 1.2.x 1.2.3

Hello smile

I have been reading here and on PunBB for a few weeks now.

Anyway, i decided to register.

I cannot get this mod to work on my local dev board (for a new site i am building)

I reinstalled the mod several times but i am 99% sure i do not have any mistakes in the code.

I get...

Parse error: syntax error, unexpected $end in D:\_LOCAL_SERVER\www\pughelp\plugins\AP_Private_messaging.php on line 151

When clicking on the plugin link in the admin panel. sad

Line 151 is the last line in that file, its simply this..

Code:

?>

smile

Offline

 

#35 2007-08-17 21:53:57

vochomaster
Member
Registered: 2007-07-09
Posts: 64
Website

Re: Private Messaging System 1.2.x 1.2.3

Spider, please post your AP_Privae_messaging.php file, there's something bad in your code, like a missing clossing bracket (}) or quote (', or ").


Sorry 4 my bad english, hope you can understand me wink

Offline

 

#36 2007-08-18 01:17:19

spider
New member
From: UK
Registered: 2007-08-17
Posts: 4

Re: Private Messaging System 1.2.x 1.2.3

vochomaster wrote:

Spider, please post your AP_Privae_messaging.php file, there's something bad in your code, like a missing clossing bracket (}) or quote (', or ").

Here it is smile

I did download a fresh copy and try again but no luck...

Code:

<?php
/***********************************************************************

  Copyright (C) 2005  Connor Dunn (Connorhd@mypunbb.com)

  This software is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  This software is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/
// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;

// Tell admin_loader.php that this is indeed a plugin and that it is loaded
define('PUN_PLUGIN_LOADED', 1);
define('PLUGIN_VERSION', '1.2.2');

if (isset($_POST['form_sent']))
{
    // Lazy referer check (in case base_url isn't correct)
    if (!preg_match('#/admin_loader\.php#i', $_SERVER['HTTP_REFERER']))
        message($lang_common['Bad referrer']);

    $form = array_map('trim', $_POST['form']);
    $allow = array_map('trim', $_POST['allow']);
    $limit = array_map('trim', $_POST['limit']);

    while (list($key, $input) = @each($form))
    {
        // Only update values that have changed
        if ((isset($pun_config['o_'.$key])) || ($pun_config['o_'.$key] == NULL)) {
            if ($pun_config['o_'.$key] != $input)
            {
                if ($input != '' || is_int($input))
                    $value = '\''.$db->escape($input).'\'';
                else
                    $value = 'NULL';
    
                $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$value.' WHERE conf_name=\'o_'.$key.'\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
            }
        }
    }

    while (list($id, $set) = @each($allow))
    {
        $db->query('UPDATE '.$db->prefix.'groups SET g_pm='.$set.' WHERE g_id=\''.$id.'\'') or error('Unable to change permissions.', __FILE__, __LINE__, $db->error());
    }
    while (list($id, $set) = @each($limit))
    {
    
        $db->query('UPDATE '.$db->prefix.'groups SET g_pm_limit='.intval($set).' WHERE g_id=\''.$id.'\'') or error('Unable to change permissions.', __FILE__, __LINE__, $db->error());
    }
    // Regenerate the config cache
    require_once PUN_ROOT.'include/cache.php';
    generate_config_cache();

    redirect('admin_loader.php?plugin=AP_Private_messaging.php', 'Options updated. Redirecting &hellip;');
}
else
{
    // Display the admin navigation menu
    generate_admin_menu($plugin);
?>
    <div class="block">
        <h2><span>Private Messaging - v<?php echo PLUGIN_VERSION ?></span></h2>
        <div class="box">
            <div class="inbox">
                <p>This plugin is used to control the settings and permissions for the private messaging mod.</p>
            </div>
        </div>
    </div>
    <div class="blockform">
        <h2 class="block2"><span>Options</span></h2>
        <div class="box">
            <form method="post" action="admin_loader.php?plugin=AP_Private_messaging.php">
                <div class="inform">
                    <input type="hidden" name="form_sent" value="1" />
                    <fieldset>
                        <legend>Settings</legend>
                        <div class="infldset">
                        <table class="aligntop" cellspacing="0">
                            <tr>
                                <th scope="row">Enable private messaging</th>
                                <td>
                                    <input type="radio" name="form[pms_enabled]" value="1"<?php if ($pun_config['o_pms_enabled'] == '1') echo ' checked="checked"' ?> />&nbsp;<strong>Yes</strong>&nbsp;&nbsp;&nbsp;<input type="radio" name="form[pms_enabled]" value="0"<?php if ($pun_config['o_pms_enabled'] == '0') echo ' checked="checked"' ?> />&nbsp;<strong>No</strong>
                                    <span>If no all private messaging functions will be disabled.</span>
                                </td>
                            </tr>
                            <tr>
                                <th scope="row">Messages per page</th>
                                <td>
                                    <input type="text" name="form[pms_mess_per_page]" size="50" maxlength="255" value="<?php echo $pun_config['o_pms_mess_per_page'] ?>" />
                                    <span>This is the numebr of messages that will be displayed per page in private messaging views.</span>
                                </td>
                            </tr>
                        </table>
                        </div>
                    </fieldset>
                </div>
                <div class="inform">
                    <fieldset>
                        <legend>Permissions</legend>
                        <div class="infldset">
                        <table class="aligntop" cellspacing="0">
                            <?php
                            $result = $db->query('SELECT g_id, g_title, g_pm, g_pm_limit FROM '.$db->prefix.'groups WHERE g_id>'.PUN_ADMIN.' AND g_id != 3 ORDER BY g_id') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());
                            while ($cur_group = $db->fetch_assoc($result))
                            {
                            ?>
                            <tr> 
                                <th scope="row"><?php echo $cur_group['g_title'] ?></th>
                                <td>
                                    <input type="radio" name="allow[<?php echo $cur_group['g_id'] ?>]" value="1"<?php if ($cur_group['g_pm'] == '1') echo ' checked="checked"' ?> />&nbsp;<strong>Yes</strong>&nbsp;&nbsp;&nbsp;<input type="radio" name="allow[<?php echo $cur_group['g_id'] ?>]" value="0"<?php if ($cur_group['g_pm'] == '0') echo ' checked="checked"' ?> />&nbsp;<strong>No</strong>
                                    <span>Allow this group to use private messaging.</span>
                                </td>
                            </tr>
                            <tr>
                                <th scope="row">&nbsp;</th>
                                <td>
                                    Messages limit: <input type="text" name="limit[<?php echo $cur_group['g_id'] ?>]" size="20" maxlength="10" value="<?php echo $cur_group['g_pm_limit'] ?>" />
                                    <span>This is the number of messages each user is allowed in their inbox.</span>
                                </td>
                            </tr>
                            <?
                            }
                            ?>
                            
                        </table>
                        </div>
                    </fieldset>
                </div>
            <p class="submitend"><input type="submit" name="save" value="Save changes" /></p>
            </form>
        </div>
    </div>

<?php
}
?>

Offline

 

#37 2007-08-18 14:03:06

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Private Messaging System 1.2.x 1.2.3

Got it.

This bit:

Code:

while (list($key, $input) = @each($form))
    {
        // Only update values that have changed
        if ((isset($pun_config['o_'.$key])) || ($pun_config['o_'.$key] == NULL)) {
            if ($pun_config['o_'.$key] != $input)
            {
                if ($input != '' || is_int($input))
                    $value = '\''.$db->escape($input).'\'';
                else
                    $value = 'NULL';
    
                $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$value.' WHERE conf_name=\'o_'.$key.'\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
            }
        }
    }

Should be

Code:

while (list($key, $input) = @each($form))
    {
        // Only update values that have changed
        if ((isset($pun_config['o_'.$key])) || ($pun_config['o_'.$key] == NULL)) {
        {
            if ($pun_config['o_'.$key] != $input)
            {
                if ($input != '' || is_int($input))
                    $value = '\''.$db->escape($input).'\'';
                else
                    $value = 'NULL';
    
                $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$value.' WHERE conf_name=\'o_'.$key.'\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
            }
        }
    }

FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#38 2007-08-18 14:45:25

spider
New member
From: UK
Registered: 2007-08-17
Posts: 4

Re: Private Messaging System 1.2.x 1.2.3

Thanks smile ... Although it must be me , i cannot see a difference in your second code.

(and thanks to the staff member who re-instated me after it banned me for some reason lol)

Anyway, it still errors (sorry). sad

Code:

Parse error: syntax error, unexpected T_ELSE in D:\_LOCAL_SERVER\www\pughelp\plugins\AP_Private_messaging.php on line 72

I post lines 70 - 76

Code:

    redirect('admin_loader.php?plugin=AP_Private_messaging.php', 'Options updated. Redirecting &hellip;');
}
else
{
    // Display the admin navigation menu
    generate_admin_menu($plugin);
?>

Line 72 is the "else"

smile

Last edited by spider (2007-08-18 14:46:38)

Offline

 

#39 2007-08-18 15:58:13

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Private Messaging System 1.2.x 1.2.3

Hrmm, I was wrong. It was just badly readable code >=/

The only thing I can think of is that you don't have short tags enabled. Then this should fix it:

Code:

<?php
/***********************************************************************

  Copyright (C) 2005  Connor Dunn (Connorhd@mypunbb.com)

  This software is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  This software is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/
// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;

// Tell admin_loader.php that this is indeed a plugin and that it is loaded
define('PUN_PLUGIN_LOADED', 1);
define('PLUGIN_VERSION', '1.2.2');

if (isset($_POST['form_sent']))
{
    // Lazy referer check (in case base_url isn't correct)
    if (!preg_match('#/admin_loader\.php#i', $_SERVER['HTTP_REFERER']))
        message($lang_common['Bad referrer']);

    $form = array_map('trim', $_POST['form']);
    $allow = array_map('trim', $_POST['allow']);
    $limit = array_map('trim', $_POST['limit']);

    while (list($key, $input) = @each($form))
    {
        // Only update values that have changed
        if ((isset($pun_config['o_'.$key])) || ($pun_config['o_'.$key] == NULL)) 
        {
            if ($pun_config['o_'.$key] != $input)
            {
                if ($input != '' || is_int($input))
                    $value = '\''.$db->escape($input).'\'';
                else
                    $value = 'NULL';
    
                $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$value.' WHERE conf_name=\'o_'.$key.'\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
            }
        }
    }

    while (list($id, $set) = @each($allow))
    {
        $db->query('UPDATE '.$db->prefix.'groups SET g_pm='.$set.' WHERE g_id=\''.$id.'\'') or error('Unable to change permissions.', __FILE__, __LINE__, $db->error());
    }
    while (list($id, $set) = @each($limit))
    {
    
        $db->query('UPDATE '.$db->prefix.'groups SET g_pm_limit='.intval($set).' WHERE g_id=\''.$id.'\'') or error('Unable to change permissions.', __FILE__, __LINE__, $db->error());
    }
    // Regenerate the config cache
    require_once PUN_ROOT.'include/cache.php';
    generate_config_cache();

    redirect('admin_loader.php?plugin=AP_Private_messaging.php', 'Options updated. Redirecting &hellip;');
}
else
{
    // Display the admin navigation menu
    generate_admin_menu($plugin);
?>
    <div class="block">
        <h2><span>Private Messaging - v<?php echo PLUGIN_VERSION ?></span></h2>
        <div class="box">
            <div class="inbox">
                <p>This plugin is used to control the settings and permissions for the private messaging mod.</p>
            </div>
        </div>
    </div>
    <div class="blockform">
        <h2 class="block2"><span>Options</span></h2>
        <div class="box">
            <form method="post" action="admin_loader.php?plugin=AP_Private_messaging.php">
                <div class="inform">
                    <input type="hidden" name="form_sent" value="1" />
                    <fieldset>
                        <legend>Settings</legend>
                        <div class="infldset">
                        <table class="aligntop" cellspacing="0">
                            <tr>
                                <th scope="row">Enable private messaging</th>
                                <td>
                                    <input type="radio" name="form[pms_enabled]" value="1"<?php if ($pun_config['o_pms_enabled'] == '1') echo ' checked="checked"' ?> />&nbsp;<strong>Yes</strong>&nbsp;&nbsp;&nbsp;<input type="radio" name="form[pms_enabled]" value="0"<?php if ($pun_config['o_pms_enabled'] == '0') echo ' checked="checked"' ?> />&nbsp;<strong>No</strong>
                                    <span>If no all private messaging functions will be disabled.</span>
                                </td>
                            </tr>
                            <tr>
                                <th scope="row">Messages per page</th>
                                <td>
                                    <input type="text" name="form[pms_mess_per_page]" size="50" maxlength="255" value="<?php echo $pun_config['o_pms_mess_per_page'] ?>" />
                                    <span>This is the numebr of messages that will be displayed per page in private messaging views.</span>
                                </td>
                            </tr>
                        </table>
                        </div>
                    </fieldset>
                </div>
                <div class="inform">
                    <fieldset>
                        <legend>Permissions</legend>
                        <div class="infldset">
                        <table class="aligntop" cellspacing="0">
                            <?php
                            $result = $db->query('SELECT g_id, g_title, g_pm, g_pm_limit FROM '.$db->prefix.'groups WHERE g_id>'.PUN_ADMIN.' AND g_id != 3 ORDER BY g_id') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());
                            while ($cur_group = $db->fetch_assoc($result))
                            {
                            ?>
                            <tr> 
                                <th scope="row"><?php echo $cur_group['g_title'] ?></th>
                                <td>
                                    <input type="radio" name="allow[<?php echo $cur_group['g_id'] ?>]" value="1"<?php if ($cur_group['g_pm'] == '1') echo ' checked="checked"' ?> />&nbsp;<strong>Yes</strong>&nbsp;&nbsp;&nbsp;<input type="radio" name="allow[<?php echo $cur_group['g_id'] ?>]" value="0"<?php if ($cur_group['g_pm'] == '0') echo ' checked="checked"' ?> />&nbsp;<strong>No</strong>
                                    <span>Allow this group to use private messaging.</span>
                                </td>
                            </tr>
                            <tr>
                                <th scope="row">&nbsp;</th>
                                <td>
                                    Messages limit: <input type="text" name="limit[<?php echo $cur_group['g_id'] ?>]" size="20" maxlength="10" value="<?php echo $cur_group['g_pm_limit'] ?>" />
                                    <span>This is the number of messages each user is allowed in their inbox.</span>
                                </td>
                            </tr>
                            <?php
                            }
                            ?>
                            
                        </table>
                        </div>
                    </fieldset>
                </div>
            <p class="submitend"><input type="submit" name="save" value="Save changes" /></p>
            </form>
        </div>
    </div>

<?php
}
?>

FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#40 2007-08-18 16:50:24

spider
New member
From: UK
Registered: 2007-08-17
Posts: 4

Re: Private Messaging System 1.2.x 1.2.3

elbekko wrote:

Hrmm, I was wrong. It was just badly readable code >=/

The only thing I can think of is that you don't have short tags enabled. Then this should fix it:

That works great smile

Thank you very much for your time to do that smile

Offline

 

#41 2007-09-04 00:35:05

kublai
New member
Registered: 2007-09-03
Posts: 1

Re: Private Messaging System 1.2.x 1.2.3

Very nice mod. It would be perfect if a user could create folders. I'd really like to have the possibility to archive old messages in a different folder!

Offline

 

#42 2007-09-06 11:45:24

gmarco
New member
Registered: 2007-09-06
Posts: 1

Re: Private Messaging System 1.2.x 1.2.3

Hi all,
I have a little problem with this mod.

I am using the latest punbb (1.2.15) with sqlite as backend.

The database file is managed by punbb in sqlite 2.x format, but your installation script (install_mod) tries to use some sql syntax like ALTER TABLE that does not exist in sqlite 2.x . So it fails.

I have tried to manually do the database modifications dumping the old table (groups), create a new one modified with the new column and reimporting the old data and setting the two new column to the default values (1,20) as well.

So the first question is :
You are assuming that the punbb uses sqlite 3.x but mine installation (FreeBSD, lighttpd, php fast-cgi) defaults to a sqlite 2.x file format. It is my fault ? I am _not_ succeeding in finding any setting to tell the forum to use the new 3.x file format. Any help or lights it is welcome.

Last edited by gmarco (2007-09-06 20:17:17)

Offline

 

#43 2007-09-06 12:23:33

kostis12345
Member
Registered: 2007-03-15
Posts: 179

Re: Private Messaging System 1.2.x 1.2.3

hsl can you please post the code ?

Offline

 

#44 2007-09-08 16:03:37

mman
Member
Registered: 2007-08-10
Posts: 16

Re: Private Messaging System 1.2.x 1.2.3

Hey guys, heres my quick fix of RE: RE: RE: ... issue, when you replying, chating with other users via pm...

open message_send.php and find:

Code:

// Add subject
$subject = "RE: " . $message['subject'];

replace with:

Code:

if (stripos($message['subject'], 're:') !== false)
   $subject = $message['subject'];
else
   $subject = "RE: " . $message['subject'];

simple but works cool


hey still looking for solution on next post - please any help will be nice

mman wrote:

Hi I want to see and use preview button in pms before posting, like in normal reply to topic posts? Somebody knows how to add that functionality ??? This realy boders me, especialy when inserting bcc. Please help

Offline

 

#45 2007-09-10 00:59:40

Bill Harris
New member
Registered: 2007-08-31
Posts: 4

Re: Private Messaging System 1.2.x 1.2.3

mman wrote:

Hey guys, heres my quick fix of RE: RE: RE: ... issue, when you replying, chating with other users via pm...

open message_send.php and find:

Code:

// Add subject
$subject = "RE: " . $message['subject'];

replace with:

Code:

if (stripos($message['subject'], 're:') !== false)
   $subject = $message['subject'];
else
   $subject = "RE: " . $message['subject'];

simple but works cool

<clip>

I tried that the above fix and I got this when hitting reply in Private Message:

Fatal error: Call to undefined function: stripos() in /home/ebasebiz/public_html/message_send.php on line 205

Offline

 

#46 2007-09-10 10:00:37

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Private Messaging System 1.2.x 1.2.3

You need PHP5 for that. Using the following code will work too:

Code:

if (strpos(strtolower($message['subject']), 're:') !== false)
   $subject = $message['subject'];
else
   $subject = "RE: " . $message['subject'];

FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#47 2007-09-17 16:36:18

dilauro
Member
From: New Milford, CT
Registered: 2007-09-06
Posts: 159
Website

Re: Private Messaging System 1.2.x 1.2.3

I am not sure if this is normal for mod conflicts/clashes.  I have FlashChat installed and when I installed Private Messaging 1.2.3, I ran into a little problem with \include\functions.php

Code:

        if ($pun_user['g_id'] > PUN_MOD)
        {
            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&amp;id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
        else
        {
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            require(PUN_ROOT.'include/pms/functions_navlinks.php');
            $links[] = '<li id="navlogout"><a href="login.php?action=out&amp;id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }

With Flashchat Installed  this update deleted:

Code:

                $links[] = '<li id="navchat"><a href="./chat/flashchat.php" target="_blank">Chat</a>';
                $links[] = '<li id="navwhoinchat"><a href="./chat/info.php" target="WhoChatWindow" onClick="window.open(\'\',\'WhoChatWindow\',\'height=300,width=400,toolbar=no,location=no ,directories=no,status=no,menubar=no,scrollbars=no ,resizable=yes\');">Who\'s in chat</a>';

and

Code:

    
               $links[] = '<li id="navchat"><a href="./chat/flashchat.php" target="_blank">Chat</a>';
               $links[] = '<li id="navwhoinchat"><a href="./chat/info.php" target="WhoChatWindow" onClick="window.open(\'\',\'WhoChatWindow\',\'height=300,width=400,toolbar=no,location=no ,directories=no,status=no,menubar=no,scrollbars=no ,resizable=yes\');">Who\'s in chat</a>';
               $links[] = '<li id="navchat"><a href="./chat/admin/index.php" target="_blank">ChatAdmin</a>';

As soon as I added both of those back, PM continued to work as well as Flashchat


Ron

30+ years with Big Blue  Main Frames and Personal Computers - And Still learning every day!

Offline

 

#48 2007-09-17 17:55:37

dilauro
Member
From: New Milford, CT
Registered: 2007-09-06
Posts: 159
Website

Re: Private Messaging System 1.2.x 1.2.3

Anyone have a working setup for Firefox for PM sounds?

The PM mod uses bgsound, which Firefox no longer supports.  You can use <embed, but that doesnt come close to being as swift as bgsound


Ron

30+ years with Big Blue  Main Frames and Personal Computers - And Still learning every day!

Offline

 

#49 2007-09-17 18:08:41

FSX
Member
Registered: 2006-09-14
Posts: 593
Website

Re: Private Messaging System 1.2.x 1.2.3

you can use a flash file that plays a sound. That work in Firefox. But my forum users didn't like the pm sounds so I removed it.

Offline

 

#50 2007-10-24 19:57:48

datagutten
New member
Registered: 2005-12-18
Posts: 7

Re: Private Messaging System 1.2.x 1.2.3

I made so that it shows how many new messages you have, and display a different text if you have one or more new messages.

Here is the modifications for the language file, pms.php:

Code:

    'New messages start single'    =>        'There is ',
    'New messages start multiple'=>        'There are ',
    'New messages end single'    =>        ' new message.',
    'New messages end multiple'    =>        ' new messages',

header_new_messages.php:

Code:

        if ($unread=$db->result($result_messages, 0)){
            if ($unread==1)
            $word='single';
            elseif ($unread>=2)
            $word='multiple';
            $tpl_temp .= "\n\t\t\t\t".'<li class="pmlink"><strong><a href="message_list.php">'.$lang_pms['New messages start '.$word].$unread.$lang_pms['New messages end '.$word].'</a></strong></li>';
        }

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.