cleaning up my act
mörten:dk is now a bit more 2007 hip and much more drupal :)
well after 2 evenings (aka nights) to throw the stuff together, im kinda satisfied.
keep it simple -drupal!
No more 69 different views- templates and 4572421lines of template.php + panels stuff and all kinds of modules & hacks all around.
So this time i tried to set my mind right before i digged in (well actually i just read the notes i wrote on the flight home from oscms, about theming n stuff) -and it actually worked (WTF!).
As i see this drupal stuff its is a mind game man here you got all the opportunities to create what ever it is you want to, and suddently yout drowning in all kinds of code & drap - so keep it drupal simple
one of the small tricks i did use though were this one, a simple way to add special css to the admin areas and hide sidebars etc when your in the admin.
#000000">#0000BB"><?php
#007700">function #0000BB">_phptemplate_variables#007700">(#0000BB">$hook#007700">, #0000BB">$vars#007700">) {
switch (#0000BB">$hook#007700">) {
case #DD0000">'page'#007700">:
global #0000BB">$user#007700">;
#FF8000">//admin & edit template
#007700">if (#0000BB">arg#007700">(#0000BB">0#007700">) == #DD0000">'admin' #007700">&& #0000BB">arg#007700">(#0000BB">1#007700">) == #DD0000">'build' #007700">&& #0000BB">arg#007700">(#0000BB">2#007700">) == #DD0000">'block'#007700">){
#0000BB">$vars#007700">[#DD0000">'template_file'#007700">] = #DD0000">'page'#007700">;
}elseif (#0000BB">arg#007700">(#0000BB">0#007700">) == #DD0000">'admin' #007700">|| #0000BB">arg#007700">(#0000BB">1#007700">) == #DD0000">'add' #007700">|| #0000BB">arg#007700">(#0000BB">2#007700">) == #DD0000">'edit' #007700">|| #0000BB">arg#007700">(#0000BB">2#007700">) == #DD0000">'revisions' #007700">|| #0000BB">arg#007700">(#0000BB">2#007700">) == #DD0000">'translation' #007700">){
#0000BB">$vars#007700">[#DD0000">'template_file'#007700">] = #DD0000">'page-edit'#007700">;
#0000BB">$vars#007700">[#DD0000">'is_admin'#007700">] = #DD0000">'1'#007700">;
}
break;
}
return #0000BB">$vars#007700">;
}
#0000BB">?>in the page.tpl you can now tell it if a user is doing some kinda admin stuff
</head>
<body #000000">#0000BB"><?php #007700">if(#0000BB">$is_admin#007700">){print #DD0000">'id="admin"'#007700">;} #0000BB">?>>and then i can remove all stuff that we dont wanna use in the admin
/*drupal admin*/
#admin .pageBlock_1_Width{width:880px; }
#admin .pageBlock_2_Width {display:none;}
#admin .pageBlock_3_Width {display:none}
#admin .js .resizable-textarea textarea {width:100%;}As always theres a need for fiddeling around and get all the details right aka get drupal to do what you want - so with my normal pace ill be done in 2009 -well my portfolio is getting up to date, but damn i have to clean up some of the style madness over there ;)
css framework anyone?
For the last coupple of months i have been playing around with a simple little "css framework" where it should be easy to create the design you wants, and add the most simple stuff 2 blocks 50% wide each inside another block etc - without hacking all kinds of crap outta ie - if anybodys interested then it can be downloaded from css.morten.dk. Maybe someday ill even write some documentation! ...

