351

(2 replies, posted in Feature requests)

Shouldn't be hard to change it yourself. wink

There's also the "Languages and styles" plugin on the PunBB downloads page.

I think you could add something like this to your theme's color scheme:

div.isticky a { color: something }

354

(14 replies, posted in General discussion)

Does the 8-ball know all? Magic 8-Ball Answers Your Questions Regarding Microsoft?s ?Zune?

I assume he's talking about the one on the PunBB download page. (Direct link)

356

(18 replies, posted in PunBB 1.2 troubleshooting)

You can put XML data in a file and give it any extension you want. However, I don't know if that causes any problems with Google. (I use .xml.gz myself.)

Check for typos in your post.php file?

Some searching suggests that it may be a syntax error with the From or To address(es).

http://punbb.org/forums/viewtopic.php?id=12528

360

(2 replies, posted in Feature requests)

Like Connor said here, this has been discussed many times:
Open links in new tab/window

I've read that it's not valid XHTML 1.0 Strict:
XHTML Strict 1.0 and "target"

If you still want to force this on your users, use this mod:
Open external link in new window

361

(15 replies, posted in General discussion)

Maybe this should be moved to the general discussion area?

I believe it is by design. However, I think closing the [threads] would prevent editing. Alternatively, you could modify edit.php to have the desired behavior.

Sorry, I didn't really think that through. smile

Another thought? the "Go back" link made by message() is just javascript; If you delete messages and follow that link, those messages are still sitting there, selected.

Labeled:

id   owner  subject        message                              sender      sender_id   posted       sender_ip   smileys   status   showed
==   ====   =======        =======                              ======      =========   ======       =========   =======   ======   ======
10   3      Test subject   I'm saving a copy of this message.   admin_user  2           1153866671   127.0.0.1   1         0        0
11   2      Test subject   I'm saving a copy of this message.   test_user   3           1153866671   127.0.0.1   1         1        1

Status is 1 for saved messages.

Admin sends message to another user and saves a copy:

10  3   Test subject     I'm saving a copy of this message.  admin_user  2   1153866671  127.0.0.1   1   0   0
11  2   Test subject     I'm saving a copy of this message.  test_user   3   1153866671  127.0.0.1   1   1   1

Edit: The first message is in test_user's "Inbox" and the second message is in the admin's "Sent" box.

Smartys/Mark, is the plugin including messages from the "Sent" box as well?

Wouldn't something like this work?

$wee['inlagg'] = preparse_bbcode($wee['inlagg'], $errors);
$wee['inlagg'] = parse_message($wee['inlagg'], false);
echo $wee['inlagg'];

369

(11 replies, posted in General discussion)

Limber wrote:

I agree with pogenwurst but at the same time it takes about 2-3 minutes to write up a quick "what's going on"-post.

What would that look like?

**hypothetical** wrote:

22 July: Fixed some CSS
23 July: Replaced keyboard (don't ask)
24 July: Worked on extension system

Dalizzer wrote:

In fact a plugin for  viewing member's pms that have been sent on the board.

Viewing? Smartys posted a plugin (here) to do just that!

Dalizzer wrote:

You could envisage a possibility of exporting the logs of PM?

What log? PMs are just stored in the database.

Are you saying that you view PMs even after they've been deleted? I think it would be hard to read something that doesn't exist anymore.

(The problem here is either defining the problem or using the right language to describe the problem?)

371

(3 replies, posted in PunBB 1.2 troubleshooting)

Smartys wrote:

http://www.punres.org/files.php?pid=92 | You can use [style] here for size I guess

I made changes such as this to add [smaller] and [larger]?

 '#\[smaller\](.*?)\[/smaller\]#s',
 '#\[larger\](.*?)\[/larger\]#s',
'<span style="font-size: smaller">$1</span>',
'<span style="font-size: larger">$1</span>',

You should be able to use something like this in a similar manner.

'#\[size=([0-9]*)\](.*?)\[/size\]#s',
'<span style="font-size: $1em">$2</span>',

372

(6 replies, posted in Feature requests)

Decoy wrote:

I mean technical discussions... In this case only topic started is the best to know, when his problem (topic) was solved. So he should close thread.

Are you saying the topic starter should be able to close the thread after his problem is solved? If said person has to ask, then how would (s)he know what the best answer is, or when all possible answers/issues have been covered? I guess it would depend on what the subject is. smile

Regardless, this might get a more useful response in the modification forum?

I think something like this should work:

<?php
if ($pun_user['g_id'] == PUN_GUEST)
    include PUN_ROOT.'datafile_loggofuser.php';
?>
<?php
if ($pun_user['g_id'] == PUN_MEMBER)
    include PUN_ROOT.'datafile_defaultuser.php';
?>

Version 1.2:

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

  Copyright (C) 2006  guardian34 (publicbox@fmguy.com)

  This file is part of PunBB.

  PunBB 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.

  PunBB 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);

if (isset($_POST['update']))
{
    // Make sure post id was entered
    if (trim($_POST['post_id']) == '')
        message('You didn\'t enter a post id!');

    // Make sure user id was entered
    if (trim($_POST['user_id']) == '')
        message('You didn\'t specifiy an user!');

    $post_id = intval($_POST['post_id']);
    $user_id = intval($_POST['user_id']);

    // Get username
    $result = $db->query('SELECT username FROM '.$db->prefix.'users WHERE id='.$user_id) or error('Unable to fetch username', __FILE__, __LINE__, $db->error());
    $username = $db->result($result);

    // Get topic id
    $result = $db->query('SELECT topic_id FROM '.$db->prefix.'posts WHERE id='.$post_id) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    $topic_id = $db->result($result);

    // Get topic post id
    $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id='.$topic_id.' ORDER BY posted LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    $topic_post_id = $db->result($result);
    
    
    // Update post
    $db->query('UPDATE '.$db->prefix.'posts SET poster=\''.$username.'\', '.'poster_id='.$user_id.' WHERE id = '.$post_id);
    if ($db->affected_rows() < 1)
        $msg = 'The post author was <b>not</b> updated.<br />'."\n\t\t\t\t";
    else
        $msg = 'The post author was updated successfully. '.
            '(Post: <a href="viewtopic.php?pid='.$post_id.'#p'.$user_id.'">'.$post_id.'</a>;'.
            ' User: <a href="profile.php?id='.$user_id.'">'.$username.'</a>)<br />'."\n\t\t\t\t";

    // Try to update "topic post"
    if ($post_id == $topic_post_id)
        $db->query('UPDATE '.$db->prefix.'topics SET poster = \''.$username.'\' WHERE id = '.$topic_id);

    // Try to update last_poster
    $db->query('UPDATE '.$db->prefix.'topics SET last_poster = \''.$username.'\' WHERE last_post_id = '.$post_id);
    
    // Update forum
    $result = $db->query('SELECT forum_id FROM '.$db->prefix.'topics WHERE id = '.$topic_id);
    update_forum($db->result($result, 0));


    // Display the admin navigation menu
    generate_admin_menu($plugin);
?>
    <div class="block">
        <h2><span>Post Author Update - v1.2</span></h2>
        <div class="box">
            <div class="inbox">
                <p>This plugin modifies a post's author.</p>
            </div>
        </div>
    </div>
        
    <div class="block">
        <h2 class="block2"><span>Result</span></h2>
        <div class="box">
            <div class="inbox">
                <p><?php echo $msg; ?></p>
            </div>
        </div>
    </div>
<?php
}
else
{
    // Display the admin navigation menu
    generate_admin_menu($plugin);
?>
    <div class="block">
        <h2><span>Post Author Update - v1.2</span></h2>
        <div class="box">
            <div class="inbox">
                <p>This plugin modifies a post's author.</p>
            </div>
        </div>
    </div>
        
    <div class="blockform">
        <h2 class="block2"><span>Input</span></h2>
        <div class="box">
            <form method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>">
                <div class="inform">
                    <fieldset>
                        <legend>IDs</legend>
                        <div class="infldset">
                            <table class="aligntop" cellspacing="0">
                                <tr>
                                    <th scope="row">Post ID:</th>
                                    <td><input type="text" name="post_id" size="16" tabindex="1" /></td>
                                </tr>
                                <tr>
                                    <th scope="row">User:</th>
                                    <td>
                                        <?php
                                        
                                        echo '<select name="user_id" tabindex="2">'."\n";
                                        
                                        $result = $db->query('SELECT id, username FROM '.$db->prefix.'users WHERE id > 1 ORDER BY username ASC') or error('Unable to get user list', __FILE__, __LINE__, $db->error());

                                        while ($cur_user = $db->fetch_assoc($result))
                                            echo "\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_user['id'].'">'.pun_htmlspecialchars($cur_user['username']).'</option>'."\n";
                                        ?>
                                    </select>
                                    </td>    
                                </tr>
                            </table>
                        </div>
                    </fieldset>
                </div>
            <p class="submitend"><input type="submit" name="update" value="Update" tabindex="3" /></p>
            </form>
        </div>
    </div>
<?php
}
?>

Sounds like they just created an index for your private messages?