| Re: How to use smarty plugin "xoAppUrl" and "xoImgUrl"? |
| by skenow on 2007/8/20 17:44:59 A little digging turned this up - le="color: #000000"><?php function xoops_getcss($theme = '') { if ($theme == '') { $theme = $GLOBALS['xoopsConfig']['theme_set']; } $uagent = xoops_getenv('HTTP_USER_AGENT'); if (stristr($uagent, 'mac')) { $str_css = 'styleMAC.css'; } elseif (preg_match("/MSIE ([0-9].[0-9]{1,2})/i", $uagent)) { $str_css = 'style.css'; } else { $str_css = 'styleNN.css'; } if (is_dir(XOOPS_THEME_PATH.'/'.$theme)) { if (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/'.$str_css)) { return XOOPS_THEME_URL.'/'.$theme.'/'.$str_css; } elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/style.css')) { return XOOPS_THEME_URL.'/'.$theme.'/style.css'; } } if (is_dir(XOOPS_THEME_PATH.'/'.$theme . '/css')) { if (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/css/'.$str_css)) { return XOOPS_THEME_URL.'/'.$theme.'/css/'.$str_css; } elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/css/style.css')) { return XOOPS_THEME_URL.'/'.$theme.'/css/style.css'; } } return ''; } In a nutshell - $xoops_themecss gets its value from this function and this function uses the browser agent to determine which stylesheet to use - styleMAC, styleNN, or style. The Smarty variables are documented in the wiki |
| Re: How to use smarty plugin "xoAppUrl" and "xoImgUrl"? |
| by kris_fr on 2007/8/9 19:12:07 Why you want a leaf styleNN.css, just style.css is enough If your Css is in conformity you will not have any concern some is the navigator |
| Re: How to use smarty plugin "xoAppUrl" and "xoImgUrl"? |
| by script_fu on 2007/8/9 19:07:42 Wonderful... I did mention above that the styleNN.css works fine in firefox with the old style sheet code from the XOOPS default theme. Also that it does not work with the xoImgUrl So in order to get this far! It means we already know how to delete templates_c, cache & hit the reload button. Maybe I should state. Php 5 MySql 5 FireFox 2.0.0.6 Maybe this is the reason it does not work. |
| Re: How to use smarty plugin "xoAppUrl" and "xoImgUrl"? |
| by kris_fr on 2007/8/9 17:46:19 hi, just delete files in templates_c, may be @++ |
| Re: How to use smarty plugin "xoAppUrl" and "xoImgUrl"? |
| by script_fu on 2007/8/9 10:32:42 This page cannot be displayed due to an internal error. You can provide the following information to the administrators of this site to help them solve the problem: Error: Smarty error: [in /themes/XGv3_Blue/theme.html line 16]: syntax error: unrecognized tag: xoImgUrl/style.css (Smarty_Compiler.class.php, line 436) ---------- xoImgUrl/style.css = Smarty Errors --- xoImgUrl /style.css = Nothing but style.css in FireFox ---------- I thought maybe it was the white space so I closed it. lol Nope... I will just keep this for now. le="color: #000000"><?php <link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />
|