1
ORbit2
Different image in header for specific pages
  • 2012/5/23 11:21

  • ORbit2

  • Just popping in

  • Posts: 36

  • Since: 2008/5/12


Hi,

I want people to see image 1 in the header of my theme when there are on page http://.....smartsection/item.php?itemid=103 and image 2 for example on http://.....smartsection/item.php?itemid=1 or image 3 for http://.....myhome/index.php

I have seen there is a theme changer available but that isn't really handy for I want to display quite a few different images fore there specific pages.

Anybody a idea?

I have found a possibility here https://xoops.org/modules/newbb/viewtopic.php?viewmode=thread&topic_id=28780&forum=27&post_id=126941

But this options reads only in which module the visitor is browsing, I need to have that code changed in it reading the page and directing the right image onto the header.

2
ORbit2
Re: Different image in header for specific pages
  • 2012/5/23 15:16

  • ORbit2

  • Just popping in

  • Posts: 36

  • Since: 2008/5/12


it has to be someting like this but unfortunatly i have no knowledge in programming php.

this code reads the current url
function curPageURL() {
 
$pageURL 'http';
 if (
$_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 
$pageURL .= "://";
 if (
$_SERVER["SERVER_PORT"] != "80") {
  
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return 
$pageURL;
}
?>

  echo curPageURL();
?>

and then the script has to read the outcome and if it reads page X he has to write the according image.....I think.

Well I keep looking, it would be nice having this function in my site, that way I can show and inform my visitors more relative pictures/information .

Login

Who's Online

231 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 231


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits