Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:$Context->ObjectFactory->SetReference("MyNeatClass", "AnotherClass"); $Context->ObjectFactory->SetReference("Head", "ManualHead");
class ManualHead extends Head {
function Render(){
$this->Context->Writer->Add("test");
}
}
function Head(&$Context) {
$this->Context = &$Context;
}
function ManualHead(&$Context) {
$this->Context = &$Context;
}
class ManualHead extends Head {
function Render(){
$this->Context->Writer->Add("test");
}
}
$Context->ObjectFactory->SetReference("Head", "ManualHead");
function Render() {
$this->Context->Writer->Add("<".chr(63)."xml version=\"1.0\" encoding=\"utf-8\"".chr(63).">
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-ca\">
<head>
<title>".agAPPLICATION_TITLE." - ".$this->Context->PageTitle."</title>
<link rel=\"shortcut icon\" href=\"/favicon.ico\" />");
if (is_array($this->StyleSheets)) {
$StyleSheetCount = count($this->StyleSheets);
for ($i = 0; $i < $StyleSheetCount; $i++) {
$this->Context->Writer->Add("\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"".$this->StyleSheets[$i]["Sheet"]."\"".($this->StyleSheets[$i]["Media"] == ""?"":" media=\"".$this->StyleSheets[$i]["Media"]."\"")." />");
}
}
if (is_array($this->Scripts)) {
$ScriptCount = count($this->Scripts);
for ($i = 0; $i < $ScriptCount; $i++) {
$this->Context->Writer->Add("\r\n<script type=\"text/javascript\" src=\"".$this->Scripts[$i]."\"></script>");
}
}
if (is_array($this->Strings)) {
$StringCount = count($this->Strings);
for ($i = 0; $i < $StringCount; $i++) {
$this->Context->Writer->Add($this->Strings[$i]);
}
}
$this->Context->Writer->Write("</head>
<body".$this->Context->BodyAttributes."><div id=\"header\"><!-- A menu, a few divs etc --></div>
");
}
$this->Context->Writer->Add("<".chr(63)."xml version=\"1.0\" encoding=\"utf-8\"".chr(63).">
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-ca\">
$MyObj = $Context->ObjectFactory->NewContextObject($Context, "MyClass");
$Page->AddControl("Head_Render", $MyObj);
<?php
/*
Extension Name: Change the header
Extension Url: http://lussumo.com/docs/
Description: Allows you to manually edit the header of Vanilla forums
Version: 1.0
Author: Martin Sweeney
Author Url: http://martini.me.uk/
*/
class ManualHead {
var $Context;
function ManualHead (&$Context) {
$this->Context = &$Context;
}
function Render() {
$this->Context->Writer->Write("Hello :-)");
}
}
$ManualHead = $Context->ObjectFactory->NewContextObject($Context, "ManualHead");
$Page->AddControl("Menu_Render", $ManualHead);
?>
1 to 11 of 11