News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

AJAX Instant Quick Reply

Started by SlammedDime, May 29, 2008, 06:59:11 PM

Previous topic - Next topic

Eliana Tamerin

Really? I'm on the same version and I'm not experiencing that.

Did you do a hard refresh (Ctrl+F5) of your forum so the xml_topic.js could be refreshed?
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

_Anthony_


SlammedDime

No no, You need to specifically do it in this order, starting with your original files before I modified them.

Replace Display.php and Display.template.php from your original post above.
Install the mod, ignore the errors.
Replace Display.php and Display.template.php from my post above.

If you don't do this, what happens is even though there are errors, the Package installer still installs parts of the mod in the file, just not the error parts.  By doing what you did, my mod was effectively installed twice in some parts, thus creating the errors you got.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

Quote from: MrBabbelen on June 07, 2008, 09:32:42 PM
SlammedDime in smf 1.1.5 even with the fix it still shows new on board index

From the first post of the topic and the readme:
QuoteIf anyone would like me to see why it isn't working on their site, they will need to provide a link to their site as well as a test account to be used.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

jossanaijr

Quote from: SlammedDime on June 07, 2008, 04:18:24 PM
jossanaijr - post Display.template.php from your board.  xml_topic.js too.

razorblitz07

#145
This is the error I am getting:



8: Undefined index: view_newest_first
File: /home/fiestaon/public_html/fiestahq/forum/Themes/Fiesta/Display.template.php (main sub template - eval?)
Line: 564


if ($context['show_spellchecking'])
echo '
<script language="JavaScript" type="text/javascript" src="' . $settings['default_theme_url'] . '/spellcheck.js"></script>';

echo '
<script language="JavaScript" type="text/javascript" src="' . $settings['default_theme_url'] . '/xml_topic.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
quickReplyCollapsed = ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] == 2 ? 'false' : 'true', ';
var view_newest_first = ', $options['view_newest_first'], '

smf_topic = ', $context['current_topic'], ';
smf_start = ', $context['start'], ';
smf_show_modify = ', $settings['show_modify'] ? '1' : '0', ';

// On quick modify, this is what the body will look like.
var smf_template_body_edit = \'<div id="error_box" style="padding: 4px; color: red;"></div><textarea class="editor" name="message" rows="12" style="width: 94%; margin-bottom: 10px;">%body%</textarea><br /><input type="hidden" name="sc" value="', $context['session_id'], '" /><input type="hidden" name="topic" value="', $context['current_topic'], '" /><input type="hidden" name="msg" value="1572329" /><div style="text-align: center;"><input type="submit" name="post" value="', $txt[10], '" onclick="return modify_save(\\\'' . $context['session_id'] . '\\\');" accesskey="s" />&nbsp;&nbsp;', $context['show_spellchecking'] ? '<input type="button" value="' . $txt['spell_check'] . '" onclick="spellCheck(\\\'quickModForm\\\', \\\'message\\\');" />&nbsp;&nbsp;' : '', '<input type="submit" name="cancel" value="', $txt['modify_cancel'], '" onclick="return modify_cancel();" /></div>\';

// And this is the replacement for the subject.
var smf_template_subject_edit = \'<input type="text" name="subject" value="%subject%" size="60" style="width: 99%;" maxlength="80" />\';

// Restore the message to this after editing.
var smf_template_body_normal = \'%body%\';
var smf_template_subject_normal = \'<a href="', $scripturl, '?topic=', $context['current_topic'], '.msg1572329#msg1572329">%subject%</a>\';
var smf_template_top_subject = "', $txt[118], ': %subject% &nbsp;(', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')"

if (window.XMLHttpRequest)
showModifyButtons();
// ]]></script>



After I use Quick Reply, the post is applied but the error is that it shows up as a new thread right below the current one.  Refreshing the browser fixes it up.....but I am wondering what causes the error.

SlammedDime

razor - It looks like the mod wasn't properly applied to your custom Display.template.php file.  As for the error you get in the error log, it has nothing to do with the issue you're having.  Its a small bug that I've fixed in the next version I'll release when 2.0 Beta 4 comes out.

In the code you posted,
Code (Find) Select
var view_newest_first = ', $options['view_newest_first'], '
and Replace with
Code (Replace) Select
var view_newest_first = ', !empty($options['view_newest_first']) ? $options['view_newest_first'] : 0, '
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

jossanaijr - Here you go.  Give these two a shot.  That should do it for you.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

razorblitz07

Quote from: SlammedDime on June 08, 2008, 02:15:51 PM
razor - It looks like the mod wasn't properly applied to your custom Display.template.php file.  As for the error you get in the error log, it has nothing to do with the issue you're having.  Its a small bug that I've fixed in the next version I'll release when 2.0 Beta 4 comes out.

In the code you posted,
Code (Find) Select
var view_newest_first = ', $options['view_newest_first'], '
and Replace with
Code (Replace) Select
var view_newest_first = ', !empty($options['view_newest_first']) ? $options['view_newest_first'] : 0, '

I've applied the change to my file but the error still occurs.

jossanaijr

Quote from: SlammedDime on June 08, 2008, 02:22:28 PM
jossanaijr - Here you go.  Give these two a shot.  That should do it for you.
Yes. Fixed!  Thank you very much! Great!

SlammedDime

razor - You'll need to post up a link to your board and a test account for me to use to see what is going on.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

pjrobertson

#151
Hi SlammedDime. I'd love to get this working on my test board :)
atm the are 2 issues. 1 - it doesn't work!
2. When it's installed the +/- doesn't work for the quick reply box (meaning when it's closed by default you can't open it)
the site is at hxxp:smf.tyddynadda.co.uk [nonactive]

I've made an account for you (see the PM for security reasons!)
I've tried it with both the default theme, and the currently installed theme.


EDIT: never mind. It's OK now.

razorblitz07

Quote from: SlammedDime on June 09, 2008, 04:23:25 AM
razor - You'll need to post up a link to your board and a test account for me to use to see what is going on.

http://www.fiestahq.sparkonline.net/forum/index.php

User: test
Pass: t3staccount

SlammedDime

razor - please attach a copy of Display.template.php.  It wasn't modified right so I'd like to take a look at it. :)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

razorblitz07


SlammedDime

SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

razorblitz07

Quote from: SlammedDime on June 09, 2008, 03:30:26 PM
Give this a shot

works!

thanks....what was wrong with the coding?

SlammedDime

The html Comment to start a single post wasn't inserted correctly.  It was on the same line as the php comment, thus commenting it out from being output in html.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

kai920

Hey SD,

I use the Joomla bridge and this isn't working - AFAIK it's because of the URL... I see in the error console script.js (line 68)


POST http://www.kaitech.hk/option,com_smf/Itemid,71?action=post2;topic=1878;xml (1141ms)


Do I need to
- convert ? and ; to /
- convert = to ,

?  Are there other files to edit besides script.js?

Second thing is, I installed version 1.0 but now it cannot be uninstalled b/c display.template.php failed the test.   How should I proceed?

SlammedDime

I'm almost 100% sure that this won't work with the Joomla or Mambo bridge with SEF urls turned on on the Mambo or Joomla side without some modification (at least that was my experience).  You can most certainly try making the fixes you suggested in the JS files and see if that solves the problem for you, but I'm not sure.  I use Mambo but haven't had a chance to even test or install this on my live site.

As for the uninstalling: You'll have to perform the uninstall, ignoring the error, and then use the Package Parser integrated into the mod's download page and go through Display.Template.php and remove anything that was installed by the mod by hand.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: