Archives FluxBB.fr

Les archives de FluxBB.fr

Vous n'êtes pas identifié(e).

#326 09-12-2007 19:19:51

macapus
Membre

Re : PunToolBar 1.5

pleure 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

#327 09-12-2007 22:03:19

bingiman
Membre

Re : PunToolBar 1.5

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

#328 10-12-2007 20:12:32

yemgi
Expatrié

Re : PunToolBar 1.5

You will need to edit
/js/toolbar.js
/include/cache_puntoolbar.php
/include/parser.php

Hors ligne

#329 10-12-2007 22:11:03

bingiman
Membre

Re : PunToolBar 1.5

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

#330 11-12-2007 00:57:45

yemgi
Expatrié

Re : PunToolBar 1.5

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

#331 11-12-2007 02:35:06

bingiman
Membre

Re : PunToolBar 1.5

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

#332 12-12-2007 03:27:14

bingiman
Membre

Re : PunToolBar 1.5

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. smile

Thank you
Shedrock

Hors ligne

#333 12-12-2007 05:11:34

Mpok
Néo Admin

Re : PunToolBar 1.5

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

#334 12-12-2007 05:39:55

bingiman
Membre

Re : PunToolBar 1.5

This code shown in the image here:

example.gif
[code= php]code here[ / code] and this is the mod here:


http://www.punres.org/files.php?pid=48

Thanks

Hors ligne

#335 14-12-2007 00:11:56

bingiman
Membre

Re : PunToolBar 1.5

Can someone please help me with this?:)

Hors ligne

#336 15-12-2007 17:15:52

bingiman
Membre

Re : PunToolBar 1.5

*bump*

Hors ligne

#337 15-12-2007 17:39:50

Trauma
Membre

Re : PunToolBar 1.5

il existe pr puntoolbar, un pack d icones plus adapté pr les fonds sombres ?

Hors ligne

#338 15-12-2007 17:51:03

yemgi
Expatrié

Re : PunToolBar 1.5

Trauma a écrit :

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

#339 15-12-2007 17:56:28

Trauma
Membre

Re : PunToolBar 1.5

j ai essayé les 3, et ça rend vraiement pas top sur un fond sombre ...

Hors ligne

#340 15-12-2007 18:02:29

yemgi
Expatrié

Re : PunToolBar 1.5

bingiman a écrit :

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

#341 15-12-2007 18:03:20

yemgi
Expatrié

Re : PunToolBar 1.5

Trauma a écrit :

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

#342 15-12-2007 18:28:43

Versace 69
Membre

Re : PunToolBar 1.5

Trauma a écrit :

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

#343 15-12-2007 19:54:20

M@x
Membre

Re : PunToolBar 1.5

Trauma a écrit :

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

#344 15-12-2007 20:47:45

Thomas7441
Membre

Re : PunToolBar 1.5

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 wink
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

#345 15-12-2007 21:15:12

Thomas7441
Membre

Re : PunToolBar 1.5

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  yikes 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

#346 15-12-2007 23:06:58

bingiman
Membre

Re : PunToolBar 1.5

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. sad

Hors ligne

#347 15-12-2007 23:22:21

bingiman
Membre

Re : PunToolBar 1.5

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

#348 15-12-2007 23:27:04

Versace 69
Membre

Re : PunToolBar 1.5

@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

#350 15-12-2007 23:44:27

falconflyz
Membre

Re : PunToolBar 1.5

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.
smile

Dernière modification par falconflyz (15-12-2007 23:47:29)

Hors ligne

Pied de page des forums