Editting css.php Not Working!

Hello,

I have recently downloaded Elgg 1.7.10.

I am trying to edit the theme through CSS.

What I did:

I used Firebug on Firefox to edit the CSS. Then I went to the css.php file (views/default/) and pasted the CSS (Replacing the old CSS). After doing that, nothing changes on the site. I tried different computers, clearing Cache, but no matter what changes I make in the css.php file the site doesnt change. I even tried downloading themes and changing the css.php in the themes, but again nothing happens!

Please advise!

 

The CSS:

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
    border0 none;
    font-familyinherit;
    font-size100%;
    font-styleinherit;
    font-weightinherit;
    margin0;
    outline0 none;
    padding0;
    vertical-alignbaseline;
}
:focus {
    outline0 none;
}
ol, ul {
    list-stylenone outside none;
}
em, i {
    font-styleitalic;
}
table {
    border-collapseseparate;
    border-spacing0;
}
caption, th, td {
    font-weightnormal;
    text-alignleft;
    vertical-aligntop;
}
blockquote:before, blockquote:after, q:before, q:after {
    content"";
}
blockquote, q {
    quotes"" "";
}
.clearfloat {
    clearboth;
    font-size1px;
    height0;
    line-height0;
}
body {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    color#333333;
    font80%/1.4 "Lucida Grande",Verdana,sans-serif;
    margin0 auto;
    padding0;
    text-alignleft;
}
a {
    color#333333;
    outlinemedium none;
    text-decorationnone;
}
a:visited {
}
a:hover {
    color#333333;
    text-decorationnone;
    text-shadow-3px 2px 2px #F7F7F7;
}
p {
    margin0 0 15px 0;
}
img {
    bordermedium none;
}
ul {
    margin5px 0 15px;
    padding-left20px;
}
ul li {
    margin0;
}
ol {
    margin5px 0 15px;
    padding-left20px;
}
ul li {
    margin0;
}
form {
    margin0;
    padding0;
}
small {
    font-size90%;
}
h1, h2, h3, h4, h5, h6 {
    font-weightbold;
    line-heightnormal;
}
h1 {
    font-size1.8em;
}
h2 {
    font-size1.5em;
}
h3 {
    font-size1.2em;
}
h4 {
    font-size1em;
}
h5 {
    font-size0.9em;
}
h6 {
    font-size0.8em;
}
dt {
    font-weightbold;
    margin0;
    padding0;
}
dd {
    margin0 0 1em 1em;
    padding0;
}
pre, code {
    backgroundnone repeat scroll 0 0 #EBF5FF;
    font-familyMonaco,"Courier New",Courier,monospace;
    font-size12px;
    overflowauto;
    white-spacepre-wrap;
    word-wrapbreak-word;
}
code {
    padding2px 3px;
}
pre {
    line-height1.3em;
    margin0 0 15px;
    padding3px 15px;
}
blockquote {
    backgroundnone repeat scroll 0 0 #EBF5FF;
    bordermedium none !important;
    border-radius5px 5px 5px 5px;
    line-height1.3em;
    margin0 0 15px;
    padding3px 15px;
}
blockquote p {
    margin0 0 5px;
}
#page_container {
    margin0;
    padding0;
}
#page_wrapper {
    margin0 auto;
    min-height300px;
    padding0;
    width990px;
}
#layout_header {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    height67px;
    text-alignleft;
    width100%;
}
#wrapper_header {
    margin0;
    padding10px 20px 20px 0;
}
#wrapper_header h1 {
    letter-spacing-0.03em;
    margin10px 0 0;
}
#layout_canvas {
    backgroundnone repeat scroll 0 0 white;
    border-bottom1px solid #CCCCCC;
    border-radius8px 8px 8px 8px;
    border-right1px solid #CCCCCC;
    margin0 0 20px;
    min-height360px;
    padding20px;
}
#one_column {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    border-radius8px 8px 8px 8px;
    margin0;
    min-height360px;
    padding0 0 10px;
}
#two_column_left_sidebar {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    border-bottom1px solid #CCCCCC;
    border-radius8px 8px 8px 8px;
    border-right1px solid #CCCCCC;
    floatleft;
    margin0 20px 0 0;
    min-height360px;
    padding0;
    width210px;
}
#two_column_left_sidebar_maincontent {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    border-radius8px 8px 8px 8px;
    floatleft;
    margin0;
    min-height360px;
    padding0 0 5px;
    width718px;
}
#two_column_left_sidebar_maincontent_boxes {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    border-radius8px 8px 8px 8px;
    floatleft;
    margin0 0 20px 20px;
    padding0 0 5px;
    width718px;
}
#two_column_left_sidebar_boxes {
    floatleft;
    margin0 0 20px 0;
    min-height360px;
    padding0;
    width210px;
}
#two_column_left_sidebar_boxes .sidebarBox {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    border-bottom1px solid #CCCCCC;
    border-radius8px 8px 8px 8px;
    border-right1px solid #CCCCCC;
    margin0 0 22px;
    padding4px 10px 10px;
}
#two_column_left_sidebar_boxes .sidebarBox h3 {
    color#0054A7;
    font-size1.25em;
    line-height1.2em;
    padding0 0 5px;
}
#two_column_right_sidebar {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    border-bottom1px solid #CCCCCC;
    border-radius8px 8px 8px 8px;
    border-right1px solid #CCCCCC;
    floatleft;
    margin0 0 0 20px;
    min-height360px;
    padding0;
    width210px;
}
.contentWrapper {
    backgroundnone repeat scroll 0 0 white;
    border-radius8px 8px 8px 8px;
    margin0 10px 10px;
    padding10px;
}
span.contentIntro p {
    margin0;
}
.notitle {
    margin-top10px;
}
#widgets_left {
    margin0 20px 20px 0;
    min-height360px;
    padding0;
    width303px;
}
#widgets_middle {
    margin0 0 20px;
    padding0;
    width303px;
}
#widgets_right {
    floatleft;
    margin0 0 20px 20px;
    padding0;
    width303px;
}
#widget_table td {
    border0 none;
    margin0;
    padding0;
    text-alignleft;
    vertical-aligntop;
}
* html #widgets_right {
    floatnone;
}
* html #profile_info_column_left {
    margin0 10px 0 0;
    width200px;
}
* html #dashboard_info {
    width585px;
}
:first-child + html #profile_info_column_left {
    width200px;
}
#layout_spotlight {
    backgroundnone repeat scroll 0 0 white;
    border-bottom1px solid #CCCCCC;
    border-radius8px 8px 8px 8px;
    border-right1px solid #CCCCCC;
    margin20px 0;
    padding0;
}
#wrapper_spotlight {
    heightauto;
    margin0;
    padding0;
}
#wrapper_spotlight #spotlight_table h2 {
    color#333333;
    font-size1.25em;
    line-height1.2em;
}
#wrapper_spotlight #spotlight_table li {
    color#CCCCCC;
    line-height1.2em;
    list-stylesquare outside none;
    margin5px 20px 5px 0;
}
#wrapper_spotlight .collapsable_box_content {
    -moz-border-bottom-colorsnone;
    -moz-border-imagenone;
    -moz-border-left-colorsnone;
    -moz-border-right-colorsnone;
    -moz-border-top-colorsnone;
    backgroundnone repeat scroll 0 0 transparent;
    border-color#CCCCCC -moz-use-text-color -moz-use-text-color;
    border-rightmedium none;
    border-stylesolid none none;
    border-width1px medium medium;
    margin0;
    min-height60px;
    padding10px 10px 5px;
}
#spotlight_table {
    margin0 0 2px;
}
#spotlight_table .spotlightRHS {
    floatright;
    margin0 0 0 50px;
    width270px;
}
:first-child + html #wrapper_spotlight .collapsable_box_content {
    width958px;
}
#layout_spotlight .collapsable_box_content p {
    padding0;
}
#wrapper_spotlight .collapsable_box_header {
    backgroundnone repeat scroll 0 0 transparent;
    bordermedium none;
}
#layout_footer {
    backgroundnone repeat scroll 0 0 #B6B6B6;
    border-radius8px 8px 8px 8px;
    height80px;
    margin0 0 20px;
}
#layout_footer table {
    margin0 0 0 20px;
}
#layout_footer a, #layout_footer p {
    color#333333;
    margin0;
}
#layout_footer .footer_toolbar_links {
    font-size1.2em;
    padding15px 0 0;
    text-alignright;
}
#layout_footer .footer_legal_links {
    text-alignright;
}
#elgg_topbar {
    backgroundurl("http://www.notebox.ca/ggmss/GSocial/_graphics/toptoolbar_background.gif") repeat-x scroll left top #333333;
    border-bottom1px solid #000000;
    color#EEEEEE;
    height24px;
    min-width998px;
    positionrelative;
    width100%;
    z-index9000;
}
#elgg_topbar_container_left {
    floatleft;
    height24px;
    left0;
    positionabsolute;
    text-alignleft;
    top0;
    width60%;
}
#elgg_topbar_container_right {
    floatright;
    height24px;
    positionabsolute;
    right0;
    text-alignright;
    top0;
}
#elgg_topbar_container_search {
    floatright;
    height21px;
    margin3px 0 0;
    positionrelative;
    right120px;
    text-alignright;
}
#elgg_topbar_container_left .toolbarimages {
    floatleft;
    margin-right20px;
}
#elgg_topbar_container_left .toolbarlinks {
    floatleft;
    margin0 0 10px;
}
#elgg_topbar_container_left .toolbarlinks2 {
    floatleft;
    margin3px 0 0;
}
#elgg_topbar_container_left a.loggedinuser {
    color#EEEEEE;
    font-weightbold;
    margin0 0 0 5px;
}
#elgg_topbar_container_left a.pagelinks {
    colorwhite;
    displayblock;
    margin0 15px 0 5px;
    padding3px;
}
#elgg_topbar_container_left a.pagelinks:hover {
    backgroundnone repeat scroll 0 0 #333333;
    text-decorationnone;
    text-shadow-1px 1px 1px #F7F7F7;
}
#elgg_topbar_container_left a.privatemessages {
    backgroundurl("http://www.notebox.ca/ggmss/GSocial/_graphics/toolbar_messages_icon.gif") no-repeat scroll left 2px transparent;
    cursorpointer;
    margin0 15px 0 5px;
    padding0 0 4px 16px;
}
#elgg_topbar_container_left a.privatemessages:hover {
    backgroundurl("http://www.notebox.ca/ggmss/GSocial/_graphics/toolbar_messages_icon.gif") no-repeat scroll left -36px transparent;
    text-decorationnone;
}
#elgg_topbar_container_left a.privatemessages_new {
    backgroundurl("http://www.notebox.ca/ggmss/GSocial/_graphics/toolbar_messages_icon.gif") no-repeat scroll left -17px transparent;
    colorwhite;
    margin0 15px 0 5px;
    padding0 0 0 18px;
}
* html #elgg_topbar_container_left a.privatemessages_new {
    background-positionleft -18px;
}
* + html #elgg_topbar_container_left a.privatemessages_new {
    background-positionleft -18px;
}
#elgg_topbar_container_left a.privatemessages_new:hover {
    text-decorationnone;
}
#elgg_topbar_container_left a.usersettings {
    color#999999;
    margin0 0 0 20px;
    padding3px;
}
#elgg_topbar_container_left a.usersettings:hover {
    color#EEEEEE;
}
#elgg_topbar_container_left img {
    margin0 0 0 5px;
}
#elgg_topbar_container_left .user_mini_avatar {
    border1px solid #EEEEEE;
    margin0 0 0 20px;
}
#elgg_topbar_container_right {
    padding3px 0 0;
}
#elgg_topbar_container_right a {
    backgroundurl("http://www.notebox.ca/ggmss/GSocial/_graphics/elgg_toolbar_logout.gif") no-repeat scroll right top transparent;
    color#FFFFFF;
    displayblock;
    height20px;
    margin0 5px 0 0;
    padding0 21px 0 0;
}
* html #elgg_topbar_container_right a {
    width120px;
}
#elgg_topbar_container_right a:hover {
    background-positionright -21px;
}
#elgg_topbar_panel {
    backgroundnone repeat scroll 0 0 #333333;
    color#EEEEEE;
    displaynone;
    height200px;
    padding10px 20px;
    positionrelative;
    width100%;
}
ul.topbardropdownmenu, ul.topbardropdownmenu ul {
    displayinline;
    floatleft;
    list-style-typenone;
    margin0;
    padding0;
    positionrelative;
    z-index9000;
}
ul.topbardropdownmenu {
    margin0 20px 0 5px;
}
ul.topbardropdownmenu li {
    displayblock;
    floatleft;
    list-stylenone outside none;
    margin0;
    padding0;
    positionrelative;
}
ul.topbardropdownmenu a {
    displayblock;
}
ul.topbardropdownmenu ul {
    displaynone;
    left0;
    margin0;
    padding0;
    positionabsolute;
}
* html ul.topbardropdownmenu ul {
    line-height1.1em;
}
ul.topbardropdownmenu ul a {
}
ul.topbardropdownmenu ul li {
    floatnone;
}
ul.topbardropdownmenu ul {
    border-top1px solid black;
    top24px;
    width150px;
}
ul.topbardropdownmenu *:hover {
}
ul.topbardropdownmenu a {
    colorwhite;
    padding3px;
    text-decorationnone;
}
ul.topbardropdownmenu li.hover a {
    background-color#333333;
    text-decorationnone;
}
ul.topbardropdownmenu ul li.drop a {
    font-weightnormal;
}
:first-child + html #elgg_topbar_container_left a.pagelinks {
}
:first-child + html ul.topbardropdownmenu li.drop a.menuitemtools {
    padding-bottom6px;
}
ul.topbardropdownmenu ul li a {
    background-color#999999;
    border-bottom1px solid white;
    font-weightbold;
    height22px;
    padding-bottom0;
    padding-left6px;
    padding-top4px;
}
ul.topbardropdownmenu ul a.hover {
    background-color#333333;
}
ul.topbardropdownmenu ul a {
    opacity0.9;
}
.messages {
    backgroundnone repeat scroll 0 0 #CCFFCC;
    border4px solid #00CC00;
    border-radius4px 4px 4px 4px;
    color#000000;
    cursorpointer;
    margin0;
    padding3px 10px;
    positionfixed;
    top30px;
    width969px;
    z-index8000;
}
.messages_error {
    backgroundnone repeat scroll 0 0 #F7DAD8;
    border4px solid #D3322A;
    border-radius4px 4px 4px 4px;
    color#000000;
    cursorpointer;
    margin0;
    padding3px 10px;
    positionfixed;
    top30px;
    width969px;
    z-index8000;
}
.closeMessages {
    floatright;
    margin-top17px;
}
.closeMessages a {
    color#666666;
    cursorpointer;
    font-size80%;
    text-decorationnone;
}
.closeMessages a:hover {
    colorblack;
}
.collapsable_box {
    heightauto;
    margin0 0 20px;
}
* html .collapsable_box {
    height10px;
}
.collapsable_box_header {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    border-bottom1px solid #CCCCCC;
    border-left1px solid white;
    border-right1px solid #CCCCCC;
    border-top-left-radius8px;
    border-top-right-radius8px;
    color#4690D6;
    margin0;
    padding5px 10px;
}
.collapsable_box_header h1 {
    color#0054A7;
    font-size1.25em;
    line-height1.2em;
}
.collapsable_box_content {
    backgroundnone repeat scroll 0 0 #DEDEDE;
    border-bottom1px solid #CCCCCC;
    border-bottom-left-radius8px;
    border-bottom-right-radius8px;
    border-left1px solid white;
    border-right1px solid #CCCCCC;
    heightauto;
    margin0;</di
  • Try running yourdomain.com/upgrade.php after you make changes to css (where yourdomain.com is your website address/domain name)

     

    Rodolfo Hernandez

    Arvixe/Elgg Community Liaison

  • Also, disable the 'Simple Cache' which is under site administration while theming.Cheers

  • The Upgrade.php worked! 

    I tried it before but i don't know why it didn't work. 

    Thanks rjcalifornia

     

  • UPDATE:

    Ok so It worked the first time and I did all the updates.

    Now when I do the CSS updates in Firebug and copy it into the CSS.php under /mod/socialweb/views/default and then run the upgrade.php, the changes I made don't apply.. suggestions?

  • Oh, for that theme, make sure it is at the bottom on the tools administration

     

    Rodolfo Hernandez

    Arvixe/Elgg Community Liaison

  • it's simple , go to folder _css and change css.php (remove /* ... */) to :

    <?php

     

    require_once(dirname(dirname(__FILE__)) . "/engine/start.php");

     

    $default_css = elgg_view("css");

     

    header("Content-type: text/css", true);

    header('Expires: ' . date('r',time() + 864000), true);

    header("Pragma: public", true);

    header("Cache-Control: public", true);

    header("Content-Length: " . strlen($default_css));

     

    echo $default_css;

     

     

    define('externalpage',true);

     

    global $viewinput, $override;

    $viewinput['view'] = 'css';

    $viewinput['viewtype'] = $_GET['viewtype'];

     

    $override = true;

     

    header("Content-type: text/css", true);

    header('Expires: ' . date('r',time() + 86400000), true);

    header("Pragma: public", true);

    header("Cache-Control: public", true);

     

    header("Content-Length: " . strlen($default_css));

    require_once(dirname(dirname(__FILE__)) . '/simplecache/view.php');

     

    and now you can change views/css.php

  • RACHID

    Do you mean copy what you have above into css.php uner _css? 

    This is what my css.php under _css looks like right now :

    <?php

    /**

     * Elgg CSS file

     *

     * @package Elgg

     * @subpackage Core

     */

     

    /*

     

    require_once(dirname(dirname(__FILE__)) . "/engine/start.php");

     

    $default_css = elgg_view("css");

     

    header("Content-type: text/css", true);

    header('Expires: ' . date('r',time() + 864000), true);

    header("Pragma: public", true);

    header("Cache-Control: public", true);

    header("Content-Length: " . strlen($default_css));

     

    echo $default_css;

    */

     

    define('externalpage',true);

     

    global $viewinput, $override;

    $viewinput['view'] = 'css';

    $viewinput['viewtype'] = $_GET['viewtype'];

     

    //$override = true;

     

    header("Content-type: text/css", true);

    header('Expires: ' . date('r',time() + 86400000), true);

    header("Pragma: public", true);

    header("Cache-Control: public", true);

     

    // header("Content-Length: " . strlen($default_css));

    require_once(dirname(dirname(__FILE__)) . '/simplecache/view.php');

    I Tried this But it Didn't do anything: 
    <?php
    /**
     * Elgg CSS file
     *
     * @package Elgg
     * @subpackage Core
     */
    /*
    <?php
    require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
    $default_css = elgg_view("css");
    header("Content-type: text/css", true);
    header('Expires: ' . date('r',time() + 864000), true);
    header("Pragma: public", true);
    header("Cache-Control: public", true);
    header("Content-Length: " . strlen($default_css));
    echo $default_css;
    define('externalpage',true);
    global $viewinput, $override;
    $viewinput['view'] = 'css';
    $viewinput['viewtype'] = $_GET['viewtype'];
    $override = true;
    header("Content-type: text/css", true);
    header('Expires: ' . date('r',time() + 86400000), true);
    header("Pragma: public", true);
    header("Cache-Control: public", true);
    header("Content-Length: " . strlen($default_css));
    require_once(dirname(dirname(__FILE__)) . '/simplecache/view.php');
    */
    define('externalpage',true);
    global $viewinput, $override;
    $viewinput['view'] = 'css';
    $viewinput['viewtype'] = $_GET['viewtype'];
    //$override = true;
    header("Content-type: text/css", true);
    header('Expires: ' . date('r',time() + 86400000), true);
    header("Pragma: public", true);
    header("Cache-Control: public", true);
    // header("Content-Length: " . strlen($default_css));
    require_once(dirname(dirname(__FILE__)) . '/simplecache/view.php');
    And rjcalifornia I made it the last plugin on the list but it didn't make a difference. 
    Thanks Everybody for the continuos support! 
  • yes .

    you see /*....*/ in this code ?

    <?php

    /**

     * Elgg CSS file

     *

     * @package Elgg

     * @subpackage Core

     */

    ---- 

    /*  

    ---- 

    require_once(dirname(dirname(__FILE__)) . "/engine/start.php");

     

    $default_css = elgg_view("css");

     

    header("Content-type: text/css", true);

    header('Expires: ' . date('r',time() + 864000), true);

    header("Pragma: public", true);

    header("Cache-Control: public", true);

    header("Content-Length: " . strlen($default_css));

     

    echo $default_css;

    ----

    */

    ----

    define('externalpage',true);

     

    global $viewinput, $override;

    $viewinput['view'] = 'css';

    $viewinput['viewtype'] = $_GET['viewtype'];

    .......

    ......

    .....

     

    then remove this documentation /*....*/ , and you can edit views/css.php .

    sorry for my bad english .

    see the exemple :  http://www.paixland.com , it's my site

  • Your best bet is to make a plug-in of your own rather than messing around with the main files.

    First, create a blank directory in mod and name it 'yourtheme' copy all files from views/default

    css,navigation, page. Then modify to your hearts content.

    Make sure to have a manifest.xml and start.php in the yourtheme directory.

     

    Start.php needs to have

    function yourthemename_theme_init() {
    this section you can modify other elgg functions like layout not just colors

    elgg_register_event_handler('init', 'system', 'yourthemename_theme_init');

     

    the manifest needs:

    <?xml version="1.0" encoding="UTF-8"?>
    <plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8"&gt;
        <name>Mytheme</name>
        <author>Me</author>
        <version>0.1</version>
        <category>theme</category>
        <description>
            Modifies your Elgg site to look how you want.
        </description>
        <website>http://mydomain.com</website&gt;
        <copyright>(C) 2011 Me</copyright>
        <license>GNU Public License version 2</license>
        
        <requires>
            <type>elgg_version</type>
            <version>2011061200</version>(this is for 1.8b2)
        </requires>
        <requires>
            <type>priority</type>
            <priority>after</priority>
            <plugin>profile</plugin>
        </requires>
        <requires>
            <type>priority</type>
            <priority>after</priority>
            <plugin>groups</plugin>
        </requires>
        <requires>
            <type>priority</type>
            <priority>after</priority>
            <plugin>messages</plugin>
        </requires>
        <requires>
            <type>priority</type>
            <priority>after</priority>
            <plugin>search</plugin>
        </requires>
        <requires>
            <type>priority</type>
            <priority>after</priority>
            <plugin>thewire</plugin>
        </requires>
        
        <suggests>
            <type>plugin</type>
            <name>profile</name>
            <version>1.8</version>
        </suggests>
        <admin_interface>simple</admin_interface>
    </plugin_manifest>

    I'm just learning this stuff myself, so if someone has a better way, please let me know.