News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Enhanced Quick Reply 2.0

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

Previous topic - Next topic

static091

#160
Hellou!

I have managed to install the mod and now I would have to copy-paste the modified code into the  Display.template.php, but somehow I am not managing to do it.

I have attached the Display.template.php file, hoping someone might do it for me :)

I'm using 1.1.4 and graphite SlickPro Graphite theme.

Thank you!

jossanaijr

#161
How to increase the width? I thought it was in display.template but width says 95% and mine is shown as in picture attached.


   // Finally the most important bit - the actual text box to write in!
echo '
<textarea class="editor" cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);"></textarea>';
}

jossanaijr


chep

covered this on the first page of the mod with a couple of examples...

Edit: display.template.php


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

to this (tweaking style width)

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

jossanaijr

Thank you.  I just discovered that it was not working because I was changing "text box inside quick reply" width and not the quick reply box!

Kirby

Sorry everyone for the late reply. I will address the remaining concerns.

Quote from: Alundra on November 03, 2007, 11:24:32 AM
Quote from: Alundra on November 01, 2007, 01:14:00 AM
http://custom.simplemachines.org/mods/index.php?mod=639

how do we include this?
lol i wish i knew php :|

i refer to my previous statement ;)
Earlier in this topic there was information on adding a youtube tag. Use that same information but replace youtube with whatever tag is needed.

Trying to add this to your theme? (static091, Qlim4X)
Quote
HOW DO I MAKE THIS MOD COMPATIBLE WITH MY THEME?
If you want to use the "enhanced" quick reply box on your own theme, you have to first remove the old one. The old one starts off with this clause in Display.template.php:
   if ($context['can_reply'] && !empty($options['display_quick_reply']))
It has some code in between this clause and another curly bracket. Remove the old quick reply box code entirely. Replace it with the one in the modded default Display.template.php (it starts with the same clause).
You also have to add the entire template_quickreply_box() function from the modded default Display.template.php into your theme's Dsiplay.template.php.

Jade Elizabeth

its not a tag thats needed....their dropdown boxes...
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

romuba

A very neat little mod that I have wished for and now have - Thanks a stack. I did have to modify the Display.template.php file but to increase the width to 200% before it displayed correctly.
Ross Bartholomew
email: [email protected]
www.bartwebsites.com

Black Knight Cro

I don't get it how to customize for my theme :S

Aileen

Quote from: chep on August 07, 2007, 11:13:44 AM
To make it bigger I changed this:
<a name="quickreply"></a>
<div style="width: 100%;" align="center"><div class="tborder" style="width: 50%;" align="left">


to this:

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


I was also able to get mine to work with the mod which changes post box size.

Sweet mod.

What File should I edit and in what theme?

Aileen

I have installed it succesfully but


For members and not moderators, the message


Warning: this topic is currently locked!
Only admins and moderators can reply.


Does not show up. Here is an example

How can I have it to show up


thanks for taking time to read this

romuba

It is the Display.template.php file and found in the folder of the template you are using, e.g. Default.

In the example above the border width is changed to 100% which in incorrect. The first width needs to be changed to what works, I had to make it 200% to get it right. My code that works looks like this:
<a name="quickreply"></a>
<div style="width: 200%;" align="left"><div class="tborder" style="width: 50%;" align="left">
and it works!
Ross Bartholomew
email: [email protected]
www.bartwebsites.com

Aileen

Quote from: will888 on November 16, 2007, 04:52:29 AM
I have installed it succesfully but


For members and not moderators, the message

Thanks for that it works. Do you know how to fix this error?
Warning: this topic is currently locked!
Only admins and moderators can reply.


Does not show up. Here is an example

How can I have it to show up


thanks for taking time to read this

Yeah it works but do you know how to fix ths error

Kirby

Quote from: Alundra on November 08, 2007, 11:32:52 PM
its not a tag thats needed....their dropdown boxes...
You may add the dropdown code after this area in Display.template.php:

// 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 />';


ramuba, I'm glad you like the mod :)

will888, it is not an error. 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>';
}

MinasC

would it be possible to remove all the default smileys and replace the "more" link for the pop up window including the rest of the smileys with another one that would  include ALL the smileys (default + secondary , or , at least , just the default ones) ?

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Aileen

Can we change the default GLOW Color in the enhanced quick reply?

Aileen

THanks, how can I change the height to 200 pixels?

Aileen

Great. Love this. Thanks Kirby.


I have 2 other questions


How do I change the note With a Quick-Reply you can use bulletin board code and smileys as you would in a normal post, but much more conveniently.


another is that how do I change the height

romuba

Why are we only seeing questions here and no replies??
Ross Bartholomew
email: [email protected]
www.bartwebsites.com

Advertisement: