?> " lang="<?php echo $this->language; ?> " class="<?php echo $htheme; ?> ie ie9"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="<?php echo $htheme . ' ' . $browser->name() . ' ' . $browser->name() . $browser->major(); ?> "> <!--<![endif]--> <head> <meta name="viewport" content="width=device-width" /> <jdoc:include type="head" /> <script type="text/javascript" src="<?php echo str_replace('/core', '', $this->baseurl); ?> /core/assets/js/jquery.uniform.min.js"></script> <script type="text/javascript" src="<?php echo $this->baseurl; ?> /templates/<?php
*/ defined('_HZEXEC_') or die; // get needed objects $group = \Hubzero\User\Group::getInstance(Request::getCmd('cn', '')); // return url (if any) $return = '/' . trim(str_replace(Request::base(), '', Request::current()), '/'); // include frameworks Html::behavior('framework', true); Html::behavior('modal'); // include group script $this->addScript($this->baseurl . '/templates/' . $this->template . '/js/hub.js'); $this->addScript($this->baseurl . '/templates/' . $this->template . '/js/group.js'); // get browser agent $browser = new \Hubzero\Browser\Detector(); $p = strtolower(str_replace(' ', '', $browser->platform())); $b = $browser->name(); $v = $browser->major(); // determine if we are a group member or manager $isMember = false; $isManager = false; $isPending = false; $isInvitee = false; if (in_array(User::get('id'), $group->get('managers'))) { $isManager = true; } elseif (in_array(User::get('id'), $group->get('members'))) { $isMember = true; } elseif (in_array(User::get('id'), $group->get('applicants'))) { $isPending = true; } elseif (in_array(User::get('id'), $group->get('invitees'))) { $isInvitee = true; }
* * HUBzero is a registered trademark of Purdue University. * * @package hubzero-cms * @author Shawn Rice <*****@*****.**> * @copyright Copyright 2005-2015 HUBzero Foundation, LLC. * @license http://opensource.org/licenses/MIT MIT */ // No direct access defined('_HZEXEC_') or die; Html::behavior('framework', true); Html::behavior('modal'); $this->addScript($this->baseurl . '/templates/' . $this->template . '/js/hub.js?v=' . filemtime(__DIR__ . '/js/hub.js')); $menu = App::get('menu'); $browser = new \Hubzero\Browser\Detector(); $cls = array($this->direction, $browser->name(), $browser->name() . $browser->major(), $menu->getActive() == $menu->getDefault() ? 'home' : ''); $this->setTitle(Config::get('sitename') . ' - ' . $this->getTitle()); ?> <!DOCTYPE html> <!--[if lt IE 7 ]> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="<?php echo $this->direction; ?> ie ie6"> <![endif]--> <!--[if IE 7 ]> <html dir="<?php echo $this->direction;
<?php if ($this->isAuthorised) { ?> <p class="admin"><a class="btn icon-edit" href="<?php echo Route::url($this->base . '&action=edit'); ?> "><?php echo Lang::txt('JACTION_EDIT'); ?> </a></p> <?php } ?> <?php if ($browser->name() != 'chrome') { ?> <p class="warning">Note: Windows Tools require the use of the Chrome web browser only.</p> <?php } ?> <?php if ($content = $this->page->get('content')) { ?> <?php echo $content; } else { ?> <ol> <li>Click <strong>Launch Tool</strong>
<?php defined('_JEXEC') or die('Restricted access'); $config = JFactory::getConfig(); $juser = JFactory::getUser(); $this->template = 'alveo2015'; $lang = JFactory::getLanguage(); $lang->load('tpl_' . $this->template); $browser = new \Hubzero\Browser\Detector(); $cls = array($browser->name(), $browser->name() . $browser->major()); ?> <!DOCTYPE html> <!--[if lt IE 7 ]> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="<?php echo implode(' ', $cls); ?> ie ie6"> <![endif]--> <!--[if IE 7 ]> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="<?php echo implode(' ', $cls); ?>
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * HUBzero is a registered trademark of Purdue University. * * @package hubzero-cms * @author Shawn Rice <*****@*****.**> * @copyright Copyright 2005-2015 HUBzero Foundation, LLC. * @license http://opensource.org/licenses/MIT MIT */ // No direct access defined('_HZEXEC_') or die; Html::behavior('framework', true); // Get browser info to set some classes $browser = new \Hubzero\Browser\Detector(); $cls = array('no-js', $browser->name(), $browser->name() . $browser->major(), $this->direction); ?> <!DOCTYPE html> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="<?php echo implode(' ', $cls); ?> "> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <link rel="stylesheet" type="text/css" media="all" href="<?php
/** * Compute the files to be include * * @param string $folder folder name to search into (images, css, js, ...) * @param string $file path to file * @param boolean $relative path to file is relative to /core folder * @param boolean $detect_browser detect browser to include specific browser files * @param boolean $detect_debug detect debug to include compressed files if debug is on * @return array files to be included */ protected static function includeRelativeFiles($folder, $file, $relative, $detect_browser, $detect_debug) { // If http is present in filename if (strpos($file, 'http') === 0) { $includes = array($file); } else { $root = rtrim(App::get('request')->root(true), '/'); // Extract extension and strip the file $strip = preg_replace('/\\.[^.]*$/', '', $file); $ext = App::get('filesystem')->extension($file); // Detect browser and compute potential files if ($detect_browser) { $navigator = new \Hubzero\Browser\Detector(); $browser = $navigator->name(); $major = $navigator->major(); $minor = $navigator->minor(); // Try to include files named filename.ext, filename_browser.ext, filename_browser_major.ext, filename_browser_major_minor.ext // where major and minor are the browser version names $potential = array($strip, $strip . '_' . $browser, $strip . '_' . $browser . '_' . $major, $strip . '_' . $browser . '_' . $major . '_' . $minor); } else { $potential = array($strip); } // If relative search in template directory or media directory if ($relative) { // Get the template $template = App::get('template')->template; // Prepare array of files $includes = array(); // For each potential files foreach ($potential as $strip) { $files = array(); // Detect debug mode if ($detect_debug && App::get('config')->get('debug')) { $files[] = $strip . '-uncompressed.' . $ext; } $files[] = $strip . '.' . $ext; // Loop on 1 or 2 files and break on first found foreach ($files as $file) { // If the file is in the template folder if (file_exists(JPATH_THEMES . "/{$template}/{$folder}/{$file}")) { $includes[] = App::get('request')->base(true) . "/templates/{$template}/{$folder}/{$file}"; break; } else { // If the file contains any /: it can be in an media extension subfolder if (strpos($file, '/')) { // Divide the file extracting the extension as the first part before / list($extension, $file) = explode('/', $file, 2); // If the file yet contains any /: it can be a plugin if (strpos($file, '/')) { // Divide the file extracting the element as the first part before / list($element, $file) = explode('/', $file, 2); // Try to deal with plugins group in the media folder if (file_exists(PATH_ROOT . "/core/{$extension}/{$element}/{$folder}/{$file}")) { $includes[] = $root . "/core/{$extension}/{$element}/{$folder}/{$file}" . '?v=' . filemtime(PATH_ROOT . "/core/{$extension}/{$element}/{$folder}/{$file}"); break; } elseif (file_exists(PATH_ROOT . "/core/{$extension}/{$folder}/{$element}/{$file}")) { $includes[] = $root . "/core/{$extension}/{$folder}/{$element}/{$file}" . '?v=' . filemtime(PATH_ROOT . "/core/{$extension}/{$folder}/{$element}/{$file}"); break; } elseif (file_exists(JPATH_THEMES . "/{$template}/{$folder}/system/{$element}/{$file}")) { $includes[] = $root . "/templates/{$template}/{$folder}/system/{$element}/{$file}" . '?v=' . filemtime(JPATH_THEMES . "/{$template}/{$folder}/system/{$element}/{$file}"); break; } elseif (file_exists(PATH_ROOT . "/core/assets/{$folder}/{$element}/{$file}")) { $includes[] = $root . "/core/assets/{$folder}/{$element}/{$file}" . '?v=' . filemtime(PATH_ROOT . "/core/assets/{$folder}/{$element}/{$file}"); break; } } elseif (file_exists(PATH_ROOT . "/core/{$extension}/{$folder}/{$file}")) { $includes[] = $root . "/core/{$extension}/{$folder}/{$file}" . '?v=' . filemtime(PATH_ROOT . "/core/{$extension}/{$folder}/{$file}"); break; } elseif (file_exists(JPATH_THEMES . "/{$template}/{$folder}/system/{$file}")) { $includes[] = $root . "/templates/{$template}/{$folder}/system/{$file}" . '?v=' . filemtime(JPATH_THEMES . "/{$template}/{$folder}/system/{$file}"); break; } elseif (file_exists(PATH_ROOT . "/core/assets/{$folder}/{$file}")) { $includes[] = $root . "/core/assets/{$folder}/{$file}" . '?v=' . filemtime(PATH_ROOT . "/core/assets/{$folder}/{$file}"); break; } } elseif (file_exists(PATH_ROOT . "/core/assets/{$folder}/{$file}")) { $includes[] = $root . "/core/assets/{$folder}/{$file}" . '?v=' . filemtime(PATH_ROOT . "/core/assets/{$folder}/{$file}"); break; } } } } } else { $includes = array(); foreach ($potential as $strip) { // Detect debug mode if ($detect_debug && App::get('config')->get('debug') && file_exists(PATH_ROOT . "/{$strip}-uncompressed.{$ext}")) { $includes[] = $root . "/{$strip}-uncompressed.{$ext}"; } elseif (file_exists(PATH_ROOT . "/{$strip}.{$ext}")) { $includes[] = $root . "/{$strip}.{$ext}"; } } } } return $includes; }
" class="ie ie8"> <![endif]--> <!--[if IE 9 ]> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="ie ie9"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="<?php echo $browser->name() . ' ' . $browser->name() . $browser->major(); ?> "> <!--<![endif]--> <head> <meta name="viewport" content="width=device-width" /> <jdoc:include type="head" /> <script type="text/javascript" src="<?php echo $this->baseurl; ?> /templates/<?php echo $this->template; ?> /js/placeholder.js"></script>
</div> <input type="hidden" name="referer" value="<?php echo Request::getVar('HTTP_REFERER', NULL, 'server'); ?> " /> <input type="hidden" name="os" value="<?php echo $browser->platform(); ?> " /> <input type="hidden" name="osver" value="<?php echo $browser->platformVersion(); ?> " /> <input type="hidden" name="browser" value="<?php echo $browser->name(); ?> " /> <input type="hidden" name="browserver" value="<?php echo $browser->version(); ?> " /> <input type="hidden" name="hostname" value="<?php echo gethostbyaddr(Request::getVar('REMOTE_ADDR', '', 'server')); ?> " /> <input type="hidden" name="uas" value="<?php echo Request::getVar('HTTP_USER_AGENT', '', 'server'); ?> " />
/** * Check if the plugin can render for the provided browser * * @return boolean */ protected function canRender() { $browser = new \Hubzero\Browser\Detector(); if ($allowed = trim($this->params->get('browsers'))) { $browsers = array(); $allowed = str_replace("\r", '', $allowed); $allowed = str_replace('\\n', "\n", $allowed); $allowed = explode("\n", $allowed); foreach ($allowed as $allow) { $allow = trim($allow); if (preg_match('/(.+?),\\s+([^\\s]+)\\s+(\\d+)\\.(\\d+)/i', $allow, $matches)) { $req = new stdClass(); $req->name = strtolower(trim($matches[2])); $req->major = intval($matches[3]); $req->minor = intval($matches[4]); $req->os = strtolower(trim($matches[1])); $browsers[] = $req; } } $matched = false; foreach ($browsers as $minimum) { if ($minimum->os != '*' && $minimum->os != strtolower($browser->platform())) { continue; } if ($minimum->name != strtolower($browser->name())) { continue; } // If we get to here, we have a matching OS and browser if ($minimum->major > $browser->major()) { return false; } if ($minimum->major == $browser->major() && $minimum->minor > $browser->minor()) { return false; } $matched = true; } if (!$matched) { return false; } } if ($regexes = trim($this->params->get('regexes'))) { $regexes = str_replace("\r", '', $regexes); $regexes = str_replace('\\n', "\n", $regexes); $regexes = explode("\n", $regexes); foreach ($regexes as $disallow) { $disallow = trim($disallow); if (preg_match("/{$disallow}/i", $browser->agent(), $matches)) { return false; } } } return true; }
?> " lang="<?php echo $this->language; ?> " class="<?php echo $this->direction; ?> ie ie9"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="<?php echo $this->direction . ' ' . $browser->name() . ' ' . $browser->name() . $browser->major(); ?> "> <!--<![endif]--> <head> <meta name="viewport" content="width=device-width" /> <link type="text/css" rel="stylesheet" href="<?php echo $this->baseurl; ?> /templates/<?php echo $this->template; ?> /css/error.css?v=<?php echo filemtime(__DIR__ . DS . 'css' . DS . 'error.css'); ?> " />
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * HUBzero is a registered trademark of Purdue University. * * @package hubzero-cms * @author Shawn Rice <*****@*****.**> * @copyright Copyright 2005-2015 HUBzero Foundation, LLC. * @license http://opensource.org/licenses/MIT MIT */ // No direct access defined('_HZEXEC_') or die; $this->template = 'hubbasic2013'; Lang::load('tpl_' . $this->template) || Lang::load('tpl_' . $this->template, __DIR__); $browser = new \Hubzero\Browser\Detector(); $cls = array($this->direction, $browser->name(), $browser->name() . $browser->major()); ?> <!DOCTYPE html> <!--[if lt IE 7 ]> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="<?php echo $this->direction; ?> ie ie6"> <![endif]--> <!--[if IE 7 ]> <html dir="<?php echo $this->direction; ?>
// Load theme $color1 = str_replace('#', '', $this->params->get('colorPrimary', '2f8dc9')); // 2f8dc9 171a1f $color2 = str_replace('#', '', $this->params->get('colorSecondary', '2f8dc9')); $bground = $this->params->get('background', 'delauney'); $hash = md5($color1 . $bground . $color2); $p = substr(PATH_APP, strlen(PATH_ROOT)); $path = '/templates/' . $this->template . '/css/theme.php?path=' . urlencode($p) . '&color1=' . $color1 . '&color2=' . $color2 . '&background=' . $bground; if (file_exists(PATH_APP . '/cache/site/' . $hash . '.css')) { $path = '/cache/site/' . $hash . '.css'; } $this->addStyleSheet($this->baseurl . $path); // Get browser info to set some classes $menu = App::get('menu'); $browser = new \Hubzero\Browser\Detector(); $cls = array('no-js', $browser->name(), $browser->name() . $browser->major(), $this->direction, $this->params->get('header', 'light'), $menu->getActive() == $menu->getDefault() ? 'home' : ''); // Prepend site name to document title $this->setTitle(Config::get('sitename') . ' - ' . $this->getTitle()); ?> <!DOCTYPE html> <html dir="<?php echo $this->direction; ?> " lang="<?php echo $this->language; ?> " class="<?php echo implode(' ', $cls); ?> "> <head>
function modChrome_outline($module, &$params, &$attribs) { static $css = false; if (!$css) { $css = true; $browser = new \Hubzero\Browser\Detector(); $doc = App::get('document'); $doc->addStyleDeclaration(".mod-preview-info { padding: 2px 4px 2px 4px; border: 1px solid black; position: absolute; background-color: white; color: red;}"); $doc->addStyleDeclaration(".mod-preview-wrapper { background-color:#eee; border: 1px dotted black; color:#700;}"); if ($browser->name() == 'ie') { if ($browser->major() <= 7) { $doc->addStyleDeclaration(".mod-preview-info {filter: alpha(opacity=80);}"); $doc->addStyleDeclaration(".mod-preview-wrapper {filter: alpha(opacity=50);}"); } else { $doc->addStyleDeclaration(".mod-preview-info {-ms-filter: alpha(opacity=80);}"); $doc->addStyleDeclaration(".mod-preview-wrapper {-ms-filter: alpha(opacity=50);}"); } } else { $doc->addStyleDeclaration(".mod-preview-info {opacity: 0.8;}"); $doc->addStyleDeclaration(".mod-preview-wrapper {opacity: 0.5;}"); } } ?> <div class="mod-preview"> <div class="mod-preview-info"><?php echo $module->position . "[" . $module->style . "]"; ?> </div> <div class="mod-preview-wrapper"> <?php echo $module->content; ?> </div> </div> <?php }