Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: wynnyelle on August 21, 2013, 12:16:43 AM

Title: Removing global header from the registration page
Post by: wynnyelle on August 21, 2013, 12:16:43 AM
I use a global header and footer, and it is really screwing up our registration page. It works well elsewhere on the site, though.

I'd like to cancel it so it doesn't load on that one page. How would I do this?
Title: Re: Removing global header from the registration page
Post by: Matthew K. on August 21, 2013, 12:35:08 AM

if ($context['current_action'] != 'register' && $context['current_action'] != 'register2') {
// Global Headers and Footers mod "injection" code here...
}
Title: Re: Removing global header from the registration page
Post by: Matthew K. on August 21, 2013, 12:36:53 AM
//-- Start of Typical Support Rant
This post probably should have been made in either the modifications support topic, or at the very least SMF Coding Discussion (http://www.simplemachines.org/community/index.php?board=60.0).
// End of Typical Support Rant --//
Title: Re: Removing global header from the registration page
Post by: wynnyelle on August 21, 2013, 02:45:43 AM
Wow, thank you! :)

What file do I insert that into and what part of that file?

I am interested in doing this on profiles as well.

...Should I restart this in the coding board and lock this? I'm sorry if it was misplaced.
Title: Re: Removing global header from the registration page
Post by: Matthew K. on August 21, 2013, 12:37:24 PM
You're welcome! Whatever file Global Headers and Footers modifies to add the code..which should be Subs.php if I'm recalling correctly.

A better alternative may be in the modifications own file so that you modify one place that would stop the function from returning the headers / footers.