PHP-Fusion je lehký open source redakční systém (CMS) napsaný v PHP. PHP-Fusion využívá databázi MySQL na ukládání obsahu vašich stránek a obsahuje jednoduchý, ale komplexní a kompletní administrativní systém na správu vašich stránek. PHP-Fusion obsahuje nejběžnější funkce, které byste očekávali v mnoha dalších CMS systémech.
Icon Aktuální verze: 9.0 - 27.4. 2017
Language Překlad

How to Add Buttons in textual editor PHP-Fusion v9

Poslední aktualizace před 5 měsíci
I want to share an example of creating an additional button, in a text editor, for inserting a video into news, a blog or an article. This topic has already been discussed at the German forum. There, dimki, showed an example code, for the version of PF 7.02.07, which you need to insert into the file /includes/html_buttons_include.php
 $res .= ">', '".$formname."');\" />\n";

If you have Bootstrap enabled on your site pf-9. It in Admin Dashboard / Settings / Theme Settings -> it is enable: Enable Bootstrap. You can use, Responsive Video, Embed.
 $res .= ">
', '".$formname."');\" />\n";

After clicking the YouTube button, you need to replace XXXXXX, on, the id of the clip is - p7wTDIcWqzM.
You can change the parameters of the video yourself, as you need. For example, if you want to change Aspect Ratio in Video Embeds, change 16by9 to 4by3.
Based on this sample, you can create any button. For example, now in pf 9.xx you can not publish news, with an empty brief part (Snippet*). I do not know how to disable it, and for this, I created a button to insert a symbol, an indissoluble space, into Snippet*.
 $res .= ">NBSP\n";

I'm inserting the code in the file /includes/html_buttons_include.php, on the line 157, below and higher
Perhaps it will be useful for someone.
Thank! Zveřejníme tento návod jako článek v Technologie. Díky.
Návod není zřejmě celý. Mně to nechodí.
Hm, nestačilo by třeba tohle:
The first upper code, for the version of pf-7. I checked, it also works on pf9. After clicking the button, you need to insert the identifier after the slash in the text editor (...embed/ ). I showed it for the sample, so that others could see the difference between the pf7 code and the pf9 code. If you compare two codes, then it becomes obvious that you need to change to create your own button for another video hosting, for example vimeo.
Here is another version of the simple code pf9, for videos from youtube:
 $res .= ">', '".$formname."');\" />\n";

PS: I inserted your code iframe, into my editor, the player booted, everything is fine, but without video. Your video 12aqm3nfphU is not available on YouTube. Try another video, another identifier, such as this -> iKzRIweSBLA
Try again, for verification, copy the code from the forum, and paste it into the file html_buttons_include.php, do not change anything in it. Click the YouTube button and paste the video identifier.
When copying the code from the forum, disable Google translator, or another, it may distort the code. More I do not know what to advise.
Thanks for the effort!
I tried the phpf7. It works, the video display will be displayed, but the video will not start.
I'm going to phpf9
There is no Youtube2 button in phpf9. I added the code here:

style='font-size:11px; font-family: Georgia, \'Times New Roman\', Times, serif !important;'>Heading 5\n\n";
 $res .= "
  • \n>', '', '".$formname."');\">Heading 6\n
  • \n";
    $res .= ">', '".$formname."');\" />\n";
    $res .= ">', '".$formname."');\" />\n";

     $res .= "\n";
     $res .= "
    I do not know what might be the reason. On my test site, all the buttons appear well and work.
    Thanks. Buduto still try. Although it is a rather impractical procedure.
    It should work as in news commentaries where the "youtube" icon is. Click on the icon and

    We must not forget, I think, of the bbcode function.
    In order for bbcode video (icon) to be in the editor menu, add the following:

    // BB Codes For News Mod Kvido
    if ((file_exists(INCLUDES."na_bbcodes_settings.php")) && $settings['tinymce_enabled'] !== 1) {
    require_once INCLUDES."na_bbcodes_settings.php";
    Vy můžete zobrazit všechny příspěvky v tomto fóru.
    Vy nemůžete začít nový diskusní příspěvek v tomto fóru.
    Vy nemůžete odpovědět v této diskusi.
    Vy nemůžete začít v anketu v tomto fóru.
    Vy nemůžete na tomto fóru nahrát přílohy.
    Vy můžete stáhnout přílohy v tomto fóru.
    Uživatelé, kteří se účastnili diskuse:infoadmin, zizub
    Nejnovější témata fóra
      Vlákno Zobrazení Odpovědi Poslední příspěvek
    vlastné stránky
    v PHP - Fusion 9.1
    3 0 Balin50
    20-03-2018 17:48
    chyby po upgrade
    v PHP - Fusion 9.1
    25 2 Balin50
    20-03-2018 11:53
    Jak to žije (14), fórum
    v PHP - Fusion 9.1
    48 8 Balin50
    20-03-2018 09:33
    update a chyby
    v PHP - Fusion 9.1
    226 3 RobiNN
    19-03-2018 08:37
    Obrazky v Downloads
    v PHP - Fusion 9.1
    373 3 RobiNN
    19-03-2018 08:34
    bb tagy v comments
    v PHP - Fusion 9.0
    34 1 RobiNN
    19-03-2018 08:30