Halogy dashboard is not displaying graph

柔情痞子 提交于 2019-12-10 12:14:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!