News:

Wondering if this will always be free?  See why free is better.

Main Menu

Enhanced Quick Reply 2.0

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

Previous topic - Next topic

Kirby

Any time guys :)

This part right here, geezmo:

<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="25%" valign="top">Put whatever you want here</td>

JerryCRO

tnx kirby,but how i can put hidden for guest button in bbc lists?i speak about this mod :
http://custom.simplemachines.org/mods/index.php?mod=756
www.xybrid-clan.net
www.xybrid-clan.net/forum

geezmo

It worked for me Kirby. Thanks!

Kirby

Add this to the BBCode array in Display.template.php:

'lockguest' => array('code' => 'logged', 'before' => '[logged]','after' => '[/logged]', 'description' => $txt['description_lock_guests']),


Any time geezmo :)

geezmo

Quote from: Kirby on August 26, 2007, 04:18:19 PM
Any time guys :)

This part right here, geezmo:

<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="25%" valign="top">Put whatever you want here</td>


Hi Kirby, I placed my Adsense code in that part but that also removed the "This topic is already locked" message. How do I add this message back, probably just place it right above the body text field?

JerryCRO

Quote from: Kirby on August 27, 2007, 04:57:15 PM
Add this to the BBCode array in Display.template.php:

'lockguest' => array('code' => 'logged', 'before' => '[logged]','after' => '[/logged]', 'description' => $txt['description_lock_guests']),


Any time geezmo :)
ty
www.xybrid-clan.net
www.xybrid-clan.net/forum

Kirby

geezmo,

you can add this anywhere you want it:

', $txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' . $txt['quick_reply_warning'] . '</b>' : '', '

Doughboy

#87
I'm using quite a few mods and I'm trying to install this one.   I'm having trouble with the Display.template.php modifications.  Everything is done except this part of the code -

// Show the quick reply box.
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>';
}


Now this is my section of the code in the Dispay.template.php file where I have to add the code -

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'] . '" />
';
if (isset($context['topicSolved']))
echo ' <input type="hidden" name="icon" value="' . $modSettings['topicsolvedIcon' . ($context['user']['started'] ? 'Starter' : 'Other')] . '"/>';
else
echo ' <input type="hidden" name="icon" value="xx" />';
echo'
<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'], '" />
';

// if both color and bgcolor are disabled
if (!isset($context['disabled_tags']['color']) || !isset($context['disabled_tags']['bgcolor'])) {

echo '<script language="javascript" type="text/javascript">
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
';
// define the image dir
echo 'var cbid = "', $settings['default_theme_url'],'/images/bbc/";
';
// define the settings for javascript purposes
echo 'var usecolor = ', (!isset($context['disabled_tags']['color'])) ? 1 : 0 , ';
';
echo 'var usebgcolor = ', (!isset($context['disabled_tags']['bgcolor'])) ? 1 : 0 , ';
';
// use array to quickly write all the language strings since javascript can't read php language strings
$lang = array(
'yourtexthere', 'insert', 'changetoinsertcolor', 'changetoinsertbgcolor',
'switchbetween', 'insertlastclicked', 'insertlasthovered'
);
// WRITE EACH VAR WE MAY USE
foreach($lang as $var) {
echo 'var '.$var.' = "'.$txt[$var].'";
';
}

// call colorbar.js which has the javascript in
echo '</script>
<script language="javascript" src="', $settings['default_theme_url'], '/color.js" type="text/javascript"></script>';
}
echo '
<textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br />
';
// Want to tell us what you're listening to?
if($modSettings['nowplayingEnabled'])
{
echo $txt['nowplaying2'] . '<br /><input type="text" style="width:95%" name="nowplaying" tabindex="2" /><br />';
}
echo '

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


I'm sure it will work once I got this code figured out.  Actually added a few mods manually on my forum and got them all working minus this one and one other.  I'll keep trying but I was wondering if someone could help me out.

Doughboy

#88
Actually got it working.  Not sure this is normal or not but when I post the message from Quick Reply I get redirected to the Category view.  I then have to click on the post to see the reply.  But the post works.  Any thoughts?

Good mod though.

geezmo

Quote from: Kirby on August 28, 2007, 05:41:46 PM
geezmo,

you can add this anywhere you want it:

', $txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' . $txt['quick_reply_warning'] . '</b>' : '', '


Works great. Tnx Kirby!

Kirby

Quote from: Doughboy on August 29, 2007, 04:37:49 PM
Actually got it working.  Not sure this is normal or not but when I post the message from Quick Reply I get redirected to the Category view.  I then have to click on the post to see the reply.  But the post works.  Any thoughts?

Good mod though.
This is because of a profile setting.

No problem geezmo :)

asdboard

Quote from: Kirby on August 19, 2007, 06:47:29 PM
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.
I noticed the same problem. Works with FF 2.x, not with IE7 (not yet a chance to try with Opera and Safari) Any help would be appreciated. Using 1.1.3 with lots of mods.

Kirby

Okay, will test this and get back to you.

asdboard


Kirby

#94
I have identified this as a bug and will shortly release an updated full package (2.0.1) and for everyone else,

Open Display.template.php.

Look for

<textarea class="editor" cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea>';


Replace with:

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

asdboard


husam

#96
How do I make it fit to this space?

Screenshot: http://img300.imageshack.us/img300/8404/hmmmje6.png

Kirby


Coldfx

Quote from: Kirby on September 03, 2007, 01:36:52 PM
What do you mean, husam?

I think he doesn't want the large, left-panel spaced so much.

husam

Quote from: SySRoot74 on September 03, 2007, 02:12:12 PM
Quote from: Kirby on September 03, 2007, 01:36:52 PM
What do you mean, husam?

I think he doesn't want the large, left-panel spaced so much.

Yes, what SySRoot74 said.

Advertisement: