[size="4"]pncBBCode Parser[/size]
pncBBCode Parser


Les modules mis en templates et inclus dans la version 0.760-1 et tirés de la branche 0.8 du CVS sont les suivants :

<h1>h1</h1>

h1


<h2>h2</h2>

h2


<h3>h3</h3>

h3


<h4>h4</h4>

h4


<h5>h5</h5>
h5


<ul title="ul list" style="list-style-type:circle;"><li>Admin</li><li>Admin Messages</li><li>Autolinks</li><li>Typetool</li><li>Xanthia</li></ul>

<ol title="ol list"><li>Admin</li><li>Admin Messages</li><li>Autolinks</li><li>Typetool</li><li>Xanthia</li></ol>
  1. Admin
  2. Admin Messages
  3. Autolinks
  4. Typetool
  5. Xanthia


[ul style="list-style-type:square;"][*]Admin[*]Admin Messages[*]Autolinks[*]Typetool[*]Xanthia[/ul]

[ol][*]Admin[*]Admin Messages[*]Autolinks[*]Typetool[*]Xanthia[/ol]
  1. Admin
  2. Admin Messages
  3. Autolinks
  4. Typetool
  5. Xanthia


[size=4]Six projets principaux pour le développement de PostNuke[/size]

Six projets principaux pour le développement de PostNuke

Nous avons identifié six sous-projets vitaux pour la future version .8.
Ces sous-projets couvrent un large éventail de fonctionnalités et sont tous à différents stades de leur cheminement. Les six projets (sans ordre particulier) sont les suivants:

[u][/u] Nous avons identifié six sous-projets vitaux pour la future version .8.

[i][/i] Nous avons identifié six sous-projets vitaux pour la future version .8.

[color="red"][/color]
Nous avons identifié six sous-projets vitaux pour la future version .8.

[email title="Mail Me !"]email here[/email] (Bot proof)
webmaster [at] pnconcept [dot] com

[url href="bbcode.php" title="This is a link"]This is a link[/url]
This is a link

[url href="http://dev.pnconcept.com/bbcode.php" title="This is an External link"]This is an External link[/url]
This is an External link


Big Link : http://landseer.selfhost.de/761/ind...c=display&fid=1


[img src="http://www.postnuke-france.org/images/chestnut.gif" alt="logo" style="vertical-align:middle;"][/img]
logo


[quote]...[/quote]
Quote:
Cet article contient aussi quelques informations sur certaines nouveautés qui seront introduites dans la version .8.


[quote="test"]...[/quote]
test wrote:
Cet article contient aussi quelques informations sur certaines nouveautés qui seront introduites dans la version .8.

(Voir la fin de l'article mentionnant le EZComments et la gestion d'erreur).

Cet article contient aussi quelques informations sur certaines nouveautés qui seront introduites dans la version .8. (Voir la fin de l'article mentionnant le EZComments et la gestion d'erreur).

Cet article contient aussi quelques informations sur certaines nouveautés qui seront introduites dans la version .8.
(Voir la fin de l'article mentionnant le EZComments et la gestion d'erreur).


notag tag is preventing bbcode tag to be parse inside [notag][/notag]

[code]...[/code]
Code: [download] [hide]
  1. // Sélectionner un objet par son identifiant 
  2. $myObj =& DBUtil::selectObjectByID (<pntable_key>, $id); 


[code filename="testcode.php"]...[/code]
Code: (testcode.php) [download] [hide]
  1. // Sélectionner un objet par son identifiant 
  2. $myObj =& DBUtil::selectObjectByID (<pntable_key>, $id); 
  3.  
  4. // Sélectionner un(des) objet(s) (avec critère) 
  5. $myObj =& DBUtil::selectObject (<pntable_key>, $where); 
  6.  
  7. // Sélectionner les objets (avec critère et ordre) 
  8. $myObjArray =& DBUtil::selectObjectArray (<pntable_key>, $where, $sort); 
  9.  
  10. // Insérer un objet 
  11. DBUtil::insertObject ($myObj, <pntable_key>); 
  12.  
  13. // Modifier un objet 
  14. DBUtil::updateObject ($myObj, <pntable_key>); 


To highlight a specific line, enclose it between [highlight]line of code here[/highlight]
Code: (testcode2.php) [download] [hide]
  1. // Sélectionner un objet par son identifiant 
  2. $myObj =& DBUtil::selectObjectByID (<pntable_key>, $id); 


You can highlight lines by using the highlight parameter, [code highlight="2,4-7"]Code here...[/code] Line 2 and line 4 to 7 will be highlighted
Code: [download] [hide]
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> 
  3. <head> 
  4.   <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> 
  5.   <meta name="description" content="PostNuke Design and Custom Work" /> 
  6.   <link rel="stylesheet" href="bbcode/style.css" type="text/css" /> 
  7.   <title>pnConcept :: PostNuke Design and Custom Work</title> 
  8.  
  9.   <script type="text/javascript" src="bbcode/bbcode.js"></script> 
  10. </head> 
  11.  
  12. <body> 
  13. <div> 
  14. <table> 
  15.   <tr> 
  16.     <td>xxx</td> 
  17.   </tr> 
  18. </table> 
  19. <br /><br /><br /> 


Code for below: [code filename="News.php" highlight="11,13-26"]....[/code]

Code: (News.php) [download] [hide]
  1. <?php 
  2.  
  3. /************************************************************************ 
  4.  * pnForum - The Post-Nuke Module                                       * 
  5.  * ==============================                                       * 
  6.  *                                                                      * 
  7.  * Copyright (c) 2001-2004 by the pnForum Module Development Team       * 
  8.  * http://www.pnforum.de/                                               * 
  9.  *                                                                      * 
  10.  ************************************************************************ 
  11.  * License                                                              * 
  12.  ************************************************************************ 
  13.  * This program is free software; you can redistribute it and/or modify * 
  14.  * it under the terms of the GNU General Public License as published by * 
  15.  * the Free Software Foundation; either version 2 of the License, or    * 
  16.  * (at your option) any later version.                                  * 
  17.  *                                                                      * 
  18.  * This program is distributed in the hope that it will be useful,      * 
  19.  * but WITHOUT ANY WARRANTY; without even the implied warranty of       * 
  20.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        * 
  21.  * GNU General Public License for more details.                         * 
  22.  *                                                                      * 
  23.  * You should have received a copy of the GNU General Public License    * 
  24.  * along with this program; if not, write to the Free Software          * 
  25.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 * 
  26.  * USA                                                                  * 
  27.  ************************************************************************ 
  28.  * 
  29.  * @version $Id: News.php,v 1.1 2005/11/05 13:00:47 landseer Exp $ 
  30.  * @author Frank Schummertz, Franky Chestnut 
  31.  * @copyright 2005 by Frank Schummertz, Franky Chestnut 
  32.  * @package pnForum 
  33.  * @license GPL <http://www.gnu.org/licenses/gpl.html> 
  34.  * @link http://www.pnforum.de 
  35.  * 
  36.  ***********************************************************************/ 
  37.  
  38. include_once 'modules/pnForum/common.php'; 
  39. /* 
  40.  * param: objectid 
  41.  */ 
  42.  
  43. function pnForum_commentsapi_News($args) 
  44.     extract($args); 
  45.     unset($args); 
  46.  
  47.     list($dbconn, $pntable) = pnfOpenDB(); 
  48.  
  49.     $pnstoriestable  = $pntable['stories']; 
  50.     $pnstoriescolumn = $pntable['stories_column']; 
  51.     $pntopicstable   = $pntable['topics']; 
  52.     $pntopicscolumn  = $pntable['topics_column']; 
  53.  
  54.     $sql = "SELECT $pnstoriescolumn[bodytext], 
  55.                    $pnstoriescolumn[hometext], 
  56.                    $pnstoriescolumn[notes], 
  57.                    $pnstoriescolumn[title], 
  58.                    $pnstoriescolumn[topic], 
  59.                    $pnstoriescolumn[aid], 
  60.                    $pnstoriescolumn[format_type], 
  61.                    $pntopicscolumn[topicname] 
  62.             FROM   $pnstoriestable 
  63.             LEFT JOIN $pntopicstable ON $pnstoriescolumn[topic]=$pntopicscolumn[topicid] 
  64.             WHERE $pnstoriescolumn[sid] ='" . pnVarPrepForStore($objectid) . "'"; 
  65.     $result = pnfExecuteSQL($dbconn, $sql, __FILE__, __LINE__); 
  66.     //echo $sql; 
  67.     //exit; 
  68.  
  69.     if(!$result->EOF) { 
  70.         list($bodytext, 
  71.              $hometext, 
  72.              $notes, 
  73.              $title, 
  74.              $topic, 
  75.              $authorid, 
  76.              $format_type, 
  77.              $topicname) = $result->fields; 
  78.         pnfCloseDB($result); 
  79.     } else { 
  80.         return false; 
  81.     } 
  82.  
  83.     // workaround for bug in AddStories html fixed on 11-05-2005 
  84.     $authorid = (int)$authorid; 
  85.  
  86.     $link  = pnGetBaseURL() . 'index.php?name=News&file=article&sid=' . $objectid; 
  87.     $title = ($topicname<>'' ? $topicname.' - '.$title : $title); 
  88.  
  89.     if(pnModIsHooked('pn_bbcode', 'pnForum')) { 
  90.         $notes = '[i]' . $notes . '[/i]'; 
  91.         $link  = '[url=' . $link . ']' . _PNFORUM_BACKTOSUBMISSION . '[/url]'; 
  92.     } 
  93.  
  94.     $totaltext = $hometext . "\n\n" . br2nl($bodytext) . "\n\n" . $notes . "\n\n" . $link . "\n\n"; 
  95.  
  96.     return array($title, $totaltext , $topic, $authorid); 
  97.  
  98. if (!function_exists('br2nl')) { 
  99.     function br2nl($str) { 
  100.         $str = preg_replace("/(\r\n|\n|\r)/", "", $str); 
  101.         return preg_replace("=<br */?>=i", "\n", $str); 
  102.     } 
  103.  
  104. ?>