How to display something on editor_toolbar_on only for reply in forumdi X

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fabioski
    Member
    • Dec 2007
    • 37

    [Forum] How to display something on editor_toolbar_on only for reply in forumdi X

    I am working in the editor_toolbar_on template.
    I want to display some text only when the editor is called for a NEW REPLY and only when this new reply is for a thread in a forum with forumid = 43 (for example). How can I manage this issue?

    Thanks a lot.
  • fabioski
    Member
    • Dec 2007
    • 37

    #2
    How can I obtain the forumid in a plugin with this hook:
    editor_toolbar_start

    Comment

    • Andy
      Senior Member
      • Jan 2002
      • 5886
      • 4.1.x

      #3
      The only way I was able to accomplish what you want to do is to set a cookie every time a logged in member views a forum. On my forum this isn't a problem because I have modified it in a way so that all logged in members must have a cookies set and enabled.

      Comment

      • fabioski
        Member
        • Dec 2007
        • 37

        #4
        I found that there is a variable in template that return me the forumid, it is
        {vb:raw forumid}
        but I can't use it neither in template and neither in plugin.

        When you click on new reply on browser I see that there is always a paramenter ?p=123456 can I use it in any way?

        Comment

        • Andy
          Senior Member
          • Jan 2002
          • 5886
          • 4.1.x

          #5
          Originally posted by fabioski
          I found that there is a variable in template that return me the forumid, it is
          {vb:raw forumid}
          but I can't use it neither in template and neither in plugin.
          That's because not all variable are in scope of each template.

          Originally posted by fabioski
          When you click on new reply on browser I see that there is always a paramenter ?p=123456 can I use it in any way?
          I think the correct explanation is that variables need to be registered to use them.

          It would be very helpful if {vb:raw forumid} would always be available in any template. It should be put in as a feature request.

          Comment

          • Andy
            Senior Member
            • Jan 2002
            • 5886
            • 4.1.x

            #6
            Try this:

            <vb:if condition="$GLOBALS['foruminfo']['forumid'] == 1">
            test
            </vb:if>

            Comment

            • fabioski
              Member
              • Dec 2007
              • 37

              #7
              Thanks, I will try just after the upgrade.
              Ciao.

              Comment

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