|
From: <bi...@us...> - 2013-02-11 23:34:41
|
Revision: 11022
http://sourceforge.net/p/xoops/svn/11022
Author: bitc3r0
Date: 2013-02-11 23:34:38 +0000 (Mon, 11 Feb 2013)
Log Message:
-----------
Fixed htaccess class, version on styles and scripts, RMCVERSION
Modified Paths:
--------------
RMC/rmcommon/trunk/rmcommon/class/htaccess.class.php
RMC/rmcommon/trunk/rmcommon/class/template.php
RMC/rmcommon/trunk/rmcommon/loader.php
RMC/rmcommon/trunk/rmcommon/themes/twop6/class/twop6functions.class.php
RMC/rmcommon/trunk/rmcommon/themes/twop6/theme.php
Modified: RMC/rmcommon/trunk/rmcommon/class/htaccess.class.php
===================================================================
--- RMC/rmcommon/trunk/rmcommon/class/htaccess.class.php 2013-02-11 23:28:17 UTC (rev 11021)
+++ RMC/rmcommon/trunk/rmcommon/class/htaccess.class.php 2013-02-11 23:34:38 UTC (rev 11022)
@@ -29,6 +29,14 @@
$this->module = $module;
$this->file = XOOPS_ROOT_PATH.'/.htaccess';
+
+ if(strpos($_SERVER['SERVER_SOFTWARE'], 'Apache')!==FALSE){
+
+ if(!file_exists($this->file))
+ file_put_contents($this->file, '');
+
+ }
+
$this->content = file_get_contents($this->file);
$this->checkHealth();
Modified: RMC/rmcommon/trunk/rmcommon/class/template.php
===================================================================
--- RMC/rmcommon/trunk/rmcommon/class/template.php 2013-02-11 23:28:17 UTC (rev 11021)
+++ RMC/rmcommon/trunk/rmcommon/class/template.php 2013-02-11 23:34:38 UTC (rev 11022)
@@ -58,6 +58,10 @@
*/
private $metas = array();
/**
+ * Version to add as parameter to scripts and styles
+ */
+ private $version = '';
+ /**
* At this moment this method do nothing
* Maybe later i will add some functionality... i must to think ;)
*/
@@ -65,7 +69,9 @@
global $rmc_config;
if (!function_exists("xoops_cp_header") && !$rmc_config['jquery']) return;
+ $this->version = str_replace(" ", '-', RMCVERSION);
$this->add_jquery(true);
+
}
/**
@@ -279,10 +285,10 @@
if($url=='') return;
if (strpos($url, "?")>1){
if (strpos($url, 'ver=')===FALSE){
- $url .= "&ver=".RMCVERSION;
+ $url .= "&ver=".$this->version;
}
} else {
- $url .= "?ver=".RMCVERSION;
+ $url .= "?ver=".$this->version;
}
$id = crc32($url.$type);
@@ -331,10 +337,10 @@
if (strpos($url, "?")>1){
if (strpos($url, 'ver=')===FALSE){
- $url .= "&ver=".RMCVERSION;
+ $url .= "&ver=".$this->version;
}
} else {
- $url .= "?ver=".RMCVERSION;
+ $url .= "?ver=".$this->version;
}
$id = crc32($url.$type.$more);
@@ -361,10 +367,10 @@
if (strpos($url, "?")>1){
if (strpos($url, 'ver=')===FALSE){
- $url .= "&ver=".RMCVERSION;
+ $url .= "&ver=".$this->version;
}
} else {
- $url .= "?ver=".RMCVERSION;
+ $url .= "?ver=".$this->version;
}
$this->tpl_scripts[$id] = array('url'=>$url,'type'=>$type, 'more'=>$more, 'footer' => $footer);
@@ -394,10 +400,10 @@
if (strpos($url, "?")>1){
if (strpos($url, 'ver=')===FALSE){
- $url .= "&ver=".RMCVERSION;
+ $url .= "&ver=".$this->version;
}
} else {
- $url .= "?ver=".RMCVERSION;
+ $url .= "?ver=".$this->version;
}
$this->tpl_scripts[$id] = array(
@@ -422,7 +428,7 @@
$this->add_script("http://code.jquery.com/jquery-latest.js");
if ($ui)
- $this->add_script(RMCURL.'/include/js/jquery-ui.min.js');
+ $this->add_local_script('jquery-ui.min.js', 'rmcommon', 'include');
}
/**
* Get all scripts stored in class
@@ -483,10 +489,10 @@
if (strpos($url, "?")>1){
if (strpos($url, 'ver=')===FALSE){
- $url .= "&ver=".RMCVERSION;
+ $url .= "&ver=".$this->version;
}
} else {
- $url .= "?ver=".RMCVERSION;
+ $url .= "?ver=".$this->version;
}
$this->tpl_styles[$id] = array(
@@ -539,10 +545,10 @@
if (strpos($url, "?")>1){
if (strpos($url, 'ver=')===FALSE){
- $url .= "&ver=".RMCVERSION;
+ $url .= "&ver=".$this->version;
}
} else {
- $url .= "?ver=".RMCVERSION;
+ $url .= "?ver=".$this->version;
}
$this->tpl_styles[$id] = array(
@@ -581,10 +587,10 @@
if (strpos($url, "?")>1){
if (strpos($url, 'ver=')===FALSE){
- $url .= "&ver=".RMCVERSION;
+ $url .= "&ver=".$this->version;
}
} else {
- $url .= "?ver=".RMCVERSION;
+ $url .= "?ver=".$this->version;
}
return $url;
@@ -652,7 +658,7 @@
}
/**
- * Add option to menu. This method is only functionall in admin section or with the themes
+ * Add option to menu. This method is only functional in admin section or with the themes
* that support this feature
*
* @param string Menu parent name
@@ -661,14 +667,14 @@
* @param string Option icon url
* @param string Target window (_clank, _self, etc.)
*/
- public function add_menu_option($caption, $link, $icon='', $target=''){
+ public function add_menu_option($caption, $link, $icon='', $class='', $target=''){
if ($caption=='' || $link=='') return;
$id = crc32($link);
if (isset($this->tpl_menus[$id])) return;
- $this->tpl_menus[$id] = array('caption'=>$caption,'link'=>$link,'icon'=>$icon,'target'=>$target, 'type'=>'normal');
+ $this->tpl_menus[$id] = array('caption'=>$caption,'link'=>$link,'icon'=>$icon,'class'=>$class,'target'=>$target, 'type'=>'normal');
}
public function add_separator(){
@@ -687,11 +693,12 @@
/**
* Menu Widgets
*/
- public function add_menu($title, $link, $icon='', $location='', $options=array()){
+ public function add_menu($title, $link, $icon='', $class='', $location='', $options=array()){
$this->menus[] = array(
'title' => $title,
'link' => $link,
'icon' => $icon,
+ 'class' => $class,
'location' => $location,
'options' => $options
);
Modified: RMC/rmcommon/trunk/rmcommon/loader.php
===================================================================
--- RMC/rmcommon/trunk/rmcommon/loader.php 2013-02-11 23:28:17 UTC (rev 11021)
+++ RMC/rmcommon/trunk/rmcommon/loader.php 2013-02-11 23:34:38 UTC (rev 11022)
@@ -12,7 +12,7 @@
define("RMCURL",XOOPS_URL.'/modules/rmcommon');
define('ABSURL', XOOPS_URL);
define('ABSPATH', XOOPS_ROOT_PATH);
-define('RMCVERSION','2.1.8.4 Beta');
+define('RMCVERSION','2.1.8.7 RC');
// Message Levels
define('RMMSG_INFO', 0);
Modified: RMC/rmcommon/trunk/rmcommon/themes/twop6/class/twop6functions.class.php
===================================================================
--- RMC/rmcommon/trunk/rmcommon/themes/twop6/class/twop6functions.class.php 2013-02-11 23:28:17 UTC (rev 11021)
+++ RMC/rmcommon/trunk/rmcommon/themes/twop6/class/twop6functions.class.php 2013-02-11 23:34:38 UTC (rev 11022)
@@ -41,10 +41,12 @@
} else {
$icon = '';
}
+
$rmTpl->add_menu(
$menu['title'],
strpos($menu['link'], 'http://')!==FALSE && strpos($menu['link'], 'ftp://')!==FALSE ? $menu['link'] : XOOPS_URL.'/modules/'.$mod->getVar('dirname','n').'/'.$menu['link'],
$icon,
+ !empty($menu['class']) ? $menu['class'] : '',
isset($menu['location']) ? $menu['location'] : '',
isset($menu['options']) ? $menu['options'] : array()
);
Modified: RMC/rmcommon/trunk/rmcommon/themes/twop6/theme.php
===================================================================
--- RMC/rmcommon/trunk/rmcommon/themes/twop6/theme.php 2013-02-11 23:28:17 UTC (rev 11021)
+++ RMC/rmcommon/trunk/rmcommon/themes/twop6/theme.php 2013-02-11 23:34:38 UTC (rev 11022)
@@ -40,7 +40,7 @@
<?php echo $xoopsModule->name(); ?>
<b class="caret"></b>
</a>
-
+
<ul class="dropdown-menu">
<?php foreach($this->get_menus() as $menu): ?>
<?php if($menu['icon']=='option'): ?>
@@ -48,7 +48,11 @@
<?php endif; ?>
<li<?php if(isset($menu['options']) && !empty($menu['options'])): ?> class="dropdown-submenu"<?php endif; ?>>
<a href="<?php echo $menu['link']; ?>"<?php if(isset($menu['options']) && !empty($menu['options'])): ?> tabindex="-1"<?php endif; ?>>
- <i class="xo-icon<?php echo $menu['icon']=='option' ? ' xicon-settings' : ''; ?>"<?php if($menu['icon']!='' && $menu['icon']!=='option'): ?> style="background-image: url(<?php echo $menu['icon']; ?>); background-size: 16px 16px;"<?php endif; ?>></i>
+ <?php if((empty($menu['icon']) || $menu['icon']=='') && (!empty($menu['class']) && $menu['class']!='')): ?>
+ <i class="<?php echo $menu['class']; ?>"></i>
+ <?php else: ?>
+ <i class="xo-icon<?php echo $menu['icon']=='option' ? ' xicon-settings' : ''; ?>"<?php if($menu['icon']!='' && $menu['icon']!=='option'): ?> style="background-image: url(<?php echo $menu['icon']; ?>); background-size: 16px 16px;"<?php endif; ?>></i>
+ <?php endif; ?>
<?php echo $menu['title']; ?>
</a>
<?php if($menu['options']): ?>
@@ -148,7 +152,7 @@
<?php endif; ?>
<li>
- <a href="#" id="xo-showmodules" title="<?php _e('Select Module','twop6'); ?>">
+ <a href="#" id="xo-showmodules" title="<?php _e('Modules Box','twop6'); ?>">
<i class="xo-icon xicon-modules"></i>
<?php _e('Modules','twop6'); ?>
</a>
|