Thread: Add-On Releases - AJAX Tabs Content Script v2
View Single Post
  #48  
Old 11-25-2007, 07:55 PM
glorify's Avatar
glorify glorify is offline
 
Join Date: Aug 2004
Posts: 376
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For anyone that likes the default vb look of your table header, here is the way I did it.

Step 1:
Keep a back up of your adv_portal_Tab_Block_Main template, and ajaxtabs.css

Step 2:




Figure out the way you want the header to look. In the first image, I used the default gradient_tcat and gradient_thead gifs. In the second I used the standard gradient_tcat gif, then turned it upside down and renamed it to gradient_thead.gif. Figure out what you want, then upload the two images to your ajaxtabs folder.

Step 3:
Here is my adv_portal_Tab_Block_Main. The red is what you HAVE to change, the blue matches my css, but if you change the width anywhere, you'll have to edit it.
Code:
<tr><td>
<head>
<link rel="stylesheet" type="text/css" href="http://www.XXXX.com/forums/ajaxtabs/ajaxtabs.css" />
<script type="text/javascript" src="http://www.XXXX.com/forums/ajaxtabs/ajaxtabs.js">
/***********************************************
* Ajax Tabs Content script- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
* Ajax Tabs Content script- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
</head>
<body>

<div id="tabs" class="indentmenu">
<ul>
<li><a href="http://www.XXXX.com/forums/tabexternal.php" rel="tabcontainer" class="selected"><strong>&raquo; Tab1</strong></a></li>
<li><a href="http://www.XXXX.com/forums/tabexternal2.php" rel="tabcontainer"><strong>&raquo; Tab2</strong></a></li>
<li><a href="http://www.XXXX.com/forums/tabexternal3.php" rel="tabcontainer"><strong>&raquo; Tab3</strong></a></li>
<li><a href="http://www.XXXX.com/forums/tabexternal4.php" rel="tabcontainer"><strong>&raquo; Tab4</strong></a></li>
</ul>
<br style="clear: left" />
</div>

<div id="divcontainer" style="border:1px solid #003366; border-top: none; width:99.75%; height: 573px;  margin-bottom:1em">
</div>


<script type="text/javascript">

var mytabs=new ddajaxtabs("tabs", "divcontainer")
mytabs.setpersist(false)
mytabs.setselectedClassTarget("link")
mytabs.init()


</script>
</body>
</td></tr>
Step 4:
Next up is the indented portion of my css. Replace the Indented portion of your ajaxtabs.css with the edited AFTER YOUR CHANGES below.

The red are the values to change to match your site. The blue are optional width, that if you change you HAVE to change to match in your adv_portal_Tab_Block_Main template. I have put comments in green so it's easy to know where you can find these settings in your admincp to match your site (because I hate trying to figure out css).

Code:
/* ######### CSS for Indented CSS Tabs. Remove if not using ######### */


.indentmenu{
font: 10px Arial;
width: 100%; 
}

.indentmenu ul{
margin: 0;
padding: 0;
float: left;
width: 99.75%; /*used in conjunction with width variable in adv_portal_Tab_Block_Main*/
border: 1px solid #003366; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Table Border: Background of your table*/
border-bottom: none;
background: #05173D; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Page Background: Background of your table*/
}

.indentmenu ul li{
display: inline;
}

.indentmenu ul li a{
float: left;
color: #ffcc00; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Font Color of your Category Strips*/
padding: 2px 13px; /*Edit the 13px if you want to pad the cells wider or slimmer*/
font-size: 8pt;
padding-top: 6px; /*shift text down 1px*/
padding-bottom: 6px;
text-decoration: none;
background: #003366  url(http://www.XXXX.com/forums/ajaxtabs/gradient_tcat.gif) repeat-x top left; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Background Color and Image Name of your Category Strips*/
}

.indentmenu ul li a:visited{
color: #ffcc00; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Font Color of your Category Strips*/
}

.indentmenu ul li a:hover{
color: #ffcc00  !important; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Font Color of your Category Strips*/
padding-top: 7px; /*shift text down 1px*/
padding-bottom: 5px;
background: #05173D url(http://www.XXXX.com/forums/ajaxtabs/gradient_thead.gif) repeat-x top left; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Table Header: Background Color and Image Name of your Table Header*/
}

.indentmenu ul li a.selected{
color: #ffcc00  !important; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Font Color of your Category Strips*/
padding-top: 7px; /*shift text down 1px*/
padding-bottom: 5px;
background: #05173D url(http://www.XXXX.com/forums/ajaxtabs/gradient_thead.gif) repeat-x top left; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Table Header: Background Color and Image Name of your Table Header*/
Step 5 (Optional if using for recent threads):
Use the tabexternal attached.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01176 seconds
  • Memory Usage 1,792KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete