Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Reply button not properly setting anchor and showing the editor form
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 28, 2017 - 3:43 am

I don't really have any way of knowing if you have dome something wrong. Give me a detailed step-by-step description of what you are seeing and I will see if I can replicate. I certainly can not based on what you have described previous to the change.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Aug 28, 2017 - 4:11 am

Thanks Andy, but this is way to complicated for me right now. 
I did exactly what you suggested and it did not work. 
I also don't like the fact that the forums scripts are not compressed anymore after making this change. Our site is not the fastest, this will add even more weight to it. 

I am out. I need to find a better solution for this issue or ignore it for now. 

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Aug 28, 2017 - 4:49 am

Could you possibly sent me the compressed JS file with the change in it, so I may just replace the one on our server?
Maybe that will work. 

sebastian.schimpf {at} gmail.com

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 28, 2017 - 5:36 am

We can see if that is possible. There are a lot of changes to all of our JavaScript files for 5.8 so it would need to be hand-crafted. I will try and take a look later today.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Aug 28, 2017 - 5:49 am

okay ... please see what you can do. 

Thanks!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 28, 2017 - 9:22 pm

if its loading sp-forum.js and not sp-forum-dev.js, its not loading the one you modified...  please show us what you added to wp-config.php and show us where you added it...  make sure you have valid quote chars... sometimes if you copy it from formatted html you may get the wrong one... always best when copying code to use the copy raw button...

I have already coded up a enhancement for the reply button to always scroll to the form...

in the same js file, find these lines (sorry, dont have line number as I am on travel)...

                        $('#' + editorId).slideDown();
                        if (!window.location.hash) location.href = location.href + '#spEditFormAnchor';
                        spj.editorOpen(formType);

after those, just add:

                        $('html, body').animate({scrollTop: $('#' + editorId).offset().top - sp_platform_vars.headpadding}, 500);

which of course assumes you can get it to load the right file...

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Aug 29, 2017 - 3:05 am

Thanks, Mr. Papa, 

the issue was indeed my copy and paste of the code you gave me for the wp-config.php!

After i corrected the code to use proper quotes, it works. 
Thank you!

However, I think there is a weakness in the way you have coded this button feature in general.

When I scroll up, after the click on the button took me to the text editor, and I click again on the button, nothing happens. In my opinion, it would be more user-friendly if the focus would again lead the user directly to the text editor, no matter if he was there already or not. 
So I think it would be smarter to make sure the button always scrolls to the form - no matter what. 

What are your thoughts?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 29, 2017 - 3:43 am

Is that a browser specific problem? It certainly does what you want on our test systems in both MacOS and Windows browsers...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Aug 29, 2017 - 4:01 am

On my Windows machine, it seems to appear in Chrome and Opera, not in IE 11 and Firefox. 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 29, 2017 - 4:20 am

I shall need to pass that one over to @mr-papa as I do not have a Windows PC

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 618
Members: 17348
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10120
Posts: 79605