Pagina 1 van 1

Ik snap der niks van!!!

Geplaatst: 22 jun 2004, 13:55
door steve
ik heb een mod gedownload met deze code:

Code: Selecteer alles

##############################################################
## MOD Title: Quick Reply
## MOD Author: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com
## MOD Description: This will add a quick-reply form below every topics
##			It will only display when user has the Reply access
## MOD Version: 1.0.5
##
## Installation Level: easy
## Installation Time: 5 Minutes
## Files To Edit: 3
##	viewtopic.php,
##	language/lang_english/lang_main.php
##	templates/subSilver/viewtopic_body.tpl
## Included Files: N/A
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## Author Notes:
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

#
#-----[ BEFORE, ADD ]------------------------------------
#
//
// Quick Reply Mod
//
if ( ((!$is_auth['auth_reply']) or ($forum_topic_data['forum_status'] == FORUM_LOCKED) or ($forum_topic_data['topic_status'] == TOPIC_LOCKED)) and ($userdata['user_level'] != ADMIN) )
{
	$quick_reply_form = "";
}
else
{
	$notify_user = (( $userdata['session_logged_in'] ) ? $userdata['user_notify'] : 0) ? '1' : '';
	$attach_sig = (( $userdata['session_logged_in'] ) ? $userdata['user_attachsig'] : 0) ? '1' : '';
	$quick_reply_form = "
		<script language='JavaScript' type='text/javascript'>
			function checkForm() {
				formErrors = false;
				if (document.post.message.value.length < 2) {
				formErrors = '" . $lang['Empty_message'] . "';
				}
				if (formErrors) {
					alert(formErrors);
					return false;
				} else {
					return true;
				}
			}
		</script>
		<form action='".append_sid("posting.$phpEx")."' method='post' name='post' onsubmit='return checkForm(this)'>
		<span class='genmed'><b>".$lang["Quick_Reply"].":</b><br /><br />
	";

	if (!$userdata['session_logged_in'])
	{
		$quick_reply_form .= $lang['Username'] . ":&nbsp;<input class='post' type='text' name='username' size='25' maxlength='25' value='' /><br />";
	}

	$quick_reply_form .= "
		<textarea class='post' name='message' rows='10' cols='50' wrap='virtual'></textarea><br />
		<input type='hidden' name='attach_sig' value='" . $attach_sig . "' />
		<input type='hidden' name='mode' value='reply' />
		<input type='hidden' name='sid' value='" . $userdata['session_id'] . "' />
		<input type='hidden' name='t' value='" . $topic_id . "' />
		<input type='hidden' name='notify' value='" . $notify  . "' /><br />
		<input type='submit' name='preview' class='liteoption' value='".$lang['Preview']."' />&nbsp;
		<input type='submit' name='post' class='mainoption' value='".$lang["Submit"]."' />
		</form></span>
	";
}

$template->assign_vars(array(
	'QUICK_REPLY_FORM' => $quick_reply_form)
);
//
// END Quick Reply Mod
//

#
#-----[ OPEN ]------------------------------------------
#
lang_main.php

#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!

#
#-----[ BEFORE, ADD ]------------------------------------
#
// Quick Reply MOD
$lang['Quick_Reply'] = 'Quick Reply';

#
#-----[ OPEN ]------------------------------------------
#
viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#
{S_TOPIC_ADMIN}

#
#-----[ AFTER, ADD ]------------------------------------
#
{QUICK_REPLY_FORM}

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
wat bedoelen ze er nou allemaal mee? als ik viewtopic.php heb geopend en heb gezocht naar $template->pparse('body'); wa moet ik dan doen?

Geplaatst: 22 jun 2004, 13:59
door abcde

Geplaatst: 15 jul 2004, 13:38
door Eminemzdogz
Hoi, ik heb deze mod ook toegevoegd, maar ik krijg aan de linkerkant een veel te klein hokje, het ziet er niet uit... hoe kan ik deze in het midden krijgen??

Geplaatst: 15 jul 2004, 13:44
door Stef
Wat bedoel je met een te klein hokje?

//Een url? :)

Geplaatst: 15 jul 2004, 13:51
door Eminemzdogz
Ik zal ff uploaden en 'n screenshot maken...dan zie je wat er fout loopt (het script verzint op 1 of andere manier zelf vanalles :wink:

Geplaatst: 15 jul 2004, 13:54
door Eminemzdogz
Afbeelding

Naast Geplaatst (bovenaan iedere post) heb ik nu zo'n vaag hokje...de knoppen met Reply en New Topic worden op een of andere manier vervangen door 'n tekstlink :S

Terwijl je in

viewtopic_body.tpl alleen dit

Code: Selecteer alles

#
#-----[ OPEN ]------------------------------------------
#
viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#
{S_TOPIC_ADMIN}

#
#-----[ AFTER, ADD ]------------------------------------
#
{QUICK_REPLY_FORM}
doet... :?:

Geplaatst: 15 jul 2004, 13:57
door [_M-A-R-K_]
je wilt hem in het midden heb <center> misshien

Geplaatst: 15 jul 2004, 13:58
door Eminemzdogz
Ja wil hem variabel aan de breedte van het hele forum...

Geplaatst: 15 jul 2004, 14:11
door Stef
Moet je hem ff 100% zetten, maar verder heb je denk ik toch een foutje gemaakt, mag ik van jou de viewtopic_body.tpl eens zien.

Geplaatst: 15 jul 2004, 14:23
door Eminemzdogz
Ja 't is alsof m'n pc hem vanzelf weer verandert :?: net als word dat weleens wil doen...

[Oude bestand]

Code: Selecteer alles

<table width="100%" cellspacing="2" cellpadding="2" border="0">
  <tr> 
	<td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><br />
	  <span class="gensmall"><b>{PAGINATION}</b><br />
	    </span></td>
  </tr>
</table>

<table width="100%" cellspacing="2" cellpadding="2" border="0">
  <tr> 
	<td align="left" valign="bottom" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>   <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
	<td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>  <font color="#336699">•</font>  <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
  </tr>
</table>

<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
	<tr align="right">
		<td class="catHead" colspan="2" height="28"><span class="nav"><a href="{U_VIEW_OLDER_TOPIC}" class="navnextprev">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="navnextprev">{L_VIEW_NEXT_TOPIC}</a>  </span></td>
	</tr>
	{POLL_DISPLAY} 
	<tr>
		<th class="thLeft" width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th>
		<th class="thRight" nowrap="nowrap">{L_MESSAGE}</th>
	</tr>
	<!-- BEGIN postrow -->
	<tr> 
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POST_DAY_STATS}<br />{postrow.POSTER_FROM}</span><br /></td>
		<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="top">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
			        <tr>
			                <td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span>   {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
			                <td valign="top" align="right" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
		                </tr>
		                <tr> 	
		                        <td colspan="2"><hr /></td>
		                </tr>	
		                <tr>
		                        <td colspan="2" height="100%" valign="top"><span class="postbody">{postrow.MESSAGE}</span><BR /><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
		                </tr>
		                <tr>
		                        <td colspan="2" valign="bottom"><span class="postbody">{postrow.SIGNATURE}</span></td>
		                </tr>		
                </table></td>
	</tr>
	<tr> 
		<td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td>
		<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
			<tr> 
				<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!-- 

	if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 )
		document.write(' {postrow.ICQ_IMG}');
	else
		document.write('</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
				
				//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
			</tr>
		</table></td>
	</tr>
	<tr> 
		<td class="spaceRow" colspan="2" height="1"><img src="templates/BMan1Blue/images/spacer.gif" alt="" width="1" height="1" /></td>
	</tr>
	<!-- END postrow -->
	<tr align="center"> 
		<td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0">
			<tr><form method="post" action="{S_POST_DAYS_ACTION}">
				<td align="center"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} <input type="submit" value="{L_GO}" class="liteoption" name="submit" /></span></td>
			</form></tr>
		</table></td>
	</tr>
</table>

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>   <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
	<td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>  <font color="#336699">•</font>  <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
	<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
  </tr>
  <tr>
	<td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
	<td align="center">{JUMPBOX}</td>
  </tr>
</table>

<table class="otherline" width="100%" cellspacing="2" border="0" align="center">
  <tr> 
	<td width="40%" valign="middle" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span><br />
	   <br />
	  {S_TOPIC_ADMIN}</td>
	<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_AUTH_LIST}</span></td>
  </tr>
</table>
En dan als ik die 1e regel heb toegevoegd en opsla, wordt dit m'n bestand:

Code: Selecteer alles

<table width="100%" cellspacing="2" cellpadding="2" border="0">
  <tr> 
	<td align="left" valign="bottom" colspan="2"><a class="maintitle" href="Quick_reply%20mod%20untouched%20files/%7BU_VIEW_TOPIC%7D">{TOPIC_TITLE}</a><br />
	  <span class="gensmall"><b>{PAGINATION}</b><br />
	    </span></td>
  </tr>
</table>

<table width="100%" cellspacing="2" cellpadding="2" border="0">
  <tr> 
	<td align="left" valign="bottom" nowrap="nowrap"><span class="nav"><a href="Quick_reply%20mod%20untouched%20files/%7BU_POST_NEW_TOPIC%7D"><img src="Quick_reply%20mod%20untouched%20files/%7BPOST_IMG%7D" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>   <a href="Quick_reply%20mod%20untouched%20files/%7BU_POST_REPLY_TOPIC%7D"><img src="Quick_reply%20mod%20untouched%20files/%7BREPLY_IMG%7D" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
	<td align="left" valign="middle" width="100%"><span class="nav">   <a href="Quick_reply%20mod%20untouched%20files/%7BU_INDEX%7D" class="nav">{L_INDEX}</a>  <font color="#336699">•</font>  <a href="Quick_reply%20mod%20untouched%20files/%7BU_VIEW_FORUM%7D" class="nav">{FORUM_NAME}</a></span></td>
  </tr>
</table>

<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
	<tr align="right">
		<td class="catHead" colspan="2" height="28"><span class="nav"><a href="Quick_reply%20mod%20untouched%20files/%7BU_VIEW_OLDER_TOPIC%7D" class="navnextprev">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="Quick_reply%20mod%20untouched%20files/%7BU_VIEW_NEWER_TOPIC%7D" class="navnextprev">{L_VIEW_NEXT_TOPIC}</a>  </span></td>
	</tr>
	{POLL_DISPLAY} 
	<tr>
		<th class="thLeft" width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th>
		<th class="thRight" nowrap="nowrap">{L_MESSAGE}</th>
	</tr>
	<!-- BEGIN postrow -->
	<tr> 
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POST_DAY_STATS}<br />{postrow.POSTER_FROM}</span><br /></td>
		<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="top">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
			        <tr>
			                <td width="100%"><a href="Quick_reply%20mod%20untouched%20files/%7Bpostrow.U_MINI_POST%7D"><img src="Quick_reply%20mod%20untouched%20files/%7Bpostrow.MINI_POST_IMG%7D" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span>   {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
			                <td valign="top" align="right" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
		                </tr>
		                <tr> 	
		                        <td colspan="2"><hr /></td>
		                </tr>	
		                <tr>
		                        <td colspan="2" height="100%" valign="top"><span class="postbody">{postrow.MESSAGE}</span><BR /><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
		                </tr>
		                <tr>
		                        <td colspan="2" valign="bottom"><span class="postbody">{postrow.SIGNATURE}</span></td>
		                </tr>		
                </table></td>
	</tr>
	<tr> 
		<td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td>
		<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
			<tr> 
				<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!-- 

	if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 )
		document.write(' {postrow.ICQ_IMG}');
	else
		document.write('</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
				
				//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
			</tr>
		</table></td>
	</tr>
	<tr> 
		<td class="spaceRow" colspan="2" height="1"><img src="Quick_reply%20mod%20untouched%20files/templates/BMan1Blue/images/spacer.gif" alt="" width="1" height="1" /></td>
	</tr>
	<!-- END postrow -->
	<tr align="center"> 
		<td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0">
			<tr><form method="post" action="Quick_reply%20mod%20untouched%20files/%7BS_POST_DAYS_ACTION%7D">
				<td align="center"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} <input type="submit" value="{L_GO}" class="liteoption" name="submit" /></span></td>
			</form></tr>
		</table></td>
	</tr>
</table>

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="Quick_reply%20mod%20untouched%20files/%7BU_POST_NEW_TOPIC%7D"><img src="Quick_reply%20mod%20untouched%20files/%7BPOST_IMG%7D" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>   <a href="Quick_reply%20mod%20untouched%20files/%7BU_POST_REPLY_TOPIC%7D"><img src="Quick_reply%20mod%20untouched%20files/%7BREPLY_IMG%7D" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
	<td align="left" valign="middle" width="100%"><span class="nav">   <a href="Quick_reply%20mod%20untouched%20files/%7BU_INDEX%7D" class="nav">{L_INDEX}</a>  <font color="#336699">•</font>  <a href="Quick_reply%20mod%20untouched%20files/%7BU_VIEW_FORUM%7D" class="nav">{FORUM_NAME}</a></span></td>
	<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
  </tr>
  <tr>
	<td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
	<td align="center">{JUMPBOX}</td>
  </tr>
</table>

<table class="otherline" width="100%" cellspacing="2" border="0" align="center">
  <tr> 
	<td width="40%" valign="middle" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span><br />
	   <br />
	  {S_TOPIC_ADMIN}</td>
	  {QUICK_REPLY_FORM}
	<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_AUTH_LIST}</span></td>
  </tr>
</table>
:?: :?: :?: :?: :?: :?: :?: :?:

Geplaatst: 15 jul 2004, 19:19
door Stef
Wat heb jij gedaan? :shock:

Code: Selecteer alles

<a href="Quick_reply%20mod%20untouched%20files/%7BU_POST_NEW_TOPIC%7D"><img src="Quick_reply%20mod%20untouched%20files/%7BPOST_IMG%7D" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>   <a href="Quick_reply%20mod%20untouched%20files/%7BU_POST_REPLY_TOPIC%7D"><img src="Quick_reply%20mod%20untouched%20files/%7BREPLY_IMG%7D" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a>
Vervang dit stukje met het oude en alles is weer goed. :wink: