Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
  #1  
Old 01-02-2011, 05:31 PM
MaryTheG(r)eek MaryTheG(r)eek is offline
 
Join Date: Sep 2006
Location: Greece
Posts: 1,340
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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". 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
Reply With Quote
  #2  
Old 01-03-2011, 12:35 AM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 .
Reply With Quote
  #3  
Old 01-03-2011, 05:40 AM
MaryTheG(r)eek MaryTheG(r)eek is offline
 
Join Date: Sep 2006
Location: Greece
Posts: 1,340
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Attached Images
File Type: jpg buttonsample.jpg (10.8 KB, 0 views)
Reply With Quote
  #4  
Old 01-03-2011, 06:46 AM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MicroHellas View Post
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:



You can see the code I used in blue, it's a rough draft so now simply edit the code to show your buttons . 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 .
Attached Images
File Type: png buttoninheader.png (13.5 KB, 0 views)
Reply With Quote
  #5  
Old 01-03-2011, 07:27 AM
MaryTheG(r)eek MaryTheG(r)eek is offline
 
Join Date: Sep 2006
Location: Greece
Posts: 1,340
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you... Meanwhile, see what I succeeded so far to do with my designing knowledge. At least they appear in the header . Now I'll try your instructions.

Thank you
Maria
Attached Images
File Type: jpg buttonsample.jpg (12.6 KB, 0 views)
Reply With Quote
  #6  
Old 01-03-2011, 07:39 AM
MaryTheG(r)eek MaryTheG(r)eek is offline
 
Join Date: Sep 2006
Location: Greece
Posts: 1,340
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 01-03-2011, 05:46 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MicroHellas View Post
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 .
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:35 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04723 seconds
  • Memory Usage 2,248KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (3)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete