News:

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

Main Menu

My quick reply is looking kind of strange.

Started by hebron, August 07, 2014, 05:28:59 PM

Previous topic - Next topic

hebron

I noticed something funny about my quick reply looking for 404 that the Google crawler reported. I normally don't use the quick reply so I hadn't noticed, but if I expand the container it goes way out of the screen to the right (see picture). As it turns out it seems to also be the source of the 404 error, and looking at the javascript behind it all it looks very strange:


if ('XMLHttpRequest' in window)
{
var oQuickModify = new QuickModify({
  sScriptUrl: smf_scripturl,
  bShowModify: true,
  iTopicId: 11,
  sTemplateBodyEdit: '\n\t\t\t\t\t\t\t\t<div id="quick_edit_body_container" style="width: 90%">\n\t\t\t\t\t\t\t\t\t<div id="error_box" style="padding: 4px;" class="error"><' + '/div>\n\t\t\t\t\t\t\t\t\t<textarea class="editor" name="message" rows="12" style="width: 100%; margin-bottom: 10px;" tabindex="1">%body%<' + '/textarea><br />\n\t\t\t\t\t\t\t\t\t<input type="hidden" name="a92623594d" value="8fe8fde778ea50cc8e5c0b0463801b0f" />\n\t\t\t\t\t\t\t\t\t<input type="hidden" name="topic" value="11" />\n\t\t\t\t\t\t\t\t\t<input type="hidden" name="msg" value="%msg_id%" />\n\t\t\t\t\t\t\t\t\t<div class="righttext">\n\t\t\t\t\t\t\t\t\t\t<input type="submit" name="post" value="Lagre" tabindex="2" onclick="return oQuickModify.modifySave(\'8fe8fde778ea50cc8e5c0b0463801b0f\', \'a92623594d\');" accesskey="s" class="button_submit" />&nbsp;&nbsp;<input type="submit" name="cancel" value="Avbryt" tabindex="3" onclick="return oQuickModify.modifyCancel();" class="button_submit" />\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t<' + '/div>',
  sTemplateSubjectEdit: '<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="4" class="input_text" />',
  sTemplateBodyNormal: '%body%',
  sTemplateSubjectNormal: '<a hr'+'ef="http://tvillingmamma.no/forum/index.php'+'?topic=11.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%<' + '/a>',
  sTemplateTopSubject: 'Emne: %subject% &nbsp;(Lest 84 ganger)',
  sErrorBorderStyle: '1px solid red'
});


Now, I am no expert in Java by any means, but this code does not look right... I did a search for sTemplateBodyEdit and it turned up in /Themes/default/scripts/topic.js on line 273 as part of the function QuickModify.prototype.onMessageReceived. Might also be causing a memory leak, my Chrome went up a couple of hundreds MBs after I expanded the container.

Does anyone understand what is going on here?

I am running SMF 2.0.8 with Norwegian UTF-8 language, mods installed: Tapatalk SMF 2.0 Plugin, SMF Gallery Lite and SimplePortal and using theme Blue Star Theme.

Illori

is your theme a 2.0+ theme? if it is not search the tips/tricks board for the changes between rc5 and 2.0 and apply them to your theme.

hebron

Quote from: Illori on August 07, 2014, 05:35:15 PM
is your theme a 2.0+ theme? if it is not search the tips/tricks board for the changes between rc5 and 2.0 and apply them to your theme.
I think so, here is what it says on the info page:

Blue Star Theme 2.0 rc3
Author: Sh@rp
Last Update: March 22, 2014, 02:01:50 PM
SMF versions: 2.0 RC3, 2.0.5, 2.0.7

That being said I have on a couple occasions had to correct some errors in the template...

Illori

then you need to find a new theme, or manually patch it up to the changes through 2.0.

hebron

Quote from: Illori on August 07, 2014, 05:59:26 PM
then you need to find a new theme, or manually patch it up to the changes through 2.0.
It does say "SMF versions: 2.0 RC3, 2.0.5, 2.0.7", wouldn't that mean that it has been patched?

hebron

Quote from: hebron on August 07, 2014, 06:13:33 PM
Quote from: Illori on August 07, 2014, 05:59:26 PM
then you need to find a new theme, or manually patch it up to the changes through 2.0.
It does say "SMF versions: 2.0 RC3, 2.0.5, 2.0.7", wouldn't that mean that it has been patched?
Nope... You were right, I found the entry in the CSS and that did the trick. Thank you very much for pointing me in the right direction :)

Advertisement: