MyBB Hacks

Full Version: $GLOBALS['threadfields']
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey guys I'm willing to make something like this:

Code:
<if $GLOBALS['threadfields'] == ['threadfields'] then>
<if $GLOBALS['threadfields']['threadtypeADMIN'] == 'Entry' then>
SOMETHING FOR "ENTRY" VALUE
<else>
SOMETHING FOR ANOTHER VALUE
</if>
<else> //if $GLOBALS['threadfields'] == ['threadtype']
<if $GLOBALS['threadfields']['threadtype'] == 'Entry' then>
SOMETHING FOR "ENTRY" VALUE
<else>
SOMETHING FOR ANOTHER VALUE
</if>
</if>


But it's not working.. can someone point me to the error... I'm sure there is something wrong...

What is the meaning of this?

(11-25-2010 03:45 AM)Skiilz Wrote: [ -> ]

Code:
<if $GLOBALS['threadfields'] == ['threadfields'] then>

...this means nothing lol.. wrong code I'll explain this issue in a better way.

Explanation:

I have 2 listboxes (custom thread fields) one called threadtypeADMIN (visible for ADMIN only) and another called threadtype (editable by members, hidden).
Then I have this on my prefix_postbit_first_classic and prefix_postbit_first:

Code:
<if $GLOBALS['threadfields']['threadtypeADMIN'] == 'Entry' then>
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tr>
		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
&nbsp;<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
		<span class="smalltext">
{$post['useravatar']}
<br />
{$post['userstars']}
{$post['groupimage']}
</span>
	</td>
	<td class="{$altbg}" valign="top">
		<table width="100%">
			<tr><td>Submission sent: {$post['postdate']} {$post['posttime']}
			<br />
			<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
<center>{$GLOBALS['threadfields']['bannerURL']}</center>
<br />
<br /><strong>Forum URL: </strong>{$GLOBALS['threadfields']['forumURL']}
<br /><br /> 
<strong>Forum Description: </strong>
<br />
{$post['message']}
</div>
			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
				{$post['iplogged']}
			</div>
		</td>
</tr>
	</table>
</td>
</tr>
<tr>
	<td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;">
<span class="smalltext">{$post['newpoints_postbit']}</span></td>
<td class="{$altbg}" style="vertical-align: middle;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom"><td align="left" ><span class="smalltext"></span>
</td>
<td align="right">
<if in_array($GLOBALS['mybb']->user['usergroup'], array(4,8)) then> 
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_edit']}{$post['button_quickdelete']}{$post['button_report']}
<else>
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_report']}
</if>
</td>
			</tr>
		</table>
	</td>
</tr>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		<tr style="{$post['tyl_display']}" id="tyl_{$post['pid']}">
			{$post['thankyoulike_data']}
		</tr>
</table>
</table>
<else>
{$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">
				<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}">
				<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']}	
							<br />{$post['newpoints_postbit']}
						</td>
					</tr>
				</table>
			</td>
		</tr>

		<tr>
			<td class="trow2 post_content {$unapproved_shade}">
				<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>

				<div class="post_body" id="pid_{$post['pid']}">
					{$post['message']}
				</div>
				{$post['attachments']}
				{$post['signature']}

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

		<tr>
			<td class="trow1 post_buttons {$unapproved_shade}">
				<div class="author_buttons float_left">
					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
				</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>
</if>
<if $GLOBALS['threadfields']['threadtype'] == 'Entry' then>
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tr>
		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
&nbsp;<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
		<span class="smalltext">
{$post['useravatar']}
<br />
{$post['userstars']}
{$post['groupimage']}
</span>
	</td>
	<td class="{$altbg}" valign="top">
		<table width="100%">
			<tr><td>Submission sent: {$post['postdate']} {$post['posttime']}
			<br />
			<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
<center>{$GLOBALS['threadfields']['bannerURL']}</center>
<br />
<br /><strong>Forum URL: </strong>{$GLOBALS['threadfields']['forumURL']}
<br /><br /> 
<strong>Forum Description: </strong>
<br />
{$post['message']}
</div>
			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
				{$post['iplogged']}
			</div>
		</td>
</tr>
	</table>
</td>
</tr>
<tr>
	<td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;">
<span class="smalltext">{$post['newpoints_postbit']}</span></td>
<td class="{$altbg}" style="vertical-align: middle;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom"><td align="left" ><span class="smalltext"></span>
</td>
<td align="right">
<if in_array($GLOBALS['mybb']->user['usergroup'], array(4,8)) then> 
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_edit']}{$post['button_quickdelete']}{$post['button_report']}
<else>
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_report']}
</if>
</td>
			</tr>
		</table>
	</td>
</tr>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		<tr style="{$post['tyl_display']}" id="tyl_{$post['pid']}">
			{$post['thankyoulike_data']}
		</tr>
</table>
</table>
<else>
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tr>
		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
&nbsp;<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
		<span class="smalltext">
{$post['useravatar']}
<br />
{$post['userstars']}
{$post['groupimage']}
</span>
	</td>
	<td class="{$altbg}" valign="top">
		<table width="100%">
			<tr><td>Submission sent: {$post['postdate']} {$post['posttime']}
			<br />
			<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
<center>{$GLOBALS['threadfields']['bannerURL']}</center>
<br />
<br /><strong>Forum URL: </strong>{$GLOBALS['threadfields']['forumURL']}
<br /><br /> 
<strong>Forum Description: </strong>
<br />
{$post['message']}
</div>
			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
				{$post['iplogged']}
			</div>
		</td>
</tr>
	</table>
</td>
</tr>
<tr>
	<td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;">
<span class="smalltext">{$post['newpoints_postbit']}</span></td>
<td class="{$altbg}" style="vertical-align: middle;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom"><td align="left" ><span class="smalltext"></span>
</td>
<td align="right">
<if in_array($GLOBALS['mybb']->user['usergroup'], array(4,8)) then> 
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_edit']}{$post['button_quickdelete']}{$post['button_report']}
<else>
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_report']}
</if>
</td>
			</tr>
		</table>
	</td>
</tr>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		<tr style="{$post['tyl_display']}" id="tyl_{$post['pid']}">
			{$post['thankyoulike_data']}
		</tr>
</table>
</table>
</if>

So if the threadtypeADMIN value is equals to Entry it will apply the template under this option and if the threadtypeADMIN value is equals to Sticky it will apply the template under this option. (ADMIN CAN ONLY SEE THISLISTBOX)
But... the other listbox (threadtype) will apply only one template, Entry only.(MEMBERS DON'T SEE THIS LISTBOX, BOTH threadtypeADMIN and threadtype ARE HIDDEN)

At moment once I post something as a normal user it will be displayed as the image bellow:
[Image: 83695468.png]

And.. The admin one like the image bellow:
[Image: 44208249.png]

What do I need to change to get things done?


Thank you, I hope that this got clearer than in the first post Smile

So, do you want to "approve" and "unapprove" a specific area of the postbit_first by using the threadtypeADMIN custom thread fields Listbox?
Mhmm.. The listboxes are to choose which template will be used to display the message. But at moment it applies both templates for each thread. :/
(11-25-2010 05:12 AM)Skiilz Wrote: [ -> ]

Code:
<if $GLOBALS['threadfields']['threadtypeADMIN'] == 'Entry' then>
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tr>
		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
&nbsp;<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
		<span class="smalltext">
{$post['useravatar']}
<br />
{$post['userstars']}
{$post['groupimage']}
</span>
	</td>
	<td class="{$altbg}" valign="top">
		<table width="100%">
			<tr><td>Submission sent: {$post['postdate']} {$post['posttime']}
			<br />
			<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
<center>{$GLOBALS['threadfields']['bannerURL']}</center>
<br />
<br /><strong>Forum URL: </strong>{$GLOBALS['threadfields']['forumURL']}
<br /><br /> 
<strong>Forum Description: </strong>
<br />
{$post['message']}
</div>
			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
				{$post['iplogged']}
			</div>
		</td>
</tr>
	</table>
</td>
</tr>
<tr>
	<td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;">
<span class="smalltext">{$post['newpoints_postbit']}</span></td>
<td class="{$altbg}" style="vertical-align: middle;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom"><td align="left" ><span class="smalltext"></span>
</td>
<td align="right">
<if in_array($GLOBALS['mybb']->user['usergroup'], array(4,8)) then> 
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_edit']}{$post['button_quickdelete']}{$post['button_report']}
<else>
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_report']}
</if>
</td>
			</tr>
		</table>
	</td>
</tr>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		<tr style="{$post['tyl_display']}" id="tyl_{$post['pid']}">
			{$post['thankyoulike_data']}
		</tr>
</table>
</table>
<else>
{$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">
				<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}">
				<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']}	
							<br />{$post['newpoints_postbit']}
						</td>
					</tr>
				</table>
			</td>
		</tr>

		<tr>
			<td class="trow2 post_content {$unapproved_shade}">
				<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>

				<div class="post_body" id="pid_{$post['pid']}">
					{$post['message']}
				</div>
				{$post['attachments']}
				{$post['signature']}

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

		<tr>
			<td class="trow1 post_buttons {$unapproved_shade}">
				<div class="author_buttons float_left">
					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
				</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>
</if>
<if $GLOBALS['threadfields']['threadtype'] == 'Entry' then>
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tr>
		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
&nbsp;<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
		<span class="smalltext">
{$post['useravatar']}
<br />
{$post['userstars']}
{$post['groupimage']}
</span>
	</td>
	<td class="{$altbg}" valign="top">
		<table width="100%">
			<tr><td>Submission sent: {$post['postdate']} {$post['posttime']}
			<br />
			<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
<center>{$GLOBALS['threadfields']['bannerURL']}</center>
<br />
<br /><strong>Forum URL: </strong>{$GLOBALS['threadfields']['forumURL']}
<br /><br /> 
<strong>Forum Description: </strong>
<br />
{$post['message']}
</div>
			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
				{$post['iplogged']}
			</div>
		</td>
</tr>
	</table>
</td>
</tr>
<tr>
	<td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;">
<span class="smalltext">{$post['newpoints_postbit']}</span></td>
<td class="{$altbg}" style="vertical-align: middle;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom"><td align="left" ><span class="smalltext"></span>
</td>
<td align="right">
<if in_array($GLOBALS['mybb']->user['usergroup'], array(4,8)) then> 
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_edit']}{$post['button_quickdelete']}{$post['button_report']}
<else>
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_report']}
</if>
</td>
			</tr>
		</table>
	</td>
</tr>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		<tr style="{$post['tyl_display']}" id="tyl_{$post['pid']}">
			{$post['thankyoulike_data']}
		</tr>
</table>
</table>
<else>
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
	<tr>
		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
&nbsp;<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
		<span class="smalltext">
{$post['useravatar']}
<br />
{$post['userstars']}
{$post['groupimage']}
</span>
	</td>
	<td class="{$altbg}" valign="top">
		<table width="100%">
			<tr><td>Submission sent: {$post['postdate']} {$post['posttime']}
			<br />
			<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
<center>{$GLOBALS['threadfields']['bannerURL']}</center>
<br />
<br /><strong>Forum URL: </strong>{$GLOBALS['threadfields']['forumURL']}
<br /><br /> 
<strong>Forum Description: </strong>
<br />
{$post['message']}
</div>
			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
				{$post['iplogged']}
			</div>
		</td>
</tr>
	</table>
</td>
</tr>
<tr>
	<td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;">
<span class="smalltext">{$post['newpoints_postbit']}</span></td>
<td class="{$altbg}" style="vertical-align: middle;">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr valign="bottom"><td align="left" ><span class="smalltext"></span>
</td>
<td align="right">
<if in_array($GLOBALS['mybb']->user['usergroup'], array(4,8)) then> 
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_edit']}{$post['button_quickdelete']}{$post['button_report']}
<else>
<span id="tyl_btn_{$post['pid']}"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" title="{$lang->add_tyl}" id="tyl_a{$post['pid']}"><img src="http://postbomb.net/mybb/postbit_{$pre}_add.gif" border="0" alt="{$lang->add_tyl}" id="tyl_i{$post['pid']}" /></a></span>{$post['button_report']}
</if>
</td>
			</tr>
		</table>
	</td>
</tr>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		<tr style="{$post['tyl_display']}" id="tyl_{$post['pid']}">
			{$post['thankyoulike_data']}
		</tr>
</table>
</table>
</if>


Reading the code above, you use the same "template" for threadtypeADMIN = Entry, threadtype = Entry, and threadtype = whatever other value here.
Are you sure you want it like it?
Whatever value selected in threadtype Listbox, it will displaying the same "template".
Yes.
threadtypeADMIN = Entry, threadtype = Entry will show the same template.
But it's not doing it.. See the image it's adding 2 templates into one thread... :/

Should I use this one?

PHP Code:
<if $GLOBALS['threadfields']['threadtypeADMIN'] == 'Entry' || $GLOBALS['threadfields']['threadtype'] == 'Entry'  then>

<else>

</if>

Or this one instead?

PHP Code:
<if $GLOBALS['threadfields']['threadtypeADMIN']  || $GLOBALS['threadfields']['threadtype'] == 'Entry'  then>

<else>

</if>

What is the value list for threadtype thread fields?
threadtypeADMIN: Entry and Sticky
threadtype: Entry
(11-25-2010 07:34 AM)Skiilz Wrote: [ -> ]threadtypeADMIN: Entry and Sticky
threadtype: Entry

And why you need the treadtype thread field? It only has one value, and use the same "template" with threadtypeADMIN = Entry.
Pages: 1 2
Reference URL's