e538d65f710c830cb12383fb162775f5229232eb
Benjamin Renard Initial commit

Benjamin Renard authored 12 years ago

main.php               1) <?php
main.php               2) /**
main.php               3)  * Project infos plugin for ViewGit.
main.php               4)  *
main.php               5)  * This add project infos on summary page.
main.php               6)  *
main.php               7)  * @author Benjamin Renard <brenard@easter-eggs.com>
main.php               8)  */
main.php               9) class ProjectInfosPlugin extends VGPlugin
main.php              10) {
main.php              11) 	function __construct() {
Benjamin Renard Put CSS in separated file

Benjamin Renard authored 11 years ago

projectinfos/main.php 12) 		$this->register_hook('header');
Benjamin Renard Initial commit

Benjamin Renard authored 12 years ago

main.php              13) 		$this->register_hook('summary');
main.php              14) 	}
main.php              15) 
main.php              16) 	function hook_summary() {
main.php              17) 		global $page;
main.php              18) 		$page['project_infos']=get_project_info($page['project']);
Benjamin Renard Fixed convertion of non arr...

Benjamin Renard authored 11 years ago

main.php              19) 		if (isset($page['project_infos']['url']) && !is_array($page['project_infos']['url'])) {
main.php              20) 			$page['project_infos']['url']=array($page['project_infos']['url']);
Benjamin Renard Initial commit

Benjamin Renard authored 12 years ago

main.php              21) 		}
main.php              22) 		$this->display_plugin_template('summary', FALSE);
main.php              23) 	}
main.php              24) 
main.php              25) 	function hook($type) {
main.php              26) 		global $conf;
Benjamin Renard Put CSS in separated file

Benjamin Renard authored 11 years ago

projectinfos/main.php 27)                 if ($type == 'header') {
projectinfos/main.php 28)                         echo "\t<link rel='stylesheet' href='plugins/projectinfos/style.css' type='text/css' />\n";
projectinfos/main.php 29)                 }
projectinfos/main.php 30) 		elseif ($type == 'summary') {