Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

'RTL'ed Dashboard?! Is it possible?

qwentyqwenty New
edited May 2012 in Vanilla 2.0 - 2.8
  1. How can I change dashboard direction and alignment to rtl direction?
    (because of a the language starts from right and goes to left!)

  2. Is there any theme for dashboard?

Best Answer

  • Options
    x00x00 MVP
    Answer ✓

    almost you have to understand how css cascades. books by htmldog are good.

    basically customadmin.css are loaded last, so can override previous rules.

    grep is your friend.

Answers

  • Options

    if you create a file called customadmin.css in themes/yourtheme/design/

    It will style over the top of /design/admin.css ,

    alternatively if you wan to make a lot of changes copy dashboard/design/admin.css to themes/yourtheme/design/

    then you can edit admin.css.

    More advanced is theme hooks. But I would keep it simple.

    The way Garden framework works is sort of parallel/cascading, so the way the themes are applied mirror the structure of the dashboard and vanilla app themes. that is why the themes folder is outside of apps, becuase it works in parallel.

    grep is your friend.

  • Options

    Great Idea! tnx.

    I've created a file into /themes/mytheme/design/ and added this code into it:

    body { direction: rtl; }

    Result: so so!

    <<. Using above code makes some problem! -> see this image, then see this one which is original.

    <<. How can I move left-ribbon to right side? (See this image)

  • Options

    I guess those are inline or inline-block elements, as I don't style rtl I havent encountered this. I would style the outer element as direction:ltr;

    Otherwise

    #Content {
        border-right: 1px solid #82BDDD;
        margin: 0 200px 0 0;
        padding: 0;
    }
    
    #Panel{
       float:right;
       border-left: 1px solid #82BDDD;
       border-right: none;
    }
    

    grep is your friend.

  • Options

    @x00

    Does your head hurt from storing all that knowledge and providing all those amazing answers?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    422422 Developer MVP

    You could edit admin.master.php file to within your theme folder.

    There was an error rendering this rich post.

  • Options

    @422 , Please don't abandon me on your "tip"s! today is the 2nd day that I'm working with Vanilla! and this is base of my questions, because I'm thinking like MyBB users (I was a MyBB user for 3 years).

    1-> Transferring "admin.master.php" file from /vanilla/applications/dashboard/views to /vanilla/themes/my-target-theme (Correct?)

    2-> Editing it; but "admin.master.php" is awesome! Actually, which part should I edit? Using this method, should I leave @x00 tip OR I should edit admin.master.php side by side editing admin.css as x00 mentioned ?

  • Options
    422422 Developer MVP

    no copy it across ( dont transfer any files from core )

    no @x00 is totally correct,. but you can edit in tandem the src file and the css

    There are in fact a couple of files you could ( copy ) over to your THEME.

    The admin css file and the admin php file.

    From there you are on your own, unfortunately for me. Because I dont intend firing up one of our forums and converting it to RL for you.

    But using firebug you should see that the sidebar ( standard ) has a float of left, and the content perhaps has a float of right. You may be able to swap these around by changing float attributes, its worth a go.

    The php may well have other attributes that need to be addressed on ad-hoc basis.

    There was an error rendering this rich post.

  • Options
    422422 Developer MVP
    edited May 2012

    a quick dirty hack. ( untested )

    in customadmin.css

    #Panel {
        background: none repeat scroll 0 0 #DBF3FC;
        border-right: 1px solid #82BDDD;
        border-top: 1px solid #82BDDD;
        float: right;
        position: absolute;
        right: 0;
        width: 25%;
        }
    
    #Content {
        border-left: 1px solid #82BDDD;
        margin: 0 0 0 0;
        padding: 0;
        width: 75%;
        }

    There was an error rendering this rich post.

  • Options

    views should go in your theme's /views folder.

    grep is your friend.

  • Options
    qwentyqwenty New
    edited May 2012

    customadmin.css didn't work, but changed "admin.css" file is working well :))

    422 said: You could edit admin.master.php file to within your theme folder.

    x00 said: views should go in your theme's /views folder.

    Ok, which item should I change inside admin.master.php?

    Note: after changing admin.css, Dashboard has been rtl. admin.master.php can make it better?

  • Options

    You don't need to change admin.master.php or move it. Just for further reference if you needed to.

    grep is your friend.

  • Options
    422422 Developer MVP

    we always copy across : default.master.php error.master.php and admin.master.php

    but its fair to say ive never touched admin.master file.

    There was an error rendering this rich post.

  • Options
    qwentyqwenty New
    edited May 2012

    x00 said:
    if you create a file called customadmin.css

    alternatively if you wan to make a lot of changes copy dashboard/design/admin.css to themes/yourtheme/design/

    What's the different between calling customadmin.css or admin.css, placed into design folder of the theme? admin.css overwrite itself on the main admin.css located into dashboard/design completely, but customadmin.css overwrite just its code? Am I right?

    Is it a rule using "custom" word at beginning of names? or every name is possible?

  • Options
    x00x00 MVP
    Answer ✓

    almost you have to understand how css cascades. books by htmldog are good.

    basically customadmin.css are loaded last, so can override previous rules.

    grep is your friend.

Sign In or Register to comment.