• Welcome to Simple Machines Community Forum. Please login or sign up.
September 20, 2021, 05:11:21 PM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


Can I use SSI this way...?

Started by Daktyl198, November 06, 2012, 01:09:07 PM

Previous topic - Next topic

Daktyl198

I swear that I've seen an answer to this somewhere before, but I tried searching and nothing came up.

Basically: I have php code where the only styling is to the text. I tried making/integrating this page using SimplePortal's page functions as I have made several HTML pages using it just fine, but when I click submit on the form, I get redirected to the home page (despite the variable ?page=pagetitle still being set).

So I was wondering if I could use SSI code to give the page the same header, background, and footer as my forum but have the content in the middle be my PHP code?

Kindred

Have you looked at this?
http://wiki.simplemachines.org/smf/Add_a_custom_action_using_integration_hooks


Although that wiki page seems to be missing references to template_main_above() and template_main_below()
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Daktyl198

Hmm... I think you're misunderstanding something.
I don't want to add the file to my forums as an action: I just want the page to LOOK like my forums.

That link is focused on adding a function to the forums via integration hooks...

Kindred

yes, I know... it seemed to be the easiest way to do what you are asking...

as I said, though, check out using template_main_above() and template_main_below()
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Daktyl198

oh.... hmm...

The last time I saw this brought up, I didn't have a need for it v.v

On that thread it said that you just had to add a specific SSI call above and below your code in your file and it would get the needed stuff :/

Kindred

no... I don't think that there was ever an SSI call for header and footer...

This seems to work for me


<?php
 
require_once('SSI.php');
 
template_html_above();
  
template_body_above();
  
 echo 
'
   <hr />
   This would be the content sections of the page
   <hr />
   '
;
  
   
template_body_below();
  
template_html_below();
    
 
?>


http://test.turtleshellprod.com/test_page.php
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Daktyl198

That certainly worked. Unfortunately, I'm having the same issue as before. I'll create a separate thread for that though, because it doesn't seem to be limited to this file.

Kill Em All

I'll mark this topic solved then. Feel free to mark it unsolved if you have any further questions. :)


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Daktyl198

Oh thanks, I was just about to do that >.<

Advertisement: