Interface Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dothan
    Mini Mivite

    • Jun 2008
    • 36

    #1

    Interface Question

    I’m trying to find out how to add an interface for my module inside the miva administration panel. I searched for documentation but couldn’t find any.
    If some one can point me in the right direction I will appreciate it.
  • truXoft
    Mivite

    • Mar 2006
    • 184

    #2
    Re: Interface Question

    Did you check the developer surce kit? At least some of the sample files there should be suitable to get you started.
    Ivo Truxa . @ . t r u X o f t

    Comment

    • Dothan
      Mini Mivite

      • Jun 2008
      • 36

      #3
      Re: Interface Question

      Firs of all... THANK YOU VERY MUCH FOR ANSWERING. I did check the developer source kit, and couldn't find anything for what I was trying to accomplish, but I managed myself to do it.
      Now, I'm working on how to read a couple of checkbox inside a <form>.
      Then again thank you for answering my post.

      Comment

      • truXoft
        Mivite

        • Mar 2006
        • 184

        #4
        Re: Interface Question

        As for forms, that's fairly simple - the value from an <input name="myVar" value="blabla" /> can be read in MIVA Script in the global variable g.myVar
        Make sure to read through the MIVA Script reference manual - although not complete at all, at least this is explained there fairly well.

        Be aware that variable names in MIVA Script unlike in JavaSCcript, are not case sensitive. Hence myVar and Myvar which would be two different variables in Javascript will both be the same one in MIVA Script.
        Last edited by truXoft; 12-11-08, 11:24 AM.
        Ivo Truxa . @ . t r u X o f t

        Comment

        • Dothan
          Mini Mivite

          • Jun 2008
          • 36

          #5
          Re: Interface Question

          Yes that I know... but my problem is that the name in the input tag is the category code, so for me to read the variable I have to loop thru the categories again and get the category code, but I need to use the category code as a variable name, and that's what's causing me troubles.

          Comment

          • Bruce - PhosphorMedia
            Developer Partner











            • Mar 2006
            • 11257

            #6
            Re: Interface Question

            you mean the form as <input type="whatever" name="{g.category_code}" ...> ???

            if so, don't think you can get there from here...or here from there may be more acurate.
            Bruce Golub
            Phosphor Media - "Your Success is our Business"

            Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
            phosphormedia.com

            Comment

            • Dothan
              Mini Mivite

              • Jun 2008
              • 36

              #7
              Re: Interface Question

              Originally posted by Bruce - PhosphorMedia View Post
              you mean the form as <input type="whatever" name="{g.category_code}" ...> ???
              Yes more like this
              <MvOPENVIEW NAME="Test" VIEW="MyView">
              <MvWHILE ...>
              <input type="whatever" name="{MyView.d.id}" ...>
              </MvWHILE>
              </MVCLOSEVIEW VIEW="MyVIew">

              This is what creates my checkbox list... now thing is each checkbox will be a global variable, after the submit... so for me to read those variables I will need to go thru the categories again, and ask if that variable has been checked... what I was thinking was something like this:

              <MvOPENVIEW NAME="Test" VIEW="MyView">
              <MvWHILE ...>
              <MvEVAL EXPR="{g.&[MyView.d.id];}">
              </MvWHILE>
              </MVCLOSEVIEW VIEW="MyVIew">

              But that is not working; it only displays 'g.' and not the value corresponding to the variable g.idcode...

              Comment

              • brian_77
                Mivite

                • Nov 2008
                • 169

                #8
                Re: Interface Question

                use this:
                <MvOPENVIEW NAME="Test" VIEW="MyView">
                <MvWHILE ...>
                <MvEVAL EXPR="{MyView.d.id}">
                </MvWHILE>
                </MVCLOSEVIEW VIEW="MyVIew">
                Brian.P
                [email protected]

                Comment

                • Dothan
                  Mini Mivite

                  • Jun 2008
                  • 36

                  #9
                  Re: Interface Question

                  Originally posted by brian_77 View Post
                  use this:
                  <MvOPENVIEW NAME="Test" VIEW="MyView">
                  <MvWHILE ...>
                  <MvEVAL EXPR="{MyView.d.id}">
                  </MvWHILE>
                  </MVCLOSEVIEW VIEW="MyVIew">
                  Yes, that will show me the value of MyView.d.id, witch will be the category code, but what I'm trying to accomplish is use the value of MyView.d.id to make reference to the name of another value and get that value… for example
                  I have categories Cat1,Cat2,Cat3 using my first loop, that creates the variables g.Cat1 , g.Cat2 and g.Cat3, that contains the value of the checked items… so for me to know the value of these variables… I need to loop the categories again and build the name of the category I want to eval… that’s what I’m trying to accomplish… get the g.CatX from the available categories …

                  Comment

                  • truXoft
                    Mivite

                    • Mar 2006
                    • 184

                    #10
                    Re: Interface Question

                    Originally posted by Dothan View Post
                    <MvEVAL EXPR="{g.&[MyView.d.id];}">
                    Macros are gone from MIVA Script since the version 4, so you should better read the refrence manual of the recent version (or the v4), than the old long time deprecated 3.x script syntax.

                    Use
                    <MvEVAL EXPR="{miva_variable_value('g.' $ MyView.d.id)}">
                    Ivo Truxa . @ . t r u X o f t

                    Comment

                    • Dothan
                      Mini Mivite

                      • Jun 2008
                      • 36

                      #11
                      Re: Interface Question

                      JAJJAJAJA yes yes... I was reading the 3.9 manual... never thought that... Thank you everybody for your help... I appreciate it very much.

                      Comment

                      Working...
                      X