Anomaly theme question 2

Anomaly theme question 2

by Chrissy Trenholme -
Number of replies: 10

I have a problem with the background colour on the page that says something like 'you successfully posted a message and you have 30mins to make any changes', after I have posted a message to a forum.

I have changed the general.css where it has

html, body {
    background-color: #C8C9C7;
}

to give me a darker background to all pages and the forum page that I have problems with, has inherited the new background colour.  As a result you cannot read the text! 

I have experimented with all the forum css to see if I can change the background colour there without any luck.  So is there any css I can add that will override the body code and if so what do I put in.

Thanks, Chrissy

Average of ratings: -
In reply to Chrissy Trenholme

Re: Anomaly theme question 2

by John St -

You could change the background color for just those pages, try something like:

body.pagelayout-redirect {

background-color: #fff;

}

or, you could try and get fancy by just adding a box around the redirect message, something like:

.pagelayout-redirect #page-content {
width:60%; background: #fff; margin: 20px auto; padding: 1em;
border: 1px solid #dadada;
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
}

Make sure you clear the theme cache after any changes. 

In reply to Chrissy Trenholme

Re: Anomaly theme question 2

by Kimber Warden -

If you don't already use it, download the Firebug toolbar for Firefox. When you click Information->Display Element Information, it will tell you the name of whatever page, region, div, etc. you click on. Knowing that information will help you precisely target your css.

In reply to Kimber Warden

Re: Anomaly theme question 2

by Miriam Laidlaw -
Picture of Plugin developers

The problem with trying to use Firebug on the particular page that Chrissy was asking about is that it only shows up very briefly, like after you've posted a message and before you get redirected back to the forum view. So it's not actually there long enough to target anything in Firebug and then look at the results.

 

----------

Final edit:

This code:

/** Redirect page settings (like the page after posting to a forum) **/

.redirectmessage {
    text-align: center;
    margin-top:40px;
}
.continuebutton {
    text-align: center;
}
div.redirectmessage {
    width: 600px;
    margin-left: auto;
    margin-right: auto;
    border-color: #FF0000;
    border-width: 2px;
    border-style: solid;
    background-color: #FF6666;
}
.pagelayout-redirect #content {
    width: 800px;
    margin-left: auto;
    margin-right: auto;
    border-color: #008040;
    border-width: 2px;
    border-style: solid;
    background-color: #CCFF66;
}
.pagelayout-redirect #page {
    width: 900px;
    margin-left: auto;
    margin-right: auto;
    border-color: #000000;
    border-width: 1px;
    border-style: solid;
    background-color: #B3B3B3;
}

Creates this page:

colours

In reply to Miriam Laidlaw

Re: Anomaly theme question 2

by Miriam Laidlaw -
Picture of Plugin developers

So, having now found all the divs on that page, styling it using just these lines:

/** Redirect page settings (like the page after posting to a forum) **/

.redirectmessage {
    text-align: center;
}
.continuebutton {
    text-align: center;
}

/* The div for the whole redirect page */
.pagelayout-redirect #page {
    width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 100px;
    height: 100px;
    padding-top: 25px;
    border-color: #000000;
    border-width: 1px;
    border-style: solid;
    background-color: #FFFFFF;
}

Gives me a nice page that looks like this:

screenshot of redirect page

In reply to Miriam Laidlaw

Re: Anomaly theme question 2

by Chrissy Trenholme -

Hi Miriam,

This has worked beautifully.  Many thanks for the help and advice from all of you.

Chrissy

In reply to Chrissy Trenholme

Re: Anomaly theme question 2

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Another way is to change anomaly/config.php to ADD this layout which tells which layout file redirect uses...like so...

    // The pagelayout used when a redirection is occuring.
    'redirect' => array(
        'file' => 'general.php',
        'regions' => array(),
        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
    ),
    // The pagelayout used for reports
    'report' => array(
        'file' => 'report.php',
        'regions' => array('side-pre'),
        'defaultregion' => 'side-pre',
    ),
);

Then your 'redirect' page will look like your theme page. smile

Mary

In reply to Mary Evans

Re: Anomaly theme question 2

by Chrissy Trenholme -

Hi Mary,

I have tried to add this to my config.php but with no luck, it seems to lock me out of the system when I do the change.  I was putting it in right at the end after this code 'options' => array('langmenu' => true) and between the ), and ); $THEME->rendererfactory = 'theme_overridden_renderer_factory';

'options' => array('langmenu' => true)

),

here

);

$THEME->rendererfactory = 'theme_overridden_renderer_factory';

$THEME->enable_dock = true;

$THEME->editor_sheets = array('editor');

 

is that right?  Thanks, Chrissy

In reply to Chrissy Trenholme

Re: Anomaly theme question 2

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

No.

You only need to add the part I highlighted in green not the whole of the code I added . If you look again the part I added after the heighlighed area is in a light gray meaning that is the code that exists already in your config.php.

So just add the this part ...

    // The pagelayout used when a redirection is occuring.
    'redirect' => array(
        'file' => 'general.php',
        'regions' => array(),
        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
    ),

above where you see this code...

    'report' => array(
        'file' => 'report.php',
        'regions' => array('side-pre'),
        'defaultregion' => 'side-pre',
    ),
);

So it fits below print layout and above report layout...like so...

  
    'print' => array(
        'file' => 'general.php',
        'regions' => array(),
        'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
    ),

HERE


    'report' => array(
        'file' => 'report.php',
        'regions' => array('side-pre'),
        'defaultregion' => 'side-pre',
        'options' => array('langmenu' => true)
    ),
);

Hope this helps?

Mary

In reply to Mary Evans

Re: Anomaly theme question 2

by Chrissy Trenholme -

Mary,

Thanks for the help - being new to this it is great to have specific instructions and it worked a treat.

Chrissy

In reply to Chrissy Trenholme

Re: Anomaly theme question 2

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

It's all part of the learning curve!  The more mistakes you make the quicker you learn. smile

Glad it's all working as you want it to.

Cheers

Cheers

Mary