Extra Quick Reply Bar

Started by Matthew K., April 23, 2009, 04:31:57 PM

Previous topic - Next topic

KahneFan

Unfortunately I'm not familiar with that theme and don't have the time at the moment to edit the mod for each theme.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

wiki



Can I make bar show at top instead of bottom of screen?

KahneFan

Yes. In the "replace" block of code:

FIND:

<div class="tborder windowbg" style="position: fixed; bottom: 0px;


REPLACE WITH:

<div class="tborder windowbg" style="position: fixed; top: 0px;


That is untested, but should push the bar to the top of the page.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Final60

Heya I'd like to try this mod out but the code to replace doesn't exist in my display.template.php, can someone edit it for me ? Thanks in advance

wiki

Quote from: KahneFan on May 26, 2009, 10:25:30 AM
Yes. In the "replace" block of code:

FIND:

<div class="tborder windowbg" style="position: fixed; bottom: 0px;


REPLACE WITH:

<div class="tborder windowbg" style="position: fixed; top: 0px;


That is untested, but should push the bar to the top of the page.


Thank you but where I should edit file in which file  :P

KahneFan

Anyone using a custom theme, since this bar is fixed to the bottom of the page, you can pretty much put it in just about any clean space on the page. By clean space, I mean, not inside of another field.

Final60, BACKUP YOUR CURRENT FILE, then try the attached file.

wiki, the complete manual edit would be (without installing the mod package):

FIND:

</form>
</div>
<div style="clear: both;"></div>
</div>
</div>';
}


REPLACE WITH:

</form>
</div>
<div style="clear: both;"></div>
</div>
</div>';
}


if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
echo '
<a name="quickreply"></a>
<div class="tborder windowbg" style="position: fixed; top: 0px; left: 1%; width: 98%; text-align: center;">
<div class="smallpadding windowbg" ', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '><div class="floatleft" style="padding: 0 5px 0 5px; border: none; width: 10%;">
<strong>', $txt['quick_reply'], '</strong></div>', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
', !$context['can_reply_approved'] && $context['verification_message'] ? ' ' : '', '
', $context['verification_message'] ? '<span class="smalltext">' . $context['verification_message'] . '</span>' : '', '
<form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="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="from_qr" value="1" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" />';

// Guests just need more.
if ($context['user']['is_guest'])
echo '
<strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" />
<strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" />';

echo '
<div class="floatleft" style="border: none; width: 60%;">
<textarea cols="75" rows="1" style="width: 95%; height: 15px;" name="message" tabindex="1"></textarea>
</div>
<div class="floatleft" style="border: none; width: 20%;">
<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />
</div>';
echo '
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>
<div style="clear: both;"></div>
</div>
</div>';
}
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Final60

#26
Heya. Th quicky reply bar displays correcly. But when i submit the text. It forwards me to a full text editor and error:

Quote
The following error or errors occurred while posting this message:
Your session timed out while posting. Please try to re-submit your message.

Im using smf 2.0 beta 4.

KahneFan

I used to get that message, even with the full editor (see link below):

http://www.simplemachines.org/community/index.php?topic=278397.0

I think that may be a 2.0 + IE problem. Ever since I began using FireFox, I've not seen the error again.

#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Final60

#28
It seems to be related to the mod. It brings up the error on FF and IE. Posting works fine with the default quickreply. I dont get the error at all using the default quick reply. I've have tried many times, without luck to get your xtra quickreply to post and it just doesnt want to. Damn.

Mystery?

The super quick reply box on a custom theme is too big.

See attached file to see how it looks on the custom theme.
Join my NEW website that I just created and be a big part of it (July 30, 2010): http://www.gamerstatic.net

KahneFan

Quote from: KahneFan on May 11, 2009, 11:19:04 AM
Unfortunately I'm not familiar with that theme and don't have the time at the moment to edit the mod for each theme.

Each custom theme may be different and therefor you might need to customize this mod per theme, as with many other mods.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Mystery?

Quote from: KahneFan on June 06, 2009, 12:14:38 AM
Quote from: KahneFan on May 11, 2009, 11:19:04 AM
Unfortunately I'm not familiar with that theme and don't have the time at the moment to edit the mod for each theme.

Each custom theme may be different and therefor you might need to customize this mod per theme, as with many other mods.

yeah, but I need help making the quick reply box a little smaller.
Join my NEW website that I just created and be a big part of it (July 30, 2010): http://www.gamerstatic.net

KahneFan

I use a percentage. You can change the percentage to a pixel count, but then you have to adjust the right/left margin as well. Then, not knowing the size of all of your viewer's monitors, it would look different on every monitor. You could try using a really small percentage, which would encompass most monitors. For example, you could try:

FIND:

</form>
</div>
<div style="clear: both;"></div>
</div>
</div>';
}


REPLACE WITH:

</form>
</div>
<div style="clear: both;"></div>
</div>
</div>';
}


if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
echo '
<a name="quickreply"></a>
<div class="tborder windowbg" style="position: fixed; bottom: 0px; left: 21%; width: 58%; text-align: center;">
<div class="smallpadding windowbg" ', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '><div class="floatleft" style="padding: 0 5px 0 5px; border: none; width: 10%;">
<strong>', $txt['quick_reply'], '</strong></div>', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
', !$context['can_reply_approved'] && $context['verification_message'] ? ' ' : '', '
', $context['verification_message'] ? '<span class="smalltext">' . $context['verification_message'] . '</span>' : '', '
<form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="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="from_qr" value="1" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" />';

// Guests just need more.
if ($context['user']['is_guest'])
echo '
<strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" />
<strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" />';

echo '
<div class="floatleft" style="border: none; width: 60%;">
<textarea cols="75" rows="1" style="width: 95%; height: 15px;" name="message" tabindex="1"></textarea>
</div>
<div class="floatleft" style="border: none; width: 20%;">
<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />
</div>';
echo '
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>
<div style="clear: both;"></div>
</div>
</div>';
}



Note, this is untested, so BACKUP BACKUP BACKUP!!!
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

DELHI_BOY

I am using smf 2 rc1-1 with default theme. This mod installed without any errors. But it is not visible anywhere. How to make it visible?

KahneFan

#34
It doesn't sound like it installed for some reason. Did you check the effected files to see if the mod took effect?

I just tested it again on my live RC1-1, and it installed and worked fine for me.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

DELHI_BOY

Sorry! Actually it is visible to normal member but not to administrator.

KahneFan

That's really strange. I have no permissions set on it.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

DELHI_BOY

Should i post any php file u want to see becoz i really need this mod. I have to click on 'reply' button every time in order to reply in thread.

KahneFan

You're welcome to post your Display.template.php, but I'm not sure what would cause it. Especially since Admins can't see it, but members can. Are you using a different browser than your members?
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

DELHI_BOY

here is my display.template.php file and i dont know which browser forum members were using as i am just an beginner. I am using firefox Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11

Thank you.

Advertisement: