Пример #1
0
 public function executeAbout()
 {
     //require_once('lib/markdown.php');
     $file = sfConfig::get('app_directorio_modulos') . '/content/data/about_' . $this->getUser()->getCulture() . '.txt';
     if (!is_readable($file)) {
         $file = sfConfig::get('app_directorio_modulos') . '/content/data/about_es.txt';
     }
     $this->html = sfMarkdown::doConvertFile($file);
     //$this->getResponse()->setTitle('askeet! » about');
 }
Пример #2
0
 public function executeDoc(sfWebRequest $request)
 {
     $file = sfConfig::get('sf_data_dir') . '/docs/' . $request->getParameter('page') . '.txt';
     $this->html = sfMarkdown::doConvertFile($file);
     $this->getResponse()->setTitle('Bee Project - ' . $request->getParameter('page'));
 }
Пример #3
0
/**
 * Convert Markdown file content to HTML
 *
 * Right now, this is simply a bridge to sfMarkdown class static functions.
 * I have some interesting ideas for the future.
 *
 * @param   string  $file
 * @return  string
 * @see     sfMarkdown::doConvertFile()
 */
function convert_markdown_file($file)
{
    return sfMarkdown::doConvertFile($file);
}