Announcement

Collapse
No announcement yet.

Image map in the postbit

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

  • Image map in the postbit

    Why can't you use the $post[userid], $post[username] etc variables in an image map in the postbit?

    Basically its taking it as the userid of the first poster and for every post the links are the same?

    - miSt
    Dean Clatworthy - Web Developer/Designer

  • #2
    I don't normally do this but it's quite an urgent matter as it's for a client and i think it may be a bug in vb?

    - miSt
    Dean Clatworthy - Web Developer/Designer

    Comment


    • #3
      What do you mean by an 'image map'? I'm not sure vB variables are designed to work in this way.
      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
      Change CKEditor Colors to Match Style (for 4.1.4 and above)

      Steve Machol Photography


      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


      Comment


      • #4
        When i use an image map which is html which plots a link against co-ordinates on an image i cannot use the variables in the url's.

        E.g'

        HTML Code:
        <img border="0" src="{imagesfolder}/postbit_top2.gif" width="757" usemap="#Map" />
        <map name="Map">
        <area shape="rect" coords="120,1,184,18" href="private.php?s=$session[sessionhash]&action=newmessage&userid=$post[userid]" alt="Click here to Send $post[username] a Private Message" title="Click here to Send $post[username] a Private Message">
        </map>
        The problem is that it inserts the author's userid in every post in the postbit so say if Bob who is userid 1 was the author of the thread then all links in the postbit to the profile will go to his profile as $post[userid] is parsed as 1 in this case

        - miSt
        Dean Clatworthy - Web Developer/Designer

        Comment


        • #5
          It would appear then that vB variables cannot be used in this way. Have you tried the exact same thing, except without an image map?
          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography


          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          Comment


          • #6
            Why would it make any difference?

            Comment


            • #7
              I don't know. Did you try as I suggested?
              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
              Change CKEditor Colors to Match Style (for 4.1.4 and above)

              Steve Machol Photography


              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


              Comment


              • #8
                How can i try the exact same thing without an image map? lol

                Seriously i think this is a bug?

                Can someone else try this?

                - miSt
                Dean Clatworthy - Web Developer/Designer

                Comment


                • #9
                  Use the <img> and <a href> tags without the map.
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment


                  • #10
                    Ahh but that isn't an option as i need the image map because the way the top of this postbit is coded such that the buttons overlap. So i have to have one big image in the postbit and map links over the top of it.

                    Just TRUST me this is a bug! Upload an image into your postbit which is high and use that code i gave you above... And post as more than one user in the thread and you'll see the links are all wrong

                    - miSt

                    - miSt
                    Dean Clatworthy - Web Developer/Designer

                    Comment


                    • #11
                      As I said it may be possible that this was never intended to work within the image mapping code or that it can't work with it. However I'll move this to Bugs so a Dev can comment.
                      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                      Change CKEditor Colors to Match Style (for 4.1.4 and above)

                      Steve Machol Photography


                      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                      Comment


                      • #12
                        This is a bug with the HTML and not vBulletin.

                        The map name is not changing so the browser uses the first map defined as Map.

                        Try adding
                        Map$post[userid]

                        where you use Map
                        Scott MacVicar

                        My Blog | Twitter

                        Comment


                        • #13
                          Should be moved out of bugs forum...
                          --filburt1, vBulletin.org/vBulletinTemplates.com moderator
                          Web Design Forums.net: vB Board of the Month
                          vBulletin Mail System (vBMS): webmail for your forum users

                          Comment

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