Announcement

Collapse
No announcement yet.

quote tag mod

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • quote tag mod

    This isn't a real hack...but I like the way it looks.

    This is a mod of the quote bbcode to put the quoted text in a nice little table instead of between the boring horizontal lines.

    Go into your admin panel and then find the "Custom BB codes" and choose "Modify"

    Then find the "[ quote]This is a quote[ /quote] is replaced with" and then choose the "Edit" link

    Replace the present code:

    <blockquote><smallfont>quote:</smallfont><hr>{param}<hr></blockquote>

    With:

    <blockquote><b>Quote:</b><br><TABLE bgcolor="#008000" CELLSPACING="4" WIDTH="85%"><TR><TD BGCOLOR="#ffffff"><font size="1" face="verdana, helvetica" color="#000000">{param}</font></TD></tr></table></blockquote>

    This will produce a nice box around the quoted text. The border color, text color and background color of course can be changed to fit your site.

    an example can be seen here: http://www.globaldungeon.net/cgi-bin...=&threadid=271

    Although...you might not want to go view it because you would have to register to get in. Sorry

    Wait....here is a screen shot:



    If I could figure out where the code for the "code" tag is kept....I will do the same to that one too.

    If someone could help me find it...I would be in your debt

    Enjoy.
    Last edited by Flack Jacket; Wed 12th Sep '01, 8:56pm.

  • #2
    Find this function in functions.php:
    PHP Code:
    // ###################### Start stripbrsfromcode #######################
    function stripbrsfromcode($foundcode) {
      
    $foundcode str_replace("\\\"","\"",$foundcode);
      return 
    "</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>" str_replace("<br>"""str_replace("<br />"""$foundcode) ) . "<hr></pre><normalfont></blockquote>";

    Chen Avinadav
    Better to remain silent and be thought a fool than to speak out and remove all doubt.

    גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

    Comment


    • #3
      Thank you firefly for pointing that out to me. Having seen what I did above to the aparently earsier to modify quote tag......can you help me modify the code you pointed out?

      I tried a couple of different things to get what I have to work in there but I get pretty good errors. Those quotation marks breaking up the html have confused the heck out of me and I don't know how to implement my html into it.

      I tried this:

      function stripbrsfromcode($foundcode) {
      $foundcode = str_replace("\\"",""",$foundcode);
      return "<blockquote><b>Quote:</b><br><TABLE bgcolor="#008000" CELLSPACING="4" WIDTH="85%"><TR><TD BGCOLOR="#ffffff"><font size="1" face="verdana, helvetica" color="#000000">" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "</font></TD></tr></table></blockquote>";
      }

      but of course that didn't work

      Thanks in advance....drives
      Last edited by Flack Jacket; Wed 12th Sep '01, 9:00pm.

      Comment


      • #4
        so what do I do to add this?

        Comment


        • #5
          Try this:
          PHP Code:
          // ###################### Start stripbrsfromcode #######################
          function stripbrsfromcode($foundcode) {
            
          $foundcode str_replace("\\"",""",$foundcode);
            return 
          "</normalfont><blockquote><b>code:</b><br><TABLE bgcolor=\"#008000\" CELLSPACING=\"4\" WIDTH=\"85%\"><TR><TD BGCOLOR=\"#ffffff\"><font size=\"1\" face=\"verdana, helvetica\" color=\"#000000\">" str_replace("<br>"""str_replace("<br />"""$foundcode) ) . "</font></TD></tr></table></blockquote>"
          (untested)
          Chen Avinadav
          Better to remain silent and be thought a fool than to speak out and remove all doubt.

          גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

          Comment


          • #6
            Parse error: parse error in ./admin/functions.php on line 519

            Fatal error: Call to undefined function: vbdate() in ./admin/sessions.php on line 338








            Nope

            Comment


            • #7
              Code:
              // ###################### Start stripbrsfromcode #######################
              function stripbrsfromcode($foundcode) {
                $foundcode = str_replace("\\"",""",$foundcode);
                return "</normalfont><blockquote><b>code:</b><br><TABLE bgcolor=\"#008000\" CELLSPACING=\"4\" WIDTH=\"85%\"><TR><TD BGCOLOR=\"#ffffff\"><font size=\"1\" face=\"verdana, helvetica\" color=\"#000000\">" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "</font></TD></tr></table></blockquote>";
              }
              This?
              Chen Avinadav
              Better to remain silent and be thought a fool than to speak out and remove all doubt.

              גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

              Comment


              • #8
                Parse error: parse error in ./admin/functions.php on line 519

                Fatal error: Call to undefined function: vbsetcookie() in ./admin/sessions.php on line 171

                Comment


                • #9
                  This works:
                  Code:
                  // ###################### Start stripbrsfromcode #######################
                  function stripbrsfromcode($foundcode) {
                    $foundcode = str_replace("\\\"","\"",$foundcode);
                    return "</normalfont><blockquote><b>code:</b><br><TABLE bgcolor=\"#008000\" CELLSPACING=\"4\" WIDTH=\"85%\"><TR><TD BGCOLOR=\"#ffffff\"><font size=\"1\" face=\"verdana, helvetica\" color=\"#000000\">" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "</font></TD></tr></table></blockquote>";
                  }
                  The first code I posted was also true, but for some reason the [php] tag removed some slashes.
                  Chen Avinadav
                  Better to remain silent and be thought a fool than to speak out and remove all doubt.

                  גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                  Comment


                  • #10
                    ah...the slashes! I can never remember when to use them or not.

                    Thank you firefly....that worked beutiful!

                    Comment


                    • #11
                      I like the idea and all, but the table doesnt close, and everything in the post changes width...when people do multiple quotes the post really looks dumb.

                      Anyone know how to get it so that you can do the cool quote tag but keep the text after it, normal?

                      Comment


                      • #12
                        I figured out what it was, vB has a max char limit in the code replacement box, and cuts off any extras. And
                        Code:
                        </blockquote>
                        became
                        Code:
                        <blockqu
                        so I changed the font part to "smallfont" which left for more room and hurrah, it was fixed.

                        Comment


                        • #13
                          that works too but depending on the color you set for your smallfont it might not.

                          If you still want to set the font color do it this way:

                          <blockquote><b>Quote:</b><br><TABLE bgcolor="#008000" CELLSPACING="4" WIDTH="85%"><TR><TD BGCOLOR="#ffffff"><smallfont><font color="#000000">{param}</font></TD></tr></table></blockquote>

                          Comment

                          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                          Working...
                          X