- Code: Select all
#################################################################
## Mod Title: Extended Quote Tag
## Mod Version: 1.0.0
## Author: Acyd Burn < acyd.burn@gmx.de > - Meik Sievertsen - http://www.opentools.de/
## Description:
## This Mod adds an extended functionality on the [quote] BBCode Tag.
## You are able to view the Post from which the User quoted and you have the ability
## to quote directly from the Topic Review Window.
## To let this Mod recognise the Post, the Quote Tag has this extended systax (old syntax works):
## [quote=p="<post_id>"][/quote]
## [quote="<Username>";p="<post_id>"][/quote]
## After the Message got parsed you will see an additional Link:
## Quote (View Post):
## Username wrote (View Post):
## Within the Topic Review Window a Quote Button is added to each Post.
## After clicking on this Button the Quote is added to the current Post Area.
##############################################################
This is the result, if you like it continue on reading

First of all you must install the mod without modifying any tpl files, after apply this code:
- Code: Select all
#
#-----[ OPEN ]---------------------------------------------
#
templates/ca_aphrodite/bbcode.tpl
#
#-----[ FIND ]---------------------------------------------
#
<!-- BEGIN quote_open --><blockquote><h6>{L_QUOTE}:</h6><!-- END quote_open -->
#
#-----[ AFTER, ADD ]---------------------------------------
#
<!-- BEGIN quote_username_post_open -->
<blockquote><h6>{USERNAME} {L_WROTE}: [{U_VIEW_POST}]</h6>
<!-- END quote_username_post_open -->
<!-- BEGIN quote_post_open -->
<blockquote><h6>{L_QUOTE}: [{U_VIEW_POST}]</h6>
<!-- END quote_post_open -->
#
#-----[ OPEN ]---------------------------------------------
#
templates/ca_aphrodite/posting_topic_review.tpl
#
#-----[ FIND ]---------------------------------------------
# around line 1
<!-- BEGIN switch_inline_mode -->
#
#-----[ BEFORE, ADD ]---------------------------------------
#
<script language="JavaScript" type="text/javascript">
<!--
message = new Array();
<!-- BEGIN postrow -->
message[{postrow.U_POST_ID}] = "[quote="{postrow.POSTER_NAME}";p="{postrow.U_POST_ID}"]\n{postrow.PLAIN_MESSAGE}\n[/quote]";
<!-- END postrow -->
function addquote(post_id) {
window.parent.document.post.message.value += message[post_id];
window.parent.document.post.message.focus();
return;
}
//-->
</script>
#
#-----[ FIND ]---------------------------------------------
#
<div class="post-subject">{postrow.POST_SUBJECT}
#
#-----[ INLINE AFTER, ADD ]---------------------------------------
#
<span class="genmed"><input type="button" class="button" name="addquote" value="Quote" style="width: 50px" onClick="addquote({postrow.U_POST_ID});" /></span>
#
#-----[ OPEN ]---------------------------------------------
#
templates/ca_aphrodite/viewtopic_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
<span class="pagination">{PAGINATION}</span>
</span></td>
</tr>
</table>
#
#-----[ AFTER, ADD ]---------------------------------------
#
<script language="Javascript" type="text/javascript">
<!--
function open_postreview(ref)
{
height = screen.height / 3;
width = screen.width / 2;
window.open(ref, '_phpbbpostreview', 'HEIGHT=' + height + ',WIDTH=' + width + ',resizable=yes,scrollbars=yes');
return;
}
//-->
</script>
#
#-----[ OPEN ]---------------------------------------------
#
templates/ca_aphrodite/style.css
#
#-----[ FIND ]---------------------------------------------
#
.post-text blockquote {
color: #444;
display: block;
margin: 5px 20px;
width: auto;
border: solid 1px #D0D0D0;
background: #FFF url(images/bg_quote_content.gif) bottom right no-repeat;
padding: 5px;
font-size: 12px;
}
#
#-----[ AFTER, ADD ]---------------------------------------
#
.post-text blockquote a, .post-text blockquote a:visited {
color: #777;
text-decoration: none;
border-bottom: dotted 1px #666;
}
.post-text blockquote a:hover, .post-text blockquote a:active {
color: #FF1010;
text-decoration: none;
border-bottom: dotted 1px #FF1010;
}
After that just copy this file to templates/ca_aphrodite:
[code filename="post_review.tpl"]<!-- INCLUDE xs/xs_code_functions.tpl -->
<script language="Javascript" type="text/javascript">
<!--
function open_postreview(ref)
{
height = screen.height / 3;
width = screen.width / 2;
window.open(ref, '_phpbbpostreview', 'HEIGHT=' + height + ',WIDTH=' + width + ',resizable=yes,scrollbars=yes');
}
//-->
</script>
<table class="forumline" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr align="right">
<td class="row-header" colspan="2" ><span><a href="{U_VIEW_OLDER_POST}" class="nav">{L_VIEW_PREVIOUS_POST}</a> :: <a href="{U_VIEW_NEWER_POST}" class="nav">{L_VIEW_NEXT_POST}</a> </span></td>
</tr>
<tr>
<th class="thRight" nowrap="nowrap">{L_AUTHOR}</th>
<th class="thRight" nowrap="nowrap">{L_MESSAGE}</th>
</tr>
<!-- BEGIN postrow -->
<tr>
<td class="row-post-author" nowrap="nowrap">
<span class="post-name"><a name="{postrow.U_POST_ID}"></a>{postrow.POSTER_NAME}</span><br />
{postrow.RANK_IMAGE}
<span class="post-images">{postrow.POSTER_AVATAR}</span>
<div class="post-details">
{postrow.POSTER_JOINED}<br />
{postrow.POSTER_POSTS}<br />
{postrow.POSTER_FROM}<br />
{postrow.POSTER_GENDER}
</div><br />
<img src="templates/ca_aphrodite/images/spacer.gif" width="150" height="1" alt="" />
</td>
<td class="row-post" width="100%" height="100%">
<div class="post-buttons-top post-buttons">{postrow.ARROWS} <span class="img-main">{postrow.QUOTE_IMG}</span> {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG} {postrow.TOPIC_VIEW_IMG} {postrow.U_R_CARD} {postrow.U_Y_CARD} {postrow.U_G_CARD} {postrow.U_B_CARD}</div>
<div class="post-subject"><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}" /></a> {postrow.POST_SUBJECT} </div>
<div class="post-text">
{postrow.MESSAGE}<br />
<span class="gensmall">{postrow.EDITED_MESSAGE}</span>
{postrow.ATTACHMENTS}
<br /><br /><br />
{postrow.SIGNATURE}
</div>
</td>
</tr>
<tr>
<td class="row-post-date">{postrow.POST_DATE}</td>
<td class="row-post-buttons post-buttons">{postrow.POSTER_ONLINE_STATUS_IMG}{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG} {postrow.SKYPE_IMG} {postrow.ICQ_IMG}</td>
</tr>
<!-- END postrow -->
</table>
[/code]




