@slickpaid code is free, do what you want... but dont use same name/version as me please.

@rahahm33: if you think I shouldn't be programming I'll just say to not use my code instead of complaining.

Sorry not having much time for this lately. Update will come when new year and co are over.

Feel free to share your own modification like slickplaid smile


@rahahm33:
I answered about submit button before your reply.
Regarding standard, to be honest I don't care. I don't see the point of applying standard for the sake of it regardless of what's the return (for example the tons of absolute div on forum index instead of a table is an error imho). This extension works perfectly like this on tested browsers and I wont bother adding useless tags for the beauty of it.

PS: don't misunderstand me, I plenty support standard effort of w3c. But I also do realistic programming, rules are generic, case is specific, main goal is to get it working not to spend 1 day per line of code to be sure its perfect.

Thanks all for the positive feedbacks smile


Regarding comments/requests:
Own page: not yet, it is rather complicated and not my priority.

Message/User color: adding a per-user color is too complicated and would require to store it somewhere. Would also create problems on big forums (how to make 1000 different colors). However I'm planning to modify a bit message template to allow alternate colors and colouring of specific users based on name.

Is there a flood limit? you cant post a message while one is bein sent and you cant reposte twice the same message. Except that there is no message-per-unit-of-time limit.

There is no submit button (I know you can just press enter, but some users might not know that). Right, can add one it doesnt cost much.

The error message should disappear after some time. You can make it disapear by clicking it. I'm not sure about timing it, what if someone miss it due to the timer ?

Are the forum censoring rules applied to the messages? No, word censoring could be applied easily I think.

A "No messages" note would be nice. there's one... but its a bit bugged, will be corrected.

Let admins ban some people from the chat. Wont do that. First because its rather heavy and complicated, second because the forum has a ban system that works perfectly.

Did you check its not a missing lang key ?
Would explain the empty <li> too.

New version:
fixed a bug that would trigger if the date was already passed when the page is loaded.

@whatrevolution: thanks smile

I wondered if DivX Web Player can be supported with this excellent tag tool.
Or what I need to replace to maybe get a Divx/Avi Tag working?

I think it would be easier to make a completely new tag since its not the same code at all for most part of the process wink

Countdown extension for PunBB 1.3
This extension let you display a countdown to a date in the annoucement.


Countdown 0.2.1


Installation:
Download the zip and extract it in your PunBB's extensions folder, then access administration and launch install.

Upgrade:
Replace content of ek_countdown folder (in extensions) with the one of the last version's zip, then launch upgrade in administration.


Use:
Simply put the following code in the announcement:

<span class="ek_countdown">01/01/2009 00:00 UTC</span>

It will be replaced by a countdown to the specified date.

Advanced:
You can pass additional parameters in the title attribute of the span:

<span class="ek_countdown" title="refresh:s|txtWhile: in #{cd}|date:12/29/2008 04:00 UTC">the 29th December !</span>

Available parameters are (bold is the default value):

  • refresh:m or s
    If the countdown is refreshed every second or minute.

  • txtWhile:#{cd}
    The text used while the countdown run, #{cd} is replaced by the value.

  • txtAfter:
    The text used once the date is passed, by default the span content is displayed.

  • date:
    If specified the date given is used rather than the span's content



Notes:
Without javascript enabled the visitors will see span's content.

Licensed under GPL.


HowTo...
...translate
Copy ek_countdown/media/js/lang/English.js and name it according to the language you want. Then open it in a text editor and replace the sentences on right by the translated ones.
If your text contains single quotes ( ' ) or backslashes ( \ ) you must add an additional backslash before ( \' or \\ ).
Feel free to send me your work at nk.punbb at eikylon.net (include your name and website/email for credits).


Old versions:
Countdown 0.2.0

New version:
minor change for compatibility with other extensions using prototype.

@esupergood: tell them its not supported anymore tongue

I guess one after the foreach() loop in bar.php would do the trick big_smile

Sharing some thought to other extension developers...

<hook id="hd_head"><![CDATA[
    $forum_head['ex1_prototype'] = '<script type="text/javascript" src="'.$ext_info['url'].'/media/js/prototype.js"></script>';
]]></hook>
-------
<hook id="hd_head"><![CDATA[
    $forum_head['ex2_prototype'] = '<script type="text/javascript" src="'.$ext_info['url'].'/media/js/prototype.js"></script>';
]]></hook>

I've come across a problem while developing an extension: what if both of them require prototype (javascript framework). Adding it twice is not only a waste, but would most likely provokes bunch of bugs, I could separate it as a third extension that others would require to run, but this is bothersome for users.
Looking at how js files are added to the header I finally found a satisfying work around.


<hook id="hd_head"><![CDATA[
    $forum_head['prototypejs'] = '<script type="text/javascript" src="'.$ext_info['url'].'/media/js/prototype.js"></script>';
]]></hook>
-------
<hook id="hd_head"><![CDATA[
    $forum_head['prototypejs'] = '<script type="text/javascript" src="'.$ext_info['url'].'/media/js/prototype.js"></script>';
]]></hook>

First we need to choose a single name for prototype across all extensions, I took "prototypejs".
This way, no matter how many extensions add it, only one file will be loaded because the last extension will override previous value for the "prototypejs" key.


<hook id="hd_head"><![CDATA[
    $forum_head['prototypejs'] = '<script type="text/javascript" src="'.$ext_info['url'].'/media/js/prototype.js"></script>';
]]></hook>
-------
<hook id="hd_head"><![CDATA[
if(FORUM_PAGE === 'index') {
    $forum_head['prototypejs'] = '<script type="text/javascript" src="'.$ext_info['url'].'/media/js/prototype.js"></script>';
}
]]></hook>

One problem remains, let's imagine 2 extensions, one run only on index and the other applies on each page. The index one is parsed last. We would have 2 different files loaded depending on the page. This is a waste of time, bandwidth and cache.


<hook id="hd_head"><![CDATA[
    $forum_head['prototypejs'] = '<script type="text/javascript" src="'.$ext_info['url'].'/media/js/prototype.js"></script>';
]]></hook>
-------
<hook id="hd_head"><![CDATA[
if(FORUM_PAGE === 'index') {
    if(!isset($forum_head['prototypejs'])) { $forum_head['prototypejs'] = '<script type="text/javascript" src="'.$ext_info['url'].'/media/js/prototype.js"></script>';}
}
]]></hook>
-------
<hook id="hd_head" priority="4"><![CDATA[
if(FORUM_PAGE === 'index') {
    $forum_head['prototypejs'] = '<script type="text/javascript" src="'.$ext_info['url'].'/media/js/prototype.js"></script>';
}
]]></hook>

There's two way to solve this, either up the priority of the index's extension so it runs first, either add a condition to not override already existing prototypejs key.


That's all, hope it may be helpful to someone. It can applies to lot of things you wish to include only once across many extensions wink

11

(41 replies, posted in PunBB 1.3 extensions)

New version:
includes help.php addition
upgrade compatibility to punbb 1.3.2.


@Mogger: no, the pun_bbcode extension's design does not allow such modification to be done automatically.

12

(19 replies, posted in PunBB 1.3 extensions)

Some thoughts:
-If a user edit a poll it should be wrote somewhere on it to avoid any confusion (just like the last edited on messages).
-If a user only change a question then results shouldn't be flushed or it should be an option (I'm assuming most edits will be for typos).
-If a user adds/removes questions then the results should be automatically flushed, someone may find the new choice more accurate and wish to change his vote. In such a case a notice should be available in thread's title to let ppl who already read the subject that poll has been reset.
-Not a fan of the idea that you must ask the administrator for a "normal behaviour".

New version:
-Fixed <h2> css for FF3
-Fixed timestamps leading zeros
-Added message deletion for admins and moderators
-and some code improvements

This is probably the last version adding features for now. It achieves a nice balance between light extension and needed/helpful options imho.


PS: added some HowTo to the first page.



@anggiawan: you got it big_smile

@dera: to solve your problem in this new version change the following before installing

ek_chatlite/data/.htaccess
  2  <Files chat.php>

ek_chatlite/manifest.xml
 61  $chatFile = $ext_info['path'].'/data/chat.php';

ek_chatlite/media/js/chat.js
 77  this.pe = new this.refresher(this.param['exturi']+'data/chat.php', {

This is probably some Apache configuration so found in httpd.conf.

Since your server doesnt deny POST method for .php file you might try to rename chat.dat in chat.php to solve the problem.
Here's where you need to change it (number = the line):

ek_chatlite/data/.htaccess
  2  <Files chat.php>

ek_chatlite/manifest.xml
 81  $content = file_get_contents($ext_info['path'].'/data/chat.php');
110  file_put_contents($ext_info['path'].'/data/chat.php', $content);
119  $content = file_get_contents($ext_info['path'].'/data/chat.dat');

ek_chatlite/media/js/chat.js
 76  this.pe = new this.refresher(this.param['exturi']+'data/chat.php', {

Do this while extension is uninstalled and process install after.

Your server doesn't permit POST access to the chat.dat file.

You might try to put the following code in ek_chatlite/data/.htaccess

<LimitExcept POST>
  Order Deny,Allow
  Allow from all
</LimitExcept>

Not sure if it will be enough, dont know your server config.

New version out. Been efficient over weekend for once big_smile
Includes:
-Timestamps (date of messages)
-Lang support
-Security Token removed (allow you to post even after a long time on index, this only applies for chat input and not entire forum of course !)
-General code improvements

Hope you will like it, done lot of tests on my side, sorry if there is any bug left. Please note that there's now a php version limitation due to several new functions I used.


@lupus6x9: Thanks ! Technically the extension rely on forum only to know user's name and language, so it can easily be separated and run as standalone if you manage those 2 points differently.
I just made a time consuming update and wont do that right now, especially since I don't need it personally. However code's licence is free and you can do it yourself if you dont want to wait wink

@teva: Adding time is is a lot more tricky than it seems, mainly because each user can have its own timezone. However many ppl requested it so I might try to get something working later.

@SkyLine: try to access "<yourforum>/extensions/ek_chatlite/data/chat.dat" (replace <yourforum> by your actual forum base url, for example http://punbb.informer.com/forums ).
If you see the chat's content please send me pm with your forum link, if you dont check that the file exists and is readable from the web.

18

(41 replies, posted in PunBB 1.3 extensions)

Updated it:
-inclued function in manifest.
-added support for google video.
-changed licence for GPL.

Thanks teva for the link, here's new version that should solve this problem smile

Can you send me a link by pm, I cant reproduce this on my side ?

21

(41 replies, posted in PunBB 1.3 extensions)

parpalak wrote:

I think you could place the function inside the hook instead of including a file
require($ext_info['path'].'/handle_video_tag.php');
By the way, a extension can't be released under a GPL-incompatible license since the forum is under GPL. Creative Commons is incompatible.

Well... I prefer to have a separate file, dont think it matters big_smile

About licensing, its not that simple. From what I read it depends how you consider the extension. In this case it is strongly bound to PunBB's functionality and wouldnt work without them, so might change license in next release (altho I dont think there's much diff between cc-by and gpl).
For my chat extension, the chat could run completely out of PunBB (what it was doing originally tongue) so it can be considered as a separate (javascript) application.
see GPL faq

1) No it cant be moved to its own page, at least not yet.

2) It should refresh automatically, every 2.5s. But it doesnt reload the page or anything, are you sure someone posted a message meanwhile ?

VideoTag extension for PunBB 1.3
This extension adds BBcode tag ([video]) to display videos from various provider.


VideoTag 0.2.0


Installation:
Download the zip and extract it in your PunBB's extensions folder, then access administration and launch install.

Upgrade:
Replace content of ek_videotag folder (in extensions) with the one of the last version's zip, then launch upgrade in administration.


Features:

  • All you need to to is to past the URI of a video, see example below.

  • Currently supports: youtube, dailymotion, vimeo, google video.
    I might add support for more services, ask for them and give me links.

  • Works with or without auto-link feature. If its turned on you will see url tags inside video tags this is normal I cant do nothing about it at the moment.

Example of use:

[video]http://www.youtube.com/watch?v=3aqO07MqLiE[/video]

Notes:
If a specific video isn't working while the extension in general is, please provide the link you used when reporting.

It would be great if the PunBB team could make auto-link a bit more accurate and/or customizable, I had to use dirty trick to support it. wink

Licensed under GPL.


Old versions:
VideoTag 0.1.1
VideoTag 0.1.0

@GHOwner: Thanks!
For the 33% width, that's most likely a css problem, feel free to mess arround in media/css/default.css if you got some knowledge about it. Works fine for me on IE6, IE7 and FF with default theme.

@teva: that's weird, file_put_contents is a standard PHP5 function.
I see 2 possible reasons: either your host disabled this function either you're running PHP4.
Anyway you can replicate this function's behaviour with:

function file_put_contents($n, $d) {
  if(($f = fopen($n, 'wb')) === false) {
    return false;
  }

  if (is_array($d)) $d = implode($d);
  fwrite($f, $d);
  fclose($f);
  return;
}

Simply past this code at the end of include/function.php.

Note that if you're still running PHP4, I strongly advise you to change to 5 (or ask your host to do so). Support for it has been completely stopped this year (including security) Source.

Found the problem, it was an Internet Explorer bug.
Changed the code a bit to avoid it, should work now.

See new version on first message.

@GHOwner: side note: the extension wont appear down there, I dont really care about it being listed on bottom big_smile