Les archives de FluxBB.fr
Vous n'êtes pas identifié(e).
euh, ça marche...
c'est juste que je n'avais pas compris le système.
J pensais que ça marchait directement.
Je ne les avais pas associé à un mot...
Pardon.
je ferais dix pompes.
Hors ligne
I don't speak french so I am not sure I am in the right forum.
Anyway, I woul djust like to find out if there is a way I can add to puntoolbar:
An image named: php and have it insert the following: [code=php]code here[/ code]
I am using phpMultiSyn-PunBB-1.1.5 and I need this feature. I tried to convert this one: Inline code: [c]text[/c] to use it but I can' t find this in parser.
Hope someone can help me here.
Thanks
Shedrock
Hors ligne
You will need to edit
/js/toolbar.js
/include/cache_puntoolbar.php
/include/parser.php
Hors ligne
I looked inside there but I can't find anything. What I would I would like is to have it as an option as well in the plugin. You see I am the creator of Mega Pun and Geshi code is already in the functions file. My old easy bbcode mod was simple to add it in there but with the puntoolbar mod I find it difficult to do. Can you help me with this?
Thanks
Shedrock
Hors ligne
if you want it as an option in the plugin, you will need to edit /plugins/AP_puntoolbar.php to add a new field in the form and create a new value in the config database o_ptb_php as an exemple
Hors ligne
I tried all of that but I just can't get it. I've been trying all weekend. All I want to be able to do is this. I want to use the [c]...[ /c] option to produce the [code=php]...[ /code] instead but I also tried that and can't get it. Can you please tell me what I need to change in the files?
Thanks
Shedrock
Hors ligne
Can someone please help me out here. All I am asking is that you show me what code to add and which files to add it to. Please. 
Thank you
Shedrock
Hors ligne
hey @bingiman : what's ur level in js and php ?
I mean, it will be difficult for us to make ALL the coding for you...
PunToolBar coding is not very easy to understand at first, even for experienced programmers, so it's rather normal u had pbms in modifying it.
First clue : trying to change the [c] behavior with a [xxx=yyy] one is NOT a good way to make things simple (which doesn't mean it's impossible..). Because the regexp used are to be slightly different in this case, and then, more modifications are required.
Actually, i didn't understand ur REAL NEED.
Please provide an example of what u want to be done.. (even screenshots or, better, link to)
..and maybe we can find a way to make it.
Note : si cette discussion en anglais se prolonge, je créerai un topic spécifique à ce cas, afin de ne pas polluer le topic original.. / if this english discussion continues, i will create a specific topic in order to not interfer with original french one..
Hors ligne
This code shown in the image here:

[code= php]code here[ / code] and this is the mod here:
http://www.punres.org/files.php?pid=48
Thanks
Hors ligne
Can someone please help me with this?:)
Hors ligne
*bump*
Hors ligne
il existe pr puntoolbar, un pack d icones plus adapté pr les fonds sombres ?
Hors ligne
il existe pr puntoolbar, un pack d icones plus adapté pr les fonds sombres ?
il y a 3 packs inclus dans la punttolbar, il doit y en avoir un adapté
Hors ligne
j ai essayé les 3, et ça rend vraiement pas top sur un fond sombre ...
Hors ligne
This code shown in the image here:
http://shedrockonline.com/filedump/example.gif
[code= php]code here[ / code] and this is the mod here:http://www.punres.org/files.php?pid=48
Thanks
Ok, I managed to get it working on my test forum.
Here is what I did:
1- Install Puntoolbar
2- Install the phpMultiSyn using these steps instead of 5 and 6:
#
#---------[ 5. FIND ]---------------------------------------------
#
//
// Parse message text
//
function parse_message($text, $hide_smilies)
#
#---------[ 6. INSERT BEFORE ]-------------------------------------------------
#
//
// Parse part code text
//
function parse_code($codename, $code)
{
global $pun_config, $lang_common, $pun_user;
include(PUN_ROOT.'syn/index.php');
if (!empty($codename))
$codename= $lang_common['Code'].': '.$codename;
else
$codename= $lang_common['Code'].':';
$num_lines = ((substr_count($code, "\n")) + 3) * 1.5;
$height_str = ($num_lines > 35) ? '35em' : $num_lines.'em';
//syn: i added dir="ltr" to <pre dir="ltr"> code is always rtl
if ($syn_engine == SYN_GESHI) //fix the geshi add breaks to lines and change <pre to <div
return '</p><div class="codebox"><div class="incqbox"><h4>'.$codename.'</h4><div><div style="font-family: \'Courier New\';font-size:10pt" dir="ltr">'.$code.'</div></div></div></div><p>';
else if ($syn_noscroll) //syn: if you want to use Courier New font without scrollbars
return '</p><div class="codebox"><div class="incqbox"><h4>'.$codename.'</h4><div><pre style="font-family: \'Courier New\';font-size:10pt" dir="ltr">'.$code.'</pre></div></div></div><p>';
else
return '</p><div class="codebox"><div class="incqbox"><h4>'.$codename.'</h4><div class="scrollbox" style="height: '.$height_str.'"><pre dir="ltr">'.$code.'</pre></div></div></div><p>';
}
#
#---------[ 7. FIND ]---------------------------------------------
#
function parse_message($text, $hide_smilies)
#
#---------[ 8. REPLACE BY ]-------------------------------------------------
#
function parse_part($text, $hide_smilies)
#
#---------[ 9. FIND ]---------------------------------------------
#
//
// Parse signature text
//
function parse_signature($text)
#
#---------[ 10. INSERT BEFORE ]-------------------------------------------------
#
//
// Parse message text
//
function parse_message($text, $hide_smilies)
{
global $pun_config, $lang_common, $pun_user;
//spilt a message to parts of (text,codename,code, empty) etc...
$parts = preg_split('#\n?\[\/?code=?(.*?)\]\n?#is', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
$codename = '';
$text = '';
$idx = 0;
foreach ($parts as $value)
{
$idx++;
switch ($idx)
{
case 1:
$text .= parse_part($value, $hide_smilies);
break;
case 2:
$codename = $value;
break;
case 3:
$text .= parse_code($codename, $value);
break;
case 4:
$codename = $value;
$idx = 0;
break;
}
}
// Add paragraph tag around post, but make sure there are no empty paragraphs
$text = str_replace('<p></p>', '', '<p>'.$text.'</p>');
return $text;
}3- Follow the instructions from http://bahamutcars.com/phpMultiSyn-PunToolBar1.5.txt
Hors ligne
j ai essayé les 3, et ça rend vraiement pas top sur un fond sombre ...
la solution est de te créer tes propres boutons alors
Hors ligne
il existe pr puntoolbar, un pack d icones plus adapté pr les fonds sombres ?
Je sais pas si tu sais mais dans le pack smooth, y un fichier qui te donne un code CSS pour affichier une barre blanche (bg.png) sous les boutons...
Hors ligne
il existe pr puntoolbar, un pack d icones plus adapté pr les fonds sombres ?
Oui ça existe. Recherche sur dans ce sujet.
M@x.
...
Hors ligne
Bonsoir ! J'ai télécharger le mod PunToolBar pour avoir l'accés rapide aux balises. Jusque la tout va bien, je fais ce qu'il m'ai demandé en modifiant les fichiers et tout ! Mais au moment de regarder le résultat, ca à tout bugé et regardez par vous même :
Cliquez ici et aller voir un sujet(cliquez sur "aller ici" avant pour accédez au forum 
Allez voir dans un sujet, vous verrez le bug !
En éspérant que vous avez conpris mon bug et que vous pouvez m'aider pck c'est la cata là yikes
Dernière modification par Thomas7441 (15-12-2007 21:04:16)
Hors ligne
C'est bon ca remarche car j'ai remit les anciens fichier (fichier par défault), et re-téléchager PunToolBar. J'ai simplement changer le dossier upload avec celui fournit dans l'archive mais quand je vais sur le forum, je ne voit pas la PunToolBar ! Pourtant j'ai l'ai bien activé dans le menu Administration ! Mais on ne peut pas la voir
c'est bizard !!
Merci de m'aider les gens, ce serait cool !!
Dernière modification par Thomas7441 (15-12-2007 21:51:16)
Hors ligne
I have tried this over and over and over and it does not work. I even tested it on a new installation of punBB. I also used a clean parser.php file. No matter what I do, it doesn't' work. 
Hors ligne
Once I add this to cache_puntoolbar.php
if ($butons['php'] == 1) # php buton
$output .= "\t".'tb.btPhp(\'<?php echo str_replace("\'","\\\'",$lang_ptb[\'btPhp\']) ?>\');'."\n";then no icons are visible. If I remove it then I can see them all. I am lost.
Hors ligne
@Thomas7441
Je ne pense pas que tu es bien installé la puntoolbar car quand je regarde help.php de ton forum, il manque des choses...
Regardes le tien: http://bmx-breizh-team.fr.tc/forum/upload/help.php
Et le mien qui a la puntoolbar installée: http://2e.rep.free.fr/Forum/help.php
Tu as uploader le dossier upload ok mais as-tu fais les modifs nécessaires dans le fichier lisez_moi.txt ??
Dernière modification par Versace 69 (15-12-2007 23:27:20)
Hors ligne
bingiman : You should post your message to the english PunBB Forum 
Hors ligne
Hi bingiman
After installation you need to start "install PunToolBar" in Admin Panel.
Regards
---
EDIT :
@ Herbivor ; Je pense que PunToolBar n'est pas repris dans les forums anglais. 
Dernière modification par falconflyz (15-12-2007 23:47:29)
Hors ligne