We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

DIY "printable page" feature | Forum

Rich
Rich Oct 31 '13
I couldn't find an option or a plugin that work reference a "printable page" CSS file, so I did this hack... and it worked! :-)

Admin Panel -> Settings -> Main Settings -> Global Page Settings -> Custom Head Code:

<div style="position:absolute;top:0px;left:0px;z-index:100;">
<input type="button" value="Printable" onclick="
$('.ow_sidebar').css('visibility', 'hidden');
$('.ow_sidebar').css('display', 'none');
$('.ow_sidebar').css('position', 'absolute');
$('.ow_header_pic').css('visibility', 'hidden');
$('.ow_header_pic').css('display', 'none');
$('.ow_header_pic').css('position', 'absolute');
$('.ow_chat').css('display','none');
$('.ow_highbox').css('display','none');
$('.ow_highbox').css('visibility', 'hidden');
$('.ow_header').css('display','none');
$('.ow_header').css('visibility', 'hidden');
$('.ow_menu_wrap').css('display','none');
$('.ow_menu_wrap').css('visibility', 'hidden');
$('.ow_site_panel').css('display','none');
$('.ow_site_panel').css('visibility', 'hidden');
$('.ow_page_wrap').css('background-image','none');
">
</div>
Rich
Rich Oct 31 '13
I use the standard "Darklets" theme. If anyone knows how to re-size the main content div to occupy the full width of the page wrapper in the absence of the sidebar on the right, I'd appreciate it.. otherwise I will post it here when I figure it out.. thanks!

[edit: the code above is a combination of simple html forms and jQuery function calls as Javascript]
The Forum post is edited by Rich Nov 1 '13