Question : Templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simonhind
    Member
    • Jan 2007
    • 59
    • 3.6.x

    Question : Templates

    i have a question

    i have a setting varname fbbadge_active_link and need to put the content of that into a template

    i tried everything from

    {vb:raw vboptions.fbbadge_active_link}
    {vb:raw vboptions.fbbadge_active_desc}
    {vb:raw vboptions.fbbadge_active}

    and all don't work fbbadge_active_link holds text from an option that i want to show

    i can't see where i am going wrong can support help on this
  • Ace
    Senior Member
    • Apr 2004
    • 4051
    • 4.2.X

    #2
    Did you make a plugin to declare that variable, and make it available to the various templates that you want it available to?
    My Live vB5 Site - NZEating.com
    vBulletin Hosting | vBulletin Services - Need hosting for your vB? Need it installed? Something else? Let me take that hassle off your hands.

    Comment

    • simonhind
      Member
      • Jan 2007
      • 59
      • 3.6.x

      #3
      Originally posted by Ace
      Did you make a plugin to declare that variable, and make it available to the various templates that you want it available to?
      its not a custom variable, its option within my admincp with a mod


      this is my setting within the .xml file for the product
      <setting varname="fbbadge_active_link" displayorder="20">
      <datatype>free</datatype>
      </setting>
      Attached Files

      Comment

      • Ace
        Senior Member
        • Apr 2004
        • 4051
        • 4.2.X

        #4
        If you are certain that this variable should be available to all templates, I'd suggest raising a JIRA bug report for it.
        My Live vB5 Site - NZEating.com
        vBulletin Hosting | vBulletin Services - Need hosting for your vB? Need it installed? Something else? Let me take that hassle off your hands.

        Comment

        • Hartmut
          Senior Member
          • Nov 2007
          • 2870
          • 4.2.x

          #5
          Originally posted by simonhind
          its not a custom variable, its option within my admincp with a mod


          this is my setting within the .xml file for the product
          <setting varname="fbbadge_active_link" displayorder="20">
          <datatype>free</datatype>
          </setting>
          The variable $vboption has to be available at the point where you call the specific template in which you want to use the var.
          No private support, only PM me when I ask for it. Support in the forums only.

          Comment

          • simonhind
            Member
            • Jan 2007
            • 59
            • 3.6.x

            #6
            Originally posted by Hartmut
            The variable $vboption has to be available at the point where you call the specific template in which you want to use the var.
            which i already did


            {vb:raw vboptions.fbbadge_active_link} is what i used for the admincp option
            the data from http://img823.imageshack.us/img823/6...77588d5c3e.png
            what is shown in that input box is from

            <setting varname="fbbadge_active_link" displayorder="20">
            <datatype>free</datatype>
            </setting>

            and i see that {vb:raw vboptions.bburl} is also called the same way in pages

            <setting varname="bburl" displayorder="20">
            <datatype>free</datatype>
            </setting>

            is that variable from xml

            Comment

            • Hartmut
              Senior Member
              • Nov 2007
              • 2870
              • 4.2.x

              #7
              I was talking about the variable vboptions being global at the time when you ask for it in the template
              No private support, only PM me when I ask for it. Support in the forums only.

              Comment

              • simonhind
                Member
                • Jan 2007
                • 59
                • 3.6.x

                #8
                Originally posted by Hartmut
                I was talking about the variable vboptions being global at the time when you ask for it in the template
                ok, but all other options work

                <setting varname="fbbadge_active" displayorder="10">
                <datatype>free</datatype>
                <optioncode>yesno</optioncode>
                <defaultvalue>1</defaultvalue>


                <vb:if condition="$vboptions['fbbadge_active']">

                the above works, i am only stuck on why

                {vb:raw vboptions.fbbadge_active_link} does not work if its already an option shown in admincp
                from

                <setting varname="fbbadge_active_link" displayorder="20">
                <datatype>free</datatype>
                </setting>

                if you could help it would be great

                Comment

                • Ace
                  Senior Member
                  • Apr 2004
                  • 4051
                  • 4.2.X

                  #9
                  Originally posted by simonhind
                  i am only stuck on why

                  {vb:raw vboptions.fbbadge_active_link} does not work if its already an option shown in admincp
                  from
                  Probably because it hasn't actually been declared for whatever template you are trying to show it in.
                  My Live vB5 Site - NZEating.com
                  vBulletin Hosting | vBulletin Services - Need hosting for your vB? Need it installed? Something else? Let me take that hassle off your hands.

                  Comment

                  • simonhind
                    Member
                    • Jan 2007
                    • 59
                    • 3.6.x

                    #10
                    Originally posted by Ace
                    Probably because it hasn't actually been declared for whatever template you are trying to show it in.
                    how do i declare it ?, VB5 is different than i am used to, if i used this in VB4 i didn't need to do anything, it found the data from admincp with no issues

                    Comment

                    • Hartmut
                      Senior Member
                      • Nov 2007
                      • 2870
                      • 4.2.x

                      #11
                      In general, you also have to declare the variables in vB4 aswell. In your case, vboptions was declared already when using this in vB4
                      No private support, only PM me when I ask for it. Support in the forums only.

                      Comment

                      • simonhind
                        Member
                        • Jan 2007
                        • 59
                        • 3.6.x

                        #12
                        Originally posted by Hartmut
                        In general, you also have to declare the variables in vB4 aswell. In your case, vboptions was declared already when using this in vB4
                        as i said Hartmut, if i am doing it correctly in the template, why does it not show my data from http://img823.imageshack.us/img823/6...77588d5c3e.png
                        so i cant see what i am doing wrong in the template i declared the correct variable
                        {vb:raw vboptions.fbbadge_active_link} from

                        <setting varname="fbbadge_active_link" displayorder="20">
                        <datatype>free</datatype>
                        </setting>

                        which is shown in the screenshot, i hope you understand ?

                        EDIT

                        i am not trying to load a phrase with is for [ global ]

                        i am trying to import data entered into [Admincp Options] > fbbadge_active_link
                        this is the only one not working i can use all other options that desclare
                        <vb:if condition="$vboptions['fbbadge_active']">
                        it works fine 100%

                        but when i call this
                        <a href="{vb:raw vboptions.fbbadge_active_link}" target="_blank">
                        which is the correct section for manual data entry from admicp options the data does not appear and just shows the homepage url
                        Last edited by simonhind; Wed 19 Sep '12, 7:28am.

                        Comment

                        • Yves R.
                          vBulletin QA
                          • Nov 2003
                          • 3860
                          • 5.6.X

                          #13
                          Your option is a public setting? Please check your setting options, it's one of the latest option available.

                          Sent from my iPhone using Forum Runner

                          vBulletin QA - vBulletin Support French - Lead Project Tools developer

                          Next release? Soon(tm)

                          Comment

                          • Wayne Luke
                            vBulletin Technical Support Lead
                            • Aug 2000
                            • 74111

                            #14
                            vBulletin 4.X Addons are not compatible with vBulletin 5.0. Just because an option is in the Options page, doesn't mean it has valid code to make it available to templates.

                            You should discuss this with the addon developer at www.vbulletin.org or post your questions in the forums available there.
                            Translations provided by Google.

                            Wayne Luke
                            The Rabid Badger - a vBulletin Cloud demonstration site.
                            vBulletin 5 API

                            Comment

                            • simonhind
                              Member
                              • Jan 2007
                              • 59
                              • 3.6.x

                              #15
                              request done thx

                              Comment

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