vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Adding a button in the header (https://vborg.vbsupport.ru/showthread.php?t=256364)

MaryTheG(r)eek 01-02-2011 05:31 PM

Adding a button in the header
 
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

1 Attachment(s)
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

1 Attachment(s)
Quote:

Originally Posted by MicroHellas (Post 2143113)
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:

Code:

<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/attachmen...2&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

1 Attachment(s)
:) 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

Quote:

Originally Posted by MicroHellas (Post 2143151)
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.


All times are GMT. The time now is 02:08 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00999 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete