Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Variables
plugin_text_file.php File Reference

Go to the source code of this file.

Variables

 $plugin_id = elgg_extract('plugin_id', $vars)
 
 $plugin = elgg_get_plugin_from_id($plugin_id)
 
 $filename = elgg_extract('filename', $vars)
 
 $error = false
 
if(!$plugin) $text_files = $plugin->getAvailableTextFiles()
 
if(!array_key_exists($filename,
$text_files)) 
$file = $text_files[$filename]
 
 $file_contents = file_get_contents($file)
 
if(!$file_contents) if($error$title = $plugin->getManifest()->getName() . ": $filename"
 
 $text = MarkdownExtra::defaultTransform($file_contents)
 
 $body
 

Variable Documentation

$body
Initial value:
= elgg_view_layout('admin', array(
'content' => '<div class="elgg-markdown">' . $text . '</div>',
'title' => $title
))
elgg_view_layout($layout_name, $vars=array())
Displays a layout with optional parameters.
Definition: views.php:679
if(!$file_contents) if($error) $title

Definition at line 48 of file plugin_text_file.php.

$error = false

Definition at line 15 of file plugin_text_file.php.

if (!array_key_exists($filename, $text_files)) $file = $text_files[$filename]

Definition at line 29 of file plugin_text_file.php.

$file_contents = file_get_contents($file)

Definition at line 30 of file plugin_text_file.php.

$filename = elgg_extract('filename', $vars)

Definition at line 6 of file plugin_text_file.php.

$plugin = elgg_get_plugin_from_id($plugin_id)

Definition at line 4 of file plugin_text_file.php.

$plugin_id = elgg_extract('plugin_id', $vars)

Definition at line 3 of file plugin_text_file.php.

$text = MarkdownExtra::defaultTransform($file_contents)

Definition at line 46 of file plugin_text_file.php.

if (!$plugin) $text_files = $plugin->getAvailableTextFiles()

Definition at line 23 of file plugin_text_file.php.

if (!$file_contents) if ($error) $title = $plugin->getManifest()->getName() . ": $filename"

Definition at line 43 of file plugin_text_file.php.