• » webSPELL.org - Free Content Management System
  • Language switch: English German
  • login



    » lost password?   » register now
  • About webSPELL

    webSPELL is a free Content Management System which was especially developed for the needs of esport related communities. Since a short while we are also offering an optimized and enhanced webSPELL version for the special requirements of non-profit organisations. The purpose of both systems is to offer a professional and free opportunity to create and administrate your own website in an easy and optimized way.

    » Learn more about webSPELL     » Download webSPELL now!
  • Advertisement

    Follow us

  • Sort:      1 2  » printview
    Author
    Message
    webSPELL newbie
    39 Posts
    25.07.2012, 10:35 email offline quote 

    hi,

    ich habe grade versucht einen eigenen bbcode hinzuzufügen. das haut auch so weit funktioniert, allerdings wenn innerhalb der tags ein smiley tag ist, wird das zuerst durch das bild ersetzt was natürlich den rest kaput macht.

    ich hab nicht soo viel ahnung von php aber den replace hab ich grade noch hinbekommen, allerdings werden halt die smileys innerhalb des codes auch ersetzt. Jetzt meine frage, wie kann ich andere bbcodes innerhalb des codes deaktivieren?

    der code:

    Code:
    1.
    2.
    3.
    4.
    5.
    function spotifyreplace($content) {
         $content = preg_replace("#\[spotify\](.*?)\[/spotify\]#si","<iframe src=\"https://embed.spotify.com/?uri=\\1\" width=\"300\" height=\"380\" frameborder=\"0\" allowtransparency=\"true\"></iframe>", $content);

         return $content;
    }

    website: sKy.eSports
    version: 4.2.1
    Administrator
    Member of webSPELL e.V.
    3068 Posts
    25.07.2012, 11:38 offline quote 

    das kannst du dir beim code-tag abschauen
    webSPELL newbie
    39 Posts
    25.07.2012, 12:36 email offline quote 

    ok hab was probiert. einfach : mit &#58; ersetzen.

    funktioniert aber nicht:

    ich hab einfach den teil vom code tag kopiert und angepasst:

    read more Mehr lesen


    Das funktioniert auch so weit, allerdings werden die smileys halt immernoch umgewandelt.

    schaut für mich danach aus, dass zuerst die smileys geparst werden bevor die bbcodes kommen.

    Code:
    1.
    <iframe src="https://embed.spotify.com/?uri=spotify&#58;user&#58;1121785091<img src="images/smileys/tongue.gif" alt="tongue" border="0" />laylist&#58;5Y5d5QrHfdEwOPrQEZCfSR" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>


    Moderator
    1708 Posts
    25.07.2012, 14:41 offline quote 

    sKy-e.belst wrote:

    ok hab was probiert. einfach : mit &#58; ersetzen.

    funktioniert aber nicht:

    ich hab einfach den teil vom code tag kopiert und angepasst:

    read more Mehr lesen


    Das funktioniert auch so weit, allerdings werden die smileys halt immernoch umgewandelt.

    schaut für mich danach aus, dass zuerst die smileys geparst werden bevor die bbcodes kommen.

    Code:
    1.
    <iframe src="https://embed.spotify.com/?uri=spotify&#58;user&#58;1121785091<img src="images/smileys/tongue.gif" alt="tongue" border="0" />laylist&#58;5Y5d5QrHfdEwOPrQEZCfSR" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>




    Warum machst du dafür auch ne neue Funktion ?
    Code:
    1.
    $content = preg_replace("#\[spotify\](.*?)\[/spotify\]#si","<iframe src=\"https://embed.spotify.com/?uri=\\1\" width=\"300\" height=\"380\" frameborder=\"0\" allowtransparency=\"true\"></iframe>", $content);

    Füg es doch in der bbcode.php einfach unter
    Code:
    1.
    $content = preg_replace("#\[/center]#si", "</center>", $content);

    ein.

    Funktioniert so auch wunderbar.
    webSPELL newbie
    39 Posts
    25.07.2012, 15:14 email offline quote 

    funktioniert auch, löst das smiley problem aber auch nicht.
    webSPELL newbie
    39 Posts
    26.07.2012, 22:43 email offline quote 

    shameless self bump
    webSPELL newbie
    39 Posts
    28.07.2012, 16:05 email offline quote 

    bump
    webSPELL newbie
    39 Posts
    29.07.2012, 21:50 email offline quote 

    Brauche immer noch Hilfe...
    Administrator
    Member of webSPELL e.V.
    2566 Posts
    29.07.2012, 22:02 email online quote 

    Wo hast du den Code den genau eingebaut?
    Es kann sein, dass du es nach dem Smileyreplace hast und es somit an der falschen stelle ist
    webSPELL newbie
    39 Posts
    30.07.2012, 12:55 email offline quote 

    direkt nach dem code replace eigentlich. weil ich noch will, dass sie innerhalb von code tags NICHT replaced werden

    also grade nochmal nachgeschaut:

    Code:
    1.
    2.
    3.
    if($bbcode) {
         $content = codereplace($content);
         $content = spotifyreplace($content);


    und spotifyreplace is halt die große funktion mit dem replace von : zu &#58; damit die smileys nicht danach innerhalb der tags noch umgewandelt werden. is aber egal sie werden davor replaced ...

    Sort:      1 2  » printview


    To start or to reply to a topic you have to be registered and logged in!

    register now
    login
  • » Support

    » Topics
    20.05.2013 - 20:12 - 4 Replies
    » login startseite
    login startseite
    Last post: Swordfish3000
    Board: DE - Technischer Support
    20.05.2013 - 20:12
    20.05.2013 - 18:27 - 4 Replies
    » [S] Tester für neuen Foru...
    [S] Tester für neuen ForumMod
    Last post: Argu
    Board: DE - Anfragen
    20.05.2013 - 18:27
    20.05.2013 - 11:47 - 5 Replies
    » Suche Designer GGL:Geld
    Suche Designer GGL:Geld
    Last post: Dynamic-Webmedia
    Board: DE - Suche
    20.05.2013 - 11:47
    20.05.2013 - 04:06 - 3 Replies
    » forum anzeige erweitern
    forum anzeige erweitern
    Last post: Swordfish3000
    Board: DE - Allgemeiner Support
    20.05.2013 - 04:06
    20.05.2013 - 00:07 - 0 Replies
    » [S] Suche Programmierer
    [S] Suche Programmierer
    Last post: phoenix762
    Board: DE - Suche
    20.05.2013 - 00:07
    19.05.2013 - 03:55 - 8 Replies
    » Mein Forum
    Mein Forum
    Last post: Lordy4007
    Board: DE - Fragen zur Seite
    19.05.2013 - 03:55
    18.05.2013 - 19:58 - 36 Replies
    » Exklusiv Webseite zur Mie...
    Exklusiv Webseite zur Miete
    Last post: liQweb
    Board: DE - Biete
    18.05.2013 - 19:58
    18.05.2013 - 12:21 - 1 Replies
    » Query failed
    Query failed
    Last post: LoRd
    Board: DE - Allgemeiner Support
    18.05.2013 - 12:21
    18.05.2013 - 09:36 - 3 Replies
    » benötige hilfe bei paar k...
    benötige hilfe bei paar kleinigkeiten
    Last post: immostar
    Board: DE - Technischer Support
    18.05.2013 - 09:36
    18.05.2013 - 03:33 - 4 Replies
    » [SELL] Gaming Website
    [SELL] Gaming Website
    Last post: hornyst
    Board: EN - Offers
    18.05.2013 - 03:33
    18.05.2013 - 00:32 - 6 Replies
    » Hide BBCODE Echo
    Hide BBCODE Echo
    Last post: dado2106
    Board: EN - Technical support
    18.05.2013 - 00:32
    17.05.2013 - 21:42 - 0 Replies
    » website help
    website help
    Last post: envy0024
    Board: EN - Technical support
    17.05.2013 - 21:42
    17.05.2013 - 21:03 - 1 Replies
    » Need Coder!
    Need Coder!
    Last post: iG.ShAdOw
    Board: EN - Requests
    17.05.2013 - 21:03
    17.05.2013 - 20:44 - 9 Replies
    » Query failed!
    Query failed!
    Last post: LoRd
    Board: DE - Allgemeiner Support
    17.05.2013 - 20:44
    17.05.2013 - 18:08 - 0 Replies
    » [4 SALE] Layouts (Gaming,...
    [4 SALE] Layouts (Gaming, Portfolio and more)
    Last post: Freestyler92
    Board: EN - Offers
    17.05.2013 - 18:08
    17.05.2013 - 18:06 - 0 Replies
    » Design Ausverkauf - alles...
    Design Ausverkauf - alles unter 70€
    Last post: Freestyler92
    Board: DE - Biete
    17.05.2013 - 18:06
    17.05.2013 - 10:56 - 6 Replies
    » [Biete] Template Designs
    [Biete] Template Designs
    Last post: Marceld
    Board: DE - Biete
    17.05.2013 - 10:56
    17.05.2013 - 10:41 - 7 Replies
    » register captcha
    register captcha
    Last post: nappel.ger
    Board: DE - Allgemeiner Support
    17.05.2013 - 10:41
    17.05.2013 - 00:13 - 0 Replies
    » News
    News
    Last post: dado2106
    Board: EN - Modifications
    17.05.2013 - 00:13
    16.05.2013 - 15:04 - 2 Replies
    » [V] mehrere Webspell Temp...
    [V] mehrere Webspell Templates und Designs
    Last post: Dynamic-Webmedia
    Board: DE - Biete
    16.05.2013 - 15:04
    » Partners
    Bilderkiste.org Image Hosting
    k3rmit.org
    PascalMh.de


    » Blog
    28.03.2013 - derchris
    » Those damn spammers