// generating links to items/archives/... (e.g. catid)\r
private $linkparams;\r
\r
- // reference to the skin object for which a part is being parsed\r
- private $skin;\r
- \r
// used when including templated forms from the include/ dir. The $formdata var\r
// contains the values to fill out in there (assoc array name -> value)\r
private $formdata;\r
}\r
\r
/**\r
- * Actions::setSkin()\r
- * Set the skin\r
- * @param object $skin an instance of Skin class\r
- * @return void\r
- */\r
- public function setSkin(&$skin)\r
- {\r
- $this->skin =& $skin;\r
- return;\r
- }\r
- \r
- /**\r
* Actions::doForm()\r
* Forms get parsedincluded now, using an extra <formdata> skinvar\r
*\r
*/\r
public function parse_skinname()\r
{\r
- echo $this->skin->getName();\r
+ echo $this->parser->skin->getName();\r
return;\r
}\r
\r
$this->postBlogContent('sticky',$b);\r
return;\r
}\r
-}
\ No newline at end of file
+}\r
* BaseActions::parse_parsedinclude()
* parsed include
*
- * @param string $filename filename to be included
+ * @param string $name filename to be included
* @return void
*/
- public function parse_parsedinclude($filename)
+ public function parse_parsedinclude($name)
{
// check current level
if ( $this->level > 3 )
return;
}
- $file = $this->getIncludeFileName($filename);
-
- if ( !file_exists($file) )
+ $file = $this->getIncludeFileName($name);
+ if ( !file_exists($file) && $this->parser->skin != NULL)
{
- return;
+ $contents = $this->parser->skin->getContentFromDB($name);
+ }
+ else
+ {
+ $contents = file_get_contents($file);
}
-
- $contents = file_get_contents($file);
if ( empty($contents) )
{
// reference to actions handler\r
public $handler;\r
\r
+ // reference to an instance of Skin class\r
+ public $skin = NULL;\r
+ \r
// delimiters that can be used for skin/templatevars\r
public $delim;\r
\r
$this->pdelim = $pdelim;\r
$this->norestrictions = 0; // set this to 1 to disable checking for allowedActions\r
\r
+ $this->skin = NULL;\r
+ \r
$handler->setParser($this);\r
\r
return;\r
}\r
\r
$actionlc = strtolower($action);\r
+ \r
// skip execution of skinvars while inside an if condition which hides this part of the page\r
$if_tags = array('else', 'elseif', 'endif', 'ifnot', 'elseifnot');\r
if ( !$this->handler->getTopIfCondition()\r
}\r
\r
/**\r
+ * Parser::setSkin()\r
+ * Set the skin\r
+ * @param object $skin an instance of Skin class\r
+ * @return void\r
+ */\r
+ public function setSkin(&$skin)\r
+ {\r
+ $this->skin = &$skin;\r
+ return;\r
+ }\r
+ \r
+ /**\r
* Parser::setProperty()\r
* Set a property of the parser in the manager\r
* \r
\r
// register action handler to parser\r
$parser = new Parser($handler);\r
+ $parser->setSkin($this);\r
$parser->parse($contents);\r
\r
$data = array(