Skip to:
Content
Pages
Categories
Search
Top
Bottom

Php if: I’m going wrong somewhere!


  • kirkslater
    Participant

    @kirkslater

    I’m ready using an if statement like the one below, to action something if the url is the same as “/activity”

    But how do I go about matching up the following url “/members/admin/activity/2” when “admin” and “2” are changeable depending on the user and activity tag?

    I’ve tried the following but with no luck

    I feel like I’m close, can anyone help?!

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • You shouldn’t need to inspect the globals like that. What are you trying to do?


    kirkslater
    Participant

    @kirkslater

    Thanks for looking @DJPaul

    I’m using the BP activity plus plugin and trying to adapt it so that on the site wide activity page it displays the image uploaded as a thumb but on the single page of a users activity I want it to display the full size image.

    The only way I could think of doing it was using if “/activity/” page do this – elseif “/members/admin/activity/2? do this – else do this.

    Am I going about this the wrong way? I’m only looking to change the style of the image to full size for the single page activity the other pages can stay as thumbnails

    Really appreciate any help or ideas you might have ;)


    kirkslater
    Participant

    @kirkslater

    Hi @sbrajesh

    Sorry to hound you like this but I wondered if you had an ideas on what I’m trying to achieve?

    Appreciate any suggestions

    Many thanks


    CJ Kruger
    Participant

    @cj-kruger

    What about using:

    bp_is_my_activity
    Used to determine if the current page is the my activity page.
    Returns:
    TRUE if current page is the my activity page
    FALSE otherwise


    kirkslater
    Participant

    @kirkslater

    Cheers I’ll give it a try

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Php if: I’m going wrong somewhere!’ is closed to new replies.
Skip to toolbar