echo "<a href=\"http://midgard-project.org/midgard2/\">Midgard2</a>"; } else { echo "<a href=\"http://midgard-project.org/midgard1/\">Midgard</a>"; } ?> </td> <td><?php echo mgd_version(); ?> </td> <td>Content Repository</td> </tr> <tr> <td><a href="http://midgard-project.org/midcom/">MidCOM</a></td> <td><?php echo midcom::get_version(); ?> </td> <td>Component Framework for PHP</td> </tr> <tr> <td><a href="http://www.php.net/">PHP</a></td> <td><?php echo phpversion(); ?> </td> <td>Web programming language</td> </tr> <?php // FIXME: IIRC, there was a function for getting this info $server_software = explode(' ', $_SERVER['SERVER_SOFTWARE']);
/** * Populates appropriate metadata into XHTML documents based on metadata information * available to MidCOM for the request. */ function populate_meta_head() { // Populate the request metadata into view $request_metadata = $this->get_request_metadata(); // HTML generator information midcom::get('head')->add_meta_head(array('name' => 'generator', 'content' => 'Midgard/' . mgd_version() . ' MidCOM/' . midcom::get_version() . ' PHP/' . phpversion())); // PermaLink into machine-detectable format midcom::get('head')->add_link_head(array('rel' => 'bookmark', 'href' => $request_metadata['permalink'])); // Last revision time for the entire page if ($request_metadata['lastmodified']) { midcom::get('head')->add_meta_head(array('name' => 'lastupdated', 'content' => @gmdate('Y-m-d H:i:s\\Z', $request_metadata['lastmodified']))); } // If an object has been bound we have more information available $view_metadata = $this->get_view_metadata(); if ($view_metadata) { foreach ($GLOBALS['midcom_config']['metadata_head_elements'] as $property => $metatag) { $content = $view_metadata->get($property); if ($content) { // Handle date fields switch ($property) { case 'published': case 'created': case 'revised': case 'approved': case 'locked': $content = gmdate('Y-m-d', (int) $content); break; } midcom::get('head')->add_meta_head(array('name' => $metatag, 'content' => $content)); } } // TODO: Add support for tags here if ($GLOBALS['midcom_config']['metadata_opengraph']) { $this->_add_opengraph_metadata($view_metadata); } if ($GLOBALS['midcom_config']['positioning_enable']) { // Load the positioning library midcom::get('componentloader')->load_library('org.routamc.positioning'); // Display position metadata $object_position = new org_routamc_positioning_object($view_metadata->object); $object_position->set_metadata(); } } }
public function get_component_version($component) { if ($component == 'midcom') { return midcom::get_version(); } if (!$this->is_installed($component) || !isset($this->manifests[$component]->version)) { return null; } return $this->manifests[$component]->version; }