PDA

View Full Version : Seperate header for CMPS Frontpage


attroll
11-29-2004, 02:00 AM
Just got done installing a sperate header for the CMPS frontpage. I created this mod myself. I will atempt to explain what I did.

1, Create a new header template called "header2".

2. After you created the "header2" template opened the /forum/includes/vba_cmps_include_bottom.php

Go through this file and changed every instance of $header to $header2.

3. Now go into the template "phpinclude_start and added the following line:

eval('$header2 = "' . fetch_template('header2') . '";');

4. Since the template is uncached you will have an extra query on each page. To fix, open global.php

Find:
// misc useful

Add Below this:
'header2',

5. Go into you CMPS templateplate adv_portal.

Find:
$navbar

Above that add:
$header2

6. Now you should be all set.

I hope I have all my steps that I did here. If not I am sure someone will point it out for me.

russbo
12-06-2004, 06:34 PM
Nice job. I was looking for something like this. Works great, should be a regular feature.

rich
x.russbo.com/index.php

Our Sponsors
 

Torqued
12-06-2004, 08:27 PM
so what does having a separate header do for us? I'm still a bit of a n00b @ this php stuff. :p

attroll
12-07-2004, 12:52 AM
If you want to see what it looks like I have done it on my forums. Look at the main page anf then go to the forums. You will see the difference.

www.whiteblaze.net

Our Sponsors
 

Brian
12-07-2004, 12:42 PM
An easier way to do this...

Edit your header template and change the code to something like this:

<if condition="THIS_SCRIPT == 'adv_index'">
CMPS Header Code
<else />
Forum Header Code
</if>


;)

attroll
12-07-2004, 01:09 PM
An easier way to do this...

Edit your header template and change the code to something like this:

<if condition="THIS_SCRIPT == 'adv_index'">
CMPS Header Code
<else />
Forum Header Code
</if>


;)

Thanks Brian

I will have to try that and post the results. That would he a heck of a lot easier. You would only have to modify the header template.

Thanks

Torqued
12-07-2004, 01:34 PM
An easier way to do this...

Edit your header template and change the code to something like this:

<if condition="THIS_SCRIPT == 'adv_index'">
CMPS Header Code
<else />
Forum Header Code
</if>


;)

Yeah. That's what I was wondering - why not just use conditionals like that. :confused:

attroll
12-08-2004, 01:46 AM
Brian

Thanks a lot. This code worked awesome. I recomend that everyone use this code instead of the hack I posted. It is far easier and you only have to modify one file. The header template.