[Beta] Easy Resize Posted Images - phpbb3.0.x

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Locked
Aedus
Registered User
Posts: 11
Joined: Wed Sep 12, 2007 8:33 am

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by Aedus »

Might I suggest limiting your DOM search to only parent div's with the "content" class? Or if you want to be template-neutral, limit it to img nodes with the alt="Image" value (BBCode default). It keeps the javascript focused only where you really *need* it to be (I have a thing about "Script's Gone Wild!").

Also, have you considered making it a full size layover of the image, instead of the pop up window? I just think it would look a lot cleaner that way.

Otherwise, beautifully simple and useful mod. Thanks.

.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by .:: Chico ::. »

Aedus wrote:
Also, have you considered making it a full size layover of the image, instead of the pop up window? I just think it would look a lot cleaner that way.

Otherwise, beautifully simple and useful mod. Thanks.
I like it in a new window.

and thank for trying to help kber in this mod! ;)

Aedus
Registered User
Posts: 11
Joined: Wed Sep 12, 2007 8:33 am

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by Aedus »

.:: Chico ::. wrote:I like it in a new window.
Alright, to each their own.

User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by kber »

Any Suggestions are welcome :)
Hello All


usef_ksa
Registered User
Posts: 18
Joined: Tue Sep 11, 2007 10:38 pm

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by usef_ksa »

shoran jazilan :)
It works :idea:

usef_ksa
Registered User
Posts: 18
Joined: Tue Sep 11, 2007 10:38 pm

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by usef_ksa »

kber wrote:Any Suggestions are welcome :)
Yes.
when I click on the image, it open in new page and ask the user to download or save or cancel ((download dialog box)). I suggest that the picture should be displayed inside the new page.

with Firefox it is okay, the picture is displayed inside the new page but with IE the download dialog box is appear.
thank you

User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by kber »

internet1 wrote:hi
i add code but nothing happend
style subsilver
http://Persianstart.com

Thank
put your viewtopic.html content here plz
Hello All

User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by kber »

usef_ksa wrote:
kber wrote:Any Suggestions are welcome :)
Yes.
when I click on the image, it open in new page and ask the user to download or save or cancel ((download dialog box)). I suggest that the picture should be displayed inside the new page.

with Firefox it is okay, the picture is displayed inside the new page but with IE the download dialog box is appear.
thank you
hi usef .
i just test it with both Firefox and IE6 with no proplem
Hello All

internet1
Registered User
Posts: 77
Joined: Sun Apr 09, 2006 9:11 am
Contact:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by internet1 »

kber wrote:
internet1 wrote:hi
i add code but nothing happend
style subsilver
http://Persianstart.com

Thank
put your viewtopic.html content here plz

Code: Select all

<!-- INCLUDE overall_header.html -->
<div align="center">{AD_CODE3}</div>

<!-- IF S_FORUM_RULES -->
	<div class="forumrules">
		<!-- IF U_FORUM_RULES -->
			<h3>{L_FORUM_RULES}</h3><br />
			<a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
		<!-- ELSE -->
			<h3>{L_FORUM_RULES}</h3><br />
			{FORUM_RULES}
		<!-- ENDIF -->
	</div>

	<br clear="all" />
<!-- ENDIF -->

<div id="pageheader">
	<h3><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h3><br />

<!-- IF MODERATORS -->
	<p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p>
<!-- ENDIF -->
<!-- IF U_MCP -->
	<p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
<!-- ENDIF -->
</div>

<br clear="all" /><br />

<div id="pagecontent">

	<table width="100%" cellspacing="1">
	<tr>
		<td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
		<!-- IF not S_IS_BOT -->
			<!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
			<!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF -->
		<!-- ENDIF -->
		</td>
		<!-- IF TOTAL_POSTS -->
			<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
			<td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>
			<td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
		<!-- ENDIF -->
	</tr>
	</table>

	<table class="tablebg" width="100%" cellspacing="1">
	<tr>
		<td class="cat">
			<table width="100%" cellspacing="0">
			<tr>
				<td class="nav" nowrap="nowrap">&nbsp;
				<!-- IF not S_IS_BOT -->
					<!-- IF U_WATCH_TOPIC --><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC or U_BOOKMARK_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
					<!-- IF U_BOOKMARK_TOPIC --><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
					<!-- IF U_PRINT_TOPIC --><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}">{L_PRINT_TOPIC}</a><!-- IF U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
					<!-- IF U_EMAIL_TOPIC --><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}">{L_EMAIL_TOPIC}</a><!-- IF U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
					<!-- IF U_BUMP_TOPIC --><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a><!-- ENDIF -->
				<!-- ENDIF -->
				</td>
				<td class="nav" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a><!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> | <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a><!-- ENDIF --> | <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>&nbsp;</td>
			</tr>
			</table>
		</td>
	</tr>
<!-- IF S_HAS_POLL -->
	<tr>
		<td class="row2" colspan="2" align="center"><br clear="all" />

			<form method="post" action="{S_POLL_ACTION}">

			<table cellspacing="0" cellpadding="4" border="0" align="center">
			<tr>
				<td align="center"><span class="gen"><b>{POLL_QUESTION}</b></span><br /><span class="gensmall">{L_POLL_LENGTH}</span></td>
			</tr>
			<tr>
				<td align="{S_CONTENT_FLOW_BEGIN}">
					<table cellspacing="0" cellpadding="2" border="0">
				<!-- BEGIN poll_option -->
					<tr>
					<!-- IF S_CAN_VOTE -->
						<td>
							<!-- IF S_IS_MULTI_CHOICE -->
								<input type="checkbox" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
							<!-- ELSE -->
								<input type="radio" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
							<!-- ENDIF -->
						</td>
					<!-- ENDIF -->
						<td><span class="gen">{poll_option.POLL_OPTION_CAPTION}</span></td>
						<!-- IF S_DISPLAY_RESULTS -->
							<td dir="ltr">{POLL_LEFT_CAP_IMG}{poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG}</td>
							<td class="gen" align="{S_CONTENT_FLOW_END}"><b>&nbsp;{poll_option.POLL_OPTION_PERCENT}&nbsp;</b></td>
							<td class="gen" align="center">[ {poll_option.POLL_OPTION_RESULT} ]</td>
							<!-- IF poll_option.POLL_OPTION_VOTED -->
								<td class="gensmall" valign="top"><b title="{L_POLL_VOTED_OPTION}">x</b></td>
							<!-- ENDIF -->
						<!-- ENDIF -->
					</tr>
				<!-- END poll_option -->
					</table>
				</td>
			</tr>
		<!-- IF S_CAN_VOTE -->
			<tr>
				<td align="center"><span class="gensmall">{L_MAX_VOTES}</span><br /><br /><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="btnlite" /></td>
			</tr>
		<!-- ENDIF -->
		<!-- IF S_DISPLAY_RESULTS -->
			<tr>
				<td class="gensmall" colspan="4" align="center"><b>{L_TOTAL_VOTES} : {TOTAL_VOTES}</b></td>
			</tr>
		<!-- ELSE -->
			<tr>
				<td align="center"><span class="gensmall"><b><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></b></span></td>
			</tr>
		<!-- ENDIF -->
			</table>
			{S_HIDDEN_FIELDS}
			
			</form>
			
		</td>
	</tr>
<!-- ENDIF -->
	</table>

<!-- BEGIN postrow -->
	<table class="tablebg" width="100%" cellspacing="1">
	<!-- IF postrow.S_FIRST_ROW -->
		<tr>
			<th>{L_AUTHOR}</th>
			<th>{L_MESSAGE}</th>
		</tr>
	<!-- ENDIF -->
	<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

	<!-- IF postrow.S_IGNORE_POST -->
			<td class="gensmall" colspan="2" height="25" align="center"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>{postrow.L_IGNORE_POST}</td>
	<!-- ELSE -->

			<td align="center" valign="middle">
				<!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>
				<b class="postauthor"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b>
			</td>
			<td width="100%" height="25">
				<table width="100%" cellspacing="0">
				<tr>
				<!-- IF postrow.POST_ICON_IMG -->
					<td><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" title="" /></td>
				<!-- ENDIF -->
					<td class="gensmall" width="100%"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<b>{L_POST_SUBJECT}:</b> {postrow.POST_SUBJECT}</div><div style="float: {S_CONTENT_FLOW_END};"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF --><b>{L_POSTED}:</b> {postrow.POST_DATE}&nbsp;</div></td>
				</tr>
				</table>
			</td>
		</tr>
		
		<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

			<td valign="top" class="profile">
				<table cellspacing="4" align="center" width="150">
			<!-- IF postrow.ONLINE_IMG -->
				<tr>
					<td>
					<p align="center">{postrow.ONLINE_IMG}</td>
				</tr>
			<!-- ENDIF -->
			<!-- IF postrow.RANK_TITLE -->
				<tr>
					<td class="postdetails">
					<p align="center">{postrow.RANK_TITLE}</td>
				</tr>
			<!-- ENDIF -->
			<!-- IF postrow.RANK_IMG -->
				<tr>
					<td>
					<p align="center">{postrow.RANK_IMG}</td>
				</tr>
			<!-- ENDIF -->
			<!-- IF postrow.POSTER_AVATAR -->
				<tr>
					<td>
					<p align="center">{postrow.POSTER_AVATAR}</td>
				</tr>
			<!-- ENDIF -->
				</table>

				<p align="center">

				<span class="postdetails">
					<!-- IF postrow.POSTER_JOINED --><br /><b>{L_JOINED}:</b> {postrow.POSTER_JOINED}<!-- ENDIF -->
					<!-- IF postrow.POSTER_POSTS != '' --><br /><b>{L_POSTS}:</b> {postrow.POSTER_POSTS}<!-- ENDIF -->
					<!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->

					<!-- IF postrow.S_PROFILE_FIELD1 -->
						<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
						<br /><b>{postrow.PROFILE_FIELD1_NAME}:</b> {postrow.PROFILE_FIELD1_VALUE}
					<!-- ENDIF -->

					<!-- BEGIN custom_fields -->
						<br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
					<!-- END custom_fields -->
				</span>

			</td>
			<td valign="top">
				<table width="100%" cellspacing="5">
				<tr>
					<td>
					<!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
						<table width="100%" cellspacing="0">
						<tr>
							<td class="gensmall"><!-- IF postrow.S_POST_UNAPPROVED --><span class="postapprove">{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span> <!-- ENDIF --> <!-- IF postrow.S_POST_REPORTED --><span class="postreported">{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF --></td>
						</tr>
						</table>

						<br clear="all" />
					<!-- ENDIF -->

						<div class="postbody">{postrow.MESSAGE}</div>

					<!-- IF postrow.S_HAS_ATTACHMENTS -->
						<br clear="all" /><br />

						<table class="tablebg" width="100%" cellspacing="1">
						<tr>
							<td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
						</tr>
						<!-- BEGIN attachment -->
							<tr>
								<!-- IF postrow.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
							</tr>
						<!-- END attachment -->
						</table>
					<!-- ENDIF -->

					<!-- IF postrow.S_DISPLAY_NOTICE -->
						<span class="gensmall error"><br /><br />{L_DOWNLOAD_NOTICE}</span>
					<!-- ENDIF -->
					<!-- IF postrow.SIGNATURE -->
						<span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span>
					<!-- ENDIF -->

					<!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
						<!-- IF postrow.EDIT_REASON -->
							<br /><br />
							<table class="tablebg" width="100%" cellspacing="1">
							<tr>
								<td class="row3"><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
							</tr>
							<tr>
								<td class="row2"><span class="genmed">{postrow.EDIT_REASON}</span></td>
							</tr>
							</table>
						<!-- ELSE -->
							<br /><br />
							<span class="gensmall">{postrow.EDITED_MESSAGE}</span>
						<!-- ENDIF -->
					<!-- ENDIF -->

					<!-- IF postrow.BUMPED_MESSAGE -->
						<span class="gensmall">{postrow.BUMPED_MESSAGE}</span>
					<!-- ENDIF -->

					<!-- IF not postrow.S_HAS_ATTACHMENTS --><br clear="all" /><br /><!-- ENDIF -->

						<table width="100%" cellspacing="0">
						<tr valign="middle">
							<td class="gensmall" align="{S_CONTENT_FLOW_END}">
							<!-- IF not S_IS_BOT -->
								<!-- IF postrow.U_REPORT --><a href="{postrow.U_REPORT}">{REPORT_IMG}</a> <!-- ENDIF --> 
								<!-- IF postrow.U_INFO --><a href="{postrow.U_INFO}">{INFO_IMG}</a> <!-- ENDIF --> 
								<!-- IF postrow.U_WARN --><a href="{postrow.U_WARN}">{WARN_IMG}</a> <!-- ENDIF --> 
								<!-- IF postrow.U_DELETE --><a href="{postrow.U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF -->
							<!-- ENDIF -->
							</td>
						</tr>
						</table>
					</td>
				</tr>
				</table>
			</td>
		</tr>

		<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

			<td class="profile">
			<p align="center"><strong><a href="#wrapheader">{L_BACK_TO_TOP}</a></strong></td>
			<td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF not S_IS_BOT --><!-- IF postrow.U_EDIT --><a href="{postrow.U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_QUOTE --><a href="{postrow.U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- ENDIF -->&nbsp;</div></td>
		</tr>

	<!-- ENDIF -->
	
	<tr>
		<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
	</tr>
	</table>
	<!-- IF AD_CODE2 -->
	<div class="post bg3">
	<div class="inner"><span class="corners-top"><span></span></span>
	<div align="center">{AD_CODE2}</div>
	<span class="corners-bottom"><span></span></span></div></div> 
	<!-- ENDIF -->
	
	<!-- IF postrow.S_FIRST_ROW == 2 --> 
	<!-- IF AD_CODE1 -->
	<div class="post bg3">
	<div class="inner"><span class="corners-top"><span></span></span>
	<div align="center">{AD_CODE1}</div>
	<span class="corners-bottom"><span></span></span></div></div> 
	<!-- ENDIF -->
	<!-- ENDIF -->

<!-- END postrow -->
<!-- IF AD_CODE4 -->
<div class="post bg3">
<div class="inner"><span class="corners-top"><span></span></span>
<div align="center">{AD_CODE4}</div>
<span class="corners-bottom"><span></span></span></div></div>
<!-- ENDIF -->

	<table width="100%" cellspacing="1" class="tablebg">
	<tr align="center">
		<td class="cat"><form name="viewtopic" method="post" action="{S_TOPIC_ACTION}"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></form></td>
	</tr>
	</table>

	<table width="100%" cellspacing="1">
	<tr>
		<td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
		<!-- IF not S_IS_BOT -->
			<!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
			<!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- IF S_QR_ENABLED -->&nbsp;<a href="javascript:toggle_quick_reply();">{QUICK_REPLY_IMG}</a><!-- ENDIF --><!-- ENDIF -->
		<!-- ENDIF -->
		</td>
		<!-- IF TOTAL_POSTS -->
			<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
			<td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>
			<td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
		<!-- ENDIF -->
	</tr>
	</table>

</div>
<!-- IF S_QR_ENABLED -->
	<!-- INCLUDE posting_qr_body.html -->
<!-- ENDIF -->

<div id="pagefooter"></div>

<br clear="all" />

<!-- INCLUDE breadcrumbs.html -->

<!-- IF S_DISPLAY_ONLINE_LIST -->
	<br clear="all" />

	<table class="tablebg" width="100%" cellspacing="1">
	<tr>
		<td class="cat"><h4>{L_WHO_IS_ONLINE}</h4></td>
	</tr>
	<tr>
		<td class="row1"><p class="gensmall">{LOGGED_IN_USER_LIST}</p></td>
	</tr>
	</table>
<!-- ENDIF -->

<br clear="all" />

<table width="100%" cellspacing="1">
<tr>
	<td width="40%" valign="top" nowrap="nowrap" align="{S_CONTENT_FLOW_BEGIN}"><!-- IF S_TOPIC_MOD --><form method="post" action="{S_MOD_ACTION}"><span class="gensmall">{L_QUICK_MOD}:</span> {S_TOPIC_MOD} <input class="btnlite" type="submit" value="{L_GO}" /></form><!-- ENDIF --></td>
	<td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><span class="gensmall"><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></span></td>
</tr>
</table>

<br clear="all" />

<table width="100%" cellspacing="0">
<tr>
	<td><!-- IF S_DISPLAY_SEARCHBOX --><!-- INCLUDE searchbox.html --><!-- ENDIF --></td>
	<td align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></td>
</tr>
</table>

<!-- INCLUDE overall_footer.html -->

User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by kber »

Test this . and wait some seconds till the page end its load

Code: Select all

    <!-- INCLUDE overall_header.html -->
<script>
window.onload = resizeimg;
function resizeimg()
{
   if (document.getElementsByTagName)
   {
      for (i=0; i<document.getElementsByTagName('img').length; i++)
      {
         im = document.getElementsByTagName('img')[i];
         if (im.width > 600)
         {
            im.style.width = '600px';
            eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
            eval("im.onclick = pop" + String(i) + ";");
            if (document.all) im.style.cursor = 'hand';
            if (!document.all) im.style.cursor = 'pointer';
            im.title = 'Click Here To See Image Full Size ';
         }
      }
   }
}

</script> 
    <div align="center">{AD_CODE3}</div>

    <!-- IF S_FORUM_RULES -->
       <div class="forumrules">
          <!-- IF U_FORUM_RULES -->
             <h3>{L_FORUM_RULES}</h3><br />
             <a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
          <!-- ELSE -->
             <h3>{L_FORUM_RULES}</h3><br />
             {FORUM_RULES}
          <!-- ENDIF -->
       </div>

       <br clear="all" />
    <!-- ENDIF -->

    <div id="pageheader">
       <h3><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h3><br />

    <!-- IF MODERATORS -->
       <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p>
    <!-- ENDIF -->
    <!-- IF U_MCP -->
       <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
    <!-- ENDIF -->
    </div>

    <br clear="all" /><br />

    <div id="pagecontent">

       <table width="100%" cellspacing="1">
       <tr>
          <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
          <!-- IF not S_IS_BOT -->
             <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
             <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF -->
          <!-- ENDIF -->
          </td>
          <!-- IF TOTAL_POSTS -->
             <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
             <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>
             <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
          <!-- ENDIF -->
       </tr>
       </table>

       <table class="tablebg" width="100%" cellspacing="1">
       <tr>
          <td class="cat">
             <table width="100%" cellspacing="0">
             <tr>
                <td class="nav" nowrap="nowrap">&nbsp;
                <!-- IF not S_IS_BOT -->
                   <!-- IF U_WATCH_TOPIC --><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC or U_BOOKMARK_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
                   <!-- IF U_BOOKMARK_TOPIC --><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
                   <!-- IF U_PRINT_TOPIC --><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}">{L_PRINT_TOPIC}</a><!-- IF U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
                   <!-- IF U_EMAIL_TOPIC --><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}">{L_EMAIL_TOPIC}</a><!-- IF U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
                   <!-- IF U_BUMP_TOPIC --><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a><!-- ENDIF -->
                <!-- ENDIF -->
                </td>
                <td class="nav" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a><!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> | <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a><!-- ENDIF --> | <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>&nbsp;</td>
             </tr>
             </table>
          </td>
       </tr>
    <!-- IF S_HAS_POLL -->
       <tr>
          <td class="row2" colspan="2" align="center"><br clear="all" />

             <form method="post" action="{S_POLL_ACTION}">

             <table cellspacing="0" cellpadding="4" border="0" align="center">
             <tr>
                <td align="center"><span class="gen"><b>{POLL_QUESTION}</b></span><br /><span class="gensmall">{L_POLL_LENGTH}</span></td>
             </tr>
             <tr>
                <td align="{S_CONTENT_FLOW_BEGIN}">
                   <table cellspacing="0" cellpadding="2" border="0">
                <!-- BEGIN poll_option -->
                   <tr>
                   <!-- IF S_CAN_VOTE -->
                      <td>
                         <!-- IF S_IS_MULTI_CHOICE -->
                            <input type="checkbox" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
                         <!-- ELSE -->
                            <input type="radio" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
                         <!-- ENDIF -->
                      </td>
                   <!-- ENDIF -->
                      <td><span class="gen">{poll_option.POLL_OPTION_CAPTION}</span></td>
                      <!-- IF S_DISPLAY_RESULTS -->
                         <td dir="ltr">{POLL_LEFT_CAP_IMG}{poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG}</td>
                         <td class="gen" align="{S_CONTENT_FLOW_END}"><b>&nbsp;{poll_option.POLL_OPTION_PERCENT}&nbsp;</b></td>
                         <td class="gen" align="center">[ {poll_option.POLL_OPTION_RESULT} ]</td>
                         <!-- IF poll_option.POLL_OPTION_VOTED -->
                            <td class="gensmall" valign="top"><b title="{L_POLL_VOTED_OPTION}">x</b></td>
                         <!-- ENDIF -->
                      <!-- ENDIF -->
                   </tr>
                <!-- END poll_option -->
                   </table>
                </td>
             </tr>
          <!-- IF S_CAN_VOTE -->
             <tr>
                <td align="center"><span class="gensmall">{L_MAX_VOTES}</span><br /><br /><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="btnlite" /></td>
             </tr>
          <!-- ENDIF -->
          <!-- IF S_DISPLAY_RESULTS -->
             <tr>
                <td class="gensmall" colspan="4" align="center"><b>{L_TOTAL_VOTES} : {TOTAL_VOTES}</b></td>
             </tr>
          <!-- ELSE -->
             <tr>
                <td align="center"><span class="gensmall"><b><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></b></span></td>
             </tr>
          <!-- ENDIF -->
             </table>
             {S_HIDDEN_FIELDS}
             
             </form>
             
          </td>
       </tr>
    <!-- ENDIF -->
       </table>

    <!-- BEGIN postrow -->
       <table class="tablebg" width="100%" cellspacing="1">
       <!-- IF postrow.S_FIRST_ROW -->
          <tr>
             <th>{L_AUTHOR}</th>
             <th>{L_MESSAGE}</th>
          </tr>
       <!-- ENDIF -->
       <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

       <!-- IF postrow.S_IGNORE_POST -->
             <td class="gensmall" colspan="2" height="25" align="center"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>{postrow.L_IGNORE_POST}</td>
       <!-- ELSE -->

             <td align="center" valign="middle">
                <!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>
                <b class="postauthor"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b>
             </td>
             <td width="100%" height="25">
                <table width="100%" cellspacing="0">
                <tr>
                <!-- IF postrow.POST_ICON_IMG -->
                   <td><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" title="" /></td>
                <!-- ENDIF -->
                   <td class="gensmall" width="100%"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<b>{L_POST_SUBJECT}:</b> {postrow.POST_SUBJECT}</div><div style="float: {S_CONTENT_FLOW_END};"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF --><b>{L_POSTED}:</b> {postrow.POST_DATE}&nbsp;</div></td>
                </tr>
                </table>
             </td>
          </tr>
          
          <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

             <td valign="top" class="profile">
                <table cellspacing="4" align="center" width="150">
             <!-- IF postrow.ONLINE_IMG -->
                <tr>
                   <td>
                   <p align="center">{postrow.ONLINE_IMG}</td>
                </tr>
             <!-- ENDIF -->
             <!-- IF postrow.RANK_TITLE -->
                <tr>
                   <td class="postdetails">
                   <p align="center">{postrow.RANK_TITLE}</td>
                </tr>
             <!-- ENDIF -->
             <!-- IF postrow.RANK_IMG -->
                <tr>
                   <td>
                   <p align="center">{postrow.RANK_IMG}</td>
                </tr>
             <!-- ENDIF -->
             <!-- IF postrow.POSTER_AVATAR -->
                <tr>
                   <td>
                   <p align="center">{postrow.POSTER_AVATAR}</td>
                </tr>
             <!-- ENDIF -->
                </table>

                <p align="center">

                <span class="postdetails">
                   <!-- IF postrow.POSTER_JOINED --><br /><b>{L_JOINED}:</b> {postrow.POSTER_JOINED}<!-- ENDIF -->
                   <!-- IF postrow.POSTER_POSTS != '' --><br /><b>{L_POSTS}:</b> {postrow.POSTER_POSTS}<!-- ENDIF -->
                   <!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->

                   <!-- IF postrow.S_PROFILE_FIELD1 -->
                      <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
                      <br /><b>{postrow.PROFILE_FIELD1_NAME}:</b> {postrow.PROFILE_FIELD1_VALUE}
                   <!-- ENDIF -->

                   <!-- BEGIN custom_fields -->
                      <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
                   <!-- END custom_fields -->
                </span>

             </td>
             <td valign="top">
                <table width="100%" cellspacing="5">
                <tr>
                   <td>
                   <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
                      <table width="100%" cellspacing="0">
                      <tr>
                         <td class="gensmall"><!-- IF postrow.S_POST_UNAPPROVED --><span class="postapprove">{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span> <!-- ENDIF --> <!-- IF postrow.S_POST_REPORTED --><span class="postreported">{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF --></td>
                      </tr>
                      </table>

                      <br clear="all" />
                   <!-- ENDIF -->

                      <div class="postbody">{postrow.MESSAGE}</div>

                   <!-- IF postrow.S_HAS_ATTACHMENTS -->
                      <br clear="all" /><br />

                      <table class="tablebg" width="100%" cellspacing="1">
                      <tr>
                         <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
                      </tr>
                      <!-- BEGIN attachment -->
                         <tr>
                            <!-- IF postrow.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
                         </tr>
                      <!-- END attachment -->
                      </table>
                   <!-- ENDIF -->

                   <!-- IF postrow.S_DISPLAY_NOTICE -->
                      <span class="gensmall error"><br /><br />{L_DOWNLOAD_NOTICE}</span>
                   <!-- ENDIF -->
                   <!-- IF postrow.SIGNATURE -->
                      <span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span>
                   <!-- ENDIF -->

                   <!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
                      <!-- IF postrow.EDIT_REASON -->
                         <br /><br />
                         <table class="tablebg" width="100%" cellspacing="1">
                         <tr>
                            <td class="row3"><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
                         </tr>
                         <tr>
                            <td class="row2"><span class="genmed">{postrow.EDIT_REASON}</span></td>
                         </tr>
                         </table>
                      <!-- ELSE -->
                         <br /><br />
                         <span class="gensmall">{postrow.EDITED_MESSAGE}</span>
                      <!-- ENDIF -->
                   <!-- ENDIF -->

                   <!-- IF postrow.BUMPED_MESSAGE -->
                      <span class="gensmall">{postrow.BUMPED_MESSAGE}</span>
                   <!-- ENDIF -->

                   <!-- IF not postrow.S_HAS_ATTACHMENTS --><br clear="all" /><br /><!-- ENDIF -->

                      <table width="100%" cellspacing="0">
                      <tr valign="middle">
                         <td class="gensmall" align="{S_CONTENT_FLOW_END}">
                         <!-- IF not S_IS_BOT -->
                            <!-- IF postrow.U_REPORT --><a href="{postrow.U_REPORT}">{REPORT_IMG}</a> <!-- ENDIF -->
                            <!-- IF postrow.U_INFO --><a href="{postrow.U_INFO}">{INFO_IMG}</a> <!-- ENDIF -->
                            <!-- IF postrow.U_WARN --><a href="{postrow.U_WARN}">{WARN_IMG}</a> <!-- ENDIF -->
                            <!-- IF postrow.U_DELETE --><a href="{postrow.U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF -->
                         <!-- ENDIF -->
                         </td>
                      </tr>
                      </table>
                   </td>
                </tr>
                </table>
             </td>
          </tr>

          <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

             <td class="profile">
             <p align="center"><strong><a href="#wrapheader">{L_BACK_TO_TOP}</a></strong></td>
             <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF not S_IS_BOT --><!-- IF postrow.U_EDIT --><a href="{postrow.U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_QUOTE --><a href="{postrow.U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- ENDIF -->&nbsp;</div></td>
          </tr>

       <!-- ENDIF -->
       
       <tr>
          <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
       </tr>
       </table>
       <!-- IF AD_CODE2 -->
       <div class="post bg3">
       <div class="inner"><span class="corners-top"><span></span></span>
       <div align="center">{AD_CODE2}</div>
       <span class="corners-bottom"><span></span></span></div></div>
       <!-- ENDIF -->
       
       <!-- IF postrow.S_FIRST_ROW == 2 -->
       <!-- IF AD_CODE1 -->
       <div class="post bg3">
       <div class="inner"><span class="corners-top"><span></span></span>
       <div align="center">{AD_CODE1}</div>
       <span class="corners-bottom"><span></span></span></div></div>
       <!-- ENDIF -->
       <!-- ENDIF -->

    <!-- END postrow -->
    <!-- IF AD_CODE4 -->
    <div class="post bg3">
    <div class="inner"><span class="corners-top"><span></span></span>
    <div align="center">{AD_CODE4}</div>
    <span class="corners-bottom"><span></span></span></div></div>
    <!-- ENDIF -->

       <table width="100%" cellspacing="1" class="tablebg">
       <tr align="center">
          <td class="cat"><form name="viewtopic" method="post" action="{S_TOPIC_ACTION}"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></form></td>
       </tr>
       </table>

       <table width="100%" cellspacing="1">
       <tr>
          <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
          <!-- IF not S_IS_BOT -->
             <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
             <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- IF S_QR_ENABLED -->&nbsp;<a href="javascript:toggle_quick_reply();">{QUICK_REPLY_IMG}</a><!-- ENDIF --><!-- ENDIF -->
          <!-- ENDIF -->
          </td>
          <!-- IF TOTAL_POSTS -->
             <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
             <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>
             <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
          <!-- ENDIF -->
       </tr>
       </table>

    </div>
    <!-- IF S_QR_ENABLED -->
       <!-- INCLUDE posting_qr_body.html -->
    <!-- ENDIF -->

    <div id="pagefooter"></div>

    <br clear="all" />

    <!-- INCLUDE breadcrumbs.html -->

    <!-- IF S_DISPLAY_ONLINE_LIST -->
       <br clear="all" />

       <table class="tablebg" width="100%" cellspacing="1">
       <tr>
          <td class="cat"><h4>{L_WHO_IS_ONLINE}</h4></td>
       </tr>
       <tr>
          <td class="row1"><p class="gensmall">{LOGGED_IN_USER_LIST}</p></td>
       </tr>
       </table>
    <!-- ENDIF -->

    <br clear="all" />

    <table width="100%" cellspacing="1">
    <tr>
       <td width="40%" valign="top" nowrap="nowrap" align="{S_CONTENT_FLOW_BEGIN}"><!-- IF S_TOPIC_MOD --><form method="post" action="{S_MOD_ACTION}"><span class="gensmall">{L_QUICK_MOD}:</span> {S_TOPIC_MOD} <input class="btnlite" type="submit" value="{L_GO}" /></form><!-- ENDIF --></td>
       <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><span class="gensmall"><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></span></td>
    </tr>
    </table>

    <br clear="all" />

    <table width="100%" cellspacing="0">
    <tr>
       <td><!-- IF S_DISPLAY_SEARCHBOX --><!-- INCLUDE searchbox.html --><!-- ENDIF --></td>
       <td align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></td>
    </tr>
    </table>

    <!-- INCLUDE overall_footer.html -->
Hello All

wolferey
Registered User
Posts: 19
Joined: Fri Dec 06, 2002 10:26 pm
Location: Trondheim, Norway
Contact:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by wolferey »

If you can make the image either a link (instead of pop-up) or have overlay effects like thickbox ( http://jquery.com/demo/thickbox/ ).. And like other comment here, fix the resize "bug" where it resizes images outside the post, then this mod will be excellent beyond imagination. So far it stops at excellent, which is pretty good too ^^

Aedus
Registered User
Posts: 11
Joined: Wed Sep 12, 2007 8:33 am

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by Aedus »

You might want to get rid of the window.onload method as well, there are better ways that don't hijack the entire event.

internet1
Registered User
Posts: 77
Joined: Sun Apr 09, 2006 9:11 am
Contact:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by internet1 »

hi
i add code in view_topicbody.html but nothing happend
:cry: :cry: :roll:

kber wrote:Test this . and wait some seconds till the page end its load

Code: Select all

    <!-- INCLUDE overall_header.html -->
<script>
window.onload = resizeimg;
function resizeimg()
{
   if (document.getElementsByTagName)
   {
      for (i=0; i<document.getElementsByTagName('img').length; i++)
      {
         im = document.getElementsByTagName('img')[i];
         if (im.width > 600)
         {
            im.style.width = '600px';
            eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
            eval("im.onclick = pop" + String(i) + ";");
            if (document.all) im.style.cursor = 'hand';
            if (!document.all) im.style.cursor = 'pointer';
            im.title = 'Click Here To See Image Full Size ';
         }
      }
   }
}

</script> 
    <div align="center">{AD_CODE3}</div>

    <!-- IF S_FORUM_RULES -->
       <div class="forumrules">
          <!-- IF U_FORUM_RULES -->
             <h3>{L_FORUM_RULES}</h3><br />
             <a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
          <!-- ELSE -->
             <h3>{L_FORUM_RULES}</h3><br />
             {FORUM_RULES}
          <!-- ENDIF -->
       </div>

       <br clear="all" />
    <!-- ENDIF -->

    <div id="pageheader">
       <h3><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h3><br />

    <!-- IF MODERATORS -->
       <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p>
    <!-- ENDIF -->
    <!-- IF U_MCP -->
       <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
    <!-- ENDIF -->
    </div>

    <br clear="all" /><br />

    <div id="pagecontent">

       <table width="100%" cellspacing="1">
       <tr>
          <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
          <!-- IF not S_IS_BOT -->
             <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
             <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF -->
          <!-- ENDIF -->
          </td>
          <!-- IF TOTAL_POSTS -->
             <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
             <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>
             <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
          <!-- ENDIF -->
       </tr>
       </table>

       <table class="tablebg" width="100%" cellspacing="1">
       <tr>
          <td class="cat">
             <table width="100%" cellspacing="0">
             <tr>
                <td class="nav" nowrap="nowrap">&nbsp;
                <!-- IF not S_IS_BOT -->
                   <!-- IF U_WATCH_TOPIC --><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC or U_BOOKMARK_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
                   <!-- IF U_BOOKMARK_TOPIC --><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
                   <!-- IF U_PRINT_TOPIC --><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}">{L_PRINT_TOPIC}</a><!-- IF U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
                   <!-- IF U_EMAIL_TOPIC --><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}">{L_EMAIL_TOPIC}</a><!-- IF U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
                   <!-- IF U_BUMP_TOPIC --><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a><!-- ENDIF -->
                <!-- ENDIF -->
                </td>
                <td class="nav" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a><!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> | <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a><!-- ENDIF --> | <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>&nbsp;</td>
             </tr>
             </table>
          </td>
       </tr>
    <!-- IF S_HAS_POLL -->
       <tr>
          <td class="row2" colspan="2" align="center"><br clear="all" />

             <form method="post" action="{S_POLL_ACTION}">

             <table cellspacing="0" cellpadding="4" border="0" align="center">
             <tr>
                <td align="center"><span class="gen"><b>{POLL_QUESTION}</b></span><br /><span class="gensmall">{L_POLL_LENGTH}</span></td>
             </tr>
             <tr>
                <td align="{S_CONTENT_FLOW_BEGIN}">
                   <table cellspacing="0" cellpadding="2" border="0">
                <!-- BEGIN poll_option -->
                   <tr>
                   <!-- IF S_CAN_VOTE -->
                      <td>
                         <!-- IF S_IS_MULTI_CHOICE -->
                            <input type="checkbox" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
                         <!-- ELSE -->
                            <input type="radio" class="radio" name="vote_id[]" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
                         <!-- ENDIF -->
                      </td>
                   <!-- ENDIF -->
                      <td><span class="gen">{poll_option.POLL_OPTION_CAPTION}</span></td>
                      <!-- IF S_DISPLAY_RESULTS -->
                         <td dir="ltr">{POLL_LEFT_CAP_IMG}{poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG}</td>
                         <td class="gen" align="{S_CONTENT_FLOW_END}"><b>&nbsp;{poll_option.POLL_OPTION_PERCENT}&nbsp;</b></td>
                         <td class="gen" align="center">[ {poll_option.POLL_OPTION_RESULT} ]</td>
                         <!-- IF poll_option.POLL_OPTION_VOTED -->
                            <td class="gensmall" valign="top"><b title="{L_POLL_VOTED_OPTION}">x</b></td>
                         <!-- ENDIF -->
                      <!-- ENDIF -->
                   </tr>
                <!-- END poll_option -->
                   </table>
                </td>
             </tr>
          <!-- IF S_CAN_VOTE -->
             <tr>
                <td align="center"><span class="gensmall">{L_MAX_VOTES}</span><br /><br /><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="btnlite" /></td>
             </tr>
          <!-- ENDIF -->
          <!-- IF S_DISPLAY_RESULTS -->
             <tr>
                <td class="gensmall" colspan="4" align="center"><b>{L_TOTAL_VOTES} : {TOTAL_VOTES}</b></td>
             </tr>
          <!-- ELSE -->
             <tr>
                <td align="center"><span class="gensmall"><b><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></b></span></td>
             </tr>
          <!-- ENDIF -->
             </table>
             {S_HIDDEN_FIELDS}
             
             </form>
             
          </td>
       </tr>
    <!-- ENDIF -->
       </table>

    <!-- BEGIN postrow -->
       <table class="tablebg" width="100%" cellspacing="1">
       <!-- IF postrow.S_FIRST_ROW -->
          <tr>
             <th>{L_AUTHOR}</th>
             <th>{L_MESSAGE}</th>
          </tr>
       <!-- ENDIF -->
       <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

       <!-- IF postrow.S_IGNORE_POST -->
             <td class="gensmall" colspan="2" height="25" align="center"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>{postrow.L_IGNORE_POST}</td>
       <!-- ELSE -->

             <td align="center" valign="middle">
                <!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>
                <b class="postauthor"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b>
             </td>
             <td width="100%" height="25">
                <table width="100%" cellspacing="0">
                <tr>
                <!-- IF postrow.POST_ICON_IMG -->
                   <td><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" title="" /></td>
                <!-- ENDIF -->
                   <td class="gensmall" width="100%"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<b>{L_POST_SUBJECT}:</b> {postrow.POST_SUBJECT}</div><div style="float: {S_CONTENT_FLOW_END};"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF --><b>{L_POSTED}:</b> {postrow.POST_DATE}&nbsp;</div></td>
                </tr>
                </table>
             </td>
          </tr>
          
          <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

             <td valign="top" class="profile">
                <table cellspacing="4" align="center" width="150">
             <!-- IF postrow.ONLINE_IMG -->
                <tr>
                   <td>
                   <p align="center">{postrow.ONLINE_IMG}</td>
                </tr>
             <!-- ENDIF -->
             <!-- IF postrow.RANK_TITLE -->
                <tr>
                   <td class="postdetails">
                   <p align="center">{postrow.RANK_TITLE}</td>
                </tr>
             <!-- ENDIF -->
             <!-- IF postrow.RANK_IMG -->
                <tr>
                   <td>
                   <p align="center">{postrow.RANK_IMG}</td>
                </tr>
             <!-- ENDIF -->
             <!-- IF postrow.POSTER_AVATAR -->
                <tr>
                   <td>
                   <p align="center">{postrow.POSTER_AVATAR}</td>
                </tr>
             <!-- ENDIF -->
                </table>

                <p align="center">

                <span class="postdetails">
                   <!-- IF postrow.POSTER_JOINED --><br /><b>{L_JOINED}:</b> {postrow.POSTER_JOINED}<!-- ENDIF -->
                   <!-- IF postrow.POSTER_POSTS != '' --><br /><b>{L_POSTS}:</b> {postrow.POSTER_POSTS}<!-- ENDIF -->
                   <!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->

                   <!-- IF postrow.S_PROFILE_FIELD1 -->
                      <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
                      <br /><b>{postrow.PROFILE_FIELD1_NAME}:</b> {postrow.PROFILE_FIELD1_VALUE}
                   <!-- ENDIF -->

                   <!-- BEGIN custom_fields -->
                      <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
                   <!-- END custom_fields -->
                </span>

             </td>
             <td valign="top">
                <table width="100%" cellspacing="5">
                <tr>
                   <td>
                   <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
                      <table width="100%" cellspacing="0">
                      <tr>
                         <td class="gensmall"><!-- IF postrow.S_POST_UNAPPROVED --><span class="postapprove">{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span> <!-- ENDIF --> <!-- IF postrow.S_POST_REPORTED --><span class="postreported">{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF --></td>
                      </tr>
                      </table>

                      <br clear="all" />
                   <!-- ENDIF -->

                      <div class="postbody">{postrow.MESSAGE}</div>

                   <!-- IF postrow.S_HAS_ATTACHMENTS -->
                      <br clear="all" /><br />

                      <table class="tablebg" width="100%" cellspacing="1">
                      <tr>
                         <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
                      </tr>
                      <!-- BEGIN attachment -->
                         <tr>
                            <!-- IF postrow.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
                         </tr>
                      <!-- END attachment -->
                      </table>
                   <!-- ENDIF -->

                   <!-- IF postrow.S_DISPLAY_NOTICE -->
                      <span class="gensmall error"><br /><br />{L_DOWNLOAD_NOTICE}</span>
                   <!-- ENDIF -->
                   <!-- IF postrow.SIGNATURE -->
                      <span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span>
                   <!-- ENDIF -->

                   <!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
                      <!-- IF postrow.EDIT_REASON -->
                         <br /><br />
                         <table class="tablebg" width="100%" cellspacing="1">
                         <tr>
                            <td class="row3"><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
                         </tr>
                         <tr>
                            <td class="row2"><span class="genmed">{postrow.EDIT_REASON}</span></td>
                         </tr>
                         </table>
                      <!-- ELSE -->
                         <br /><br />
                         <span class="gensmall">{postrow.EDITED_MESSAGE}</span>
                      <!-- ENDIF -->
                   <!-- ENDIF -->

                   <!-- IF postrow.BUMPED_MESSAGE -->
                      <span class="gensmall">{postrow.BUMPED_MESSAGE}</span>
                   <!-- ENDIF -->

                   <!-- IF not postrow.S_HAS_ATTACHMENTS --><br clear="all" /><br /><!-- ENDIF -->

                      <table width="100%" cellspacing="0">
                      <tr valign="middle">
                         <td class="gensmall" align="{S_CONTENT_FLOW_END}">
                         <!-- IF not S_IS_BOT -->
                            <!-- IF postrow.U_REPORT --><a href="{postrow.U_REPORT}">{REPORT_IMG}</a> <!-- ENDIF -->
                            <!-- IF postrow.U_INFO --><a href="{postrow.U_INFO}">{INFO_IMG}</a> <!-- ENDIF -->
                            <!-- IF postrow.U_WARN --><a href="{postrow.U_WARN}">{WARN_IMG}</a> <!-- ENDIF -->
                            <!-- IF postrow.U_DELETE --><a href="{postrow.U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF -->
                         <!-- ENDIF -->
                         </td>
                      </tr>
                      </table>
                   </td>
                </tr>
                </table>
             </td>
          </tr>

          <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

             <td class="profile">
             <p align="center"><strong><a href="#wrapheader">{L_BACK_TO_TOP}</a></strong></td>
             <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF not S_IS_BOT --><!-- IF postrow.U_EDIT --><a href="{postrow.U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_QUOTE --><a href="{postrow.U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- ENDIF -->&nbsp;</div></td>
          </tr>

       <!-- ENDIF -->
       
       <tr>
          <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
       </tr>
       </table>
       <!-- IF AD_CODE2 -->
       <div class="post bg3">
       <div class="inner"><span class="corners-top"><span></span></span>
       <div align="center">{AD_CODE2}</div>
       <span class="corners-bottom"><span></span></span></div></div>
       <!-- ENDIF -->
       
       <!-- IF postrow.S_FIRST_ROW == 2 -->
       <!-- IF AD_CODE1 -->
       <div class="post bg3">
       <div class="inner"><span class="corners-top"><span></span></span>
       <div align="center">{AD_CODE1}</div>
       <span class="corners-bottom"><span></span></span></div></div>
       <!-- ENDIF -->
       <!-- ENDIF -->

    <!-- END postrow -->
    <!-- IF AD_CODE4 -->
    <div class="post bg3">
    <div class="inner"><span class="corners-top"><span></span></span>
    <div align="center">{AD_CODE4}</div>
    <span class="corners-bottom"><span></span></span></div></div>
    <!-- ENDIF -->

       <table width="100%" cellspacing="1" class="tablebg">
       <tr align="center">
          <td class="cat"><form name="viewtopic" method="post" action="{S_TOPIC_ACTION}"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></form></td>
       </tr>
       </table>

       <table width="100%" cellspacing="1">
       <tr>
          <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
          <!-- IF not S_IS_BOT -->
             <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
             <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- IF S_QR_ENABLED -->&nbsp;<a href="javascript:toggle_quick_reply();">{QUICK_REPLY_IMG}</a><!-- ENDIF --><!-- ENDIF -->
          <!-- ENDIF -->
          </td>
          <!-- IF TOTAL_POSTS -->
             <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
             <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>
             <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
          <!-- ENDIF -->
       </tr>
       </table>

    </div>
    <!-- IF S_QR_ENABLED -->
       <!-- INCLUDE posting_qr_body.html -->
    <!-- ENDIF -->

    <div id="pagefooter"></div>

    <br clear="all" />

    <!-- INCLUDE breadcrumbs.html -->

    <!-- IF S_DISPLAY_ONLINE_LIST -->
       <br clear="all" />

       <table class="tablebg" width="100%" cellspacing="1">
       <tr>
          <td class="cat"><h4>{L_WHO_IS_ONLINE}</h4></td>
       </tr>
       <tr>
          <td class="row1"><p class="gensmall">{LOGGED_IN_USER_LIST}</p></td>
       </tr>
       </table>
    <!-- ENDIF -->

    <br clear="all" />

    <table width="100%" cellspacing="1">
    <tr>
       <td width="40%" valign="top" nowrap="nowrap" align="{S_CONTENT_FLOW_BEGIN}"><!-- IF S_TOPIC_MOD --><form method="post" action="{S_MOD_ACTION}"><span class="gensmall">{L_QUICK_MOD}:</span> {S_TOPIC_MOD} <input class="btnlite" type="submit" value="{L_GO}" /></form><!-- ENDIF --></td>
       <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><span class="gensmall"><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></span></td>
    </tr>
    </table>

    <br clear="all" />

    <table width="100%" cellspacing="0">
    <tr>
       <td><!-- IF S_DISPLAY_SEARCHBOX --><!-- INCLUDE searchbox.html --><!-- ENDIF --></td>
       <td align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></td>
    </tr>
    </table>

    <!-- INCLUDE overall_footer.html -->

usef_ksa
Registered User
Posts: 18
Joined: Tue Sep 11, 2007 10:38 pm

Re: [Beta] Easy Resize Posted Images ( RC7 )

Post by usef_ksa »

kber wrote: hi usef .
i just test it with both Firefox and IE6 with no proplem
ahlan,
as you see from the picture, the browser ask the user to download the file.
Image

Locked

Return to “[3.0.x] MODs in Development”