Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 $GLOBALS['threadfields']
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #1
$GLOBALS['threadfields']
Hey guys I'm willing to make something like this:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
<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...


[Image: 468x602b.png]
(This post was last modified: 11-25-2010 03:47 AM by Skiilz.)
11-25-2010 03:45 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: $GLOBALS['threadfields']
What is the meaning of this?

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

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


11-25-2010 04:10 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #3
RE: $GLOBALS['threadfields']
...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>
&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


[Image: 468x602b.png]
(This post was last modified: 11-25-2010 05:17 AM by Skiilz.)
11-25-2010 05:12 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: $GLOBALS['threadfields']
So, do you want to "approve" and "unapprove" a specific area of the postbit_first by using the threadtypeADMIN custom thread fields Listbox?

11-25-2010 05:58 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #5
RE: $GLOBALS['threadfields']
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. :/

[Image: 468x602b.png]
11-25-2010 06:02 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: $GLOBALS['threadfields']
(11-25-2010 05:12 AM)Skiilz Wrote:  

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>
&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".

(This post was last modified: 11-25-2010 07:09 AM by RateU.)
11-25-2010 06:46 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #7
RE: $GLOBALS['threadfields']
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>


[Image: 468x602b.png]
(This post was last modified: 11-25-2010 07:26 AM by Skiilz.)
11-25-2010 07:25 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: $GLOBALS['threadfields']
What is the value list for threadtype thread fields?

11-25-2010 07:30 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #9
RE: $GLOBALS['threadfields']
threadtypeADMIN: Entry and Sticky
threadtype: Entry

[Image: 468x602b.png]
11-25-2010 07:34 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #10
RE: $GLOBALS['threadfields']
(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.

11-25-2010 07:45 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: