Enhanced Quick Reply 2.0

Started by Kirby, August 06, 2007, 10:35:59 PM

Previous topic - Next topic

Kirby


Tinny

Hi, im using the tp style theme so I need to modify display.template.php but when i have gone to modify the file i noticed that i have extra coding.

where you mod says
<search position="replace"><![CDATA[
if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
echo '
<a name="quickreply"></a>
<table border="0" cellspacing="1" cellpadding="3" class="bordercolor" width="100%" style="clear: both;">
<tr>
<td colspan="2" class="catbg"><a href="javascript:swapQuickReply();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" id="quickReplyExpand" /></a> <a href="javascript:swapQuickReply();">', $txt['quick_reply_1'], '</a></td>
</tr>
<tr id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
<td class="windowbg" width="25%" valign="top">', $txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' . $txt['quick_reply_warning'] . '</b>' : '', '</td>
<td class="windowbg" width="75%" align="center">
<form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $context['response_prefix'] . $context['subject'] . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" />
<textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br />
<input type="submit" name="post" value="' . $txt[105] . '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="' . $txt[507] . '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />';
if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="5"/>';
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>
</td>
</tr>
</table>';
}
]]></search>


i have
if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
echo '
<a name="quickreply"></a>
<table border="0" cellspacing="1" cellpadding="3" class="bordercolor" width="100%" style="clear: both;">
<tr>
<td colspan="2" class="catbg"><a href="javascript:swapQuickReply();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" id="quickReplyExpand" /></a> <a href="javascript:swapQuickReply();">', $txt['quick_reply_1'], '</a></td>
</tr>
<tr id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
<td class="windowbg" width="25%" valign="top">', $txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' . $txt['quick_reply_warning'] . '</b>' : '', '</td>
<td class="windowbg" width="75%" align="center">
<form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $context['response_prefix'] . $context['subject'] . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" /><center><a href="javascript:void(0);" onclick="replaceText(\' :)\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/smiley.gif" align="bottom" alt="Smiley" title="Smiley" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' ;)\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/wink.gif" align="bottom" alt="Wink" title="Wink" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' :D\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/cheesy.gif" align="bottom" alt="Cheesy" title="Cheesy" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' ;D\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/grin.gif" align="bottom" alt="Grin" title="Grin" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' >:(\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/angry.gif" align="bottom" alt="Angry" title="Angry" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' :(\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/sad.gif" align="bottom" alt="Sad" title="Sad" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' :o\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/shocked.gif" align="bottom" alt="Shocked" title="Shocked" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' 8)\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/cool.gif" align="bottom" alt="Cool" title="Cool" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' ???\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/huh.gif" align="bottom" alt="Huh" title="Huh" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' ::)\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/rolleyes.gif" align="bottom" alt="Roll Eyes" title="Roll Eyes" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' :P\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/tongue.gif" align="bottom" alt="Tongue" title="Tongue" border="0" /></a>
     <a href="javascript:void(0);" onclick="replaceText(\' :-[\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/embarassed.gif" align="bottom" alt="Embarrassed" title="Embarrassed" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' :-X\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/lipsrsealed.gif" align="bottom" alt="Lips Sealed" title="Lips Sealed" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' :-\\\ \', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/undecided.gif" align="bottom" alt="Undecided" title="Undecided" border="0" /></a>
 
        <a href="javascript:void(0);" onclick="replaceText(\' :-*\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/kiss.gif" align="bottom" alt="Kiss" title="Kiss" border="0" /></a>
        <a href="javascript:void(0);" onclick="replaceText(\' :\\\'(\', document.postmodify.message); return false;"><img src="' . $settings['images_url'] . '/cry.gif" align="bottom" alt="cry" title="cry" border="0" /></a>
<br/></center>
<textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br />
<input type="submit" name="post" value="' . $txt[105] . '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="' . $txt[507] . '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />';
if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="5"/>';
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>
</td>
</tr>
</table>';


if i ignore the extra coding then your mod just pastes all the coding at the top of the forum and I can't work out how to finish adding this last bit.

RiderRaghav

Nice Mod.........works like a charm on 1.1.3 :) .......keep it up mate...... ;)

Quote from: chep on August 08, 2007, 01:15:31 AM
I soon discovered in IE that width 100% cut off the right side of the border. It could be an artifact that I have some other mods like tinyportal...

Therefore I chose auto instead. Which works for me. Only tested on IE , Opera and Firefox latest and greatest...

<a name="quickreply"></a>
<div style="width: 100%;" align="center"><div class="tborder" style="width: auto;" align="left">


thanks......it really helped me :)

Kirby

Attach your Display.template.php to a post, I will mod it and attach it back for you :) It would be easier that way.

Quote from: riderraghav on August 16, 2007, 04:53:05 PM
Nice Mod.........works like a charm on 1.1.3 :) .......keep it up mate...... ;)
Any time :) I will be releasing a few more mods next week

Tinny

I can't belive I forgot to attach this on my last post doh .... here you go and thanks

Farmacija

how we can put just smiley in quick reply without the rest bbc codes??
www.farmaceuti.com
www.farmaceuti.com/tekstovi

TimL

#66
Quote from: Kirby on August 16, 2007, 12:40:03 PM
Yes :) Try changing it to UTF-8.

The issue was that I had "URL Popup" & "Font and Size Dropdown" installed.  Your Mod or the other two give errors if they are installed along with Quick Reply.

Any chance of changing your mod to work with these two enhancements?   Or a Lite version to just have emotions?

TDW

PROBLEM! When I highlight text and click on a BBConde symbol (e.g. bold text) - it doesn't apply the function to the highlighted text it simply places the code at the end of the piece. Anyone else noticed this?

(running 1.1.3. std. theme - ad management, visual warning mods also running)

Kirby

Quote from: Tinny on August 17, 2007, 01:53:19 AM
I can't belive I forgot to attach this on my last post doh .... here you go and thanks
attached :)

Quote from: Farmacija on August 17, 2007, 10:13:20 AM
how we can put just smiley in quick reply without the rest bbc codes??
Remove the
if ($context['show_bbc'])
{
..............
}
block from the template.

Quote from: TimL on August 17, 2007, 06:49:30 PM
Quote from: Kirby on August 16, 2007, 12:40:03 PM
Yes :) Try changing it to UTF-8.

The issue was that I had "URL Popup" & "Font and Size Dropdown" installed.  Your Mod or the other two give errors if they are installed along with Quick Reply.

Any chance of changing your mod to work with these two enhancements?   Or a Lite version to just have emotions?
I'm not sure what those two mods do or why they are affecting this mod. Do you have any more information?

Quote from: TDW on August 18, 2007, 01:51:58 AM
PROBLEM! When I highlight text and click on a BBConde symbol (e.g. bold text) - it doesn't apply the function to the highlighted text it simply places the code at the end of the piece. Anyone else noticed this?

(running 1.1.3. std. theme - ad management, visual warning mods also running)
I haven't noticed that (it works for me) but if it is a problem for anyone else I will have to look into it.

Farmacija

You mean this : if ($context['show_bbc'])
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
?
www.farmaceuti.com
www.farmaceuti.com/tekstovi

adp

Where i can put the youtube bbcode?

'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => $txt['youtube']),

Tinny

Works like a charm ...... thanks Kirby

Farmacija

and how we can center submit field?
www.farmaceuti.com
www.farmaceuti.com/tekstovi

geezmo

How do we put back the left-column for the Posting Reminder just like the one below? I'm thinking of using this space for my Google Adsense ads.

Quote from: Farmacija on August 13, 2007, 11:21:20 PM



JerryCRO

Quote from: Farmacija on August 13, 2007, 11:21:20 PM


hi,this mod perfect work for me,but how i insert text in quick reply bar like this in quote
www.xybrid-clan.net
www.xybrid-clan.net/forum

Kirby

#75
Quote from: Farmacija on August 19, 2007, 10:47:03 PM
You mean this : if ($context['show_bbc'])
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
?
This:

// Assuming BBC code is enabled then print the buttons and some javascript to handle it.
if ($context['show_bbc'])
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
// ]]></script>';

// The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you!
$context['bbc_tags'] = array();
$context['bbc_tags'][] = array(
'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]),
'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]),
'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]),
'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]),
array(),
'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt[442]),
'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt[443]),
'move' => array('code' => 'move', 'before' => '[move]', 'after' => '[/move]', 'description' => $txt[439]),
array(),
'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]),
'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]),
'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]),
'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]),
array(),
'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]),
array(),
'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]),
'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]),
);
$context['bbc_tags'][] = array(
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]),
'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]),
'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]),
'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]),
array(),
'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]),
'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]),
'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]),
array(),
'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]),
'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]),
'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]),
array(),
'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[nobbc][/code][/nobbc]', 'description' => $txt[259]),
'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]),
array(),
'list' => array('code' => 'list', 'before' => '[list]\n[list][li]', 'after' => '[/li][/list]\n[list][li][/li][/list]\n[/list]', 'description' => $txt[261]),
array(),
'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => 'YouTube'),
'spoiler' => array('code' => 'spoiler', 'before' => '[spoiler]', 'after' => '[/spoiler]', 'description' => 'Spoiler'),
);

$found_button = false;
// Here loop through the array, printing the images/rows/separators!
foreach ($context['bbc_tags'][0] as $image => $tag)
{
// Is there a "before" part for this bbc button? If not, it can't be a button!!
if (isset($tag['before']))
{
// Is this tag disabled?
if (!empty($context['disabled_tags'][$tag['code']]))
continue;

$found_button = true;

// If there's no after, we're just replacing the entire selection in the post box.
if (!isset($tag['after']))
echo '<a href="javascript:void(0);" onclick="replaceText(\'', $tag['before'], '\', document.forms.postmodify.message); return false;">';
// On the other hand, if there is one we are surrounding the selection ;).
else
echo '<a href="javascript:void(0);" onclick="surroundText(\'', $tag['before'], '\', \'', $tag['after'], '\', document.forms.postmodify.message); return false;">';

// Okay... we have the link. Now for the image and the closing </a>!
echo '<img onmouseover="bbc_highlight(this, true);" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" src="', $settings['images_url'], '/bbc/', $image, '.gif" align="bottom" width="23" height="22" alt="', $tag['description'], '" title="', $tag['description'], '" style="background-image: url(', $settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';
}
// I guess it's a divider...
elseif ($found_button)
{
echo '<img src="', $settings['images_url'], '/bbc/divider.gif" alt="|" style="margin: 0 3px 0 3px;" />';
$found_button = false;
}
}

// Print a drop down list for all the colors we allow!
if (!isset($context['disabled_tags']['color']))
echo ' <select onchange="surroundText(\'[color=\' + this.options[this.selectedIndex].value.toLowerCase() + \']\', \'[/color]\', document.forms.postmodify.message); this.selectedIndex = 0; document.forms.postmodify.message.focus(document.forms.postmodify.message.caretPos);" style="margin-bottom: 1ex;">
<option value="" selected="selected">', $txt['change_color'], '</option>
<option value="Black">', $txt[262], '</option>
<option value="Red">', $txt[263], '</option>
<option value="Yellow">', $txt[264], '</option>
<option value="Pink">', $txt[265], '</option>
<option value="Green">', $txt[266], '</option>
<option value="Orange">', $txt[267], '</option>
<option value="Purple">', $txt[268], '</option>
<option value="Blue">', $txt[269], '</option>
<option value="Beige">', $txt[270], '</option>
<option value="Brown">', $txt[271], '</option>
<option value="Teal">', $txt[272], '</option>
<option value="Navy">', $txt[273], '</option>
<option value="Maroon">', $txt[274], '</option>
<option value="LimeGreen">', $txt[275], '</option>
</select>';
echo '<br />';

$found_button = false;
// Print the buttom row of buttons!
foreach ($context['bbc_tags'][1] as $image => $tag)
{
if (isset($tag['before']))
{
// Is this tag disabled?
if (!empty($context['disabled_tags'][$tag['code']]))
continue;

$found_button = true;

// If there's no after, we're just replacing the entire selection in the post box.
if (!isset($tag['after']))
echo '<a href="javascript:void(0);" onclick="replaceText(\'', $tag['before'], '\', document.forms.postmodify.message); return false;">';
// On the other hand, if there is one we are surrounding the selection ;).
else
echo '<a href="javascript:void(0);" onclick="surroundText(\'', $tag['before'], '\', \'', $tag['after'], '\', document.forms.postmodify.message); return false;">';

// Okay... we have the link. Now for the image and the closing </a>!
echo '<img onmouseover="bbc_highlight(this, true);" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" src="', $settings['images_url'], '/bbc/', $image, '.gif" align="bottom" width="23" height="22" alt="', $tag['description'], '" title="', $tag['description'], '" style="background-image: url(', $settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';
}
// I guess it's a divider...
elseif ($found_button)
{
echo '<img src="', $settings['images_url'], '/bbc/divider.gif" alt="|" style="margin: 0 3px 0 3px;" />';
$found_button = false;
}
}
}


Quote from: Tinny on August 20, 2007, 05:29:18 AM
Works like a charm ...... thanks Kirby
Any time :)

Quote from: geezmo on August 21, 2007, 10:06:14 AM
How do we put back the left-column for the Posting Reminder just like the one below? I'm thinking of using this space for my Google Adsense ads.
Quote from: JerryCRO on August 24, 2007, 11:36:37 AM
Quote from: Farmacija on August 13, 2007, 11:21:20 PM
hi,this mod perfect work for me,but how i insert text in quick reply bar like this in quote
You would have to turn this portion into tables:

if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
echo '
<a name="quickreply"></a>
<div style="width: 100%;" align="center"><div class="tborder" style="width: 50%;" align="left">
<div class="catbg" style="padding: 4px;"><a href="javascript:swapQuickReply();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" id="quickReplyExpand" /></a> <a href="javascript:swapQuickReply();">', $txt['quick_reply_1'], '</a></div>
<div class="windowbg" id="quickReplyOptions" style="padding: 1ex;', $options['display_quick_reply'] == 2 ? '' : ' display: none', '">
', $context['is_locked'] ? '<b>' . $txt['quick_reply_warning'] . '</b><br /><br />' : '', '
<form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $context['response_prefix'] . $context['subject'] . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" />';

// Here we show the actual post box with the smileys and BBCode..
theme_quickreply_box();

echo '
<br />
<input type="submit" name="post" value="' . $txt[105] . '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="' . $txt[507] . '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />';
if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="5"/>';
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>';
echo '
</div>
</div></div>';
}

Turn that into:

if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
echo '
<a name="quickreply"></a>
<table border="0" cellspacing="1" cellpadding="3" class="bordercolor" width="100%" style="clear: both;">
<tr>
<td colspan="2" class="catbg"><a href="javascript:swapQuickReply();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" id="quickReplyExpand" /></a> <a href="javascript:swapQuickReply();">', $txt['quick_reply_1'], '</a></td>
</tr>
<tr id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
<td class="windowbg" width="25%" valign="top">', $txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' . $txt['quick_reply_warning'] . '</b>' : '', '</td>
<td class="windowbg" width="75%" align="center">
<form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $context['response_prefix'] . $context['subject'] . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" />';

// Here we show the actual post box with the smileys and BBCode..
theme_quickreply_box();

echo '
<br />
<input type="submit" name="post" value="' . $txt[105] . '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="' . $txt[507] . '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />';
if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="5"/>';
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>
</td>
</tr>
</table>';
}

Quote from: adp on August 20, 2007, 04:57:50 AM
Where i can put the youtube bbcode?

'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => $txt['youtube']),
After this:

'list' => array('code' => 'list', 'before' => '[list]\n[list][li]', 'after' => '[/li][/list]\n[list][li][/li][/list]\n[/list]', 'description' => $txt[261]),


Quote from: Farmacija on August 20, 2007, 11:39:49 AM
and how we can center submit field?
Look for:

echo '
<br />
<input type="submit" name="post" value="' . $txt[105] . '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="' . $txt[507] . '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />';
if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="5"/>';
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>';


Replace with:

echo '
<br />
<div style="text-align: center;">
<input type="submit" name="post" value="' . $txt[105] . '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="' . $txt[507] . '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />';
if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="5"/>';
echo '
</div>
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>';
[/code]

alquimistabiologico

Hello

I'm very satisfied with this mod, congratulations and thanks!!!!

I've noticed that some users have a problem with the manual install, and the auto install of this mod.

I guess that they already have had an old version of the mod, and they have uninstall it, so, the next steps will help those who have problems with the auto and manual install. It also can solve the "Fatal error: Cannot redeclare template_enhanced_quick_reply() (previously declared in /Sources/Load.php(1726) : eval()'d code:1182) in /Sources/Load.php(1726) : eval()'d code on line 856" error that some can have with old versions of the mod.

So, here is how I fixed it:

ATTENTIÓN: It doesn't serve that you start to upgrade of an old version from the enhanced_quick_reply to the 2.0, what you should make is completely uninstall the previous versions, and that you also erase it of the templates where you have added it.

For a previos version of the mod: Uninstall the previous versions of enhanced_quick_reply from de Packages and do it manually too(It's recommend that  you make a backup before start)


Edit /Themes/default/Display.template.php

Search:
</table>';

if ($context['show_spellchecking'])
echo '
<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>';
}


Replace with:
</table>';
}
{
if ($context['show_spellchecking'])
echo '
<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>';
}
}


Put special attention in copying everything very well, including the brackets, because if you don't make it it can leave you parse error

And lastly you must eliminate this (everything is exactly after the code that we have just edited and it extends until the end of the file):

// Show an enhanced quick reply box for those that want everything.
function template_enhanced_quick_reply()
{
global $context, $modSettings, $settings, $txt, $options, $scripturl, $db_prefix;

&nbsp; &nbsp; &nbsp; loadLanguage('Post');
// Initialize smiley array...
$context['smileys'] = array(
'postform' => array(),
'popup' => array(),
);

// Load smileys - don't bother to run a query if we're not using the database's ones anyhow.
if (empty($modSettings['smiley_enable']) && $context['user']['smiley_set'] != 'none')
$context['smileys']['postform'][] = array(
'smileys' => array(
array('code' => ':)', 'filename' => 'smiley.gif', 'description' => $txt[287]),
array('code' => ';)', 'filename' => 'wink.gif', 'description' => $txt[292]),
array('code' => ':D', 'filename' => 'cheesy.gif', 'description' => $txt[289]),
array('code' => ';D', 'filename' => 'grin.gif', 'description' => $txt[293]),
array('code' => '>:(', 'filename' => 'angry.gif', 'description' => $txt[288]),
array('code' => ':(', 'filename' => 'sad.gif', 'description' => $txt[291]),
array('code' => ':o', 'filename' => 'shocked.gif', 'description' => $txt[294]),
array('code' => '8)', 'filename' => 'cool.gif', 'description' => $txt[295]),
array('code' => '???', 'filename' => 'huh.gif', 'description' => $txt[296]),
array('code' => '::)', 'filename' => 'rolleyes.gif', 'description' => $txt[450]),
array('code' => ':P', 'filename' => 'tongue.gif', 'description' => $txt[451]),
array('code' => ':-[', 'filename' => 'embarrassed.gif', 'description' => $txt[526]),
array('code' => ':-X', 'filename' => 'lipsrsealed.gif', 'description' => $txt[527]),
array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt[528]),
array('code' => ':-*', 'filename' => 'kiss.gif', 'description' => $txt[529]),
array('code' => ':\'(', 'filename' => 'cry.gif', 'description' => $txt[530])
),
'last' => true,
);
elseif ($context['user']['smiley_set'] != 'none')
{
if (($temp = cache_get_data('posting_smileys', 480)) == null)
{
$request = db_query("
SELECT code, filename, description, smileyRow, hidden
FROM {$db_prefix}smileys
WHERE hidden IN (0, 2)
ORDER BY smileyRow, smileyOrder", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
$row['code'] = htmlspecialchars($row['code']);
$row['filename'] = htmlspecialchars($row['filename']);
$row['description'] = htmlspecialchars($row['description']);

$context['smileys'][empty($row['hidden']) ? 'postform' : 'popup'][$row['smileyRow']]['smileys'][] = $row;
}
mysql_free_result($request);

cache_put_data('posting_smileys', $context['smileys'], 480);
}
else
$context['smileys'] = $temp;
}

// Clean house... add slashes to the code for javascript.
foreach (array_keys($context['smileys']) as $location)
{
foreach ($context['smileys'][$location] as $j => $row)
{
$n = count($context['smileys'][$location][$j]['smileys']);
for ($i = 0; $i < $n; $i++)
{
$context['smileys'][$location][$j]['smileys'][$i]['code'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['code']);
$context['smileys'][$location][$j]['smileys'][$i]['js_description'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['description']);
}

$context['smileys'][$location][$j]['smileys'][$n - 1]['last'] = true;
}
if (!empty($context['smileys'][$location]))
$context['smileys'][$location][count($context['smileys'][$location]) - 1]['last'] = true;
}
$settings['smileys_url'] = $modSettings['smileys_url'] . '/' . $context['user']['smiley_set'];

// Allow for things to be overridden.
if (!isset($context['post_box_columns']))
$context['post_box_columns'] = 75;
if (!isset($context['post_box_rows']))
$context['post_box_rows'] = 7;
if (!isset($context['post_box_name']))
$context['post_box_name'] = 'message';
if (!isset($context['post_form']))
$context['post_form'] = 'postmodify';

// Generate a list of buttons that shouldn't be shown - this should be the fastest way to do this.
if (!empty($modSettings['disabledBBC']))
{
$disabled_tags = explode(',', $modSettings['disabledBBC']);
foreach ($disabled_tags as $tag)
$context['disabled_tags'][trim($tag)] = true;
}

// Assuming BBC code is enabled then print the buttons and some javascript to handle it.
if (!empty($modSettings['enableBBC']) && !empty($settings['show_bbc']))
{
echo '
<tr>
<td align="right"></td>
<td valign="middle">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
// ]]></script>';

// The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you!
$context['bbc_tags'] = array();
$context['bbc_tags'][] = array(
'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]),
'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]),
'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]),
'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]),
array(),
'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt[442]),
'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt[443]),
'move' => array('code' => 'move', 'before' => '[move]', 'after' => '[/move]', 'description' => $txt[439]),
array(),
'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]),
'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]),
'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]),
'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]),
array(),
'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]),
array(),
'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]),
'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]),
);
$context['bbc_tags'][] = array(
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]http://', 'after' => '[/flash]', 'description' => $txt[433]),
'img' => array('code' => 'img', 'before' => '[img]http://', 'after' => '[/img]', 'description' => $txt[435]),
'url' => array('code' => 'url', 'before' => '[url=http://', 'after' => ']', 'after' => '[/url]', 'description' => $txt[257]),
'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]),
'ftp' => array('code' => 'ftp', 'before' => '[ftp=ftp://', 'after' => ']', 'after' => '[/ftp]', 'description' => $txt[434]),
array(),
'table' => array('code' => 'table', 'before' => '[table][tr][td]', 'after' => '[/table]', 'description' => $txt[436]),
'tr' => array('code' => 'td', 'before' => '[table][tr][td]', 'after' => '[/td][/tr][/table]', 'description' => $txt[449]),
'td' => array('code' => 'td', 'before' => '[table][tr][td]', 'after' => '[/td][/tr][/table]', 'description' => $txt[437]),
array(),
'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]),
'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]),
'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]),
array(),
'code' => array('code' => 'code', 'before' => '[ code]', 'after' => '[/ code]', 'description' => $txt[259]),
'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]),
array(),
'list' => array('code' => 'list', 'before' => '[list]\n[list][li]', 'after' => '[/li][/list]\n[list][li][/li][/list]\n[/list]', 'description' => $txt[261]),
);

// Here loop through the array, printing the images/rows/separators!
foreach ($context['bbc_tags'][0] as $image => $tag)
{
// Is there a "before" part for this bbc button? If not, it can't be a button!!
if (isset($tag['before']))
{
// Is this tag disabled?
if (!empty($context['disabled_tags'][$tag['code']]))
continue;

// If there's no after, we're just replacing the entire selection in the post box.
if (!isset($tag['after']))
echo '<a href="javascript:void(0);" onclick="replaceText(\'', $tag['before'], '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';
// On the other hand, if there is one we are surrounding the selection ;).
else
echo '<a href="javascript:void(0);" onclick="surroundText(\'', $tag['before'], '\', \'', $tag['after'], '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';

// Okay... we have the link. Now for the image and the closing </a>!
echo '<img onmouseover="bbc_highlight(this, true);" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" src="', $settings['images_url'], '/bbc/', $image, '.gif" align="bottom" width="23" height="22" alt="', $tag['description'], '" title="', $tag['description'], '" style="background-image: url(', $settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';
}
// I guess it's a divider...
else
echo '<img src="', $settings['images_url'], '/bbc/divider.gif" alt="|" style="margin: 0 3px 0 3px;" />';
}

// Print a drop down list for all the colors we allow!
if (!isset($context['disabled_tags']['color']))
echo ' <select onchange="surroundText(\'[color=\' + this.options[this.selectedIndex].value.toLowerCase() + \']\', \'[/color]\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0; document.forms.', $context['post_form'], '.', $context['post_box_name'], '.focus(document.forms.', $context['post_form'], '.', $context['post_box_name'], '.caretPos);" style="margin-bottom: 1ex;">
<option value="" selected="selected">', $txt['change_color'], '</option>
<option value="Black">', $txt[262], '</option>
<option value="Red">', $txt[263], '</option>
<option value="Yellow">', $txt[264], '</option>
<option value="Pink">', $txt[265], '</option>
<option value="Green">', $txt[266], '</option>
<option value="Orange">', $txt[267], '</option>
<option value="Purple">', $txt[268], '</option>
<option value="Blue">', $txt[269], '</option>
<option value="Beige">', $txt[270], '</option>
<option value="Brown">', $txt[271], '</option>
<option value="Teal">', $txt[272], '</option>
<option value="Navy">', $txt[273], '</option>
<option value="Maroon">', $txt[274], '</option>
<option value="LimeGreen">', $txt[275], '</option>
</select>';
echo '<br />';

// Print the buttom row of buttons!
foreach ($context['bbc_tags'][1] as $image => $tag)
{
if (isset($tag['before']))
{
// Is this tag disabled?
if (!empty($context['disabled_tags'][$tag['code']]))
continue;

// If there's no after, we're just replacing the entire selection in the post box.
if (!isset($tag['after']))
echo '<a href="javascript:void(0);" onclick="replaceText(\'', $tag['before'], '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';
// On the other hand, if there is one we are surrounding the selection ;).
else
echo '<a href="javascript:void(0);" onclick="surroundText(\'', $tag['before'], '\', \'', $tag['after'], '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';

// Okay... we have the link. Now for the image and the closing </a>!
echo '<img onmouseover="bbc_highlight(this, true);" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" src="', $settings['images_url'], '/bbc/', $image, '.gif" align="bottom" width="23" height="22" alt="', $tag['description'], '" title="', $tag['description'], '" style="background-image: url(', $settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';
}
// I guess it's a divider...
else
echo '<img src="', $settings['images_url'], '/bbc/divider.gif" alt="|" style="margin: 0 3px 0 3px;" />';
}

echo '
</td>
</tr>';
}

// Now start printing all of the smileys.
if (!empty($context['smileys']['postform']))
{
echo '
<tr>
<td align="right"></td>
<td valign="middle">';

// Show each row of smileys ;).
foreach ($context['smileys']['postform'] as $smiley_row)
{
foreach ($smiley_row['smileys'] as $smiley)
echo '
<a href="javascript:void(0);" onclick="replaceText(\' ', $smiley['code'], '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;"><img src="', $settings['smileys_url'], '/', $smiley['filename'], '" align="bottom" alt="', $smiley['description'], '" title="', $smiley['description'], '" /></a>';

// If this isn't the last row, show a break.
if (empty($smiley_row['last']))
echo '<br />';
}

// If the smileys popup is to be shown... show it!
if (!empty($context['smileys']['popup']))
echo '
<a href="javascript:moreSmileys();">[', $txt['more_smileys'], ']</a>';

echo '
</td>
</tr>';
}

// If there are additional smileys then ensure we provide the javascript for them.
if (!empty($context['smileys']['popup']))
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smileys = [';

foreach ($context['smileys']['popup'] as $smiley_row)
{
echo '
[';
foreach ($smiley_row['smileys'] as $smiley)
{
echo '
["', $smiley['code'], '","', $smiley['filename'], '","', $smiley['js_description'], '"]';
if (empty($smiley['last']))
echo ',';
}

echo ']';
if (empty($smiley_row['last']))
echo ',';
}

echo '];
var smileyPopupWindow;

function moreSmileys()
{
var row, i;

if (smileyPopupWindow)
smileyPopupWindow.close();

smileyPopupWindow = window.open("", "add_smileys", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=220,resizable=yes");
smileyPopupWindow.document.write(\'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\');
smileyPopupWindow.document.write(\'\n\t<head>\n\t\t<title>', $txt['more_smileys_title'], '</title>\n\t\t<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css" />\n\t</head>\');
smileyPopupWindow.document.write(\'\n\t<body style="margin: 1ex;">\n\t\t<table width="100%" cellpadding="5" cellspacing="0" border="0" class="tborder">\n\t\t\t<tr class="titlebg"><td align="left">', $txt['more_smileys_pick'], '</td></tr>\n\t\t\t<tr class="windowbg"><td align="left">\');

for (row = 0; row < smileys.length; row++)
{
for (i = 0; i < smileys[row].length; i++)
{
smileys[row][i][2] = smileys[row][i][2].replace(/"/g, \'"\');
smileyPopupWindow.document.write(\'<a href="javascript:void(0);" onclick="window.opener.replaceText(" \' + smileys[row][i][0] + \'", window.opener.document.forms.', $context['post_form'], '.', $context['post_box_name'], '); window.focus(); return false;"><img src="', $settings['smileys_url'], '/\' + smileys[row][i][1] + \'" alt="\' + smileys[row][i][2] + \'" title="\' + smileys[row][i][2] + \'" style="padding: 4px;" border="0" /></a> \');
}
smileyPopupWindow.document.write("<br />");
}

smileyPopupWindow.document.write(\'</td></tr>\n\t\t\t<tr><td align="center" class="windowbg"><a href="javascript:window.close();\\">', $txt['more_smileys_close_window'], '</a></td></tr>\n\t\t</table>\n\t</body>\n</html>\');
smileyPopupWindow.document.close();
}
// ]]></script>';
}

// Finally the most important bit - the actual text box to write in!
echo '
<tr>
<td valign="top" align="right"></td>
<td>
<textarea class="editor" name="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="6"></textarea>
</td>
</tr>';
}


You should be careful not to erase this:
}

?>


That's in the whole end of the file or you could damage it or to have parse error

After all that, go to the package manager and the enhanced_quick_reply 2.0 should install without problems.

Then, you can verify that everything is ok and don't get that annoying message (if you didn't had this, ignore it):
Fatal error: Cannot redeclare template_enhanced_quick_reply() (previously declared in /Sources/Load.php(1726) : eval()'d code:1182) in /Sources/Load.php(1726) : eval()'d code on line 856


I apologize for my English, it's not very good


You can find the original Spanish version of this here: http://www.simplemachines.org/community/index.php?topic=189773


I hope it can be useful for somebody
"Buena es la ciencia con herencia, y provechosa para los que ven el sol. Porque escudo es la ciencia, y escudo es el dinero; mas la sabiduría excede, en que da vida a sus poseedores".

Farmacija

www.farmaceuti.com
www.farmaceuti.com/tekstovi

adp


geezmo

QuoteTurn that into:

if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
echo '
<a name="quickreply"></a>
<table border="0" cellspacing="1" cellpadding="3" class="bordercolor" width="100%" style="clear: both;">
<tr>
<td colspan="2" class="catbg"><a href="javascript:swapQuickReply();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" id="quickReplyExpand" /></a> <a href="javascript:swapQuickReply();">', $txt['quick_reply_1'], '</a></td>
</tr>
<tr id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
<td class="windowbg" width="25%" valign="top">', $txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' . $txt['quick_reply_warning'] . '</b>' : '', '</td>
<td class="windowbg" width="75%" align="center">
<form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $context['response_prefix'] . $context['subject'] . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" />';

// Here we show the actual post box with the smileys and BBCode..
theme_quickreply_box();

echo '
<br />
<input type="submit" name="post" value="' . $txt[105] . '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="' . $txt[507] . '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />';
if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="5"/>';
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>
</td>
</tr>
</table>';
}

Thanks Kirby. If I am to put my Adsense code in that "Quick Reply" text column, what part do I edit to place my codes?

Advertisement: