News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

creating custom SMF-powered web pages

Started by 1MileCrash, July 17, 2005, 04:08:32 PM

Previous topic - Next topic

Elissen

You have to "end" the php section and start it again after the html

<?php
ob_start
();
$ssi_theme = 1;
$ssi_layers = array('main');
require_once(
'SSI.php');
?>
This is <b>plain</b> <i>html</i> <u>with</u> some markup.
<?php
ssi_shutdown
();

?>

1MileCrash

k.

Now, will this page work if i upload it to the a theme's directory, rather than the smf directory?

I.E.- http://mysite.com/themes/default/thepage.php
The only thing php can't do is tell you how much milk is left in the fridge.



[Unknown]

Yes, so long as you change the path to SSI.php.

But why would you upload it there?

-[Unknown]

1MileCrash

i want to upload it there for one simple reason- it will be part of a theme. If it is in the theme's directory, it can be uploaded with the theme. Very similar to the current "help" page.  :D
The only thing php can't do is tell you how much milk is left in the fridge.



1MileCrash

i finally got a chance to test this out, but why does it only work with the default theme? Even when another is set as the default, it shows it in the default theme.
The only thing php can't do is tell you how much milk is left in the fridge.



[Unknown]

You set $ssi_theme to the id of the theme to use...

We use it here with the "Simple Machines" theme ;).

-[Unknown]

1MileCrash

okay, got it.

So, i could basically use this to integrate the site into my forum, exept the other way around? For instance, what i want to do for my site is make two themes, they both look exactly alike, exept one has forum links "[profile], [help], etc. and site links on the side, and one without the forum links, but still has the site links (for the main site). So i could just create these two different themes, and use the forum with the one with [profile], [help], etc, and the custom pages with the other with just site links.
The only thing php can't do is tell you how much milk is left in the fridge.



[Unknown]

You could also do that with one theme, actually, and a few ifs.  That's what we do here.

I assume you've seen this:

Integrating the forum into your site...

-[Unknown]

1MileCrash

#28
[Unknown], i know you arent going to be happy about this, but i dont know how it happened. Everytime i attempt to create one of these pages, the copywrite just disappears. I didnt do anything to take it off. It should still be there, because even though it isnt the forum, it's still technically powered by SMF's code.

Here is the page- http://paintplayers.com/smfthemes/hi.php
Here is the forum on the same skin- http://paintplayers.com/smfthemes

How can i get it back on? What is causing this?

Edit: okay, im here to confirm that it does this with every theme. Even the SMF default theme. Is it supposed to be like this? If so, i want it back.
The only thing php can't do is tell you how much milk is left in the fridge.



1MileCrash

last quesstion.

When you say, change the path to SSI.php, do you mean something as simple as "smf/SSI.php"? Because i thought you meant something else by "path", just seemed too simple.

like this

<?php
ob_start();
$ssi_theme = 1;
$ssi_layers = array('main');
require_once('SMF/SSI.php');
?>
This is <b>plain</b> <i>html</i> <u>with</u> some markup.
<?php
ssi_shutdown();

?>
The only thing php can't do is tell you how much milk is left in the fridge.



[Unknown]

Quote from: Tippmaster on August 02, 2005, 10:15:49 AM
[Unknown], i know you arent going to be happy about this, but i dont know how it happened. Everytime i attempt to create one of these pages, the copywrite just disappears. I didnt do anything to take it off. It should still be there, because even though it isnt the forum, it's still technically powered by SMF's code.

You don't have to show the copyright *outside* the forum, just inside it.  And, actually, currently it omits it completely outside the forum - although, I've considered changing that so you can show it if you like.

Something as simple as smf/SSI.php is fine.  I would personally suggest using a full path (like /home/tipp/public_html/smf/SSI.php) but it probably won't matter.

-[Unknown]

1MileCrash

Sorry to bring this thread up again...

Is it possible to change the title of these pages? Ive tried simply doing a <title></title> in the head of my html, but that didnt work. It just takes the url of the page as the title. Is that in ssi?
The only thing php can't do is tell you how much milk is left in the fridge.



[Unknown]

$context['page_title'] = 'Test';

Try that before including SSI.php... I'm not sure that works, I don't recall offhand...

-[Unknown]

1MileCrash

The only thing php can't do is tell you how much milk is left in the fridge.



1MileCrash

#34
okay, since im using this to build my new site, ive got a question about it...

If a user is "banned" from the forum, can i "ban" them from these ssi pages as well? Or is it done this way by default? Could i do this with a simple if?
The only thing php can't do is tell you how much milk is left in the fridge.



[Unknown]

<?php

$ssi_ban = true;

require_once('SSI.php');

?>

-[Unknown]

1MileCrash

awesome.

Can i change that to a different message? I know it's probabally in index.english.php, but i want to keep that one when they try an access the forum. Or would this be diffeicult?

could i use is_banned?
The only thing php can't do is tell you how much milk is left in the fridge.



[Unknown]

Err... not really.  You need to call the is_not_banned function, which shows the error message itself, I believe.  If you don't call it, you don't know if they are banned.

-[Unknown]

1MileCrash

ahh, well. Ill justuse the same one for both the site and forum, just change the text. Thanks.
The only thing php can't do is tell you how much milk is left in the fridge.




Advertisement: