351

(2 replies, posted in General discussion)

smile

It's 0:04 AM here so... woot! Happy new year!!!

352

(12 replies, posted in PunBB 1.3 discussion)

I think you should get rid of the BBCode instead. Having HTML inside the RSS is not a good idea.

My regex skills are not very good, but you could try something like:

$cur_post['message'] = preg_replace("/\[([a-z0-9*]+)([^\[]+?)?\]([^\[]+?)\[(\/[a-z0-9*]+)\]/i", '$3', $cur_post['message']);

On line 335.

On Line 277 of header.php you can disable top breadcrumbs by adding "//" at the beginning of the line.

Line 280 for the bottom breadcrumbs.

354

(15 replies, posted in PunBB 1.3 discussion)

How could the script know if the client accepts application/rss+xml (or atom, etc)?

355

(15 replies, posted in PunBB 1.3 discussion)

Do you approve this code?

if(empty($_SERVER['HTTP_ACCEPT']) || !in_array('application/xml', explode(',', $_SERVER['HTTP_ACCEPT']))
//No HTTP_ACCEPT header or no application/xml support, use text/xml
else
//We can use application/xml

About application/rss+xml: http://duncanmackenzie.net/blog/applica … fault.aspx

I know the article is really old, but Wikipedia still shows "(Registration Being Prepared)" for the MIME type.

Yes, works on WP 2.2 and later.

357

(15 replies, posted in PunBB 1.3 discussion)

So... RSS and Atom - application/xml and XML - text/xml? I'll commit the changes to SVN depending on your answers smile

I think he wants to know where the moderation control panel is?

dera wrote:

is it anyhow possible to put latest 10 active topics on wordpress index?

Yes, here's how.

Things you need

Preparation: Install the "Widgetize Anything" Plugin

  1. Download the plugin.

  2. Extract its contents (a folder called "widgetize-anything") into 'wp-content/plugins/'.

  3. Go to Plugins on your Wordpress dashboard.

  4. Install the plugin.

Widgetize Anything: Adding more widgets

  1. Go to Settings/Options»Widgetize Anything on your Wordpress dashboard.

  2. Change the number to your needs.

  3. Update the options.

Steps

  1. Go to Appearance»Widgets (depends on your WP version) and add the "Widgetize Anything (number)" widget to your sidebar.

  2. Edit the "Widgetize Anything (number)" widget.

  3. Set the widget title to your liking.

  4. If you want to show the forum's active topics, paste Code 1 into the text box. If you want to show how many online users there are, paste Code 2. If you want to show your board stats, paste Code 3.

  5. Replace '{replace_this}' with the relative URI to your PunBB installation. See Example 1.

  6. Save the changes.

Code 1:

$show = '10'; //How many active topics we want to show

define('FORUM_ROOT', '{replace_this}');

echo '<ul>';
echo file_get_contents(FORUM_ROOT . '/extern.php?show=' . $show);
echo '</ul>';

Code 2:

define('FORUM_ROOT', '{replace_this}');

echo '<ul>';
echo file_get_contents(FORUM_ROOT . '/extern.php?action=online');
echo '</ul>';

Code 3:

define('FORUM_ROOT', '{replace_this}');

echo '<ul>';
echo file_get_contents(FORUM_ROOT . '/extern.php?action=stats');
echo '</ul>';

Example 1:

You have Wordpress installed in www.example.com and PunBB on www.example.com/forums/. Your relative URI to PunBB will then be "./forums". If Wordpress is installed on www.example.com/blog/ and www.example.com/forums/, your relative URI to PunBB will be "../forums"

Advanced users:
Read the instructions found inside 'extern.php', edit the following code to your liking and use it on step 4.

$variables = ''; //Example: action=feed&fid=1&show=30

define('FORUM_ROOT', '{replace_this}');

echo '<ul>';
echo file_get_contents(FORUM_ROOT . '/extern.php?' . $variables);
echo '</ul>';

I hope you understood my messy tutorial big_smile

361

(22 replies, posted in PunBB 1.3 extensions)

Ok, I'll start working on that sometime after new year. I got lots of stuff to do hmm

362

(22 replies, posted in PunBB 1.3 extensions)

No no, I meant to ask if that looks good. A white box under the post with all attached images.

And yes, the images will be stored in the local server.

363

(22 replies, posted in PunBB 1.3 extensions)

Like this?

http://i247.photobucket.com/albums/gg135/garcia-t/gallery.png

Create a new PHP with:

<?php
var_dump(chmod('./cache', 0777));
echo "<br />";
var_dump(chmod('./img/avatars', 0777));
?>

and save it on your PunBB root by the name of 'chmod.php', then use your browser to open it (once it's uploaded to your server).

You should see:

bool(true)
bool(true)

If not, something else is wrong...?

365

(22 replies, posted in PunBB 1.3 extensions)

I don't know about specific changes on the CSS, but I could probably make an extension that will allow you to edit your styles (as text) from within PunBB (kinda like Wordpress does), without having to upload with FTP to your server and all that hassle.

Is that good?

I'll post a screenshot right away.

That link I posted on top is the latest PunBB 1.3.2. It's a "nightly build" of PunBB, of a sort.

Btw, I love the Nissan Skyline GTR, I use it on NFS: Undercover big_smile

That's really weird... the uninstall doesn't pass the $ext_info variable. I think this is a bug...

Edit: Fixed.

This extension needs at least rev1002 of PunBB 1.3 from SVN found here.

Integrates an improved smilies system.

You can manage your smiley sets on Administration » Settings » Smilies

Download Link: http://punbb.informer.com/unofficial/pu … milies.zip

Screenshot:
http://i247.photobucket.com/albums/gg135/garcia-t/smilies.png

If you find any bugs or have any tips, please post them here.

Updates

  • 1.0: First release

369

(4 replies, posted in PunBB 1.3 discussion)

Something like this?
http://i247.photobucket.com/albums/gg135/garcia-t/left-image.jpg

Why only admins? Anyone can just go to (i.e.) http://punbb.informer.com/forums/userli … t_dir=DESC and get the same list.

It is.

372

(6 replies, posted in PunBB 1.3 additions)

What do you mean fix? You can't write those characters on the lang files?

            $base = gmdate('Y-m-d', $timestamp);
            $today = gmdate('Y-m-d', $now + $diff);
            $yesterday = gmdate('Y-m-d', $now + $diff - 86400);

            if ($base == $today)
                $formatted_time = $lang_common['Today'];
            else if ($base == $yesterday)
                $formatted_time = $lang_common['Yesterday'];

374

(27 replies, posted in News)

Well, how would it know who to show the link to? If it showed it only to the IP stored on your admin's account, it could make fixing your forum nearly impossible if your IP changes.

Oh... I forgot a line from the code! I edited the code. It should work now.