1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I Change 'Forum' Background, Every 6 Hours?:

Discussion in 'Styling and Customization Questions' started by CritiKiL, Mar 13, 2012.

  1. CritiKiL

    CritiKiL Active Member

    My site has a background in the "Style Properties / General/ 'Content' area. I will only get confused trying to use a similar customization which works only for the Header and etc. So can someone help me with the code which will allow this to change to 7 other backgrounds (8 different backgrounds total), every 6 hours or at any preset interval? Remember, these backgrounds reside in the 'Contents' area or inside of the Forum area, not the outside:

    [​IMG]
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    CritiKiL likes this.
  3. CritiKiL

    CritiKiL Active Member

    Actually I could use the one you have in the link. But can you give me the coding for the area of background I wish to manipulate? That example is using the Header background so how would I get it to work for the content background? Thanks Jake.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> EXTRA.css

    Specify your classes with the two background images by adding this block of code:

    Code:
    .backDay
    {
    	background-image: url('PATH/TO/DAY.GIF');
    }
    
    .backNight
    {
    	background-image: url('PATH/TO/NIGHT.GIF');
    }
    
    Then edit this template:

    Admin CP -> Appearance -> Templates -> PAGE_CONTAINER

    Replace the red code:

    Code:
    <div id="content" class="{$contentTemplate}">
    	<div class="pageWidth">
    		<div class="pageContent">
    			<!-- main content area -->
    			
    			<xen:hook name="page_container_content_top" />
    			
    			<xen:if is="{$sidebar}">
    				<div class="mainContainer">
    
    Like so:

    Code:
    <div id="content" class="{$contentTemplate}">
    	<div class="pageWidth">
    		<xen:if is="{xen:time $serverTime, 'G'} >= 8 AND {xen:time $serverTime, 'G'} < 20">
    			<div class="pageContent backDay">
    		<xen:else />
    			<div class="pageContent backNight">
    		</xen:if>
    			<!-- main content area -->
    			
    			<xen:hook name="page_container_content_top" />
    			
    			<xen:if is="{$sidebar}">
    				<div class="mainContainer">
    
     
  5. CritiKiL

    CritiKiL Active Member

    Ok, it's in. I'll keep you updated bro.
     

Share This Page