Re: Private Message mod v1.2.2
Hello,
I have and error with this mod, installation success, but then i login i cannot logout, any ideas ?
did you check post #193 above? ^^
(previous page)
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Private Message mod v1.2.2
Hello,
I have and error with this mod, installation success, but then i login i cannot logout, any ideas ?
did you check post #193 above? ^^
(previous page)
Yes, i have looked at that post.
functions.php
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>';
$links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'&csrf_token='.pun_hash($pun_user['id'].pun_hash(get_remote_address())).'">'.$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>';
$links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'&csrf_token='.pun_hash($pun_user['id'].pun_hash(get_remote_address())).'">'.$lang_common['Logout'].'</a>';
}
}
At this point i can't find:
login.php?action=out&id='.$pun_user['id'].'
Only found:
login.php?action=out&id='.$pun_user['id'].'
try to change
$links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'&csrf_token='.pun_hash($pun_user['id'].pun_hash(get_remote_address())).'">'.$lang_common['Logout'].'</a>';
with
$links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'&csrf_token='.sha1($pun_user['id'].sha1(get_remote_address())).'">'.$lang_common['Logout'].'</a>';
Hello,
Undiging
The Mod is running well on my forum
I have setup v1.2.2
I can't see the multi-delete button pictures and the delete function.
I just migrate my forum to PHP 5.3 and it might be the cause ?
Here is my message_list.php code regarding the delete function ;
if (isset($_POST['delete_messages']) || isset($_POST['delete_messages_comply']))
{
if (isset($_POST['delete_messages_comply']))
{
// Check this is legit
if ($pun_user['g_id'] < PUN_GUEST)
confirm_referrer('message_list.php');
if (@preg_match('/[^0-9,]/', $_POST['messages']))
message($lang_common['Bad request']);
// Delete messages
$db->query('DELETE FROM '.$db->prefix.'messages WHERE id IN('.$_POST['messages'].') AND owner='.$pun_user['id']) or error('Unable to delete messages.', __FILE__, __LINE__, $db->error());
redirect('message_list.php?box='.intval($_POST['box']), $lang_pms['Deleted redirect']);
}
else
{
$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_pms['Multidelete'];
$idlist = is_array($_POST['delete_messages']) ? array_map("intval", $_POST['delete_messages']) : array();
// Delete multiple messages
if (isset($_POST['delete_messages']) || isset($_POST['delete_messages_comply']))
{
if (isset($_POST['delete_messages_comply']))
{
// Check this is legit
if ($pun_user['g_id'] < PUN_GUEST)
confirm_referrer('message_list.php');
if (@preg_match('/[^0-9,]/', $_POST['messages']))
message($lang_common['Bad request']);
// Delete messages
$db->query('DELETE FROM '.$db->prefix.'messages WHERE id IN('.$_POST['messages'].') AND owner='.$pun_user['id']) or error('Unable to delete messages.', __FILE__, __LINE__, $db->error());
redirect('message_list.php?box='.intval($_POST['box']), $lang_pms['Deleted redirect']);
}
else
{
$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_pms['Multidelete'];
$idlist = is_array($_POST['delete_messages']) ? array_map("intval", $_POST['delete_messages']) : array();
require PUN_ROOT.'header.php';
?>
<div class="blockform">
<h2><span><?php echo $lang_pms['Multidelete'] ?></span></h2>
<div class="box">
<form method="post" action="message_list.php">
<div class="inform">
<input type="hidden" name="messages" value="<?php echo implode(',', array_values($idlist)) ?>" />
<input type="hidden" name="box" value="<?php echo intval($_POST['box']) ?>" />
<fieldset>
<div class="infldset">
<p class="warntext"><strong><?php echo $lang_pms['Delete messages comply'] ?></strong></p>
</div>
</fieldset>
</div>
<p><input type="submit" name="delete_messages_comply" value="<?php echo $lang_pms['Delete'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
</form>
</div>
</div>
Regards,
Nicolas
Test forum : http://www.forum-des-portables-asus.fr/
user : test4
pass: candle
If you want full compatiblity with newer PHP version, you should update to PunBB 1.4.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Private Message mod v1.2.2
Powered by PunBB, supported by Informer Technologies, Inc.