Overwrite prosilver header

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Dragosvr92
Registered User
Posts: 1450
Joined: Sat Sep 12, 2009 7:27 am
Location: Romania
Name: Dragos Valentin Rădulescu
Contact:

Overwrite prosilver header

Post by Dragosvr92 » Fri Feb 20, 2015 3:02 pm

So, i am guessing this would be simple to make.....

Could someone provide an easy/basic extension code that removes the <div class="headerbar"> div with everything that is inside it and replaces it to the code we provide? Is there an event that can do this?
The header is one of the most changed part of styles so if there isnt one, there should be.
Formerly known as TheKiller
3.0| Avatar on Memberlist 1.0.3

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2228
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Overwrite prosilver header

Post by kinerity » Fri Feb 20, 2015 3:12 pm

Create a new HTML file in your extension named overall_header_stylesheets_after.html and place it in /styles/prosilver/template/event.

Code: Select all

<style>
.headerbar {
    display: none;
}
</style>
The only problem you'll run into is that there are no template events before the navbar that will allow you to place you're own code there.
Kailey Truscott - Community Team

User avatar
Dragosvr92
Registered User
Posts: 1450
Joined: Sat Sep 12, 2009 7:27 am
Location: Romania
Name: Dragos Valentin Rădulescu
Contact:

Re: Overwrite prosilver header

Post by Dragosvr92 » Fri Feb 20, 2015 4:11 pm

That will just hide the class by html. Its a little messy. I thought most extensions just disable the code with events so it isnt loaded. But i guess i can work with that too.....

It appears that Killbill has requested the event needed for this.
http://area51.phpbb.com/phpBB/viewtopic ... 11&t=47226
Lets hope it gets done in 3.1.4 :D

Btw, your* .. yes. you hate me :P
Formerly known as TheKiller
3.0| Avatar on Memberlist 1.0.3

User avatar
Lumpy Burgertushie
Registered User
Posts: 66268
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Overwrite prosilver header

Post by Lumpy Burgertushie » Fri Feb 20, 2015 4:42 pm

the best way to do this would be with a child style that only contains the overall_header.html file that you want to use.


robert
I am going to be out of town and off line for a week . see ya when I get back.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
Dragosvr92
Registered User
Posts: 1450
Joined: Sat Sep 12, 2009 7:27 am
Location: Romania
Name: Dragos Valentin Rădulescu
Contact:

Re: Overwrite prosilver header

Post by Dragosvr92 » Fri Feb 20, 2015 4:52 pm

Lumpy Burgertushie wrote:the best way to do this would be with a child style that only contains the overall_header.html file that you want to use.
Yes, i am doing that already, but that will only change the header for that one style.
prosilver and all other installed styles will have their default header. I wanted to try an extension that applies on all of them.
Formerly known as TheKiller
3.0| Avatar on Memberlist 1.0.3

User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4841
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Overwrite prosilver header

Post by VSE » Fri Feb 20, 2015 5:45 pm

Extensions can't overwrite or replace template code. You can only do what kinerty or lumpy suggested.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

User avatar
Dragosvr92
Registered User
Posts: 1450
Joined: Sat Sep 12, 2009 7:27 am
Location: Romania
Name: Dragos Valentin Rădulescu
Contact:

Re: Overwrite prosilver header

Post by Dragosvr92 » Fri Feb 20, 2015 6:49 pm

VSE wrote:Extensions can't overwrite or replace template code. You can only do what kinerty or lumpy suggested.
Nah. Then what are the extensions for... ill wait till that event gets merged in the next release. If it does.
Formerly known as TheKiller
3.0| Avatar on Memberlist 1.0.3

User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4841
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Overwrite prosilver header

Post by VSE » Fri Feb 20, 2015 7:39 pm

No event will let you replace template code.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

User avatar
Dragosvr92
Registered User
Posts: 1450
Joined: Sat Sep 12, 2009 7:27 am
Location: Romania
Name: Dragos Valentin Rădulescu
Contact:

Re: Overwrite prosilver header

Post by Dragosvr92 » Sat Feb 21, 2015 5:21 am

VSE wrote:No event will let you replace template code.
No, i meant adding the content before the navbar after i disable the main header with css. ;)
Formerly known as TheKiller
3.0| Avatar on Memberlist 1.0.3

Post Reply

Return to “Extension Writers Discussion”