Announcement

Collapse
No announcement yet.

Conditional to identify user's location

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

  • Conditional to identify user's location

    I have a banner company that insists I can not use thier banners in forums. But I want to use the baner in memberfind or PM ect stuff like that... arcade...
    So how can I use a conditional?

    if user is on the forum use this banner...
    else this banner.

    HELP also...
    I need to know what locations are the forum.
    forum.php but are their more? like searching ect?

  • #2
    ok filddling around I found this works
    <if condition="THIS_SCRIPT!='private' and THIS_SCRIPT!='usercp'">
    banner stuff here...
    </if> So... how can I mod this to check if its a FORUM insted of usercp or private messages?

    Comment


    • #3
      A specific forum or any forum?

      btw THIS_SCRIPT != private AND THIS_SCRIPT !=usercp should always come back as true, as its impossible for it to be both the private.php and the usercp or profile.php

      you need to use and to check or an array

      Comment


      • #4
        Hummm thanks Zac you and Jack Bounce always help out...
        ok any forum. as long as its a forum dont show.

        But stuff like member find... PM Control panel Calendar all that stuff im cool with.
        Hey if you have the "names" for these locations please post them as well. This would be nice for specific things that may be set in the header or header include.

        This is getting really intresting!

        Comment


        • #5
          THIS_SCRIPT locations are usualy the name of the file minus .php.

          index.php = index
          showthread.php = showthread

          Comment


          • #6
            Originally posted by Zachery
            A specific forum or any forum?

            btw THIS_SCRIPT != private AND THIS_SCRIPT !=usercp should always come back as true, as its impossible for it to be both the private.php and the usercp or profile.php

            you need to use and to check or an array
            I see.. this command works by the name of the php script file correct? ok. the AND there would be stupid then.... I should have put OR

            Comment


            • #7
              Just to confim != means NOT and == means equals right?

              Thanks guys for the response in advance.

              Comment


              • #8
                "!=" Is NOT EQUAL TO
                "==" Is EQUAL TO

                Comment


                • #9
                  Zac I did this... <if condition="THIS_SCRIPT!='showthread'">
                  and it works when I am in showthread... how the heck is that...
                  If I am not mistaken it is saying if I am NOT in showthread do this correct?

                  Comment


                  • #10
                    try

                    <if condition="THIS_SCRIPT != showthread">

                    Comment


                    • #11
                      **** New Question ****

                      How would this work for a spcific template????
                      for example...

                      <if condition="THIS_SCRIPT != private"> takes you to one type...
                      BUT what if I want only certain HTML to show if you go here...
                      forums/private.php?do=newpm
                      how can I do a condition for the template?

                      Thank you for all the help so far.

                      Comment


                      • #12
                        Originally posted by John Campbell
                        <if condition="THIS_SCRIPT != private"> takes you to one type...
                        BUT what if I want only certain HTML to show if you go here...
                        forums/private.php?do=newpm
                        how can I do a condition for the template?
                        Where on that page do you want to show something? The template you need to edit depends on the exact location on the page.

                        Comment


                        • #13
                          No I dont want to edit the tempate. I am talking about a condition to tell me what template the user just loaded.

                          See private.php pulls a few differnt templates.
                          I have a 160 skyscraper banner that I want there only if they are reading not if they are writting. Thus I need how to do the if conditional.

                          Originally posted by Jake Bunce
                          Where on that page do you want to show something? The template you need to edit depends on the exact location on the page.

                          Comment


                          • #14
                            got the answer for anyone else that may need to know...

                            <if condition="THIS_SCRIPT == 'private' AND $_REQUEST['do'] == 'newpm'">
                            conditional if the script loading is sending a new private message do this...

                            Comment

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