76

(50 replies, posted in PunBB 1.3 troubleshooting)

yep..

Loaded Modules

core prefork http_core mod_so mod_access mod_auth mod_auth_anon mod_auth_dbm mod_auth_digest util_ldap mod_auth_ldap mod_include mod_log_config mod_env mod_mime_magic mod_cern_meta mod_expires mod_deflate mod_headers mod_usertrack mod_setenvif mod_mime mod_dav mod_status mod_autoindex mod_asis mod_info mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_imap mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_proxy proxy_ftp proxy_http proxy_connect mod_cache mod_suexec mod_disk_cache mod_file_cache mod_mem_cache mod_cgi mod_perl mod_php5

77

(50 replies, posted in PunBB 1.3 troubleshooting)

ok, so it should be:

# BEGIN PunBB

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /rewrite.php [L]
</IfModule>

# END PunBB

This doesn't work for me.

78

(50 replies, posted in PunBB 1.3 troubleshooting)

# BEGIN PunBB

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shedrockonline
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /rewrite.php [L]
</IfModule>

# END PunBB

I am just using the one that came in the extras folder. I am sure I have something wrong.

79

(50 replies, posted in PunBB 1.3 troubleshooting)

To Smartys:

Well, my site is at: http://shedrockonline.com so where do I enter the path?

80

(48 replies, posted in News)

Hope I can ask this question in here. I turned on fancy URL's but I get 404 errors. I also copied the .htaccess file in the root folder.

81

(18 replies, posted in PunBB 1.2 discussion)

Thanks Smartys

82

(9 replies, posted in General discussion)

Well, I didn't think that it was a js issue..then again it probably is. I have a similar Active Mods block on http://phpfusion-themes.com and the code in there is also only used once. The javascript is not tied in except to open/close the dropdown panel.

83

(18 replies, posted in PunBB 1.2 discussion)

Will it be possible to convert current styles over to the new ones or is that a dumb question that has already been asked?

84

(9 replies, posted in General discussion)

ok, but how can I do it? I have no clue.

85

(9 replies, posted in General discussion)

Can someone help me with this?

that doesn't work either.

87

(18 replies, posted in General discussion)

Hey Matt,

Are you going to release that Article Mod?

88

(9 replies, posted in General discussion)

In post #1 I do get an extra query because I have repeated the code twice. I know there is a way to use just one entry of the same query but I don't know how to do it.

The code basically displays 5 posts and you have the option to click to display more posts. Can someone please show me how to do it correctly?

Thanks
Bingiman

lol - I kinda knew something wasn't right.

Thanks

Bingiman

Is this URL ok to use. I am referring to the PHP part of it. It does work. I just couldn't understand why it works without the "/" after img

<img style="vertical-align: middle;" src="img<?php echo $pun_user['o_base_url'] ?>/icon_displaymore.gif" alt="Display More Threads" />

91

(9 replies, posted in General discussion)

Sorry Smartys. It works just fine. I made an error in my code.

Thanks
Bingiman

92

(9 replies, posted in General discussion)

hmm...didn't work. I get this.

An error was encountered
Error: Unable to fetch topic list.

93

(9 replies, posted in General discussion)

I have the following code below. What I am trying to do is to Display (10) topics using

$min = 5; // change this to the number of active topics you want to display.
$max = 5; // change this to the number of active topics you want to display.

Now, the code below is repeated twice. One uses the $min variable and the other is suppose to use the $min, $max <- the sum of both. The problem is that I get an error when I try to after: LIMIT '.$min to make it LIMIT '.$min, $max

$result = $db->query('
    SELECT p.poster_id AS has_posted, t.* 
    FROM '.$db->prefix.'topics AS t 

LEFT JOIN '.$db->prefix.'posts AS p ON p.id=p.topic_id AND p.poster_id='.$pun_user['id'].' 
    INNER JOIN '.$db->prefix.'forums AS f 
    ON f.id=t.forum_id 
    LEFT JOIN '.$db->prefix.'forum_perms AS fp 
    ON (
        fp.forum_id=f.id 
        AND fp.group_id='.$pun_user['g_id'].'
    ) 
    WHERE (
        fp.read_forum IS NULL 
        OR fp.read_forum=1
    ) 
    GROUP BY t.id
    ORDER BY t.last_post DESC
    LIMIT '.$min
) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

How can I get it to read them both?


I will also show the entire code.

<?php
/*

PunBB Active Topics

Copyright 2004-2005 Alex King, http://www.alexking.org/

This is a mod for PunBB, http://www.punbb.org/
PunBB is Copyright (C) 2002, 2003, 2004  Rickard Andersson (rickard@punbb.org)

This file is based on the viewtopic.php file in PunBB.

-------------------------------
*/

$min = 5; // change this to the number of active topics you want to display.
$max = 5; // change this to the number of active topics you want to display.

$result = $db->query('
    SELECT p.poster_id AS has_posted, t.* 
    FROM '.$db->prefix.'topics AS t 

LEFT JOIN '.$db->prefix.'posts AS p ON p.id=p.topic_id AND p.poster_id='.$pun_user['id'].' 
    INNER JOIN '.$db->prefix.'forums AS f 
    ON f.id=t.forum_id 
    LEFT JOIN '.$db->prefix.'forum_perms AS fp 
    ON (
        fp.forum_id=f.id 
        AND fp.group_id='.$pun_user['g_id'].'
    ) 
    WHERE (
        fp.read_forum IS NULL 
        OR fp.read_forum=1
    ) 
    GROUP BY t.id
    ORDER BY t.last_post DESC
    LIMIT '.$min
) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

require PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php';



$new_topics = get_all_new_topics();

?><script language="javascript" type="text/javascript">
function show_hide(element){
element=document.getElementById(element);

if (element.style.display == "none"){
element.style.display = "";
}
else
{
element.style.display = "none";
}
}
</script>
<div id="vf" class="blocktable">
    <h2><span>Latest Active Topics - <a href="javascript:show_hide('displaysmileys')">SHOW</a>
</span></h2>


    <div class="box">
        <div class="inbox">
            <table cellspacing="0">
            <thead>
                <tr><th style="border-left: 0px;" class="tc0"> </th>
                    <th class="tcl" scope="col"><?php echo $lang_common['Topic'] ?></th>
                    <th class="tc2" scope="col"><?php echo $lang_common['Replies'] ?></th>
                    <th class="tc3" scope="col"><?php echo $lang_forum['Views'] ?></th>
                    <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
                </tr>
            </thead>
            <tbody>
<?php

// If there are topics in this forum.
if ($db->num_rows($result))
{
        $alt = true;
    while ($cur_topic = $db->fetch_assoc($result))
    {
        $alt = !$alt;
        $icon_text = $lang_common['Normal icon'];
        $item_status = '';
        $icon_type = 'icon';

        if ($cur_topic['moved_to'] == null)
            $last_post = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <br /><span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).'</span>';
        else
            $last_post = ' ';

        if ($pun_config['o_censoring'] == '1')
            $cur_topic['subject'] = censor_words($cur_topic['subject']);

        if ($cur_topic['moved_to'] != 0) {
            $item_status .= 'imoved';
            $icon_type = 'icon imoved';
            $subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <br /><span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
}
        else if ($cur_topic['closed'] == '0')
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class=""><br />'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
        else
        {
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <br /><span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            $icon_text = $lang_common['Closed icon'];
            $item_status = 'iclosed';
        }
                            // gleek edit
                        if ($cur_topic['num_replies'] >= $pun_config['o_hot_count'])
                        {
                                $item_status .= 'ihot';
                                $icon_type = 'icon ihot';
                        }
        if (!$pun_user['is_guest'] && topic_is_new($cur_topic['id'], $id,  $cur_topic['last_post']) && $cur_topic['moved_to'] == null)
        {
            $icon_text .= ' '.$lang_common['New icon'];
            $item_status .= ' inew';
            $icon_type = 'icon inew';
            $subject = '<strong>'.$subject.'</strong>';
            $subject_new_posts = '<span class="newtext">[<a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a>]</span>';
        }
        else
            $subject_new_posts = null;

        // Should we display the dot or not? :)
        if (!$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1')
        {
            if ($cur_topic['has_posted'] == $pun_user['id'])
                $subject = '<img src="img/'.$pun_user['style'].'/buttons/btn_just_posted.png" title="'.$lang_forum['User has just posted'].'" alt="'.$lang_forum['User has just posted'].'" /> '.$subject;
            else
                $subject = '  '.$subject;
        }

        if ($cur_topic['sticky'] == '1')
        {
            $subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
            $item_status .= ' isticky';
            $icon_text .= ' '.$lang_forum['Sticky'];
        }

        $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);

        if ($num_pages_topic > 1)
            $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]';
        else
            $subject_multipage = null;

        // Should we show the "New posts" and/or the multipage links?
        if (!empty($subject_new_posts) || !empty($subject_multipage))
        {
            $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : '');
            $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : '';
        }
if ($alt)
{
    $item_status .= ' alt';
}
?>
                <tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
            <td style="border-left: 0;" class="tc0"><div class="<?php echo $icon_type ?>"> </div></td>
                    <td class="tc1"><?php echo $subject."\n" ?> </td>


                    <td class="tc2"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_replies'] : ' ' ?></td>
                    <td class="tc3"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_views'] : ' ' ?></td>


<?php
        if ($cur_topic['moved_to'] != 0) {
            $item_status .= 'imoved';
            $icon_type = 'icon imoved';
            echo '<td class="tcr"><img src="'.$pun_config['o_base_url'].'/img/topic_moved.gif" alt="Topic Moved" title="Topic Moved" /> Topic Moved</td>';
}else {


?>


                    <td class="tcr"><?php echo $last_post ?></td>
<?php
        }
?>
                </tr>
<?php
    }
}
else
{

?>
                <tr>
                    <td class="tcl" colspan="5"><?php echo $lang_forum['Empty forum'] ?></td>
                </tr>
<?php

}

?>
            </tbody>
            </table>

<?php


$result = $db->query('
    SELECT p.poster_id AS has_posted, t.* 
    FROM '.$db->prefix.'topics AS t 

LEFT JOIN '.$db->prefix.'posts AS p ON p.id=p.topic_id AND p.poster_id='.$pun_user['id'].' 
    INNER JOIN '.$db->prefix.'forums AS f 
    ON f.id=t.forum_id 
    LEFT JOIN '.$db->prefix.'forum_perms AS fp 
    ON (
        fp.forum_id=f.id 
        AND fp.group_id='.$pun_user['g_id'].'
    ) 
    WHERE (
        fp.read_forum IS NULL 
        OR fp.read_forum=1
    ) 
    GROUP BY t.id
    ORDER BY t.last_post DESC
    LIMIT '.$max
) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());


?><div id="displaysmileys">



            <table cellspacing="0">
            <thead>
                <tr><th style="border-left: 0px;" class="tc0"> </th>
                    <th class="tcl" scope="col"><?php echo $lang_common['Topic'] ?></th>
                    <th class="tc2" scope="col"><?php echo $lang_common['Replies'] ?></th>
                    <th class="tc3" scope="col"><?php echo $lang_forum['Views'] ?></th>
                    <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
                </tr>
            </thead>
            <tbody>
<?php

// If there are topics in this forum.
if ($db->num_rows($result))
{
        $alt = true;
    while ($cur_topic = $db->fetch_assoc($result))
    {
        $alt = !$alt;
        $icon_text = $lang_common['Normal icon'];
        $item_status = '';
        $icon_type = 'icon';

        if ($cur_topic['moved_to'] == null)
            $last_post = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <br /><span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).'</span>';
        else
            $last_post = ' ';

        if ($pun_config['o_censoring'] == '1')
            $cur_topic['subject'] = censor_words($cur_topic['subject']);

        if ($cur_topic['moved_to'] != 0) {
            $item_status .= 'imoved';
            $icon_type = 'icon imoved';
            $subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <br /><span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
}
        else if ($cur_topic['closed'] == '0')
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class=""><br />'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
        else
        {
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <br /><span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            $icon_text = $lang_common['Closed icon'];
            $item_status = 'iclosed';
        }
                            // gleek edit
                        if ($cur_topic['num_replies'] >= $pun_config['o_hot_count'])
                        {
                                $item_status .= 'ihot';
                                $icon_type = 'icon ihot';
                        }
        if (!$pun_user['is_guest'] && topic_is_new($cur_topic['id'], $id,  $cur_topic['last_post']) && $cur_topic['moved_to'] == null)
        {
            $icon_text .= ' '.$lang_common['New icon'];
            $item_status .= ' inew';
            $icon_type = 'icon inew';
            $subject = '<strong>'.$subject.'</strong>';
            $subject_new_posts = '<span class="newtext">[<a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a>]</span>';
        }
        else
            $subject_new_posts = null;

        // Should we display the dot or not? :)
        if (!$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1')
        {
            if ($cur_topic['has_posted'] == $pun_user['id'])
                $subject = '<img src="img/'.$pun_user['style'].'/buttons/btn_just_posted.png" title="'.$lang_forum['User has just posted'].'" alt="'.$lang_forum['User has just posted'].'" /> '.$subject;
            else
                $subject = '  '.$subject;
        }

        if ($cur_topic['sticky'] == '1')
        {
            $subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
            $item_status .= ' isticky';
            $icon_text .= ' '.$lang_forum['Sticky'];
        }

        $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);

        if ($num_pages_topic > 1)
            $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]';
        else
            $subject_multipage = null;

        // Should we show the "New posts" and/or the multipage links?
        if (!empty($subject_new_posts) || !empty($subject_multipage))
        {
            $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : '');
            $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : '';
        }
if ($alt)
{
    $item_status .= ' alt';
}
?>
                <tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
            <td style="border-left: 0;" class="tc0"><div class="<?php echo $icon_type ?>"> </div></td>
                    <td class="tc1"><?php echo $subject."\n" ?> </td>


                    <td class="tc2"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_replies'] : ' ' ?></td>
                    <td class="tc3"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_views'] : ' ' ?></td>


<?php
        if ($cur_topic['moved_to'] != 0) {
            $item_status .= 'imoved';
            $icon_type = 'icon imoved';
            echo '<td class="tcr"><img src="'.$pun_config['o_base_url'].'/img/topic_moved.gif" alt="Topic Moved" title="Topic Moved" /> Topic Moved</td>';
}else {


?>


                    <td class="tcr"><?php echo $last_post ?></td>
<?php
        }
?>
                </tr>
<?php
    }
}
else
{

?>
                <tr>
                    <td class="tcl" colspan="5"><?php echo $lang_forum['Empty forum'] ?></td>
                </tr>
<?php

}

?>
            </tbody>
            </table>
        </div>       </div>
    </div>
</div>

<script language="javascript" type="text/javascript">document.getElementById('displaysmileys').style.display='none';</script>

Thanks
Bingiman

It does work for me. The problem is the same I was experiencing before. The border does not go all the way down to the bottom of the post.

I think you misunderstood what I am asking. I have re-uploaded the image to show the border I am trying to get.

I am trying to add a  border to the left side of the forum posts. You will see what I mean by the pic. I have tried it but the border did not go past the signature area for some reason. Is there some way I can accomplish this?

http://megapun.com/img/gallery/1201376506.gif

Would anyone know what would be in the contents of the message_popup.php file that is shown as an example here:
http://punbb.org/forums/viewtopic.php?pid=70364#p70364

I am trying to show a popup when a new PM has been received.

Thanks
Bingiman

98

(12 replies, posted in General discussion)

ok, no problem Matt.

99

(12 replies, posted in General discussion)

Well...I have 3 files to test. install_mod.php, install.php and install_attach_mod.php - If i remove those files it still tells me that they are in the folder, and they aren't.

100

(12 replies, posted in General discussion)

Neh, doesn't work.