News:

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

Main Menu

Snowflakes

Started by Chen Zhen, December 24, 2018, 06:44:11 AM

Previous topic - Next topic

Dave J

Quote from: Chen Zhen on November 10, 2019, 05:00:42 PM

I just tested this on SMF 2.0.15 with the SMF Packs shoutbox installed and enabled.
Both mods seem to be working without conflict.
Atm I am not able to duplicate the javascript issue you reported (as per your first posted image).

Thanks for looking Chen,

Not sure what it can be then as I tested it with the free shoutbox version on 3 different sites with the same issue all using the default theme.

I will do the same as you and test it on a new install and see what happens, perhaps it's a host thing.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Hi Chen,

Ok did the same as you and you are correct that there are no errors, see image attached.

So now I don't know what the issue is, I guess that there is a JS conflict somewhere that is one step too much. I might try to install the other mods I have on the live site, on the test site, and see if I can get the the root of it.

Thank you for at least looking

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Chen Zhen


Yes install your other mods one at a time until you find the culprit.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Dave J

OK now found out what the issue is. I should add that this was done on a new install of 2.0.15 with PHP5.6

It's all related to the SMF Smileys settings.

If you have Smileys that you don't want to show on the 'Post Form' and opt for the 'Pop Up' then this is when the error happens.

If you set all your smileys to 'Post Form' the error is not there, as seen in image 4, so obviously now that's what I've done...not sure if this can be called a bug or not and if it is who's bug is it?

I have taken screen shots, see below
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

It's worth noting that this doesn't happen on the new topic posting page nor on the reply to post either.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Chen Zhen

Quote
If you have Smileys that you don't want to show on the 'Post Form' and opt for the 'Pop Up' then this is when the error happens.

I'm looking at the smiley settings in a localhost setup of SMF 2.0.15 right now and I do not see those settings.
Are you positive that this is not settings added by some sort of mod or am I looking in the wrong admin template?

Please provide a screenshot that shows the appropriate admin sub-menu that includes those settings.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Arantor

Looks like a shoutbox mod combined with customised smileys being enabled.

Dave J

Gents,

Just started from scratch again to try and get some idea of this. I know you probably know all this but I'm also trying to get a handle on why this is happening but can't so I'm hoping you guys will.

So on a new install I left the 'Smileys' to default...image 1

Next I checked the box for 'Enable customised smileys' (no new set installed)...image 2

This then expands to menu for smileys to enable you to choose to edit them etc..image 3

I edtied the 'Afro' smiley so it would be seen on the pop up

I then install Shoutbox, post a test message, when I click on the smiley button you can see the option for 'more' is at the end...image 4

Now I install 'Snowflakes' and enable it, go back to the shoutbox and in image 5 you can see the results.

It seems that everything is OK when it's just the shoutbox installed and Snowflakes is not enabled. I obviously don't know where the issue lies this is only my interpretation of the issue.

I should also add there are no errors in the SMF error log and none in the cPanel host error log either

On the live site I've now discabled all the pop up smileys so this doesn't happen anymore.

So I will leave it to you to ponder.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Chen Zhen

That shoutbox mod has some poorly written javascript and HTML.
Take a look using a validator and you will see what I am referring to.
The author used document.write which IMO should perhaps be used during testing but not for stable usage.
DOM is usually the preferred method.. perhaps they improved the pro version.

Anyhow.. here is a template file you can use as a replacement for that mod.
It should be placed in the Themes/default directory to overwrite that mod's file.
Your smileys popup now appears directly above the shoutbox.

I did not test it thoroughly to include multiple smileys displayed in the popup.
Test it out and let me know if there is a problem with it.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Dave J

#29
Thanks Chen I'll check it out


OK replaced the original with your version Chen and it's all working OK. Thank you very much for your help, it's much appreciated.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Quote from: davejo on November 25, 2019, 02:47:08 AM
Thanks Chen I'll check it out


OK replaced the original with your version Chen and it's all working OK. Thank you very much for your help, it's much appreciated.

OK another update. I suppose I really should have checked everything but just checked the pop up smiley issue.

The file you have posted will clear that issue but then if you try to go in to 'Setting' in Admin it says that the tempate can't be found.

I have resolved that by re-inserting the code from the end of the original shoutbox.template file into the one you have created.

There are a couple of other issues too but I'll try to resolve those myself.

I just wanted to post this here incase someone else has the same problem and then replaces the original file with yours Chen

If it helps I have attched the original template for the original Pro V13 shoutbox mod. As my license has expired I cannot get a more recent version of the file which might of course resolved the issue.

I do appreciate what you have done though Chen, thank you.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Chen Zhen


I found some suspected issues with that last file.
Attached to this post is your edited template for the pro version of SMF Packs Shoutbox.
It will now work with multiple smileys in the "more" popup.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Chen Zhen


The file attached to this post is for the public version of SMF Packs shoutbox.
I add this in case anyone else is looking for the same fix but for the public version.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Dave J

Quote from: Chen Zhen on November 25, 2019, 09:05:36 PM

I found some suspected issues with that last file.
Attached to this post is your edited template for the pro version of SMF Packs Shoutbox.
It will now work with multiple smileys in the "more" popup.

Thanks again Chen, I will have a look
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Chen Zhen


Actually use the one attached to this post.
It should add a space before a smiley (not after).

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Dave J

#35
Hi Chen,

The other one seemed to work ok and the new one does too. I now have the site running with no errors and the Snowflakes works with the shoutbox.

Once again thank you for all your help
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Shades.

Sorry I posted this in another thread b4 but figured I'd post it here since I believe this mod is causing my problems. ;)

I'm have an issue when previewing a post. At  the end I get "null null". But when I actually post something the "nulls" arent there. So I uninstalled this mod and the "null null" on preview post was not there. Then I reinstalled this mod and the "nulls" showed up again. Any ideas? (see attachment)

This mod installed on SMF2.0.17

I also installed it on 2.1RC3 and no problems
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Chen Zhen


Navigate to its admin settings and enter the appropriate action in the disable input field:


List actions/subactions to disable Snowflakes (comma separated)


An example setting:

post


.. this will disable the mod when someone is making or editing a post.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Shades.

Quote from: Chen Zhen on November 25, 2020, 07:27:16 PM

Navigate to its admin settings and enter the appropriate action in the disable input field:


List actions/subactions to disable Snowflakes (comma separated)


An example setting:

post


.. this will disable the mod when someone is making or editing a post.

Ok, well that stopped the snowflakes while editing or posting but still getting that "null null" on preview!? Its not really a problem cause it post normal but would like to figure out whats causing it. Must be having conflict between this mod and another cause when I uninstall this one the "null null" is not there. :o
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Chen Zhen


I am able to duplicate the problem on the SMF 2.0 branch.
Although when disabled for that action it doesn't load any of its css or JavaScript nor does it show any console errors.

I can give you a temporary patch for your post template until I can resolve the problem without parsing/editing SMF files.

file: ../Themes/default/Post.template.php

find:
bodyText += preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue;

replace with:
bodyText += preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue ? preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue : "";

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Advertisement: