1

(10 replies, posted in PunBB 1.4 additions)

If features are the metric by which you judge quality, then sure having more features = more better.

That being said, adding pun_bbcode support is not that hard! Here, maybe this will help you deejay:

https://github.com/hklown/punbb_extensi … de_spoiler

check out the first two hooks in the manifest.

2

(17 replies, posted in Feature requests)

Why not just write extensions? All the things you say you're adding can be easily done with extensions to a vanilla install of punbb.

It's like writing your own blogging engine when all you want is something that could be accomplished with a wordpress plugin. I guess it's a good exercise if you want to learn how to do it, but realistically "rolling your own" is just a tremendous amount of unnecessary work.

What do you want to put there?

if you add:

define('FORUM_DISABLE_HOOKS', 1);

to your config.php, do you still get the error?

Moved to extensions section.

Cool plugin. Would it be possible to make the speech bubble "stick" if the user clicks it? Maybe some users would want to be able to toggle the appearance without having to mouseover.

Follow instructions here: http://punbb.informer.com/wiki/punbb13/ … on#general (in "General" section).

Then in your code, something like:

<div id="logbox_avatar" style="bacrground-image : url(<?php echo "./img/avatar/" . $forum_user['id'] . '.AVATAR_EXTENSION'); ?>;"></div>

The above code has some problems (what if user is guest, what about different extension types) but I have to get going for a bit. It should get you started though.

Done! Great extension by the way!

Profile > Settings > Enable BBcode buttons

9

(7 replies, posted in Supported extensions)

Great extension- thanks!

10

(2 replies, posted in Feature requests)

You mean a topic that will appear at the top of every forum, above stickies?

11

(6 replies, posted in PunBB 1.4 troubleshooting)

ams wrote:

Parsing HTML with regular expressions is widely considered to be a bad idea.

Your best bet is to use php's in built HTML parser: http://docs.php.net/manual/en/domdocument.loadhtml.php

Check out the second response under the one you linked- specifically

While it is true that asking regexes to parse arbitrary HTML is like asking Paris Hilton to write an operating system, it's sometimes appropriate to parse a limited, known set of HTML.

I definitely agree that you should probably use the html parser (I didn't know it existed actually, thanks!), I don't think that using a regular expression to strip the body out of an anchor tag is an such a bad thing. The post you linked seems to be talking about replicating the functionality of a parser with regular expressions, what (I think) hoang83vu wants to do is much less complex then that.

Either way, thanks for linking that post, it was a good read!

12

(6 replies, posted in PunBB 1.4 troubleshooting)

You're going to have to learn about regular expressions, but I would investigate http://www.php.net/manual/en/function.preg-match.php.

13

(4 replies, posted in PunBB 1.4 troubleshooting)

If you're missing the profile.php file, re-download punbb and add the missing file.

14

(7 replies, posted in Feature requests)

There's a mobile theme being worked on. As for documentation, you're right there isn't a lot.

That being said, PunBB is actually pretty exceptionally easy to use.

I don't think it's cache_hooks.php, but there is a cache_config.php that contains the $forum_config array and deleting it solves the problem.

Will I have to delete the cache_config.php in my extension, or is there another way to bypass using the cached values? I could just query the DB in the extension and store the config table in my own array, but I was trying to avoid using another query if I didn't have to.

In an extension I am working on, I have the following in manifest.xml:

<hook id="hd_head">
            <![CDATA[
                if ( FORUM_PAGE == 'index' )
                {
                    require_once $ext_info['path'].'/include/functions.php';
                    checkForUpdate();
                }
            ]]>
</hook>

At the very top of the functions.php file, I have the following:

    global $forum_config;
    echo '<div style="display:none;">';
    print_r($forum_config);
    echo '</div>';

When I view the output of the print_r statement, the values in the array are always the values of the config table at the time the extension was installed. That is to say, if I change a value in the config table (from the ACP or directly through phpMyAdmin), the values of $forum_config in functions.php do not change until I reinstall the extension.

If I use $forum_config in the actual manifest.xml though, it works fine.

Any idea why this is?

17

(15 replies, posted in Supported extensions)

gorelord4e wrote:

is it difficult to make pun_forum_news output the text on my wordpress mainpage aswell?

I don't think that's within the capacity of that extension, you'd need a wordpress extension to do that.

Where you added the crying emoticon, you used an apostrophe in the emoticon replacement text. Since the strings are delimited by single quotes (apostrophes), it messed everything up.

Try this:

array(':)' => 'smile.png', '=)' => 'smile.png', ':|' => 'neutral.png', '=|' => 'neutral.png', ':(' => 'sad.png', '=(' => 'sad.png', ':D' => 'big_smile.png', '=D' => 'big_smile.png', ':o' => 'yikes.png', ':O' => 'yikes.png', ';)' => 'wink.png', ':/' => 'hmm.png', ':P' => 'tongue.png', ':p' => 'tongue.png', ':lol:' => 'lol.png', ':mad:' => 'mad.png', ':rolleyes:' => 'roll.png', ':cool:' => 'cool.png', ":'(" => 'cry.gif', ':s' => 's.gif', ':$' => 'dollars.gif', ':@' => 'angry.png' '(h)' => 'hot.gif' 'o.O' => 'o.o.gif' 'O.O' => 'O.Obig.gif' ':woot:' => 'w00t.gif' ':doh:' => 'doh.gif' ':yayy:' => 'yayy.gif' ':argh:' => 'bangg.gif' ':nooo:' => 'nooo.gif' ':grrchear:' => 'cheeranyhow.gif');

I always was a little annoyed that when you go to report a post, you can't actually see the post without hitting back when you're typing your reason for reporting. This extension renders a watered-down version of the post above the report dialog itself, so you can reference it when typing your report.

Here's what it looks like in action:
http://i.imgur.com/HDhgt.png

This view of the post does not display post footer options, or poster information other then username, title and avatar. Also, the date in the post byline is not a link- I wanted to prevent accidentally leaving the page when typing the report.

The size of the post preview is also capped, and if it is too large it will scroll instead. This can be changed in the provided CSS file.

If anyone has comments/suggestions, please share.

DOWNLOAD v1.0.0: http://www.mediafire.com/download.php?pbyziih2whk2t29

Great extension, thanks! Probably going to install this.

Heya- are you comfortable editing the database using phpMyAdmin or another tool? If so, check out:

http://punbb.informer.com/forums/topic/ … y-gallery/

It's a little neater then adding smilies by editing the code, but it's not complete.

22

(5 replies, posted in General discussion)

http://punbb.informer.com/extensions/

You want "pun_bbcode"

See documentation for how to install extensions.

I think one line per extension would be good. If you plan on implementing some of these ideas, maybe incorporate them into pun_admin_manage_extensions_improved?

The update of the extension was a modification to the installer I'm pretty sure, so you'd have to reinstall the extension (it changes the default value of the column when you're inserting it into the users table).

KeyDog wrote:

Would be more professional to have a global setting...
how can I set it in phpmyadmin to always be on.... ? (see no advantage at all in this feature...)

UPDATE `[database name]`.`[users table name]` SET `pun_bbcode_use_buttons` = '1';

Suggestion for future versions: use enums in DB instead of "1" or "0"- enums are much clearer.