SimpleDesk

Community => General Discussion => Topic started by: MultiformeIngegno on March 05, 2010, 12:46:42 PM

Title: SSI
Post by: MultiformeIngegno on March 05, 2010, 12:46:42 PM
Hi all! :)
Sorry to post this here... I need little advices.. :D

I use this code (of course I require this 2 files in another php file):

header.php:

<?php
error_reporting
(E_ALL);

// Which Theme are we using?
$ssi_theme 1;

$context['outside_forum'] = true;
$ssi_maintenance_off true;

// Layers to be utilized
$ssi_layers = array('html');

// Change "true" to "false" to disable Gzip if not supported on your server
$ssi_gzip true;

//This is the SSI.php file in the Board dir.
require('mypath/SSI.php');
?>



footer.php:

<?php
ssi_shutdown
();
?>



How can I specify a <title>Custom Title</title>? <head> tags appear already.. I can't simply add it after requiring header.php...
Title: Re: SSI
Post by: cσσкιє мσηѕтєя on March 05, 2010, 12:53:34 PM
Use $context['page_title']:

$context['page_title'] = 'Custom title';
Title: Re: SSI
Post by: MultiformeIngegno on March 05, 2010, 01:54:00 PM
Quote from: Nas on March 05, 2010, 12:53:34 PM
Use $context['page_title']:
Thanks! It works!! :)
Is there something that lists all the "context" we can use? Functions are well documented (ssi_examples, etc..) but not the same for contexts...
http://docs.simplemachines.org/index.php?topic=789.0

Another info: when do I use " $ssi_layers = array('html', 'body'); " and when " template_header(); "? Aren't they the same..?
.. and " setupThemeContext(); "?
Title: Re: SSI
Post by: Bᵃ on March 05, 2010, 02:03:44 PM
This is not a good place to get SMF support. :) You should check out the SMF community (http://www.simplemachines.org/community) for that.

B
Title: Re: SSI
Post by: MultiformeIngegno on March 05, 2010, 03:37:57 PM
No probs.... only... fast question, what happens when I add

global $context;


..?
Title: Re: SSI
Post by: Bᵃ on March 05, 2010, 03:49:29 PM
If you add it to a function, it allows the function to access the global (outside the function) version of the $context variable. Otherwise, it creates a local (inside the function) version and uses that.

B