Is this possible? :)
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #1
Is this possible? :)
I'm looking for something like this:

I create one XThread field, dropbox with the following options:

Code:
Entry
Sticky


[Maybe using Template Conditionals?]
If the user select the "Entry" option then the thread would be displayed with the PREFIXOFTHEFORUM_NEWTHREAD.... all using the  CUSTOM templates.
If the user select the "Sticky" option then the thread would be displayed with the SHOWTHREAD.... all using the ORIGINAL templates.


In less words:
I need something/a way to select which thread will or not have the custom templates. Smile


Am I flying.. or is this possible? lol


[Image: 468x602b.png]
(This post was last modified: 11-20-2010 09:10 AM by Skiilz.)
11-20-2010 09:09 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Is this possible? :)
You can't assign different template prefixes like that, but you can use conditionals to check what has been selected, eg

Code:
<if $GLOBALS['threadfields']['whatever'] == 'Entry' then>
blah
</if>


My Blog
11-20-2010 10:14 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #3
RE: Is this possible? :)
Just t report:
I added the code bellow and it worked Smile

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
<if $GLOBALS['threadfields']['whatever'] == 'Entry' then>
<html>
<head>
<title>{$lang->post_reply_to}</title>
{$headerinclude}
<script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
<script type="text/javascript" src="jscripts/fitonpage.js?ver=230"></script>
<script type="text/javascript">
<!--
	var fitonpage_on = "{$mybb->settings['g33k_fitonpage_enabled']}";
	var fitonpage_resize = "{$mybb->settings['g33k_fitonpage_resize']}";
	var fitonpage_fluid = "{$mybb->settings['g33k_fitonpage_fluid']}";
	var fitonpage_topbar_resized = "{$lang->fitonpage_topbar_resized}";
	var fitonpage_topbar_full = "{$lang->fitonpage_topbar_full}";
	var fitonpage_topbar_text_class = "{$mybb->settings['g33k_fitonpage_topbar_text_class']}";
	var fitonpage_topbar_bground = "{$mybb->settings['g33k_fitonpage_topbar_bground']}";
	var fitonpage_topbar_icon = "{$mybb->settings['g33k_fitonpage_topbar_icon']}";
	var fitonpage_location = "newreply";
-->
</script>
</head>
<body>
{$header}
{$preview}
{$maximageserror}
{$attacherror}
{$reply_errors}
<form action="newreply.php?tid={$tid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->post_new_reply}</strong></td>
</tr>
<tr>
<td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->reply_to}</strong></span></td>
</tr>
<tr>
<td class="trow2" width="20%"><strong></strong></td>
<td class="trow2"></td>
</tr>
<tr>
<td class="trow2" valign="top"><strong>{$lang->your_message}</strong><br />{$smilieinserter}</td>
<td class="trow2">
<textarea id="message" name="message" rows="20" cols="70" tabindex="2" >{$message}</textarea>
{$codebuttons}
{$multiquote_external}
</td>
</tr>
{$subscriptionmethod}
{$captcha}
</table>
<br />
<div align="center"><input type="submit" class="button" name="submit" value="{$lang->post_reply}" tabindex="3" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="4" />{$savedraftbutton}</div>
<input type="hidden" name="action" value="do_newreply" />
<input type="hidden" name="replyto" value="{$replyto}" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
<input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
<input type="hidden" name="tid" value="{$tid}" />
{$editdraftpid}
</form>
{$footer}
</body>
</html>
<else>
SAME TEMPLATE JUST WITH A FEW CHANGES
</if>


[Image: 468x602b.png]
(This post was last modified: 11-20-2010 10:45 AM by Skiilz.)
11-20-2010 10:38 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: