How to hide somethink with events

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
PowerIdeas
Registered User
Posts: 33
Joined: Sat Jan 06, 2018 12:14 am

How to hide somethink with events

Post by PowerIdeas » Wed Feb 14, 2018 10:35 am

I have my own extension with little changes to prosilver theme. With events I can easily add code wherever I want...

But what if I want to php hide something?

I don´t want some code in style. There is event around the code. How i will use events and hide this code?

Somethink like <span style="display: none;"> but in php to really hide it.
Last edited by HiFiKabin on Wed Feb 14, 2018 10:39 am, edited 1 time in total.
Reason: Moved to Extension Writers Discussion

User avatar
david63
Jr. Extension Validator
Posts: 14342
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: How to hide somethink with events

Post by david63 » Wed Feb 14, 2018 7:14 pm

You cannot do that by using template events as you will need a start and an end and template events do not work that way. You may possibly be able to do what you want but using the jquery css commands.

There are several topics discussing this in this forum.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

PowerIdeas
Registered User
Posts: 33
Joined: Sat Jan 06, 2018 12:14 am

Re: How to hide somethink with events

Post by PowerIdeas » Wed Feb 14, 2018 9:58 pm

How to use hquery css commands? Will it be than hidden fully even in code, or just visually hiden?

Please link these topics

User avatar
Sniper_E
Registered User
Posts: 716
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: How to hide somethink with events

Post by Sniper_E » Sun Feb 25, 2018 3:16 am

If the section you want to hide has a class or id on it then you can hide it in the css of your extension with display: none;
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

PowerIdeas
Registered User
Posts: 33
Joined: Sat Jan 06, 2018 12:14 am

Re: How to hide somethink with events

Post by PowerIdeas » Sun Feb 25, 2018 6:58 am

Can we expect change in the future? It would be very cool if PHPBB 3.3. would be able to really php hide something with events, not just css.

User avatar
Ger
Recognised Extension Developer
Posts: 1486
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: How to hide somethink with events

Post by Ger » Tue Feb 27, 2018 10:27 am

If you explain what you want to hide, there might be an easy answer for you.
My extensions: Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update and Modern Quote
Newest: Quoted Where + anonymize

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

User avatar
david63
Jr. Extension Validator
Posts: 14342
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: How to hide somethink with events

Post by david63 » Tue Feb 27, 2018 10:34 am

PowerIdeas wrote:
Sun Feb 25, 2018 6:58 am
Can we expect change in the future? It would be very cool if PHPBB 3.3. would be able to really php hide something with events, not just css.
This has been talked about since extensions were first introduced but it would appear that no solution has been found. I am no expert on Twig but with Twig and the new templating framework that is being developed then this may well become possible.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 7 guests