" ...view more smilies" not opening

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
rray
Registered User
Posts: 8
Joined: Sat Sep 28, 2019 9:32 pm

" ...view more smilies" not opening

Post by rray » Sun Oct 20, 2019 8:34 pm

The " ...view more smilies" popup on the posting page doesn't show up sometimes when the button is pressed. I think it happens when the popup is already open somewhere in the background, for example from an older post.

Is this something that could be fixed on the phpbb side?

Ideally the old one would come to the front when the button is pressed. Opening a second one is the second best option, probably prefered to seeing nothing happen.

Cheers,
rr

User avatar
EA117
Registered User
Posts: 1154
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: " ...view more smilies" not opening

Post by EA117 » Tue Oct 22, 2019 4:50 pm

The posting_editor.html template (such as /styles/prosilver/template/posting_editor.html) is opening this "more smilies" window using a Javascript helper function from the style's forum_fn.js code, e.g. popup(this.href, 750, 350, '_phpbbsmilies').

This invokes the window.open() API with _phpbbsmilies as the window name. Which means yes, if there is already a previously-created window with that name, the "more smilies" list is going to open/refresh in that existing window; rather than opening a new or additional window.

I don't know that the name is key to anything? e.g. If the window didn't have this exact name, the insert functionality wouldn't work, or anything important like that? So I would try changing your style's posting_editor.html template so that the popup() helper invocation gives the pre-defined window name _blank instead of _phpbbsmilies. e.g. In phpBB 3.2.8's /styles/prosilver/template/posting_editor.html, change line 51 to:

Code: Select all

<br /><a href="{U_MORE_SMILIES}" onclick="popup(this.href, 750, 350, '_blank'); return false;">{L_MORE_SMILIES}</a>
Not that I've tested this myself. But it looks like it's only important for "the pop-up window is able to find the forms on the page which opened it", and not that the page ever needs to find the pop-up window. i.e. I don't think the _phpbbsmilies name is "important". But I guess we'll see, based on what your results are.

User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: " ...view more smilies" not opening

Post by canonknipser » Tue Oct 22, 2019 7:32 pm

EA117 wrote:
Tue Oct 22, 2019 4:50 pm
I don't think the _phpbbsmilies name is "important"
Oh, it is important - it prevents a user opening more than one (smilie) window at a time. When no name is given (_blank instead), every click on more smilies will open a additional window.
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
EA117
Registered User
Posts: 1154
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: " ...view more smilies" not opening

Post by EA117 » Tue Oct 22, 2019 8:03 pm

canonknipser wrote:
Tue Oct 22, 2019 7:32 pm
Oh, it is important - it prevents a user opening more than one (smilie) window at a time. When no name is given (_blank instead), every click on more smilies will open a additional window.
Thanks. That's the behavior they are asking for; or at least the fall back behavior they wanted to achieve, absent being able to force another existing browser window to come back to the foreground. (Which I expect is impossible for this type of window, and/or as a cross-platform guaranteed behavior.)

I was thinking in terms of "important" relative to the insert_text() calls still being able to function properly, if the window hadn't been uniquely named. i.e. If they switch to _blank to intentionally allow a new pop-up to be created instead, will it work for the purpose of inserting smilies to the correct open message editor. From what I'm seeing in code I'm expecting "yes", but haven't setup a board with "more smilies" to actually test and confirm.

EA117 wrote:
Tue Oct 22, 2019 4:50 pm
In phpBB 3.2.8's /styles/prosilver/template/posting_editor.html, change line 51 to:

Code: Select all

<br /><a href="{U_MORE_SMILIES}" onclick="popup(this.href, 750, 350, '_blank'); return false;">{L_MORE_SMILIES}</a>
I should have also confirmed and recommended there: Be sure and flush your phpBB cache from ACP in order to see the effect of this change.

rray
Registered User
Posts: 8
Joined: Sat Sep 28, 2019 9:32 pm

Re: " ...view more smilies" not opening

Post by rray » Wed Oct 23, 2019 9:25 pm

Thanks canonknipser and EA117, using _blank works fine :thumbsup:

Post Reply

Return to “[3.2.x] Support Forum”