Announcement

Collapse
No announcement yet.

Sidebar Block templates

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

  • [vB4] Sidebar Block templates

    Hi,

    Im trying to edit the sidebar block templates, I have created a custom block to use the "block_html" template which all works and displays fine, I want to edit things a little so I have tried editing the "block_html" template to make a few changes but nothing appears to change in the sidebar, I even deleted the contents of the "block_html" but my custom block still shows even though I deleted the template..

    So does anyone know what im doing wrong, and how to edit the sidebar templates?

    Thanks

  • #2
    Go to your Forum Block Manager, edit the block and set the Forum Cache Time to 1 and Save. Default is 60 which means you won't see the changes for 60 minutes. Now wait 1 minute and it should take affect.

    I wish there was a way to flush the block cache like there is for the CMS.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment


    • #3
      Originally posted by Lynne View Post
      Go to your Forum Block Manager, edit the block and set the Forum Cache Time to 1 and Save. Default is 60 which means you won't see the changes for 60 minutes. Now wait 1 minute and it should take affect.

      I wish there was a way to flush the block cache like there is for the CMS.
      I simply flush the CMS cache and it shows changes and yes to the forum blocks as well


      Former vBulletin Support Staff
      Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
      Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!

      Comment


      • #4
        Hi, I think my question is relevant to this thread so I don't want to create a new thread.
        What I am trying to do is to duplicate block_html template and call it, say, left_sidebar_block, then modify left_sidebar_block with vb:raw clauses to put for example $banner template which is registered globally. When I tried to use left_sidebar_block as template for my forum block, it didn't work! What am I missing here?

        Comment


        • #5
          What do you mean "it didn't work"? Are you saying you couldn't enter the template name into the Configure screen? Are you saying you got a blank block? Please be more specific about what the expected results were and what the actual results were. A link to see the problem would also help.

          Please don't PM or VM me for support - I only help out in the threads.
          vBulletin Manual & vBulletin 4.0 Code Documentation (API)
          Want help modifying your vbulletin forum? Head on over to vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools <- awesome site for html/css help

          Comment


          • #6
            Thanks Lynne for your reply. I admit, the previous post doesn't look understandable.
            Let me rephrase it:
            I have a variable "my_banner" which is declared in one of my_plugin like this:
            Code:
            $my_banner =     "<a href='http://en.wikipedia.org/wiki/Certificate_of_division' target='_blank'><img src='http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/John_Marshall_by_Henry_Inman%2C_1832.jpg/484px-John_Marshall_by_Henry_Inman%2C_1832.jpg'></a>";
            where my_plugin is hooked to global_bootstrap_init_complete.

            Now I want to use $my_banner in one of my blocks in "Forum Blocks Manager". How do I get this done?

            And since I think the block_html template only can be used in certain pages, how do I use Forum Block with my own custom template?

            Comment


            • #7
              Did you register the variable $my_banner for use in the template you created? Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide

              Please don't PM or VM me for support - I only help out in the threads.
              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
              Want help modifying your vbulletin forum? Head on over to vbulletin.org
              If I post CSS and you don't know where it goes, throw it into the additional.css template.

              W3Schools &lt;- awesome site for html/css help

              Comment

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