Simple Spoiler BBCode

《SOLVED》 Simple Spoiler BBCode ~ GUEST prompted to register. - Simple Spoiler BBCode

《SOLVED》 Simple Spoiler BBCode ~ GUEST prompted to register.

by paulyii » Fri Jul 26, 2019 3:16 am

I had this Simple Spoiler BBCode activated in my Forum.
I logged out and re logged in as a GUEST.

when i went to the post with this Simple Spoiler BBCode , i saw no difference between an user or a guest.
clicked the SHOW button, the hidden contains showed.

Can it be that when a GUEST visitor clicked on the SHOW button,
The Guest will be prompted to register in order to view the contain ...
instead of he can view the hidden contain just like only the registered members can.

Can somebody helps to modify it ??
Thanks.

You guys are the greatest !!
8-)

.
Last edited by paulyii on Mon Jul 29, 2019 3:45 pm
User avatar
paulyii
Registered User
Posts: 171
Joined: Tue Jul 29, 2008 5:19 am
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by AbaddonOrmuz » Fri Jul 26, 2019 3:06 pm

paulyii wrote: when i went to the post with this Simple Spoiler BBCode , i saw no difference between an user or a guest.
clicked the SHOW button, the hidden contains showed
Then it's working as intended.

This extension was never meant to hide content for guests, just to hide large text, images or information like a plot fo a movie or video game.

To achieve what you want you might need an additional BBCode, I've done a [hide] BBCode specially for that, you might want to try it.

Repository: AlfredoRamos/phpbb-ext-hide
Download: v0.3.0

With that you could do something like:

Code: Select all

[spoiler][hide]Hidden text[/hide][/spoiler]
Or simply:

Code: Select all

[hide]Hidden text[/hide]
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 978
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by paulyii » Fri Jul 26, 2019 5:10 pm


To achieve what you want you might need an additional BBCode, I've done a [hide] BBCode specially for that, you might want to try it.

Repository: AlfredoRamos/phpbb-ext-hide
Download: v0.3.0

Thanks for the effort that you had done for me.
I am indeed very grateful for your help.

Well the guest when viewing the hidden post..
The guest had this message.
Exclusive content for logged users
It would be best, if the guest is being prompted to register to view the content

You are the BEST
Thanks.
User avatar
paulyii
Registered User
Posts: 171
Joined: Tue Jul 29, 2008 5:19 am
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by 3Di » Fri Jul 26, 2019 8:05 pm

I think you can use the native URL bbcode for that - Ref.: https://phpbbstudio.com/kb/bbcodes/guests-limitation

Code: Select all

[spoiler][hide]Please [url=<register_link>]register[/url] or [url=<login_link>]login[/url] to see this hidden text[/hide][/spoiler]
Not tested :)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
3Di
Former Team Member
Posts: 16032
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by AbaddonOrmuz » Sat Jul 27, 2019 3:06 am

paulyii wrote:It would be best, if the guest is being prompted to register to view the content
Well, "best" is subjective.

For me the current state of it makes it pretty clear that, if I really want to see that content, I must register and I don't need a link for it.

You could modify the language files (the HIDDEN_CONTENT_EXPLAIN key) to show an HTML link, though I wouldn't recommend it.

Other option would be to add additional template variables to the BBCode parser to show those links but I don't feel that they're really needed.

You are, of course, welcome to use another [hide] BBCode as 3Di suggests if you really need that extra content.
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 978
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by 3Di » Sat Jul 27, 2019 3:41 am

@AbaddonOrmuz

I wasn't meant to hijack your topic, just i wanted to help. ;)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
3Di
Former Team Member
Posts: 16032
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by paulyii » Sat Jul 27, 2019 4:37 am


For me the current state of it makes it pretty clear that, if I really want to see that content, I must register and I don't need a link for it.

You could modify the language files (the HIDDEN_CONTENT_EXPLAIN key) to show an HTML link, though I wouldn't recommend it.
Managed to change the wordings to Please register to view the contents.
But can't get the link to show up.

Please register to view the content
(don't know how to keep the sentence as it is, like now it is a link.

Another problem is, i want it to be in Chinese.
Create a new folder named "zh"
Copy and paste posting.php to it from "en"
Translate it to Chinese ?

Is it the way to change it to Chinese ?

Grateful of any help and advices.
Thanks.

You guys are the greatest !
User avatar
paulyii
Registered User
Posts: 171
Joined: Tue Jul 29, 2008 5:19 am
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by 3Di » Sat Jul 27, 2019 6:31 am

Don't you have a chinese support board for phpBB, I mean localised?
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
3Di
Former Team Member
Posts: 16032
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by paulyii » Sat Jul 27, 2019 10:36 am

3Di wrote:Don't you have a chinese support board for phpBB, I mean localised?
My phpBB Forum is in Traditional Chinese

http://www.minnan.epizy.com
😉
User avatar
paulyii
Registered User
Posts: 171
Joined: Tue Jul 29, 2008 5:19 am
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by AbaddonOrmuz » Mon Jul 29, 2019 12:19 am

3Di wrote:I wasn't meant to hijack your topic, just i wanted to help. ;)
Yeah, I have no problem with that :D
paulyii wrote: Managed to change the wordings to Please register to view the contents.
But can't get the link to show up.
I'm not sure if it can be done though the BBCode by just modifying the translation, because in my tests the HTML is escaped (latest phpBB version).
paulyii wrote: Another problem is, i want it to be in Chinese.
Create a new folder named "zh"
Copy and paste posting.php to it from "en"
Translate it to Chinese ?

Is it the way to change it to Chinese ?
Yes.
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 978
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: Simple Spoiler BBCode ~ GUEST prompted to register.

by paulyii » Mon Jul 29, 2019 3:43 pm

I settled with changing the wordings.
Directly translate the composer.php in the en folder.
No link.

Considered dolvrd.

Thank you guys.
User avatar
paulyii
Registered User
Posts: 171
Joined: Tue Jul 29, 2008 5:19 am
Contact:

Re: 《SOLVED》 Simple Spoiler BBCode ~ GUEST prompted to regis

by 3Di » Wed Jul 31, 2019 2:28 pm

paulyii wrote:Directly translate the composer.php in the en folder.
Not sure if composer.php is the right file?
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
3Di
Former Team Member
Posts: 16032
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: 《SOLVED》 Simple Spoiler BBCode ~ GUEST prompted to regis

by paulyii » Fri Aug 02, 2019 10:42 pm

3Di wrote:
paulyii wrote:Directly translate the composer.php in the en folder.
Not sure if composer.php is the right file?
It should be, cos the result is just what i wanted.
:)
User avatar
paulyii
Registered User
Posts: 171
Joined: Tue Jul 29, 2008 5:19 am
Contact:

Re: 《SOLVED》 Simple Spoiler BBCode ~ GUEST prompted to regis

by 3Di » Sun Aug 04, 2019 3:36 am

paulyii wrote:
3Di wrote:
paulyii wrote:Directly translate the composer.php in the en folder.
Not sure if composer.php is the right file?
It should be, cos the result is just what i wanted.
:)
No, there is only a posting.php file.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
3Di
Former Team Member
Posts: 16032
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact: