I'll probaly port a few over if there's anyone who needs some of them... Though, I'm still planning new ones all the time so who knows when I'll find the time wink

Right now, I'm working on a "game collection/database/review" system. It will not really touch many (if any) of the original PunBB files or database tables though,so it should be a breeze to port over when 1.3 arrives (or so I hope) big_smile

127

(6 replies, posted in PunBB 1.2 discussion)

I would actually really have liked it, if we were able to set that in the user profile instead of having to use the board default. Would just make PunBB that more suitable to everyone smile

Ok, I just changed the address to your config.php, and it gave the following error:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/httpd/vhosts/j-f-f.co.uk/httpdocs/forums/config.php on line 2

Parse error: parse error in /home/httpd/vhosts/j-f-f.co.uk/httpdocs/forums/config.php on line 2

There's definetely something wrong in your config.php file, although looking at what you posted earlier, it shouldn't be...

Adding it to your main.tpl would probably be the easiest way.

Well, as far as I can see, there's nothing wrong with that file... What program did you use to create & save it? I'm just asking, because if you usede a word processor of some sort, it could be that it's saved with some sort of formatting, though I doubt this is the case... What's your server setup (platform, php version & database type (+version))?

creaturecorp wrote:

This is pretty smooth. smile Great job!

Thanks, hope you'll find a use for it smile

Is it possible? Yes (as long as you don't echo out *any* data before the include).
Would it requiring changing a lot of PunBB's code? Yes (changing all the links would just be a start).
Will it create problems? Yes (one of which will be the referrer checks).
Is it a potential security hazard? Yes, without a doubt, if done the wrong way.

...

So, what would be the point of doing this? A lot of work, without any real gain.

Post the contents of your config.php (just censor out your DB password first).

FxPatrice wrote:

Thanks for your help ... It now works for me with your modification (with "iso-8859-1" instead of "utf-8" in my case)

Nice Mod' smile I'm using it in a private area of my forum for that time ...

Glad to hear it's working smile

135

(2 replies, posted in PunBB 1.2 troubleshooting)

This should take care of it:

.pun #brdmenu { text-align: center }
FxPatrice wrote:

Thanks ... It work with FF now, but I have problem with accentuated characters

Directly from extern.php I have no problem (http://forum.windows.free.fr/forum/exte … length=100) :

* panne d'enregistrement depuis la mise en veille
* récupérer tous les pilotes de son ordi
* photo
* FREE ADSL : retour à la normale le 17 mars en zone non dégroupée
* windows xp
* Freebox Haute Définition chez Free avant la rentrée 2006
* Problème synchronisation profil
* Mots chinois
* installation du SP2 impossible
* FAT 32 ou NTFS?

But with AJAX Active public topics it looks like :

* panne d'enregistrement depuis la mise en veille
* r?cup?rer tous les pilotes de son ordi
* photo
* FREE ADSL : retour ? la normale le 17 mars en zone non d?group?e
* windows xp
* Freebox Haute D?finition chez Free avant la rentr?e 2006
* Probl?me synchronisation profil
* Mots chinois
* installation du SP2 impossible
* FAT 32 ou NTFS?

I have "?" instead of "é" ... probably the same thing with other accentuated characters, I don't have  made other tests.

Can you help me ?

Thanks

That's because javascript have problems handling it without any specific headers (in this case, utf-8).

To fix, do the following:
1. Open extern.php, and find on line 245:

        $result = $db->query('SELECT t.id, t.subject 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());

Below add:

        if(isset($_GET['utf-8'])) @header("Content-type: text/html; charset=utf-8"); // Needed for accented characters w. JS/Ajax

2. Open ./include/js/ajax_extern.js, and fine on line 25:

var extern_query = 'extern.php?action=active&show=10&length=100&rnd='+rnd;

Replace with:

var extern_query = 'extern.php?action=active&show=10&length=100&utf-8=1&rnd='+rnd;

3. Save, upload and enjoy accented characters that looks correct smile

137

(7 replies, posted in Feature requests)

mhe wrote:

I do use 9 TP2, had no idea about that feature, thanks!

Not really sure how the .css file is supposed to look though. Lets say i wanted this forum to look just like it does with the oxygen theme, apart from the standard text color RGB(51, 51, 51) wich i want to be RGB(0, 0, 0), how would i go about doing that?

First, you will want to make sure that you have set the userCSS options correct in Opera (see screen at end of post).

As for the .CSS for a PunBB forum, use something like this:

.pun { color: #000 !important }

Here's the correct settings to use:
http://img480.imageshack.us/img480/108/operacss5qs.jpg
(find that dialogue under view->style->manage modes)

138

(7 replies, posted in Feature requests)

mhe wrote:

I dont think its unnecessary smile
Thanks for the firefox tip though, too bad i use Opera.

Any other opinions? As far as i know no other board has the feature, but i dont see why really.

So do I, and it's a breeze styling the web page as you'd like smile

If you're using a opera version below Opera 9 TP2, see this link: http://nontroppo.org/wiki/StylingWebPages

In case you're using Opera 9 TP2 ++, just create a .css with the overrides you'd like for a specific site, right-click the page, choose "site preferences", style & browse to the .css you just created smile

cytexone wrote:

I just tried it with firefox 1.5.0.1  (with adblock and greasemonkey turned off) and it doesn't work.  Works in IE on my machine.  Anyone else with this problem?

Re-download the archive, and overwrite old javascript. The reason for the failure in Firefox was how I had ordered the execution of the commands. It worked in Opera & IE, but not FF. That has now been fixed smile

This applies for everyone downloading before I made this post: re-download.

StevenBullen wrote:

This is a guess....
But I think he means instead of refreshing the whole page of chat just to refresh the new chat messages. Which I doubt would be possible.....

Would not be possible the way the chatbox works now. I guess you could do some XML parsing, but that would require a total rewrite of the way the chatbox outputs data... Also, it would add some new SQL queries to the code, so it wouldn't really be worth it. You might save a few bytes of bandwidth on each update, but then again, you would also add more strain on the server so I don't really see the point.

StevenBullen wrote:

Cheers will have a look at this over the weekend.

Next question... What you working on next wink ?

Hehe, I have absolutely no idea..yet wink Was thinking about perhaps trying to get the quick post feature to use ajax, similar to how the later versions of vBulletin works, but I'm just getting started with javascripting, so we'll have to see...

EDIT: Updated script to fix a problem with Firefox. If you downloaded before this edit, download it again and just overwrite the old javascript.

So, the other day I was playing around with Ajax for the first time, and decided that I quite like it. As a result, I made a "active topics" box for PunBB that updates in real-time without having to refresh the page.

Installation is about as simple as can be. Just upload the included files, then add <pun_include "ajax_extern.php"> in your mail.tpl where you want to display it. This provides a simple way to stay up-to-date on what's going on in your forums:)

By default, the box refreshes every 15 seconds, but that's easy to edit by changing the timer variable at the top of the supplied .js.


Installation:

1. Unzip the archive into your PunBB root directory, keeping the folder structure ( uploads ajax_extern.js into ./include/js/ , and ajax_extern.php into ./include/user/ )
2. Open ./include/template/main.tpl and add <pun_include "ajax_extern.php"> where you want the box to show up. Under <pun_announcement> might be a good place..
3. Enjoy.

Note: if there is any pages you don't want the box to show up on, just add the page name to the array at line 3 in ajax_extern.php. Also, seeing as you won't be editing any of PunBB's source code, this will probably work just fine with sites like mypunbb etc. as well smile

Note 2: If you'd like to change the number of topics, just get topics from specific forums etc., change line 25 of the javascript.

[DOWNLOAD HERE]

Gooom wrote:

@codexp
for the list_chatbox_msg & handleResponse functions, it well be cool to add only the new messages  ... smile

I don't think I quite understand what you mean?

Ok, I think my ajax modification if the chatbox is working well enough for a release now smile

As I've previously mentioned, here are the most important functions I've added:
* AJAX for posting & refreshing chatbox.
* Added a delete function for moderators and admins. This is also handled using AJAX.
+++

[Download here]
[Demo]

Installation:
Just unzip the archive directly into your PunBB directory, overwriting the following files if they exist:

   <root>chatbox.php
   <root>include/js/ajax_chat.js

Please note that you need the the original version of Pokemon_JOJO's chatbox installed first.

Enjoy smile

EDIT: A small update, as I forgot a minor details. I've already updated the archive, but if you've downloaded before this edit, either re-download, or simply open up chatbox.php & change line 252 from:

    global $db, $lang_chatbox, $pun_config, $pun_user;

to

    global $db, $lang_chatbox, $pun_config, $pun_user, $lang_common;

Hehe, I'm not quite sure... I mean, it does work now, but I'd like to optimize & tweak a little more first. My best guess would be later today or tomorrow smile

@Gooom: Yes, that wouldn't be that hard, but you wouldn't want to set the time to low, as it *does* actually run a SQL query. Setting it to something like 10-15 seconds would be fine though smile

@StevenBullen: There is some changed code, but nothing that would be hard to replicate throughout your already modified version. smile

EDIT:

By the way, here's how the delete links are placed currently (IP's censored):
http://img162.imageshack.us/img162/9610/chatboxbeforedelete3hg.th.jpg

And here we're deleting a message, using ajax:
http://img162.imageshack.us/img162/9853/chatboxdeleting6ug.th.jpg

Simple & effective. I'm starting to like this ajax thing for certain features, even though this is my first time using it I had a difficult time getting started, as I didn't want to use any of those "use-for-everything" libraries, but now I see that the basics is not really all that hard smile).

Ok, I've posted the first live test version of an Ajax version of this great mod (referring to the original script of course) smile

So far, there's ajax being used for both the send & refresh button. To be able to post, either create a test account for yourself (no verification needed), or use this account:

Username: test
Password: testuser

Feel free to spam, as that's kinda the point of a demo tongue

URL: http://www.thesecondscreen.com/chatbox.php

EDIT: Just added functions to delete messages from the chatbox,  both with & without Ajax wink

Gooom wrote:

is it possible to refresh the page with AJAX, when there is an update ... ?!

like this :
http://www.devarticles.com/c/a/XML/Buil … -Database/

I'm working on it smile

Currently, I've implemented Ajax for posting (testing it at the moment for problems, as this is the first Ajax project I've done), and I'll probably have a nice refresh function there as well when I'm done. I don't have a public demo up yet though.

pogenwurst wrote:
CodeXP wrote:

I think you all are doing this a little more difficult then it needs to be smile

...but... must.... over-engineer things.... tongue

Hehe, I usually do that as well wink

I think you all are doing this a little more difficult then it needs to be smile

All you need to do to hide the login link in the navigation bar, is to add the following at the end of your .CSS (oxygen.css etc.):

.pun li#navlogin { display: none }

Simple & easy, and doesn't require any modifications of PunBB.