1

(22 replies, posted in PunBB 1.3 extensions)

Bugs in PunGeSHi extension have been fixed HERE

Bugs in Video_player extension have been fixed HERE

Thank you for trying.

2

(5 replies, posted in PunBB 1.3 extensions)

Ok. (I think i understand what you want to say but i'm going to search the meaning of "unbuffered query" in french wink ).
Thank you

3

(5 replies, posted in PunBB 1.3 extensions)

Ok. I tried to delete the "verification" query and it works perfectly now. Thank you very much for your help but i want to understand something: I had put the same code in the hook po_topic_review_row_pre_display (before) and it worked even when I put the query in the loop. Do you know why?

Hi.
I've developped an extension here but there is a bug which has been reported to me that i don't know what to do.
The extension uses GeSHi to highlight a source code form a post when users put it between the bbcode tag [Code:<language code>] and [/Code].
The bug appears when there is more than 1 posts in a topic: the first post is displayed (in viewtopic.php) but not the others. And we can see that there is more than 1 post in the topic because we see the number of posts in the topic in the first post.
I don't understand english very well so i'll post the code in my manifest.xml file here for who wants to help me:

<?xml version="1.0" encoding="utf-8"?>

<extension engine="1.0">
  <id>pungeshi</id>
  <title>PunGeSHi (GeSHi for Punbb 1.3)</title>
  <version>0.96</version>
  <description>DESCRIPTION OF THE EXTENSION</description>
  <author> ME</author>
  <minversion>1.3 Beta</minversion>
  <maxtestedon>1.3 Beta</maxtestedon>

  <note type="install"> NOTES </note>

  <install><![CDATA[
  
    // ONLY FOR A SIMPLE VERIFICATION, I PUT THE PARAMETER o_pungeshi IN THE TABLE config
    $rslt = $db->query('SELECT conf_value FROM '.$db->prefix."config WHERE conf_name='o_pungeshi' ") or error(__FILE__, __LINE__);
    if(!$db->fetch_assoc($rslt)) 
        $db->query('INSERT INTO '.$db->prefix."config VALUES('o_pungeshi', '1')");
    else
        $notices[] = 'Le parametre o_pungeshi existe déjà dans la table "'.$db->prefix.'config" de cette base de donnée. Cette extension pourrait ne pas fonctionner correctement.';
  ]]></install>

  <uninstall><![CDATA[
  
    // TO UNINSTALL THE EXTENSION, I REMOVE THE PARAMETER o_pungeshi FROM THE DATABASE
    $rslt = $db->query('SELECT conf_value FROM '.$db->prefix."config WHERE conf_name='o_pungeshi' ") or error(__FILE__, __LINE__);
    if($db->fetch_assoc($rslt)) 
        $db->query('DELETE FROM '.$db->prefix."config WHERE conf_name='o_pungeshi' LIMIT 1");
  ]]></uninstall>

  <hooks>
  
      // THE FIRST "hook" THAT I EXPLOIT IS IN viewtopic.php, JUST BEFORE POSTS ARE DISPLAYED (IN THE "while" LOOP)
    <hook id="vt_row_pre_display"><![CDATA[
    
    // A SMALL TEST...
    $rslt = $db->query('SELECT conf_value FROM '.$db->prefix."config WHERE conf_name='o_pungeshi' ") or error(__FILE__, __LINE__);
    if(!$db->fetch_assoc($rslt))
        exit;
    if (!defined('PUN_ROOT'))
        define('PUN_ROOT', './');
        
    // WE LOAD geshi LIBRARY
    require_once PUN_ROOT.'extensions/pungeshi/geshi/geshi.php';
    
    // HERE WE REPLACE ALL POSTS WHICH CONTAIN THE BBCODE TAG WITH THE HIGHLIGHTED CODE
    if(isset($cur_post['message'])) {
            
        // That's the baby 
        preg_match("#\[Code:([a-zA-Z0-9_-]*)\](.*)\[/Code\]#sU", $cur_post['message'], $infos);
        if(isset($infos['1']) && isset($infos['2']) && isset($pun_page['message'])) {
            $geshi_code =& new GeSHi($infos['2'], $infos['1']);
            $geshi_code->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
            $highlight_code = '<div class="codebox"><strong>Code: '.strtoupper($infos['1']).'</strong><br />'.$geshi_code->parse_code().'</div>';
            $pun_page['message'] = preg_replace('#\[Code:([a-zA-Z0-9_-]*)\](.*)\[/Code\]#sU', $highlight_code, $pun_page['message']);
        }
    }
    ]]></hook>
    
    // THE SECOND "hook" THAT I EXPLOIT IS post.php, JUST BEFORE POSTS ARE DISPLAYED (IN THE "while" LOOP) FOR PREVIEW
    
    // I USE EXACTLY THE SAME CODE BUT I DON'T UNDERSTAND WHY IT DOESN'T WORK IN viewtopic.php AND HERE IT WORKS
    
    <hook id="po_topic_review_row_pre_display"><![CDATA[
    $rslt2 = $db->query('SELECT conf_value FROM '.$db->prefix."config WHERE conf_name='o_pungeshi' ") or error(__FILE__, __LINE__);
    if(!$db->fetch_assoc($rslt2))
        exit;
    if (!defined('PUN_ROOT'))
        define('PUN_ROOT', './');
    require_once PUN_ROOT.'extensions/pungeshi/geshi/geshi.php';
    
    if(isset($cur_post['message'])) {
        
        // Run it again
        preg_match("#\[Code:([a-zA-Z0-9_-]*)\](.*)\[/Code\]#sU", $cur_post['message'], $infos2);
        if(isset($infos2['1']) && isset($infos2['2']) && isset($pun_page['message'])) {
            $geshi_code2 =& new GeSHi($infos2['2'], $infos2['1']);
            $geshi_code2->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
            $highlight_code2 = '<div class="codebox"><strong>Code: '.strtoupper($infos2['1']).'</strong><br />'.$geshi_code2->parse_code().'</div>';
            $pun_page['message'] = preg_replace('#\[Code:([a-zA-Z0-9_-]*)\](.*)\[/Code\]#sU', $highlight_code2, $pun_page['message']);
        }
    }
    ]]></hook>
  </hooks>
</extension>

5

(22 replies, posted in PunBB 1.3 extensions)

Sorry but in France we don't know all these "platforms" (:)). But i need you to identify all the platforms you want and i'll put them on the next release(s). For the moment I'm working on a system of toolbar.
For youtube i think that they have updated their player. I'll resolve the problem soon.
Thanks

6

(22 replies, posted in PunBB 1.3 extensions)

metacafe ????

7

(22 replies, posted in PunBB 1.3 extensions)

I'm not especially "strong" in javascript but i think i can do this also. Wait for the next releases...

EDIT: Some testers have told me that there is some bugs in the extension PunGeSHi. For them, it seems like the extension is in conflict with some other extensions. Please, can you report any bug found?

8

(22 replies, posted in PunBB 1.3 extensions)

SuperMAG wrote:

and make the next release in punres so the files dosent get lost later

Heu.... Why?

EDIT: ok!

9

(22 replies, posted in PunBB 1.3 extensions)

kierownik wrote:

the pungeshi looks nice but he does not work in you preview your post first hmm

But when you post your message it works?
For the preview, i'm working on it.

You must understand that i "parse" the message without any hooks in parser.php (because it's the old version of 1.2.x) and i "play" with hooks which are in viewtopic.php and post.php.
So, it's (a little) difficult to parse correctly the message.

But in the next release i think i will be able to fix it.

10

(22 replies, posted in PunBB 1.3 extensions)

Ok i understand.
They will be in the next release.

11

(22 replies, posted in PunBB 1.3 extensions)

smile

Hi.
I've made 2 small extensions: Video Player and PunGeSHi.

The first makes it possible to the users to put flash (or divx) videos in their messages. it uses dailymotion, youtube, google video and stage6's video players. They can personnalize the size of the player with 2 variables called "largeur" and "hauteur".
Syntax:
Default: [video]URL of the video at dailymotion, youtube, google video or stage6[/video]
Personnalized size: [video largeur=540 hauteur=499]URL of the video at dailymotion, youtube, google video or stage6[/video]

Dowload Video Player 1.0 extension for punbb 1.3 beta

Screenshots:
http://img215.imageshack.us/img215/531/modvideocx2.th.png


The second extension provides for the integration of GeSHi (Generic Syntax Highlighter) in punbb. I think it could be useful for forums talking about programming.
Syntax:
[Code:<the code of the language>] your code here [/Code]
Language codes are in the package (in the file lisez_moi.txt).
Example: For php
[Code:php]$var = "Vive punbb !"; echo $var;[/Code]

Dowload PunGeSHi 0.96 extension for punbb 1.3 beta

Screenshots:
http://img510.imageshack.us/img510/8014/verif1jn3.th.png


PS: i'm sorry but i don't speak english. So please excuse me for spelling's mistakes. The file lisez_moi.txt is also in french but i think that you will understand it. (thks to google smile )