问题
I am using halogy cms built on Codeigniter.
i have installed it successfully.
its working in the sub folder but i am having a problem because i see dashboard statistics are not displayed.
I configured it couple of months ago and the dashboard was being displayed but i can't remember how i did it.
Any help?
Here is what i have modified
config/site_config.php
$config['uploadsPath'] = 'static/uploads';
$config['staticPath'] = '/halogy/static';
回答1:
I have made a little fix to this problem. Here is how you can do it.
In halogy/config/site_config.php
add this line
$config['appFolder'] = '/halogy';
where halogy
is the name of folder me application resides.
Next add a function in helpers/halogy_helper.php
function addFolder($string){
$CI =& get_instance();
$folder = $CI->config->item('appFolder');
return $folder . $string;
}
Next search the function display_image
and add this line
$path = addFolder($path);
Before
$imageHTML = '<img src="'.$path.'" alt="'.$alt.'" ';
Next go to views/includes/header.php
and add this code in head section
<script type="text/javascript">
function base_url(){
return '<?php echo base_url();?>';
}
</script>
Next fo to static/js/jquery.flot.init.js
and replace this
base_url()+'admin/stats/'+days
with this
'admin/stats/'+days
Finally go to line 206 and replace this line
$imagePath = $imageData['src'];
with this
$imagePath = addFolder($imageData['src']);
Now the image problem has been solved and also the dashboard will work properly.
来源:https://stackoverflow.com/questions/11663517/halogy-dashboard-is-not-displaying-graph