SSI

Started by MultiformeIngegno, March 05, 2010, 12:46:42 PM

Previous topic - Next topic

MultiformeIngegno

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...
RockCiclopedia (wiki - forum - tv)
Tutta la storia del rock, scritta da voi ...

...iscriviti al feed di RockCiclopedia dedicato alle ultime news del mondo della musica!

cσσкιє мσηѕтєя

Use $context['page_title']:

$context['page_title'] = 'Custom title';

MultiformeIngegno

#2
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(); "?
RockCiclopedia (wiki - forum - tv)
Tutta la storia del rock, scritta da voi ...

...iscriviti al feed di RockCiclopedia dedicato alle ultime news del mondo della musica!

Bᵃ

This is not a good place to get SMF support. :) You should check out the SMF community for that.

B

Conquer Club - Free Global Domination Game
Think the board game Risk on steroids!

MultiformeIngegno

No probs.... only... fast question, what happens when I add

global $context;


..?
RockCiclopedia (wiki - forum - tv)
Tutta la storia del rock, scritta da voi ...

...iscriviti al feed di RockCiclopedia dedicato alle ultime news del mondo della musica!

Bᵃ

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

Conquer Club - Free Global Domination Game
Think the board game Risk on steroids!