XF 2.0 Changing header image every hour automatically using php?

Mave

Active member
In SMF I had this code:

Code:
$currentdaynumber = date("d");
$selectedBg = "header-bg". $currentdaynumber;

echo '<style type="text/css">
<!--
#header-container{
background: url(images/' . $selectedBg . '.jpg) 50% 0;
}
-->
</style>';

Example of today would be https://forums.themavesite.com/images/header-bg30.jpg

Where would I put code like this in Xenforo's framework? I can only find app.header.less (which is only css)
 
Use the search here to find out where the headers are located. Once you've located that template (it's not a .less IIRC),
add this to the url of the header image:
HTML:
{{date($xf.time, 'd')}}
 
Back
Top Bottom