PDA

View Full Version : Adding a button in the header


MaryTheG(r)eek
01-02-2011, 05:31 PM
Hello and Happy New Year to all,

I must admit that I'm old fashioning in coding, so I'm still using tables instead of divs. But in my new site I want to use the "new technology":D. So, can someone tell me how I can add 2 menu buttons (one beside the other) on the header's right-bottom position? I mean over the vB's Tabs.

Thank you
Maria

TheLastSuperman
01-03-2011, 12:35 AM
Maria,

Give these a read ;).

https://vborg.vbsupport.ru/showthread.php?t=226914
https://vborg.vbsupport.ru/showthread.php?t=228338

Removing default tabs here:
https://vborg.vbsupport.ru/showthread.php?t=234220

And finally this:
https://vborg.vbsupport.ru/showthread.php?t=256333
*So basically no you don't need a plugin however best bet is to do one so no need to do template edits if your style does not update correctly or something is overwritten ;).

MaryTheG(r)eek
01-03-2011, 05:40 AM
Thank you but seems that I was not understandable. I don't want to add another Tab in the Tab line. I know how to do it. What I want is to add 2 normal button in the header and align them bottom-right. If it was a cell in a table I had to write align="right" valign="bottom". But using divs must be something like div class="float:container" etc etc ....

Maria

TheLastSuperman
01-03-2011, 06:46 AM
Thank you but seems that I was not understandable. I don't want to add another Tab in the Tab line. I know how to do it. What I want is to add 2 normal button in the header and align them bottom-right. If it was a cell in a table I had to write align="right" valign="bottom". But using divs must be something like div class="float:container" etc etc ....

Maria

I did some quick tinkering, copying a button code out of showthread template and edited my header to display a button ;).

Example of header template:

<div class="above_body"> <!-- closing tag is in template navbar -->
<div id="header" class="floatcontainer doc_header">
<div><a name="top" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}" class="logo-image"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></div>
<div style="float:right;margin-right:10px;margin-top:20px;">
<a href="newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1"
class="newcontent_textcontrol" id="newreplylink_top"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase closed_thread}</vb:if></a>
<img style="display:none" id="progress_newreplylink_top" src="{vb:stylevar imgdir_misc}/progress.gif" alt="" />
</div>
<div id="toplinks" class="toplinks">

Image example:

https://vborg.vbsupport.ru/attachment.php?attachmentid=125172&d=1294044553

You can see the code I used in blue, it's a rough draft so now simply edit the code to show your buttons :D. Let me know how it goes, you can also get rid of style="yadda yadda" in the <div and use class="yadda yadda" by adding in your own css definitions to additional.css template :D.

MaryTheG(r)eek
01-03-2011, 07:27 AM
:) Thank you... Meanwhile, see what I succeeded so far to do with my designing knowledge. At least they appear in the header :D. Now I'll try your instructions.

Thank you
Maria

MaryTheG(r)eek
01-03-2011, 07:39 AM
Thank you Superman :-). I mixed your code with mine and it works perfect. I used the div settings that you gave me, and I added a ...table inside ...hahaha... Not right coding, but works fine.

Thank you again.
Maria

TheLastSuperman
01-03-2011, 05:46 PM
Thank you Superman :-). I mixed your code with mine and it works perfect. I used the div settings that you gave me, and I added a ...table inside ...hahaha... Not right coding, but works fine.

Thank you again.
Maria

No problem! I went to bed after that lol it was late but at some point when you have a few spare minutes (we never do eh?!) sit down and brush up on CSS, tables are easier but CSS would be more hmm how shall I put it... "proper" ;). Here's a rough outline of a member who I gave hints to then helped near the end: https://vborg.vbsupport.ru/showthread.php?t=255222 and as you can see he wanted to use <table and <td etc but with some time he learned quite a bit and tbo it will only help you when constructing any template part of your mods :D.