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>
- Admin
- Admin Messages
- Autolinks
- Typetool
- Xanthia
<ol title="ol list"><li>Admin</li><li>Admin Messages</li><li>Autolinks</li><li>Typetool</li><li>Xanthia</li></ol>
- Admin
- Admin Messages
- Autolinks
- Typetool
- Xanthia
[ul style="list-style-type:square;"][*]Admin[*]Admin Messages[*]Autolinks[*]Typetool[*]Xanthia[/ul]
- Admin
- Admin Messages
- Autolinks
- Typetool
- Xanthia
[ol][*]Admin[*]Admin Messages[*]Autolinks[*]Typetool[*]Xanthia[/ol]
- Admin
- Admin Messages
- Autolinks
- Typetool
- 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]

[quote]...[/quote]
Quote:
[quote="test"]...[/quote]
test wrote:
notag tag is preventing bbcode tag to be parse inside [notag][/notag]
[code]...[/code]
- // Sélectionner un objet par son identifiant
- $myObj =& DBUtil::selectObjectByID (<pntable_key>, $id);
[code filename="testcode.php"]...[/code]
- // Sélectionner un objet par son identifiant
- $myObj =& DBUtil::selectObjectByID (<pntable_key>, $id);
- // Sélectionner un(des) objet(s) (avec critère)
- $myObj =& DBUtil::selectObject (<pntable_key>, $where);
- // Sélectionner les objets (avec critère et ordre)
- $myObjArray =& DBUtil::selectObjectArray (<pntable_key>, $where, $sort);
- // Insérer un objet
- DBUtil::insertObject ($myObj, <pntable_key>);
- // Modifier un objet
- DBUtil::updateObject ($myObj, <pntable_key>);
To highlight a specific line, enclose it between [highlight]line of code here[/highlight]
- // Sélectionner un objet par son identifiant
- $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
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
- <meta name="description" content="PostNuke Design and Custom Work" />
- <link rel="stylesheet" href="bbcode/style.css" type="text/css" />
- <title>pnConcept :: PostNuke Design and Custom Work</title>
- <script type="text/javascript" src="bbcode/bbcode.js"></script>
- </head>
- <body>
- <div>
- <table>
- <tr>
- <td>xxx</td>
- </tr>
- </table>
- <br /><br /><br />
Code for below: [code filename="News.php" highlight="11,13-26"]....[/code]
- <?php
- /************************************************************************
- * pnForum - The Post-Nuke Module *
- * ============================== *
- * *
- * Copyright (c) 2001-2004 by the pnForum Module Development Team *
- * http://www.pnforum.de/ *
- * *
- ************************************************************************
- * License *
- ************************************************************************
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the Free Software *
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
- * USA *
- ************************************************************************
- *
- * @version $Id: News.php,v 1.1 2005/11/05 13:00:47 landseer Exp $
- * @author Frank Schummertz, Franky Chestnut
- * @copyright 2005 by Frank Schummertz, Franky Chestnut
- * @package pnForum
- * @license GPL <http://www.gnu.org/licenses/gpl.html>
- * @link http://www.pnforum.de
- *
- ***********************************************************************/
- include_once 'modules/pnForum/common.php';
- /*
- * param: objectid
- */
- function pnForum_commentsapi_News($args)
- {
- extract($args);
- unset($args);
- list($dbconn, $pntable) = pnfOpenDB();
- $pnstoriestable = $pntable['stories'];
- $pnstoriescolumn = $pntable['stories_column'];
- $pntopicstable = $pntable['topics'];
- $pntopicscolumn = $pntable['topics_column'];
- $sql = "SELECT $pnstoriescolumn[bodytext],
- $pnstoriescolumn[hometext],
- $pnstoriescolumn[notes],
- $pnstoriescolumn[title],
- $pnstoriescolumn[topic],
- $pnstoriescolumn[aid],
- $pnstoriescolumn[format_type],
- $pntopicscolumn[topicname]
- FROM $pnstoriestable
- LEFT JOIN $pntopicstable ON $pnstoriescolumn[topic]=$pntopicscolumn[topicid]
- WHERE $pnstoriescolumn[sid] ='" . pnVarPrepForStore($objectid) . "'";
- $result = pnfExecuteSQL($dbconn, $sql, __FILE__, __LINE__);
- //echo $sql;
- //exit;
- if(!$result->EOF) {
- list($bodytext,
- $hometext,
- $notes,
- $title,
- $topic,
- $authorid,
- $format_type,
- $topicname) = $result->fields;
- pnfCloseDB($result);
- } else {
- return false;
- }
- // workaround for bug in AddStories html fixed on 11-05-2005
- $authorid = (int)$authorid;
- $link = pnGetBaseURL() . 'index.php?name=News&file=article&sid=' . $objectid;
- $title = ($topicname<>'' ? $topicname.' - '.$title : $title);
- if(pnModIsHooked('pn_bbcode', 'pnForum')) {
- $notes = '[i]' . $notes . '[/i]';
- $link = '[url=' . $link . ']' . _PNFORUM_BACKTOSUBMISSION . '[/url]';
- }
- $totaltext = $hometext . "\n\n" . br2nl($bodytext) . "\n\n" . $notes . "\n\n" . $link . "\n\n";
- return array($title, $totaltext , $topic, $authorid);
- }
- if (!function_exists('br2nl')) {
- function br2nl($str) {
- $str = preg_replace("/(\r\n|\n|\r)/", "", $str);
- return preg_replace("=<br */?>=i", "\n", $str);
- }
- }
- ?>