MyBB Hacks

Full Version: Trivia Forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Not a problem!  

I decided to have a go at it and so far, I am happy with the results.  I just have one problem...

http://www.7173mustangs.com/thread-vip-question-test

If you click on the same tab twice, the content disappears!  Any ideas??
Could you post your template_prefix_postbit_first_classic and your template_prefix_showthread template?
And your custom thread fields setting for that tabs.
tf_postbit_first

Code:
{$ignore_bit}
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tbody>
		<tr>
			<td class="tcat" colspan="3">
				<div class="float_left smalltext">
					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
				</div>
				{$post['posturl']}
			</td>
		</tr>

		<tr>
			<td class="trow1 {$unapproved_shade}" colspan="3">
				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
					<tr>
						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
							{$post['useravatar']}
						</td>
						<td class="post_author">
							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
							<span class="smalltext">
								{$post['usertitle']}<br />
								{$post['userstars']}
								{$post['groupimage']}
							</span>
						</td>
						<td class="smalltext post_author_info" width="165">
							{$post['user_details']}
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td class="tcat at tab" title="Main" style="cursor: pointer; text-align: center; width: 33%;" abbr="tc1">
				<strong>Main</strong>
			</td>
			{$GLOBALS['threadfields']['tc2']}
			{$GLOBALS['threadfields']['tc3']}
		</tr>
		<tr>
			<td class="trow2 post_content {$unapproved_shade}" colspan="3">
				<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
				<div id="tc1" class="content">
					<div class="post_body" id="pid_{$post['pid']}">
						{$post['message']}
					</div>
				</div>
				{$GLOBALS['threadfields']['tc2c']}
				{$GLOBALS['threadfields']['tc3c']}
				{$post['attachments']}
				{$post['signature']}

				<div class="post_meta" id="post_meta_{$post['pid']}">
				{$post['iplogged']}
				</div>
			</td>
		</tr>

		<tr>
			<td class="trow1 post_buttons {$unapproved_shade}" colspan="3">
				<div class="author_buttons float_left">
					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
				</div>
				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
				</div>
			</td>
		</tr>
	</tbody>
</table>


tf_showthread

Code:
<html>
<head>
<title>{$thread['subject']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	var quickdelete_confirm = "{$lang->quickdelete_confirm}";
// -->
</script>
<script type="text/javascript" src="jscripts/thread.js?ver=1400"></script>
<script type="text/javascript" src="jscripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
	$.noConflict();
</script>
<style type="text/css">
.at {background: #026CB1 url(images/thead_bg.gif) top left repeat-x;color: #ffffff;}
#image, #mod, #details {display: none;}
</style>
</head>
<body>
{$header}
{$pollbox}
<div class="float_left">
	{$multipage}
</div>
<div class="float_right">
	{$newreply}
</div>
<br style="clear: both;" />
<table border="0" width="100%">
	<tr>
		<td width="200" valign="top">
			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
				<tr>
					<td class="thead">
						<strong>{$forum['name']}</strong>
					</td>
				</tr>
				<tr>
					<td class="trow1" colspan="{$colspan}">
						<strong><a href="{$forumurl}">Member's WFQ Index</a></strong>
					</td>
				</tr>
				<tr>
					<td class="trow1" colspan="{$colspan}">
						<strong><a href="http://www.7173mustangs.com/forum-vip-weekly-fun-questions">VIP's WFQ Index</a></strong>
					</td>
				</tr>
			</table><P>
			{$search_thread}
		</td>
		<td valign="top">
			<script type="text/javascript">
				jQuery(document).ready(function($){
					$('.tab').click(function(){
						$('.at').removeClass('at');
						$(this).addClass('at');
						$('.content').slideUp();
						var catshow = $(this).attr('abbr');
						$('#'+ catshow).slideDown();
					});
				});
			</script>
			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
				<tr>
					<td class="tcat at tab" title="Overview" style="cursor: pointer; text-align: center;" abbr="overview">
						<strong>Question</strong>
					</td>
					<td class="tcat tab" title="Images" style="cursor: pointer; text-align: center;" abbr="image">
						<strong>Answer</strong>
					</td>
					<td class="tcat tab" title="Vehicle Modification" style="cursor: pointer; text-align: center;" abbr="mod">
						<strong>Winner</strong>
					</td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0; border-top-width: 0;">
				<tr>
					<td class="thead" colspan="2">
						{$ratethread}
						<strong><a href="{$threadurl}">{$thread['subject']}</a></strong>
					</td>
				</tr>
			</table>
			<div id="overview" class="content">
				{$first_post}
			</div>
			<div id="image" class="content">
				<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
					<tr>
						<td class="tcat">
							<div class="float_left smalltext">
								<strong>{$thread['subject']} - Official Answer</strong>
							</div>
						</td>
					</tr>
					<tr>
						<td class="trow1" align="center">
							{$GLOBALS['threadfields']['tc2c']}
						</td>
					</tr>
				</table>
			</div>
			<div id="mod" class="content">
				<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
					<tr>
						<td class="tcat">
							<div class="float_left smalltext">
								<strong>{$thread['subject']} - Winner</strong>
							</div>
						</td>
					</tr>
					<tr>
						<td class="trow1" align="center">
							{$GLOBALS['threadfields']['tc3c']}
						</td>
					</tr>
				</table>
			</div>
			
			<br class="clear" />
			<div align="center">
				<strong>&laquo; <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> &raquo;</strong>
			</div>
			<br class="clear" />
			<strong>Comments</strong>
			<div id="posts">
				{$posts}
			</div>
			<div class="float_left">
				{$multipage}
			</div>
			<div style="padding-top: 4px;" class="float_right">
				{$newreply}
			</div>
			<br style="clear: both;" />
			{$quickreply}
			{$threadexbox}
			{$similarthreads}
			<br />
			<div class="float_right" style="text-align: right;">
				{$moderationoptions}
				{$forumjump}
			</div>
		</td>
	</tr>
</table>
<br style="clear: both;" />
<div class="smalltext" align="center">
<b>Trivia Forum</b><br />
Powered By <b><a href="http://mybbhacks.zingaburga.com">XThreads</a></b>
</div>
{$footer}
</body>
</html>


Multiline Textbox for Tabs Contents:

    * Title: Contents 2
    * Key: tc2c
    * Applicable Forums: select forum that we want to apply the tabs
    * Input Field Type: Multiline Textbox
    * Editable by / Required Field?: Everyone
    * Display Parsing : Use MyBB Parser (MyCode)
    * MyBB Parser Options : Check all except Allow HTML.
    * Display Format :

Code:
<div id="tc2" class="content">{VALUE}</div>

Not quite sure why you need two sets of tabs there?
(01-13-2011 03:57 AM)RocketFoot Wrote: [ -> ]tf_postbit_first

Code:
			<td class="tcat at tab" title="Main" style="cursor: pointer; text-align: center; width: 33%;" abbr="tc1">
				<strong>Main</strong>
			</td>
			{$GLOBALS['threadfields']['tc2']}
			{$GLOBALS['threadfields']['tc3']}
		</tr>


tf_showthread

Code:
			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
				<tr>
					<td class="tcat at tab" title="Overview" style="cursor: pointer; text-align: center;" abbr="overview">
						<strong>Question</strong>
					</td>
					<td class="tcat tab" title="Images" style="cursor: pointer; text-align: center;" abbr="image">
						<strong>Answer</strong>
					</td>
					<td class="tcat tab" title="Vehicle Modification" style="cursor: pointer; text-align: center;" abbr="mod">
						<strong>Winner</strong>
					</td>
				</tr>
			</table>


And, you have {$GLOBALS['threadfields']['tc2c']} variable in tf_showthread and tf_postbit_first.
I ended up not using the tab titles, I just hard coded them so they would be the same in every post.  

Does this cause the disappearing content?  How should I go about fixing?

I've tried this but still no good...

Code:
{$ignore_bit}
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tbody>
		<tr>
			<td class="tcat" colspan="3">
				<div class="float_left smalltext">
					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
				</div>
				{$post['posturl']}
			</td>
		</tr>

		<tr>
			<td class="trow1 {$unapproved_shade}" colspan="3">
				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
					<tr>
						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
							{$post['useravatar']}
						</td>
						<td class="post_author">
							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
							<span class="smalltext">
								{$post['usertitle']}<br />
								{$post['userstars']}
								{$post['groupimage']}
							</span>
						</td>
						<td class="smalltext post_author_info" width="165">
							{$post['user_details']}
						</td>
					</tr>
				</table>
			</td>
		</tr>

		<tr>
			<td class="trow2 post_content {$unapproved_shade}" colspan="3">
				<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
				<div id="tc1" class="content">
					<div class="post_body" id="pid_{$post['pid']}">
						{$post['message']}
					</div>
				</div>
				{$post['attachments']}
				{$post['signature']}

				<div class="post_meta" id="post_meta_{$post['pid']}">
				{$post['iplogged']}
				</div>
			</td>
		</tr>

		<tr>
			<td class="trow1 post_buttons {$unapproved_shade}" colspan="3">
				<div class="author_buttons float_left">
					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
				</div>
				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
				</div>
			</td>
		</tr>
	</tbody>
</table>


I am using the tc2c globals but not the tc2...

Do you use postbit_classic there?
My whole forum is set to classic
Could you post your tf_postbit_first_classic template?
I don't have that template...I only created tf_postbit_first

Forum/Xthread setting is set to not force layout.  So I'm not sure what to do...LOL

Would it be easier for me to PM you admin access?
Post your postbit_classic here.
Pages: 1 2 3 4 5 6
Reference URL's