• threadkiller

    (@threadkiller)


    What I’d like to do is get rid of the calendar and put a little bit of advertising into the menu. But what type of advertising (AdSense, small buttons to affiliate merchants, etc.) depends on what kind of page it is – what is to the right of index.php in the URL.
    – Main page (… index.php)
    – Archive (… index.php?m=200405)
    – Permanent link to any specific topic (… index.php?p=1)
    – Category postings (… index.php?cat=1)
    Suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • lamb

    (@lamb)

    if ((!$m) && (!$p) && (!$cat)) { do this }
    else if ($m) { do this }
    else if ($p) { do this }
    else if ($cat) { do this }

    Thread Starter threadkiller

    (@threadkiller)

    Cool – thanks! ( I didn’t realize that $m/$p/$cat were variables, I guess I might try reading the documentation next time!)

    Anonymous

    Note, you should really use `$_GET[m], $_GET[p] and $_GET[cat] as if you are running a newer version of php global variables maybe turned off. If not’s it’s still sensible to use them… (The PHP manual page that talks about this in details)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP question – Menu text based on url’ is closed to new replies.