We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7690
    • 166 Posts
    Is it possible to let a admin reply on a comment by pressing a button?
    Or is it only possible by making a new comment?


    ==========
    2nd question
    Is this the only tutorial for adding smileys in JOT:
    http://modxcms.com/forums/index.php/topic,13183.0.html
    ?
      • 33992 ☆ A M B ☆
      • 455 Posts
      Quote from: DNA at May 06, 2009, 10:00 AM

      Is it possible to let a admin reply on a comment by pressing a button?
      Or is it only possible by making a new comment?
      Explain more please .....


      Quote from: DNA at May 06, 2009, 10:00 AM

      2nd question
      Is this the only tutorial for adding smileys in JOT:
      http://modxcms.com/forums/index.php/topic,13183.0.html
      ?
      PHx way is better (cleaner): phx:smileys
        God loves me. 【ツ】


        MODX.ir (Persian Support)

        Boplo.ir/modx/ (Persian)
        • 7690
        • 166 Posts
        Quote from: AHHP at May 06, 2009, 12:07 PM

        Quote from: DNA at May 06, 2009, 10:00 AM

        Is it possible to let a admin reply on a comment by pressing a button?
        Or is it only possible by making a new comment?
        Explain more please .....

        If a visitor has posted a comment and an admin wants to reply on it.
        On a lot of guestbook scripts you have the option to reply on that comment by clicking on a button.
        Like this:

        User:
        This is a nice website
        admin: thank you

        User:
        This is a second comment.


        If you still dont understand it:
        When an admin edits a comment. Is it possible to show what his edit was with a different color or something?
          • 33992 ☆ A M B ☆
          • 455 Posts
          You can modify the existed bbcode PHx modifier to convert a custom bbcode. look at first line:
          <?php
          $string = preg_replace('~\[AdminReply\](.+?)\[/AdminReply\]~is', '<span class="reply">\1</span>', $string);
          
          $string = preg_replace("/&(#[0-9]+|[a-z]+);/i", "&$1;", htmlspecialchars($output));
          $string = preg_replace('~\[b\](.+?)\[/b\]~is', '<b>\1</b>', $string);
          $string = preg_replace('~\[i\](.+?)\[/i\]~is', '<i>\1</i>', $string);
          $string = preg_replace('~\[u\](.+?)\[/u\]~is', '<span style="text-decoration: underline;">\1</span>', $string);
          $string = preg_replace('~\[link\]www.(.+?)\[/link\]~is', '<a href="http://www.\1" target="_blank">www.\1</a>', $string);
          $string = preg_replace('~\[link\](.+?)\[/link\]~is', '<a href="\1" target="_blank">\1</a>', $string);
          $string = preg_replace('~\[link=(.+?)\](.+?)\[/link\]~is', '<a href="\1" target="_blank">\2</a>', $string);
          $string = preg_replace('~\[url\]www.(.+?)\[/url\]~is', '<a href="http://www.\1" target="_blank">www.\1</a>', $string);
          $string = preg_replace('~\[url\](.+?)\[/url\]~is', '<a href="\1" target="_blank">\1</a>', $string);
          $string = preg_replace('~\[url=(.+?)\](.+?)\[/url\]~is', '<a href="\1" target="_blank">\2</a>', $string);
          $string = preg_replace('~\[img\](.+?)\[/img\]~is', '<img src="\1" alt="[image]" style="margin: 5px 0px 5px 0px" />', $string);
          $string = preg_replace('~\[img-l\](.+?)\[/img\]~is', '<img src="\1" alt="[image]" style="border: thin solid #DFE5F2; FLOAT: left; MARGIN-RIGHT: 20px" />', $string);
          $string = preg_replace('~\[img-r\](.+?)\[/img\]~is', '<img src="\1" alt="[image]" style="border: thin solid #DFE5F2; FLOAT: right; MARGIN-LEFT: 20px;" />', $string);
          $string = preg_replace('~\[color=(.+?)\](.+?)\[/color\]~is', '<font color="\1">\2</font>', $string);
          $string = preg_replace('~\[left\](.+?)\[/left\]~is', '<div style="text-align:left;">\1</u>', $string);
          $string = preg_replace('~\[center\](.+?)\[/center\]~is', '<div style="text-align:center;">\1</u>', $string);
          $string = preg_replace('~\[right\](.+?)\[/right\]~is', '<div style="text-align:right;">\1</u>', $string);
           
          $string = str_replace(array("[","]","`"),array("[","]","`"),$string);
           
          return $string;
          ?>

          It puts strings in [AdminReply] and [/AdminReply] in <span class="reply"> and </span>.
          You can use this custom bbcode easily BUT be sure that no visitor knows this bbcode because they can use it!
            God loves me. 【ツ】


            MODX.ir (Persian Support)

            Boplo.ir/modx/ (Persian)
            • 7690
            • 166 Posts
            Wow thanks.
            I am new with the PHx Modifiers, but it’s a great tool!

            I have made a custom smiley script with the PHx Modifier. Maybe for inspiration for other people:
            http://tinyurl.com/qhxynd