Unable to open CSS file

Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
In admin panel i can't access the css files, what is the reason for that?
Thanks
APAGAR.png
APAGAR.png  •  50KB


updated by @nmaster88: 03/01/16 03:27:00AM
brian
@brian
9 years ago
10,148 posts
Do you get this everytime on the same file? Can you let me know the file?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
9 years ago
7,715 posts
The screenshot shows the name of the skin is 'WowMusic' which looks like its based off of Flashback by the rest of the screen.

make sure your CSS files are registered in your include.php file for your skin and that they are in the /css directory.

so for flashback that looks like this:
/skins/jrFlashback/include.php

/**
 * jrFlashback_init
 * NOTE: unlike with a module, init() is NOT called on each page load, but is
 * called when the core needs to rebuild CSS or Javascript for the skin
 */
function jrFlashback_skin_init(){
    // Bring in all our CSS files
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'html.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'grid.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'site.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'page.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'banner.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'header.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'footer.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'form_element.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'form_input.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'form_select.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'form_layout.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'form_button.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'form_notice.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'forum.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'list.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'menu.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'table.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'tabs.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'image.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'gallery.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'profile.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'skin.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'slider.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'text.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'bundle.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'base.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'action.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'doc.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'poll.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'slidebar.css');

    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'admin_menu.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'admin_log.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'admin_modal.css');

    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'tablet.css');
    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'mobile.css');

    jrCore_register_module_feature('jrCore', 'css', 'jrFlashback', 'playlist.css');

    // Register our Javascript files with the core
    jrCore_register_module_feature('jrCore', 'javascript', 'jrFlashback', 'responsiveslides.min.js');
    jrCore_register_module_feature('jrCore', 'javascript', 'jrFlashback', 'jrFlashback.js');

    // Slidebars
    jrCore_register_module_feature('jrCore', 'javascript', 'jrFlashback', APP_DIR . '/skins/jrFlashback/contrib/slidebars/slidebars.min.js');

    // Tell the core the default icon set to use (black or white)
    jrCore_register_module_feature('jrCore', 'icon_color', 'jrFlashback', 'white');
    // Tell the core the size of our action buttons (width in pixels, up to 64)
    jrCore_register_module_feature('jrCore', 'icon_size', 'jrFlashback', 16);
    // Hide module icons
    jrCore_register_module_feature('jrCore', 'module_icons', 'jrFlashback', 'show', false);

    // Our default media player skins
    jrCore_register_module_feature('jrCore', 'media_player_skin', 'jrFlashback', 'jrAudio', 'jrAudio_player_dark');
    jrCore_register_module_feature('jrCore', 'media_player_skin', 'jrFlashback', 'jrVideo', 'jrVideo_player_dark');
    jrCore_register_module_feature('jrCore', 'media_player_skin', 'jrFlashback', 'jrPlaylist', 'jrPlaylist_player_dark');

    return true;
}

each of the 'css' filenames will be looked for in
/skins/jrFlashback/css/*

There are some javascript files too. those will all be packaged up into a single file to increase page load time.

Take a look inside some of those files too to see the convention for getting a CSS property into the STYLE tab.

You'll see something like this:

/* @title Site Content */
/* @help This is the main Site Content holder */
#content {
    background-color:#0D4C72;
    max-width:1140px;
    height:100%; /* @ignore */
    margin:0 auto;  /* @ignore */
    padding:0;
    box-shadow: 0 0 4px #000 inset;
}

That commented stuff at the top of the CSS is what will show in the STYLE tab (screenshot). The properties with /* @ignore */ will not show up.
Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
Thanks for the tip.
I've done that but there are some files of css that don't work there! I had to let them on the meta.tpl and i don't know why.
Files like: font-awesome.css (that was taken from the site fontawesome) and other files.
Is there some incompatibilities there?
michael
@michael
9 years ago
7,715 posts
I've linked to the font-awesome CDN before with this code inside the _init()
    jrCore_register_module_feature('jrCore', 'css', '(YOUR SKIN NAME HERE)', '//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css');

--edit--
But if its something like this that isn't going to have any changeable elements anyhow, no problem linking direct from the meta.tpl.

Just want to keep the dynamic one there too, so modules can get their stuff out.
updated by @michael: 11/30/15 10:51:42PM

Tags