Announcement

Collapse
No announcement yet.

Silly question...but...how do I "comment out" code?

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

  • [Forum] Silly question...but...how do I "comment out" code?

    I want to remove a code (in this case the code for FAQs in the navbar) but I don't want to remove the code completely from the template. I know you can "comment out" a piece of code, without actually removing it entirely. How do I do that though?

    Thank you!

  • #2
    Originally posted by Pamela View Post
    I want to remove a code (in this case the code for FAQs in the navbar) but I don't want to remove the code completely from the template. I know you can "comment out" a piece of code, without actually removing it entirely. How do I do that though?

    Thank you!

    At the navbar template find the following code:

    HTML Code:
    <li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li>
    and replace it with:

    HTML Code:
    <!--
    <li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li>
    -->
    You can comment code in html with :

    Code:
    <!-- text that you want to comment -->
    Hope it helps.

    Comment


    • #3
      Thank you so much!!!

      Comment


      • #4
        Originally posted by Pamela View Post
        Thank you so much!!!
        You are most welcome. Glad to have been of help

        Comment


        • #5
          If you mean in the template, the above works. If you have a heavily traffic site, better to use <vb:comment > ... </vb:comment>. The methods above actually render the code and send it to the browser, but the browser doesn't render it. Using <vb:comment> tells the vBulletin rendering engine to ignore the section, which reduces cpu load and data traffic a little. Your call as to whether the savings are worth the effort.
          Please- I'm not tech support. Don't send your problem reports to me unless I've asked you to.

          Comment


          • #6
            I've also noticed that sometimes Internet Explorer will have problems with <!-- ... -->. In those rare situations use the <vb:comment > ... </vb:comment> instead.

            Comment


            • #7
              I agree. In that case <vb:comment > ... </vb:comment> is better used instead.

              Comment

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