Exemple #1
0
 * 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);
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 
Exemple #2
0
if ($theme = $this->params->get('theme')) {
    if ($theme == 'custom') {
        $color = $this->params->get('color');
        $this->addStyleDeclaration(include_once __DIR__ . DS . 'css' . DS . 'themes' . DS . 'custom.php');
    } else {
        if ($theme != 'gray') {
            $this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/themes/' . $theme . '.css');
        }
    }
}
// Load language direction CSS
if ($this->direction == 'rtl') {
    $this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/common/rtl.css');
}
$htheme = $this->params->get('header', 'light');
$browser = new \Hubzero\Browser\Detector();
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html dir="<?php 
echo $this->direction;
?>
" lang="<?php 
echo $this->language;
?>
" class="<?php 
echo $htheme;
?>
 ie ie6"> <![endif]-->
<!--[if IE 7 ]>    <html dir="<?php 
echo $this->direction;
?>
<?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);
?>
Exemple #4
0
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
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'))) {
Exemple #5
0
 /**
  * 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;
 }
Exemple #6
0
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2015 Purdue University. All rights reserved.
 * @license   http://www.gnu.org/licenses/lgpl-3.0.html LGPLv3
 */
// No direct access
defined('_HZEXEC_') or die;
$this->css();
$browser = new \Hubzero\Browser\Detector();
?>
<h3 class="section-header">
	<?php 
echo Lang::txt('PLG_RESOURCES_WINDOWSTOOLS');
?>
</h3>

<?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');
Exemple #7
0
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access.
defined('_HZEXEC_') or die;
$text = $this->task == 'edit' ? Lang::txt('JACTION_EDIT') : Lang::txt('JACTION_CREATE');
Toolbar::title(Lang::txt('COM_SUPPORT') . ': ' . Lang::txt('COM_SUPPORT_TICKET') . ': ' . $text, 'support.png');
Toolbar::save();
//Toolbar::apply();
Toolbar::cancel();
Toolbar::spacer();
Toolbar::help('ticket');
Html::behavior('tooltip');
$this->css();
$browser = new \Hubzero\Browser\Detector();
$cc = array();
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;

	if (pressbutton == 'cancel') {
		submitform(pressbutton);
		return;
	}

	submitform(pressbutton);
}
</script>
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * 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" />
Exemple #9
0
 /**
  * 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;
 }
Exemple #10
0
// Load theme
if ($theme = $this->params->get('theme')) {
    if ($theme == 'custom') {
        $color = $this->params->get('color');
        $this->addStyleDeclaration(include_once __DIR__ . DS . 'css' . DS . 'themes' . DS . 'custom.php');
    } else {
        if ($theme != 'gray') {
            $this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/themes/' . $theme . '.css');
        }
    }
}
// Load language direction CSS
if ($this->direction == 'rtl') {
    $this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/common/rtl.css');
}
$browser = new \Hubzero\Browser\Detector();
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html dir="<?php 
echo $this->direction;
?>
" lang="<?php 
echo $this->language;
?>
" class="ie ie6"> <![endif]-->
<!--[if IE 7 ]>    <html dir="<?php 
echo $this->direction;
?>
" lang="<?php 
echo $this->language;
?>
Exemple #11
0
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * 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;
Lang::load('tpl_' . $this->template) || Lang::load('tpl_' . $this->template, __DIR__);
$code = is_numeric($this->error->getCode()) && $this->error->getCode() > 100 ? $this->error->getCode() : 500;
$browser = new \Hubzero\Browser\Detector();
?>
<!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;
?>
Exemple #12
0
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * 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;
Exemple #13
0
$this->addScript($this->baseurl . '/templates/' . $this->template . '/js/hub.js?v=' . filemtime(__DIR__ . '/js/hub.js'));
// 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);
?>
">
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Christopher Smoak <*****@*****.**>
 * @copyright Copyright 2005-2011 Purdue University. All rights reserved.
 * @license   http://www.gnu.org/licenses/lgpl-3.0.html LGPLv3
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
$config = JFactory::getConfig();
//define tempate
$this->template = 'alveo2015';
//get device info
$browser = new \Hubzero\Browser\Detector();
//get joomla version
$joomlaVersion = new JVersion();
$joomlaRelease = 'joomla' . $joomlaVersion->RELEASE;
?>
<!DOCTYPE html>
<html class="<?php 
echo strtolower($browser->device() . ' ' . $browser->platform() . ' ' . $browser->platformVersion());
?>
 <?php 
echo $joomlaRelease;
?>
">
	<head>
		<!-- <meta http-equiv="X-UA-Compatible" content="IE=edge" /> Doesn't validate... -->
Exemple #15
0
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 
}