Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Image Preview In Newthread And Editpost
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #32
RE: Image Preview In Newthread
(10-02-2010 06:43 AM)RateU Wrote:  EDIT:

OK. In this case, you need to move the layout inside the conditional to your previewpost template. It is under Ungrouped Templates. Create a new previewpost with a prefix.

Example:

HTML 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
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
<tr>
<td class="thead" colspan="2"><strong>{$lang->post_preview}</strong></td>
</tr>
</table>
{$postbit}
<br />
<form>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
	<tr><td class="thead" colspan="2"><strong>Images Preview</strong></td></tr>
	<tr><td class="tcat" align="center" colspan="2"><strong>Image 1 Preview &amp; URL</strong></td></tr>
	<tr>
		<td class="trow1" align="center">
			<img src="{$GLOBALS['threadfields']['pfpic']['url']}/thumb160x120" alt="" title="" />
		</td>
		<td class="trow1" valign="top">
			<div class="float_left" style="width: 50%;">
				<strong>BBCODE - 160 x 120 Thumbnail</strong>
				<input name="prev_img1_bbcode" type="text" size="40" value="[IMG]{$mybb->settings['bburl']}/{$GLOBALS['threadfields']['pfpic']['url']}/thumb160x120[/IMG]" readonly="readonly" />
				<input type="button" value="Select" onClick="javascript:this.form.prev_pfpic_bbcode.focus();this.form.prev_pfpic_bbcode.select();">
			</div>
			<div class="float_left" style="width: 50%;">
				<strong>Direct Link</strong><br />
				<input name="prev_pfpic_dl" type="text" size="40" value="<func htmlspecialchars_uni><a href="{$mybb->settings['bburl']}/{$GLOBALS['threadfields']['pfpic']['url']}/thumb160x120">{$GLOBALS['threadfields']['pfpic']['filename']}</a></func>" readonly="readonly" />
				<input type="button" value="Select" onClick="javascript:this.form.prev_pfpic_dl.focus();this.form.prev_pfpic_dl.select();">
			</div>
			<div class="float_left" style="width: 50%;">
				<strong>HTML Code - 160 x 120 Thumbnail</strong>
				<input name="prev_pfpic_html" type="text" size="40" value="<func htmlspecialchars_uni><img src="{$mybb->settings['bburl']}/{$GLOBALS['threadfields']['pfpic']['url']}/thumb160x120" alt="" title="" /></func>" readonly="readonly" />
				<input type="button" value="Select" onClick="javascript:this.form.prev_pfpic_html.focus();this.form.prev_pfpic_html.select();">
			</div>
			<div class="float_left" style="width: 50%;">
				<strong>Full Size Image URL</strong>
				<input name="prev_pfpic_full" type="text" size="40" value="{$mybb->settings['bburl']}/{$GLOBALS['threadfields']['pfpic']['url']}" readonly="readonly" />
				<input type="button" value="Select" onClick="javascript:this.form.prev_pfpic_full.focus();this.form.prev_pfpic_full.select();">
			</div>
		</td>
	</tr>
</table>
</form>
<br />


Leave the contents inside the else condition in your Display Format.
Remove other additional code there. So, it will like the code before you edit the Display Format.
The contents of your Display Format should be only like this:

HTML Code
<a href="{URL}" rel="lightbox[find]"><img src="{URL}/thumb160x120" alt="{$thread['subject']} Screenshot" title="{$GLOBALS['threadfields']['pfpicdesc']}" style="border: 1px solid #C1C1C1; padding: 3px; margin: 3px;" /></a>


Sorry, Lee. I've edited my post too.

EDIT: Don't forget to remove the {$GLOBALS['threadfields']['pfpic']['value']} variable from your newthread template.

Other method:

Just change the {$GLOBALS['threadfields']['pfpic']['value']} variable in postbit to:

HTML Code
<a href="{$GLOBALS['threadfields']['pfpic']['url']}" rel="lightbox[find]"><img src="{$GLOBALS['threadfields']['pfpic']['url']}/thumb160x120" alt="{$thread['subject']} Screenshot" title="{$GLOBALS['threadfields']['pfpicdesc']}" style="border: 1px solid #C1C1C1; padding: 3px; margin: 3px;" /></a>


(This post was last modified: 10-02-2010 07:14 AM by RateU.)
10-02-2010 06:54 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Image Preview In Newthread - leefish - 09-29-2010, 05:09 AM
RE: Image Preview In Newthread - Imran - 09-30-2010, 01:03 AM
RE: Image Preview In Newthread - RateU - 09-30-2010, 05:18 AM
RE: Image Preview In Newthread - Imran - 09-30-2010, 05:33 AM
RE: Image Preview In Newthread - leefish - 09-30-2010, 08:46 AM
RE: Image Preview In Newthread - leefish - 10-01-2010, 12:53 AM
RE: Image Preview In Newthread - RateU - 10-01-2010, 03:47 AM
RE: Image Preview In Newthread - leefish - 10-01-2010, 08:01 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 01:32 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 02:00 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 02:11 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 03:20 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 04:02 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 04:29 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 05:03 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 05:34 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 05:56 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 05:59 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 06:02 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 06:07 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 06:09 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 06:14 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 06:26 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 06:38 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 06:39 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 06:43 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 06:44 AM
RE: Image Preview In Newthread - RateU - 10-02-2010 06:54 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 07:11 AM
RE: Image Preview In Newthread - RateU - 10-02-2010, 07:27 AM
RE: Image Preview In Newthread - leefish - 10-02-2010, 07:56 AM
RE: Image Preview In Newthread - RateU - 10-03-2010, 07:18 AM

 Standard Tools
Forum Jump: