Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can I edit/disable adminbar.css?ver=3.0.1? (not adminbar.css)


  • zomex
    Member

    @zomex

    Hello everyone,

    I have a tiny problem I’m hopping someone can help me with. I’ve created a customised version of the default Buddypress theme and instead of having a set width for the admin bar I have edited adminbar.css to make it stretch across the whole screen seen here:

    http://skateify.com/

    Now I’ve noticed that every sub-blog loads a file called adminbar.css?ver=3.0.1 which I imagine is a database based file. As a result of this the admin bar on other blogs has a a set width seen below:

    http://concept.skateify.com/

    I’m wondering if anyone knows where/how I can find the adminbar.css?ver=3.0.1 file as I only need to edit 1 line. If I add this to my style.css file to over right it doesn’t have any affect.

    The CSS change I need to make to the adminbar.css?ver=3.0.1 file is as simple as:

    body#bp-default #wp-admin-bar .padder { max-width: 950px; }

    to

    body#bp-default #wp-admin-bar .padder { max-width: none; }

    :D

    Any help with this will be greatly appreciated!

    Thanks,
    Jack

Viewing 13 replies - 1 through 13 (of 13 total)

  • zomex
    Member

    @zomex

    OK I’ve noticed that the line to reference the strange adminbar css file is inserted through this:

    I assume this is inserted from the database? Any help with this will be greatly appreciated!

    Thanks,
    Jack


    zomex
    Member

    @zomex

    [backticks][/backticks]


    zomex
    Member

    @zomex

    Sorry:


    zomex
    Member

    @zomex

    I’ve tried everything to figure this out but I’ve run out of ideas :( Does anyone know the best way to go about this?

    Here’s some screenshots showing the file in Firebug but it doesn’t exist so I imagine the styles are taken from the database?

    http://skateify.com/1.png

    http://skateify.com/2.png

    Thanks everyone!


    zomex
    Member

    @zomex

    Can anyone help with this? I’m desperate :(


    r-a-y
    Keymaster

    @r-a-y

    @zomex – If you’re trying to override the adminbar CSS on the subblog, create a file called:
    `/wp-content/themes/_YOURTHEME_/_inc/css/adminbar.css`

    And copy the styles from bp-default’s adminbar.css. Then you can customize the styles to your heart’s content.


    Hugo Ashmore
    Participant

    @hnla

    @zomex ignore the query string it’s a version string appended when the style sheet is added to the output of the page and is simply a method used to force refresh of browser cache , it’s appended to the file after the fact and no file actually exists physically with a query string, just edit the adminbar.css as r-a-y has shown you

    Thanks very much for your replies!

    I just created the file and added the overights that work on the main blog with no luck :( I’ve created a short screencast so you can see the problem:

    http://www.zomex.com/help.mp4

    As you can see when applying the change to adminbar.css?ver=3.0.1 it works but it doesn’t on adminbar.css.

    I’ll send the first person to help me solve this $5 via PayPal.

    Thanks very much for your replies!
    Jack

    @r-a-y

    Unfortunately that method breaks the adminbar in the wordpress admin panel :(

    Thanks.

    :(


    r-a-y
    Keymaster

    @r-a-y

    @zomex – You might want to try this in your theme’s functions.php:

    `remove_action( ‘init’, ‘bp_core_add_admin_bar_css’ );

    if ( !is_admin() )
    add_action( ‘init’, ‘bp_core_add_admin_bar_css’ );`

    Untested, but give it a shot.

    Actually, based on your report, it’s hard to give a definitive answer. What exactly is breaking in the admin area?

    Thanks for your reply. I’d rather not touch the functions.php file due to a lack of knowledge of PHP.

    The problem is that Buddypress is loading 2 different CSS files for the admin bar. They are:

    /buddypress/bp-themes/bp-default/_inc/css/adminbar.css

    and

    /buddypress/bp-themes/bp-default/_inc/css/adminbar.css?ver=3.0.3

    On the adminbar.css file I made changes so the admin bar stretches across the whole page.

    When visiting a sub-domain blog it loads the second file called adminbar.css?ver=3.0.3 so my admin bar doesn’t stretch across the whole screen anymore. I can’t edit this file as it doesn’t exist and is inserted via a line of PHP in the header.php file.

    Honestly I’m very close to giving up with Buddypress completely as I’ve been trying to resolve this issue for over a month now. No one knows why Buddypress is adding this database version of the adminbar.css file and I don’t see why it’s doing it either.

    I can edit /buddypress/bp-themes/bp-default/_inc/css/adminbar.css?ver=3.0.3 via Firebug and change the 1 line of code to fix the admin bar but I can’t reach that file as it doesn’t exist at all.

    Jack

    First of all, it’s not a database version. CSS in WordPress and BuddyPress has those “get” parameters in the URL as a means of forcing browsers to refetch the file rather than use its cached version. For example, when BuddyPress is upgraded in v1.3, you don’t want people to be loading the browser cache version of the CSS for v1.2. This is exactly what hnla told you above four weeks ago.

    Secondly, if your theme is trying to load two versions of that file, it’s because in your child theme (or customised version thereof) is calling it twice. I can’t comment where or how this could be happening as we can’t see any custom script you’ve put into your theme.

    Finally, you should be safe to copy and paste the php snippet r-a-y gave you two weeks ago into your functions.php; just be sure to paste it before the “?>” line at the bottom of the file.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Can I edit/disable adminbar.css?ver=3.0.1? (not adminbar.css)’ is closed to new replies.
Skip to toolbar