1

(0 replies, posted in PunBB 1.3 additions)

Hello everybody!

I recently have been searching for PunBB 1.3 Styles and I came across these pictures:
http://punbb.informer.com/docs/screens/

So I was wondering if somebody know what theme is that and where to download it.

Regards,
John

Hello everybody,

Recently I decided to add some modification to my Punbb installation, but I had to face the fact that I don't have even a tiniest idea of how SQL queries are working in PunBB.

So far I tried everything I knew on this query which is supposed to bring first post of a topic created in a specific forum and display it as a news entry. However all I get is that it displays all posts made in that forum.

<?php
define('FORUM_ROOT', 'forum/');
require FORUM_ROOT.'include/common.php';

define('RECENT_POSTS_SHOW_POST', true); // Set to false to show topic subject only

$query = array(
    'SELECT'    => 'p.id, p.message, t.subject, t.poster, t.num_replies, t.posted, p.poster_id, t.num_replies',
    'FROM'        => 'topics AS t',
    'WHERE'        => 't.forum_id = 2 AND t.sticky = 0',
    'JOINS'        => array(
        array(
            'LEFT JOIN'        => 'posts AS p',
            'ON'            => 'p.topic_id = t.id'
        )
    ),
    'ORDER BY'    => 't.posted DESC',
    'LIMIT'        => '0,10'
);
 
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
 
$recent_posts = array();
while ($cur_post = $forum_db->fetch_assoc($result))
    $recent_posts[] = $cur_post;
 
// Print out posts
if (!empty($recent_posts))
{
    foreach($recent_posts as $cur_post)
    {
        $message = str_replace("\n", "<br />", $cur_post['message']);
        $date = date("j  M  Y", $cur_post['posted']);
        
        echo '
        <h2>'.$cur_post['subject'].'</h2>
        <p class="info">Written by <a href="'. FORUM_ROOT .'profile.php?id='.$cur_post['poster_id'].'" 
        title="'.$cur_post['poster'].'\'s profile">'.$cur_post['poster'].'</a> on '.$date.' | 
        <a href="'. FORUM_ROOT .'viewtopic.php?id='.$cur_post['id'].'" title="View Replies" >'.$cur_post['num_replies'].' Comments</a></p>
        <p>'.$message.'</p>';
        
    }
}
 else { echo '<p>We are sorry but no news were found in the database, if you believe this is an error, please notify the administrator.</p>'; }
?>

Could somebody explain it please? I tried searching though the WiKi but there seems to be no articles about it.
Thanks a lot in advance! big_smile

Thanks all! Works great smile

4

(7 replies, posted in PunBB 1.3 extensions)

Anatoly wrote:

Doesn't this help?

Hello,

Thanks, I was able to adapt that to my needs!

5

(7 replies, posted in PunBB 1.3 extensions)

Anybody please?

6

(7 replies, posted in PunBB 1.3 extensions)

However I don't want to install a portal sad

7

(7 replies, posted in PunBB 1.3 extensions)

Hello everybody,

I have been searching a way to make posts from a certain forum to appear on the frontpage as news, sadly without success so far. Then I found this:
http://punbb.informer.com/forums/topic/ … ied-forum/

So I was wondering if anybody could update it for 1.3 please, that would be really great!
Thanks a lot in advance in case somebody decides to do it.

Oh, didn't think of that, thanks! smile

Hello everybody,

As the title says I am wondering how can I delete the "Currently used extensions" from the footer of my forum. Is it possible?

Thanks a lot in advance.

10

(21 replies, posted in PunBB 1.3 extensions)

This page seems to have a problem or a bug in this script:

<script type="text/javascript">var pun_quote_posts = new Array();var pun_quote_authors = new Array();pun_quote_posts[115750] = "You are welcome to visit http://punbb.informer.com/extensions/ and explore the collection of official PunBB extensions.\\xc2\\xad\\xc2\\xadCurrent official extensions list: pun_admin_add_user, pun_attachment, pun_bbcode, pun_e_mail_auth, pun_extension_reinstaller, pun_hook_navigator, pun_karma, pun_log, pun_poll, pun_quote, pun_topic_online_users.\\xc2\\xad\\xc2\\xadOfficial extensions in development: pun_pm, pun_backup, pun_approval, pun_tags, pun_ajax_auth, pun_draft, pun_stat and others.\\xc2\\xad\\xc2\\xadFeel free to request for new official extensions.\\xc2\\xad\\xc2\\xadPlease, create separate new topic for some individual extension discussion (be this bug report, feature or support request, whatever).";pun_quote_authors[115750] = "Anatoly";pun_quote_posts[117813] = "The All-Togehter-Download don\'t work...";pun_quote_authors[117813] = "ses";pun_quote_posts[117834] = "

ses wrote:

The All-Togehter-Download don\'t work...

\\xc2\\xadFixed. Thanks!";pun_quote_authors[117834] = "Anatoly";pun_quote_posts[119554] = "If pun_quote is enabled, then those who have javascript disabled can not quote at all (well, they can use cut&paste, etc.)\\xc2\\xad\\xc2\\xadWhy not javascript-enable only the new \"Quick quote\" button, leaving the \"old\' Quote/Reply button intact for those who prefer (or have to) keep javascript switched off?";pun_quote_authors[119554] = "8k84";pun_quote_posts[119561] = "Yeah, something like:\\xc2\\xad

\\xc2\\xad<script type=\"text/javascript\">\\xc2\\xaddocument.write(quick_quote_link);\\xc2\\xad</script>\\xc2\\xad<noscript>{normal_quote_link}</noscript>\\xc2\\xad

";pun_quote_authors[119561] = "Garciat";pun_quote_posts[119586] = "

8k84 wrote:

If pun_quote is enabled, then those who have javascript disabled can not quote at all (well, they can use cut&amp;paste, etc.)\\xc2\\xad\\xc2\\xadWhy not javascript-enable only the new \"Quick quote\" button, leaving the \"old\' Quote/Reply button intact for those who prefer (or have to) keep javascript switched off?

\\xc2\\xadYou are right.\\xc2\\xadAdded to wiki.";pun_quote_authors[119586] = "Anatoly";pun_quote_posts[119717] = "Timeline shows that extension is fixed, however, extensions panel does not show any update to pun_quote.\\xc2\\xad\\xc2\\xadThere is another glitch: when quoting without selection (i.e. in full), the resulting quote includes signature, which I guess it is not supposed to.";pun_quote_authors[119717] = "8k84";pun_quote_posts[119719] = "It also adds the \"Last edited by...\" message to the quote.";pun_quote_authors[119719] = "Garciat";pun_quote_posts[119732] = "

8k84 wrote:

Timeline shows that extension is fixed, however, extensions panel does not show any update to pun_quote.

\\xc2\\xadThere\'s delay before extension is published in PunBB repository (where the forum gets new versions from). Each new version is being reviewed (differences to the previous version at least) before publication.";pun_quote_authors[119732] = "Anatoly";pun_quote_posts[119925] = "Punbb_bbcode should put single space before smiley code, otherwise users forget to put it manually and then parser doesn\'t recognize the code.";pun_quote_authors[119925] = "8k84";pun_quote_posts[120275] = "Hello!\\xc2\\xad\\xc2\\xadI am writting about pun_bbcode extension.\\xc2\\xad\\xc2\\xadI don\'t know, maybe in my problem guilty my crooked hands, or maybe it is bug of extention.\\xc2\\xad\\xc2\\xadI tryed translate this extention, and like example I used the English file:\\xc2\\xad\\xc2\\xad

<?php\\xc2\\xad\\xc2\\xadif (!defined(\'FORUM\')) die();\\xc2\\xad\\xc2\\xad$lang_pun_bbcode = array(\\xc2\\xad    \'Pun BBCode Bar\'                => \'Use BBCode Bar\',\\xc2\\xad    \'Notice BBCode Bar\'                => \'Enable BBCode Bar when writing posts (extension Pun BBCode)\',\\xc2\\xad    \'BBCode Graphical\'                => \'Use graphical buttons\',\\xc2\\xad    \'BBCode Graphical buttons\'        => \'Use graphical buttons in BBcode Bar\'\\xc2\\xad)\\xc2\\xad\\xc2\\xad?>

\\xc2\\xad\\xc2\\xadWhen I tryed create the translation file in folder \"Russian\" , like this:\\xc2\\xad\\xc2\\xad

<?php\\xc2\\xad\\xc2\\xadif (!defined(\'FORUM\')) die();\\xc2\\xad\\xc2\\xad$lang_pun_bbcode = array(\\xc2\\xad    \'Pun BBCode Bar\'                => \'Использовать панель BBCode\',\\xc2\\xad    \'Notice BBCode Bar\'                => \'Разрешить использование панели BBCode, когда пишутся сообщения (расширение Pun BBCode)\',\\xc2\\xad    \'BBCode Graphical\'                => \'Использовать графические кнопки\',\\xc2\\xad    \'BBCode Graphical buttons\'        => \'Использовать графические кнопки на панели BBcode\'\\xc2\\xad)\\xc2\\xad\\xc2\\xad?>

\\xc2\\xad\\xc2\\xadThe translation make one problem:\\xc2\\xadWhen I go into preferences, in Profile menu, all options, on page, where I can show preferences from this extension, doesn\'t show on the screen (I can\'t see DIV layer, where is the all preferences)...\\xc2\\xad\\xc2\\xadI too tryed remove this line\\xc2\\xad\\xc2\\xad

\\xc2\\xadif (!defined(\'FORUM\')) die();\\xc2\\xad

\\xc2\\xad\\xc2\\xadBut it\'s didn\'t help me.\\xc2\\xad\\xc2\\xadWhat I do wrong? Or it is bug of extension?\\xc2\\xad\\xc2\\xadPunBB 1.3.1\\xc2\\xadBBCode Buttons 1.2.1";pun_quote_authors[120275] = "Boron1987";pun_quote_posts[120276] = "The file should have UTF-8 encoding. Try to set this encoding in your text editor before saving.";pun_quote_authors[120276] = "parpalak";pun_quote_posts[120277] = "Argh!\\xc2\\xadparpalak, yes, it was problem with encoding... sad\\xc2\\xad\\xc2\\xadThank you for answer! wink\\xc2\\xadNow all works fine. smile";pun_quote_authors[120277] = "Boron1987";pun_quote_posts[120279] = "Cool smile";pun_quote_authors[120279] = "parpalak";pun_quote_posts[124588] = "im using latest punbb and tried to install official pun_pm but got this error below.\\xc2\\xad\\xc2\\xad

IMPORTANT! The extensions listed below were found in the extensions folder but are not available for install or upgrade because the errors displayed below were detected.\\xc2\\xadLoading of extension \"pun_pm\" failed.\\xc2\\xad\\xc2\\xadUnable to parse manifest.xml.

\\xc2\\xad\\xc2\\xadI have reupload but got same error.pls help.\\xc2\\xad\\xc2\\xadim sorry if this is in the wrong section";pun_quote_authors[124588] = "FaRe-Ed";pun_quote_posts[124603] = "How to install pun_antispam ?\\xc2\\xadThere is no Readme file or other instructions.";pun_quote_authors[124603] = "lvivport";pun_quote_posts[124604] = "in pun_repository I can\'t find readme or instructions too\\xc2\\xad\\xc2\\xadhow can I install it?????";pun_quote_authors[124604] = "lvivport";</script>

It is shown above everything when you try to visualize this page: http://punbb.informer.com/forums/topic/ … xtensions/

Reactor wrote:

After adding this code I've 2 errors.

Notice: Undefined index: userfile in /var/www/pcmod/img/uploaded/index.php on line 5

if (is_uploaded_file($_FILES['userfile']['tmp_name']))

Undefined index errors seem to appear within the PunBB in general, I have that error on my user list page, so I doubt it's because of the integration. I tried everything I knew to fix them, I still couldn't find a solution :s


Notice: Undefined variable: content in /var/www/pcmod/img/uploaded/index.php on line 162

<?php echo $content; ?>

What content are you trying to display?

12

(4 replies, posted in Programming)

If you modify your templates to suit your design then yes, you can easily integrate it visually.

Hello, I did that already but there is nothing about the user authentication in the Wiki.
Anyway, doesn't matter, I found the way, thanks for help anyway.

I wound how to do it. It's quite easy actually.

Integration of the PunBB 1.3 into your website (user authentication system)
Simply add this code at the first line of your code (in the very top)

define('FORUM_ROOT', 'forum/');
require FORUM_ROOT.'include/common.php';

// Replace 'forum/' by the directory name in which you have your punBB installation. Example:
If you have your PunBB forum under: www.yoururl.com/yourforum/ and your script in which
you want to use the user authentication is in www.yoururl.com/  then replace forum/ in define by 'yourforum/'

Once you do that, you can use $forum_user variable in your script, note that it is an array
which contains all the data about the user who's viewing the page. 
(Id, Group Id, Username, Email and so on...)

That's all smile
EDIT: Added that part to the PunBB 1.3 Integration in Wiki.

Greetings everybody,

I decided to make a website in which I count to use PunBB, however I would like to have only one user authentication system and I thought if it was possible to use the PunBB's one.

Does anybody know how to do so?

Thanks a lot in advance!
John