Include Login Box in the top bar Posted by kwow 11 Oct 2005 05:40 UTC Hi, I had this thought of putting the Login box in the tiki top bar. I am wondering how this could be easily done. Can I use the code similar to the inlne module to do this?? Some pointer on where to start is much appreciated. TIA. --kwow
Posted by Gary Cunningham-Lee 13 Oct 2005 02:12 UTC Modify tiki-top_bar.tpl by adding a statement to include the login file, like this: Copy to clipboard{include file="modules/mod-login_box.tpl"} --Gary
Posted by kwow 14 Oct 2005 00:13 UTC So silly of me not to think of that. 😡 I do face another problem in using the inline login-box module. Now the home page displays two login-boxes - one in the body and another login-box module on the top bar. Any way to control the login-box module at the top bar not to show up only on the home page but display after you logged in? I reckon it to be similar to the serach box display in the top right corner Planetfall theme. Not too sure how difficult to code this but I like the way how this is being display. Maybe I am asking for too much........😐 --kwow
Posted by Rick Sapir / Tiki for Smarties 14 Oct 2005 02:45 UTC > So silly of me not to think of that. 😡 > > I do face another problem in using the inline login-box module. Now the home page displays two login-boxes - one in the body and another login-box module on the top bar. Any way to control the login-box module at the top bar not to show up only on the home page but display after you logged in? > Try this: Copy to clipboard{if !$user} {include file="modules/mod-login_box.tpl"} {/if} Now the login module will appear only when user is not logged in. > I reckon it to be similar to the serach box display in the top right corner Planetfall theme. > > Not too sure how difficult to code this but I like the way how this is being display. Maybe I am asking for too much........😐 > > --kwow
Posted by kwow 14 Oct 2005 10:19 UTC Thanks Gary and Rick for the code. I am trying out all ways to change the font color in the module box as it clashes with the background color of the top bar. I know I can change it out at the cbox property in the stylesheet but then this will be applying it across the whole site. What my intention is have a separate property control just for this so that I can change the font color, clear the borders, etc without affecting the rest of the cbox property currently used. Tried but no luck due to my limited skills 😐. Any help here will be much appreciated. --kwow
Posted by Rick Sapir / Tiki for Smarties 15 Oct 2005 01:44 UTC For a quick hack, you can add a new background color directly in mod-login_box.tpl file. Make the very first line of the file: Copy to clipboard<div style="background:#ffffff;"> Then add a closing </div> at the end of the file. In this example, you'll get a white background. Simply replace the #ffffff with any color. HTH, Rick > Thanks Gary and Rick for the code. > > I am trying out all ways to change the font color in the module box as it clashes with the background color of the top bar. I know I can change it out at the cbox property in the stylesheet but then this will be applying it across the whole site. > > What my intention is have a separate property control just for this so that I can change the font color, clear the borders, etc without affecting the rest of the cbox property currently used. > > Tried but no luck due to my limited skills 😐. Any help here will be much appreciated. > > --kwow
Posted by kwow 22 Oct 2005 03:05 UTC Rick, Thanks for the little hack offered. I was wondering again how I can align this module to the right hand side of the screen. Try adding a float:right tag but did not help. I wanted this module to be wrap around my page title (the first line) also. Now it is on another line. TIA. --kwow
Posted by Gary Cunningham-Lee 24 Oct 2005 01:53 UTC My Planetfall adaptation uses tables and divs for layout. The header area looks like this (parentheses substituting for angle brackets): (table cellspacing="0" cellpadding="0" width="100%") (tr) (td id="planetfall_header" width="100%") (div id="planetfall_header_module") User errorPlugin argument(s) missing or invalid:page (/div) (div id="planetfall_logo")(/div) (/td) (/tr) (/table) and in the style sheet: .... div#planetfall_header_module { float: right; margin: 0; padding-left: 0; vertical-align: top; width: 180px; } ... -- Gary
Posted by Rick Sapir / Tiki for Smarties 24 Oct 2005 14:00 UTC Gary has the right idea about ussing your stylesheet to control the layout (as opposed to including formatting directly in your HTML pages). However... here's how to move the module to the right: Copy to clipboard<div style="background:#ffffff;" align="right"> HTH, -Rick > Rick, > > Thanks for the little hack offered. > I was wondering again how I can align this module to the right hand side of the screen. Try adding a float:right tag but did not help. I wanted this module to be wrap around my page title (the first line) also. Now it is on another line. > > TIA. > > --kwow
Posted by Gary Cunningham-Lee 26 Oct 2005 03:38 UTC > Gary has the right idea about ussing your stylesheet to control the layout (as opposed to including formatting directly in your HTML pages). However... here's how to move the module to the right: > > Copy to clipboard> <div style="background:#ffffff;" align="right"> > Do you mean "text-align"? I couldn't find an "align" property in CSS2. Maybe I'm missing something. Anyway, the div that contains the search module div in my Planetfall theme also contains a logo image, which I wanted to display at the left side (and there's a separate background image as well — bg img of the containing table cell — to maintain a nice display on wide pages and to allow the logo on top to be changed independently), so floating the module to the right seemed like a good way to get it over there while not interfering with the placement of the logo image. I suppose the main point is that there are different ways to get the same results. -- Gary
Posted by kwow 26 Oct 2005 12:10 UTC Thanks to Gary and Rick for all the pieces of advice offered. 😉 I'm too wondering if Rick is talking text-align or align.....I tried both and sadly did not work. Maybe I am too missing something (most likely my programming skills I guessed). Can I ask another question? Because we are using DIV for the login_box, there is a gap separating the first line of text to the second line. I tried illustrating below: This is the first line of text ------ | Login Box | | | | | |----| The second line appears here (after the login_box module) Question: How can I close the gap and have the second appear directly below the first line. I did not mention that the second line is the menu bar. Not too sure whether this has any effect though.... P.S. The login box lose the effect after I post this. What I intended is the login_box should be on the right handside. TIA. --kwow