Ive seen this somewhere here. I searched and looked in tips and tricks but came up empty.
I thought there was a way of using SMF header and footer and able to add HTML in between.
Please post the link if you happen to know where this link is?
...also,can it be used as:
mysite.com/mypage instead of index.php?=action ???
Thanx,
Mick.
You can do that using SSI.php
I do a call to template_header(); and template_footer(); with my php/html code in between. Like my example site at http://www.themezone.net which is based on SMF using SSI
Thanx for the reply.
I was hoping to avoid the use of .php
I wonder if I could use something like .html at the end.
Like:
mysite.com/whatever.html
and even add a folder:
mysite.com/folder/whatever.html
but again, using the forums header and footer.
You cannot do it using .html since SMF is written in PHP - and unless you simply copy/paste the code from a page in the browser, you'll have to use .php.
if you can edit your .htaccess file, then it might be possible to get the server to parse html pages as php
Add the folowing to your .htaccess file.
AddHandler application/x-httpd-php .html
Heres what im shooting for...
i got a wordpress page:
http://chevyavalancheclub.com/specs/
I would like to somehow integrate SMF header and footer on it.
No more no less. Not looking to add same registered users or nothing like that.
I used iframes and custom action but it didnt cut the cake for me.
Can it be done?
In your theme, include SSI.php as the very first line.
Then, call template_header() and template_footer() in the theme in the places you want them to be.
That's the only way it can be done.
Ok. I created a test folder/page in PHP
http://www.chevyavalancheclub.com/chevyavalanche/index.php
Ive been picking my brain on this one. My forum is set at 100% but why this test page is in narrow?
Any ideas?
Im using this code:
<?php require("/home/**********/public_html/SSI.php"); ?>
<?php template_header(); ?>
TEST
<?php template_footer(); ?>
Because that's how the theme makes the page, just like it does in the forum and other pages.
Quote from: Arantor on September 01, 2009, 10:17:12 PM
Because that's how the theme makes the page, just like it does in the forum and other pages.
Yeah but i changed the forum to 100% in the .css file.
See,...i use 2 themes (same ones).
One for the front page to keep it narrow and the other wide for the forums and all pages.
If you mean the table is 100%... it's 100% of its parent - which is limited in the theme.
Quote from: Arantor on September 01, 2009, 10:25:00 PM
If you mean the table is 100%... it's 100% of its parent - which is limited in the theme.
Well that sucks lol. I love the wide look.
The only way around it is to modify the parent's CSS - which means altering the rest of the theme code.
Hi Guys,
first I'll have to blow the dust away for a bit. ;)
The code:
<?php require("/home/**********/public_html/SSI.php"); ?>
<?php template_header(); ?>
TEST
<?php template_footer(); ?>
Works great for me.
However, I want the page to be viewed only bij logged in users.
Guest should get the login page.
Can I add a simple line of code, like the header and footer?
The page I want to call is http://www.mydomain.com/forum/news.php
Thanks and sorry for the big kick ;D
Actually, yeah you can.
Simply add the following line after the SSI.php statement.
<?php is_not_guest(); ?>
You can be cleaner by not having so many multiple <?php blocks:
<?phprequire("/home/**********/public_html/SSI.php");is_not_guest();template_header();?>
test
<?php template_footer(); ?>
Thanks a million!
That worked great.
You can also add a page title to it...
SMF 2.0
$context['page_title_html_safe'] = 'title of the page goes here';
SMF 1.1.x
$context['page_title']= 'title of the page goes here';