Pagina 1 van 1
"Geavanceerd" knop
Geplaatst: 06 apr 2005, 11:29
door soulcreeper
ik heb nu in mijn forum
Forum een Super Quick Reply MOD geinstalleerd en aangepast, maar nu wil ik ook aan de onderkant van mijn form, naast de Versturen-knop, een knop hebben met "Geavanceerd". dus dat de user eigenlijk gewoon de normale form krijgt waarmee hij alle opties krijgt om zijn post te plaatsen
hoe doe ik dit? als een normale button zijnde.
Geplaatst: 06 apr 2005, 14:33
door Bee
Ik heb de code nodig van viewtopic_body.tpl en de template van quick reply.
Geplaatst: 06 apr 2005, 20:30
door soulcreeper
viewtopic_body.tpl
Code: Selecteer alles
<!-- BEGIN switch_xs_enabled -->
<?php
// This code will be visible only with eXtreme Styles mod
$postrow_count = ( isset($this->_tpldata['postrow.']) ) ? sizeof($this->_tpldata['postrow.']) : 0;
for ($postrow_i = 0; $postrow_i < $postrow_count; $postrow_i++)
{
$postrow_item = &$this->_tpldata['postrow.'][$postrow_i];
// replace username with link to user profile
if(!empty($postrow_item['PROFILE']))
{
$postrow_item['SEARCH_IMG2'] = $postrow_item['SEARCH_IMG'];
$search = array($lang['Read_profile'], '<a ');
$replace = array($postrow_item['POSTER_NAME'], '<a class="name" ');
$postrow_item['POSTER_NAME'] = str_replace($search, $replace, $postrow_item['PROFILE']);
}
}
?>
<!-- END switch_xs_enabled -->
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="middle"><span class="nav">
<a href="{U_INDEX}" class="nav">{L_INDEX}</a>
» <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a>
» <a class="nav" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></span></td>
<td align="right" valign="middle"><span class="nav"><b>{PAGINATION}</b></span></td>
</tr>
<tr>
<td align="left" valign="middle"><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="right" valign="middle"><span class="nav">
<a href="{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a>
</span></td>
</tr>
</table>
{POLL_DISPLAY}
<!-- BEGIN postrow -->
<a name="{postrow.U_POST_ID}"></a>
{TPL_HDR1}<span class="cattitle">{postrow.POST_SUBJECT}</span>{TPL_HDR2}<table border="0" cellpadding="0" cellspacing="1" width="100%" class="forumline">
<tr>
<td class="th" align="center" valign="middle"><table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr height="26">
<td align="left" valign="middle" nowrap="nowrap"><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="genmed">{L_POSTED}: {postrow.POST_DATE}</span></td>
<td align="right" valign="middle" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG} </td>
</tr></table></td>
</tr>
<tr>
<td class="row1" align="left" valign="top" width="100%"><table border="0" cellspacing="0" cellpadding="0" width="100%"><!-- main table start -->
<tr>
<td width="150" align="left" valign="top" rowspan="2"><table border="0" cellspacing="0" cellpadding="0" width="100%"><!-- left row table start -->
<tr>
<td width="100%" align="left" valign="top" background="{T_TEMPLATE_PATH}/images/post_bg.gif"><table border="0" cellspacing="0" cellpadding="4">
<tr>
<td align="left" valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr><td nowrap="nowrap"><span class="name"><b>{postrow.POSTER_NAME}</b></span></td></tr>
<tr><td nowrap="nowrap"><span class="postdetails">{postrow.POSTER_RANK}</span></td></tr>
<tr><td nowrap="nowrap"><span class="postdetails">{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}</span></tr>
<tr><td><img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="120" height="5" border="0" alt="" /></td></tr>
<tr><td><span class="postdetails">{postrow.POSTER_JOINED}</span></td></tr>
<tr><td><span class="postdetails">{postrow.POSTER_POSTS}</span></td></tr>
<tr><td><span class="postdetails">{postrow.POSTER_FROM}</span></td></tr>
</table></td>
</tr>
</table><br /><br /></td>
<td width="10" background="{T_TEMPLATE_PATH}/images/post_right.gif"><img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="10" height="1" border="0" /></td>
</tr>
<tr>
<td height="10" background="{T_TEMPLATE_PATH}/images/post_bottom.gif"><img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="1" height="10" border="0" /></td>
<td width="10" height="10"><img src="{T_TEMPLATE_PATH}/images/post_corner.gif" width="10" height="10" border="0" /></td>
</tr>
<!-- left row table end --></table><br /><br /></td>
<td class="row1" align="left" valign="top" width="100%"><table border="0" cellspacing="0" cellpadding="5" width="100%"><!-- right top row table start -->
<tr>
<td width="100%"><span class="postbody">{postrow.MESSAGE}</span></td>
</tr>
<!-- right top row table end --></table></td>
</tr>
<tr>
<td class="row1" align="left" valign="bottom" nowrap="nowrap"><table border="0" cellspacing="0" cellpadding="5" width="100%"><!-- right bottom row start -->
<tr>
<td width="100%"><span class="postbody"><span class="gensmall">{postrow.EDITED_MESSAGE}</span></span>{postrow.ATTACHMENTS}<span class="postbody">{postrow.SIGNATURE}</span></td>
</tr>
<!-- right bottom row end --></table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="28" align="left" valign="middle" class="row4"><table border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="135"><img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="120" height="1" border="0" /></td>
<td align="left" valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.SEARCH_IMG2} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}</td>
<td align="left" valign="top" nowrap="nowrap"><script language="JavaScript" type="text/javascript"><!--
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
document.write(' {postrow.ICQ_IMG}');
else
document.write('<div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:4px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
<td width="60"><img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="60" height="1" border="0" /></td>
</tr></table></td>
</tr>
</table>{TPL_FTR}
<br />
<!-- END postrow -->
<!-- Quick Reply Form -->
{TPL_HDR1}<span class="cattitle">Quick Reply</span>{TPL_HDR2}
<table class="forumline" width="100%" cellspacing="1" cellpadding="" border="0">
<tr>
<td class="row1" align="center" valign="top">
<table border="0" cellspacing="0" cellpadding="5" width="70%">
<tr>
<td align="left" valign="top">{QUICK_REPLY_FORM}</td>
</tr>
</table>
</td>
</tr>
</table>{TPL_FTR}
<br />
<!-- Quick Reply Form -->
{TPL_HDR1}<span class="cattitle"><a class="cattitle" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></span>{TPL_HDR2}<table class="forumline" width="100%" cellspacing="1" cellpadding="" border="0">
<tr>
<th align="left"> <a class="th" href="{U_INDEX}">{L_INDEX}</a> » <a class="th" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></th>
</tr>
<tr>
<td class="row1" align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td align="left" valign="top">
<span class="gensmall">{S_AUTH_LIST}</span>
</td>
<td align="right" valign="top">
<span class="gensmall">{S_TIMEZONE} <br />
{PAGE_NUMBER} </span>
<span class="nav"><b>{PAGINATION}</b></span><br />
<span class="gensmall">{S_WATCH_TOPIC}</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row4" align="center" valign="middle" nowrap="nowrap"><table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<form method="post" action="{S_POST_DAYS_ACTION}"><td align="left" valign="middle" nowrap="nowrap">{S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} <input type="submit" value="{L_GO}" class="liteoption" name="submit" /></td></form>
<td align="right" valign="middle" nowrap="nowrap">{JUMPBOX}</td>
</tr>
</table>
</td>
</tr>
</table>{TPL_FTR}
<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td align="left" valign="top"> <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="right" valign="top">{S_TOPIC_ADMIN} </td>
</tr>
</table>
deze volgende code staat in viewtopic.php
template quick reply
Code: Selecteer alles
//
// 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
{
if ( $can_watch_topic && $is_watching_topic )
{
$notify = 1;
}
else
{
$notify = $userdata['user_notify'];
}
$bbcode_uid = $postrow[$total_posts - 1]['bbcode_uid'];
$last_poster = $postrow[$total_posts - 1]['username'];
$last_msg = $postrow[$total_posts - 1]['post_text'];
$last_msg = str_replace(":1:$bbcode_uid", "", $last_msg);
$last_msg = str_replace(":u:$bbcode_uid", "", $last_msg);
$last_msg = str_replace(":o:$bbcode_uid", "", $last_msg);
$last_msg = str_replace(":$bbcode_uid", "", $last_msg);
$last_msg = str_replace("'", "'", $last_msg);
$last_msg = "[QUOTE=\"$last_poster\"]" . $last_msg . "[/QUOTE]";
$quick_reply_form = "
<script language='JavaScript' type='text/javascript'>
function checkForm() {
formErrors = false;
document.post.message.value = '';
if (document.post.input.value.length < 2) {
formErrors = '" . $lang['Empty_message'] . "';
}
if (formErrors) {
alert(formErrors);
return false;
} else {
if (document.post.quick_quote.checked) {
document.post.message.value = document.post.last_msg.value;
}
document.post.message.value += document.post.input.value;
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 />";
if (!$userdata['session_logged_in'])
{
$quick_reply_form .= $lang['Username'] . ": <input class='post' type='text' name='username' size='25' maxlength='25' value='' /><br />";
}
$quick_reply_form .= "<textarea name='input' rows='10' cols='50' wrap='virtual' class='post''></textarea><br />
<input type='checkbox' name='quick_quote' />".$lang["Quick_quote"]."<br />
<input type='checkbox' name='attach_sig' checked='checked' />".$lang["Attach_signature"]."<br />
<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='message' value='' />
<input type='hidden' name='notify' value=" . $notify . " />
<input type='hidden' name='last_msg' value='" . $last_msg . "' />
<input type='submit' name='preview' class='liteoption' value='".$lang['Preview']."' />
<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
//
bedankt alvast voor je hulp

Geplaatst: 12 apr 2005, 12:01
door soulcreeper
weet niemand het? ik wil het wel heel graag weten

Geplaatst: 12 apr 2005, 16:22
door Bee
Welke template is dit?
Geplaatst: 12 apr 2005, 17:45
door soulcreeper
Quick Reply with Quote van Smartor
[link]
Geplaatst: 12 apr 2005, 17:47
door Paul
das de mod, hij bedoelt de template(Style)

Geplaatst: 12 apr 2005, 17:51
door soulcreeper
ah, oke. dacht juist dat hij deze bedoelde. maar de style/template is
EOS
Geplaatst: 18 apr 2005, 18:02
door soulcreeper
en nu is het topic weer dood?

wil het wel graag weten mensen. plz help me!
Geplaatst: 19 apr 2005, 17:58
door soulcreeper
niemand die me kan helpen?
dan ook maar even op engelse site posten

als niemand me hier kan helpen