...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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
<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>
<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&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&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>
<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&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&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>
<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&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&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:
And.. The admin one like the image bellow:
What do I need to change to get things done?
Thank you, I hope that this got clearer than in the first post