News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Snowflakes

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

Previous topic - Next topic

Steve

#60
It does in fact, resolve the same problem I had with one minor glitch. When I go to my forum's index page the shoutbox loads normally, At it's next automatic refresh, it hangs up. Refreshing the page resolves that problem.


Edit: it doesn't seem to be doing it now so maybe it was a problem on my end. I have some custom mods which may be interfering.
DO NOT pm me for support!

Chen Zhen

For SMF Packs Shoutbox make sure you download the appropriate file because 1 is for pro and the other is for the free version.
The pro version has a different file that loads some sort of modal JS library.

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

Steve

DO NOT pm me for support!

Chen Zhen

Yes but I haven't tested the pro file because I do not have that version.
If I remember correctly all I did was edit that file with similar edits that I did to the public file.

The public version works fine for me.

Note that you can't test it with 2 windows opened in the same browser.
If you're going to test the shoutbox you need to have 2 different user accounts but log into them using different browsers.
ie. Edge for one user and Chrome for the other.

I believe the shoutbox is designed not to refresh for the same user in the same browser because it updates in the browser you shouted in. 

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

jsx

#64
Quote from: Chen Zhen on December 16, 2020, 07:07:49 PM

The attachment for this post: [Click Here] ... is a replacement file for that shoutbox mod. Try it out to see if it resolves your problem.

@Chen Zhen

Unfortunately, this file does not solve this problem, these effects are still not displayed: Xmas Lights, Xmas Lights Strands, Xmas Wired Lights

And unfortunately, this file on my forum did not fix the display of the window with additional emoticons. This file from the attachment broke this feature more.

I have SMFPacks Shoutbox Pro 1.4.5 and the Shoutbox.template.php file is v1.4.4

Can you do this for this version? I can attach this file.

Chen Zhen


Temporarily uninstall Ohara YouTube Embed and then see if it works.

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

jsx

Unfortunately, these effects still don't work after uninstalling the Ohara YouTube Embed mod.

I would also like to fix this bug. There is a collision between the SMFPacks Shoutbox Pro modification and your modification. Can you help me fix this bug?


billtidy

jsx try using the attached file.

Rename your original file by adding a 1 after the word 'template' then upload this version. It should stop the issue with the shoutbox and also help the snowflakes to work.

What will not work is the 'Smileys' [more] 'Pop Up' button, although the smileys you have on the 'Post form' will still work.

If you switch off  'Snowflakes' at the end of the festive season then rename this file to 2 and rename the original file by removing the 1, then the shoutbox will work as normal.

Steve

Why would someone fix one problem knowing it will create another?
DO NOT pm me for support!

jsx

Quote from: billtidy on December 28, 2020, 05:44:00 AM
jsx try using the attached file.

Rename your original file by adding a 1 after the word 'template' then upload this version. It should stop the issue with the shoutbox and also help the snowflakes to work.

What will not work is the 'Smileys' [more] 'Pop Up' button, although the smileys you have on the 'Post form' will still work.

If you switch off  'Snowflakes' at the end of the festive season then rename this file to 2 and rename the original file by removing the 1, then the shoutbox will work as normal.

However, I want the additional smileys window to display properly.

Chen Zhen

I mentioned the Ohare Youtube mod because it uses document.write which can cause problems with other JavaScript on the page.  Imo developers should be using DOM to insert script tags & not document.write at all. The latest JQuery library makes it extremely easy to do that using $.getScript().

Unfortunately I can not test any changes to your Shoutbox Pro mod because I do not have a copy of it at all. For me to test any changes I make to any of its files requires me to have a legal copy of it which I'm not willing to pay for. For me to make blind changes to one of its files & upload it for you to test is too much trouble. You can ask the shoutbox mod author who may be willing to help you out.

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

billtidy

Quote from: Steve on December 28, 2020, 07:56:24 AM
Why would someone fix one problem knowing it will create another?

In it's present state it doesn't work at all, so the attached file lets it work with just the minor issue of the pop up window not working. Both of these mods have always not worked together, alone they work perfectly, so my fix is, admittedly only a limited fix, but a fix none the less.

It better to have something working rather than nothing, wouldn't you agree Steve?

The file I attached file was from the pro version of the shoutbox mod.

Steve

Quote from: billtidy on December 29, 2020, 02:22:10 AMIt better to have something working rather than nothing, wouldn't you agree Steve?

Actually, in the case of mods, no, I wouldn't agree. BUT, that's just me. Your solution may work for others and the time and effort you put in to get it to work this much is appreciated.
DO NOT pm me for support!

Chen Zhen


The solution is to replace document.write() with proper DOM object manipulation.
Anyone who is JavaScript savvy & has access to the pro version should be able to perform the edits to that modification's file(s).
In my opinion if the author of that shoutbox mod is still active & supports that package then simply ask him/her to do just that.
I assure you it will fix the problem. 

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

jsx

@Chen Zhen

When I uninstalled TinyPortal 2.0.0 these effects display correctly: Xmas Lights, Xmas Lights Strands, Xmas Wired Lights

So it would be nice if you checked what causes this mistake.

Chen Zhen


@jsx: Please stop frequently PMing me to look at your posts.

You can download & try this version here:
https://web-develop.ca/index.php?action=downloads;area=stable_smf_modifications;file=37

I have to test it for a while which is why it is a RC version release. There may be unforeseen bugs due to the minor changes.
When it appears to have no problems, I will post a stable release here & on my forum (no RC in its title/name).




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

jsx

@Chen Zhen

Okay if you have a problem with that.

I installed this version from your link and these effects are showing now.

But after refreshing the forum, for example, the lamps breaking effect does not work and no sound heard.

But when the Flurry effect is enabled, when I browse the forum on Chrome on my smartphone, the forum moves. I saw this bug on the previous version of your modification.

When the Snowstorm effect is enabled, this effect is not displayed on the smartphone when browsing the forum.

Chen Zhen

Many of the snow & image effects will likely raise your CPU usage for smartphones.
You can run your own tests to see if that statement holds true.
For this reason I included admin options to disable the effects for smartphones and/or tablets.
I suggest disabling the effects for both which will affect people using mobile browsers.
 
Thanks for the reports.

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

jsx

I understand.

I have the Flurry effect enabled and from time to time the forum seems to be reloading, a flash appears. Why is this happening?

Chen Zhen

Prior to the recent changes I have not seen that behavior on desktop/laptop. Also using Simple Portal or EhPortal I never had those problems with any of the light scripts.
Other than the use of document.write() from TP, I don't see any JS errors on the page yet something is causing a problem. Even after replacing document.write() with DOM manipulation the incorrect behavior persists.

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: