1

(8 replies, posted in PunBB 1.4 troubleshooting)

That part of the code is generated by the extention External Template and its generated in ASP. I cannot change that, so I have to ask the one who build my website. Tnx for helping, but I have to wait with solving the problem until 2014 (because of holidays...)

2

(8 replies, posted in PunBB 1.4 troubleshooting)

Euhm, no. I compared with Beyond compare and footer.php is exact the same as the original one. Mayby because of the extension  External Template • Versie's v1.4.2. (Adds an external template (header and footer HTML) to all pages.) something isn't loaded?

3

(8 replies, posted in PunBB 1.4 troubleshooting)

Tnx, I'll have to ask them. The rest of the site is ASP but I wanted to keep punBB, so the forum is PHP. I can read and write/modify a bit in PHP, so that's why I was trying to do this myself.

4

(8 replies, posted in PunBB 1.4 troubleshooting)

Tnx for helping. All plugins are up to date.
In the console appeared ReferenceError: PUNBB is not defined when I clicked one of the buttons. So I searched (google translate rules wink ) and found out to add

if(typeof PUNBB==="undefined"||!PUNBB){var PUNBB={};}

in pun_bbcode.js en pun_bbcode.min.js. Unfortunatly it didn't work.
There is no style containing template.

I also added a folder with the name of my style in the punBB directory. No result, buttons still not working?

5

(8 replies, posted in PunBB 1.4 troubleshooting)

Recently my forum was update to version 1.4.2. One thing I can't get to work, is punBB code. I have refeshed hooks, reinstalled via admin console, removed and reinstalled with a fresh downloaded version, but it is still not working.
The buttons appear, but clicking on it doesn't have any effect. It looks like the javascript isn't activated by clicking.

Other extensions installed (and active) are:
Admin add user
Easy Google Analytics
External Template
Fancy Stop SPAM
jQuery
Pun Admin Manage Extensions Improved
Pun Move Posts
PunBB Repository
Show links in new window
Subject edit lock

Does anyone have an idea?

6

(17 replies, posted in PunBB 1.3 additions)

Hmm... it's not just the wrong post-icon. The layout is ok, but that's all. Now i don't see the content of the post, but i see for every post in a topic the same topic-title  hmm  It's not just oxygen.css but it's making the right search-action. No. 2 i can't create  sad

(but i do love the preview option @ quick-reply, since english is not my [insert something i don't know in english  roll ]

7

(17 replies, posted in PunBB 1.3 additions)

Yes, it shows them almost the way i want to wink It's just that it would be nice if everything doesn't seems to be closed & sticky  lol  I allready had found that variable and was playing around with it, but did not know yet where to insert it.

I really do like v. 1.3, but sometimes i wish i staid with 1.2  roll

8

(17 replies, posted in PunBB 1.3 additions)

Well, the link works, i figured that out, but i don't want to show the content of the post, just the topic(titel) you made the post in. And that's the part i can't get working...

9

(5 replies, posted in PunBB 1.3 additions)

Sorry for the slow reply, tnx for helping me.
It's right that i want a link somewhere to the recent topics, but i want to make it work the same as the old one, not based on time you logged in, but showing the last 50 started topics, independent from if you have seen them before.
I need the space in the header to make something else my forum-members are used to... but that's another project.

For this one, i tried to make an new action like u siggested before, but i had to change a lot more then just adjust an new action. I thought, if i figured out how to make a new $action, i could figure out how to change it in 50 topics instead of new topics, but it did not work. Isn't there a way to add a new page in punBB 1.3.x and paste my old code in it? Or something like that?

10

(5 replies, posted in PunBB 1.3 additions)

Yes i did but it was not a real mod. I was helped by Quaker in this topic. You can find my code there too, but  I don't use a seperate column for author though.
I tried to do the same this time with the code in this topic, also a portal page, but can't fix it this time.

11

(5 replies, posted in PunBB 1.3 additions)

For a few days now I'm trying to make a page that shows like the recent topic-page, but contains the latest topics from certain forums, orderd by date of first post.

I know now that i can use extern.php, but i don't want to show the topics elsewhere, but as a forum-page.
So what I'm trying to do is show this example from the Wiki:  include('http://host.com/extern.php?action=feed&show=10&fid=5,6,7'); in a forum-view.

punBB 1.3 is new to me (my forum is updated a short while ago) and i'm trying hard to get used to it, but my forummembers are a bit impatient wink So can someone help me out? I did find some suggestions to some code, but can't manage to integrate it myself.

12

(17 replies, posted in PunBB 1.3 additions)

I'm trying to make this work, but the code Amelotti posted will show a list of all the topics you started; I want to show a link of all the topics that contain a post you made. Like in Profile, but then shown as topics.
How can I change this part:

$visit_links['search_topics'] = '<span id="search_topics"'.(empty($visit_links) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search_user_topics'], $forum_user['id']).'"title="'.$lang_common['My topics title'].'">'.$lang_common['My topics'].'</a></span>';

so that it shows juist de topic-title and not all of the text of the post?

Ow.. euhm.. hm.. i'm not that proud of my code, it wòrks...  Please don't laugh at my solutions wink

<?php
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
 
$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.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.

-------------------------------

You can see this in action at the Use Tasks forums:

  http://www.usetasks.com/forums/


To install, include this file below the forums list in your index.php file:



  include('mod_active_topics_1.2.php');

*/

$ak_limit = 30; // change this to the number of active topics you want to display.

$result = $db->query('
    SELECT t.*, f.forum_name 
    FROM '.$db->prefix.'topics AS t 
    INNER JOIN '.$db->prefix.'forums AS f 
    ON f.id=t.forum_id 
    AND t.forum_id IN ("3","30", "31")
    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
    ) 
    ORDER BY t.posted DESC
    LIMIT '.$ak_limit
) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

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

?>

<div id="vf" class="blocktable">
    <h2><span>Nieuwe topics uit de categorie "Show Off"</span></h2>
    <div class="box">
        <div class="inbox">
            <table cellspacing="0">
            <thead>
                <tr>
                    <th class="tcl" scope="col" width="200px"><?php echo $lang_common['Topic'] ?></th>
                    <th class="tc2" scope="col" style="width:45px;"><?php echo "Door" ?></th>
                    <th class="tcl" scope="col" style="width:60px"><?php echo $lang_common['Forum'] ?></th>
                    <th class="tc3" scope="col" style="width:40px;"><?php echo $lang_common['Replies'] ?></th>
                    <th class="tcr" scope="col" style="width:60px;"><?php echo "Gestart" ?></th>
                </tr>
            </thead>
            <tbody>
<?php
// If there are topics in this forum.
if ($db->num_rows($result))
{
    while ($cur_topic = $db->fetch_assoc($result))
    {
        $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> <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)
            $subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> ';
        else if ($cur_topic['closed'] == '0')
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a>';
        else
        {
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> ';
            $icon_text = $lang_common['Closed icon'];
            $item_status = 'iclosed';
        }

        if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $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 (1 == 0 && !$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1')
        {
            if ($cur_topic['has_posted'] == $pun_user['id'])
                $subject = '<strong>·</strong> '.$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 : '';
        }
        
//gebruikersnaam maximaal 9 karakters

$suffix = "..";
$maxChar = 9;

if (strlen($cur_topic['poster']) > $maxChar){
    $cur_topic['poster'] = substr($cur_topic['poster'],0,$maxChar);
    $cur_topic['poster'] = $cur_topic['poster'] . $suffix;
    }

?>
                <tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
                    <td class="tcl">
                        <div class="intd">
                            <div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>
                            <div class="tclcon">
                                <?php echo $subject."\n" ?>
                            </div>
                        </div>
                    </td>
                    <td class="tc2" style="text-align:left;"><?php echo pun_htmlspecialchars($cur_topic['poster']) ?></td>
                    <td class="tc2" style="text-align:left;"><?php echo '<a href="'.$pun_config['o_base_url'].'/viewforum.php?id='.$cur_topic['forum_id'].'">'.$cur_topic['forum_name'].'</a>' ?></td>
                    <td class="tc3"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_replies'] : ' ' ?></td>
                    <td class="tcr"><?php echo format_time($cur_topic['posted']) ?></td>
                </tr>
<?php

    }
}
else
{

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

}

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

<?php
 
require PUN_ROOT.'footer.php';

I changed the query for $result  and euhm.. in holland we say 'that doesn't deserve a beautycontest-price'  yikes
And that's the same with the styles of the <td>'s.

Be gentle wink

I found the solution myself.
Somewhere around line 964 in profile.php change this part:

$posts_field .= (($posts_field != '') ? ' - ' : '').'<a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a>';

in:

$posts_field .= (($posts_field != '') ? ' - ' : '').'<a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a> <br /> <a href="search.php?action=show_user_topics&user_id='.$id.'">'.$lang_profile['Show topics'].'</a>';

yikes 2 questions in one week...

While searching for other solutions, i found one for a question i asked nearly a year ago. But there's something i can't get right.

I use this mod: search user topics, but the link isn't visible in the profile of other users. It is for me (as admin), it is in user's own profile, but it's not visible for users in other users profiles, and that's what i want.

Can anybody help me and explain what i can change in (i guess??) this part of the code:

//MOD:search user threads
if ($pun_user['g_id'] == PUN_ADMIN)
    $posts_field = '<label>'.$lang_common['Posts'].'<br /><input type="text" name="num_posts" value="'.$user['num_posts'].'" size="8" maxlength="8" /><br /></label><p><a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a><br /><a href="search.php?action=show_user_topics&user_id='.$id.'">'.$lang_profile['Show topics'].'</a></p>'."\n";
else if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST)
    $posts_field = '<p>'.$lang_common['Posts'].': '.$user['num_posts'].' - <a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a><br /><a href="search.php?action=show_user_topics&user_id='.$id.'">'.$lang_profile['Show topics'].'</a></p>'."\n";
else
    $posts_field = '<p><a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a><br /><a href="search.php?action=show_user_topics&user_id='.$id.'">'.$lang_profile['Show topics'].'</a></p>'."\n";
//MOD:end

so the link to user's topics is visible for all users? Or is there an other part of the code what i have to edit?

It took quite a while (did i say i'm not a coder? wink) but i managed to make a real 'recent topics'-page, with workin icons and column with author and forum! It's a bit of your (=quaker) index.php, a bit of your other code and a little bit of me wink
Thank you very much!!

I managed to create a new page with your code in it and i modified it so it looks a bit like 'Recent topics' (and i'm a bit proud... i'm not a real coder wink)

There are 2 things i can't work out (is that english??):
- i want a column with the forum-name; i managed to make a column with replies (count) and start-date, but can't get the forum-name in a column ---> Done!
- i would like to have the icons (new topic/allready read topic) in front of the topics

This is my code (i used the this new page template):

<?php
 
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
 
//Set the page title here
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Nieuwste topics';
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
 
?>
        <div class="block">
     <h2><span>Nieuwste topics</span></h2>
        <div> 
    
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th class="tcl" scope="col"><?php echo $lang_common['Topic'] ?></th>
<th class="tc1" scope="col"><?php echo 'Door' ?></th>
<th class="tc1" scope="col"><?php echo $lang_common['Forum'] ?></th>
<th class="tc1" scope="col"><?php echo $lang_common['Replies'] ?></th>
<th class="tcr" scope="col"><?php echo 'Gestart' ?></th>
</tr>
          
<?php

showRecent(25); // Set amount of posts to be displayed here

function showRecent($show=5) {
    global $lang_common, $db, $pun_config, $db_prefix;

    $order_by = 't.posted';
    $forum_sql = '';

//$show = isset($_GET['show']) ? intval($_GET['show']) : 5;
        //if ($show < 1 || $show > 50) $show = 5;

$trunc_len = 50; // Set amount of text to be displayed in subject.

// Fetch $show topics
    $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.num_replies, t.forum_id FROM '.$db->prefix.'topics AS t 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=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT '.$show) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());


    
    
            while ($cur_topic = $db->fetch_assoc($result)) {
        if ($pun_config['o_censoring'] == '1')
     $cur_topic['subject'] = censor_words($cur_topic['subject']);
    $subject_truncated = pun_htmlspecialchars($cur_topic['subject']);
    
    
     


?>

<?php
    echo '<tr><td class="tcl">'.'<a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.substr($cur_topic['subject'], 0, $trunc_len).'</a></td>'.'<td class="tc1">'.$cur_topic['poster'].'</td><td class="tc2"></td><td class="tc3">'.$cur_topic['num_replies'].'</td><td class="tcr">'.format_time($cur_topic['posted'])."\n";
    }
    echo '</td></tr>';
    return;
}
?>
 

</td>
  </tr>
</table>
</div>
</div>
<?php
 
require PUN_ROOT.'footer.php';

Can you help me to get the forum-name in the output, and maybe the icons in front of the topic-titels?
I do know how to put the icons there, but don't know what code to use so the right icon (new/old) is in front of the topic-titel.

[edit]
I managed to get the forum-name in the output; so i'm just looking for a way to put the right icon in front of the topic-titels..

Well, I wasn't, because i'm not using a portal, but I think that can be a solution if I can change that to someting like 'Recent posts' with a link on the forum.
I found your mod, so I'm going to try this. Tnx!

I've been searching, but can't find a solution and I don't think I can make it myself:
my members are asking for an option "show new topics", not meaning: "show new posts since last visit". They would like to have something like this, but then with just New Topics started since last visit. This is because I have a forum called "Show Off" and they would like to see just the new Show Off's.

Dit I overlook a mod or is this something that can easily be done?

20

(3 replies, posted in Feature requests)

Well, i tried all kind of search-combinations, including the one you suggest (Author / topicsubject only) but I still have tot filter manualy; when I do this at one of my forums, (e.g. "Show Off", a forum where members can show their 'projects' and I want to see all projects made by one user), manually filtering, even when I list alphabetically is not working very euhm.. 'nice' (can't find the right english word).

21

(3 replies, posted in Feature requests)

A few weeks ago I started a topic in Modifications about the posibility for "Search on topicstarter", but I still don't have a solution for this; I can't make it myself and there is no mod for it.

That's why I post this question here in Feature requests. I hope this can be implemented (is that english??) in the next version of PunBB? It's all about using the searchoption to search for all topics started by a specific author.

I manage 2 sites: one with html-pages and a punBB-forum, the other is a shop (osCommerce).
osCommerce works with boxes and I want to show one of these boxes at my forum. So I put <pun_include "box.php"> in main.tpl and the file 'box.php' in include/user/. So far, so good, the box shows, the links in the box work. But... the images don't!

When I look at the properties of the image, it says 'http://www.site1.nl/forum/images/bla.jpg' instead of 'http://www.site2.nl/images/bla.jpg'. So I guess there is something not working the way i want it with <base> of something.

Is there anybody who can help me with this problem? Càn this be solved??

So there is nobody who can or did make this mod?

I've searched all over Punbb.org and Punres.org but I can't find the mod I'm looking for, though I can't imagine it's not made yet..
I would like to use the search for all topics started by one author. With the standard search, you can search on Author, but you will see every topic the author has posted in. I would like an option to see just the topics the user started.

I'm not that good in php to mod the search myself..

25

(6 replies, posted in Feature requests)

I hope you don't mind me kicking this topic, but I was wondering if it's still on the list?
I hoped to find this feature as a mod or project, but all I found was Gizzmo's question smile