Hey Guys
Just had a email from my host saying that they deleted my phpwebgallery_history table and told me to disable anything relating to it.
I disabled footer count as this was part of the problem but is there any way to comment out the php so that I dont have history accessing the mysql database at all or showing errors on admin side of things to.
I need to remove it fully it seems :( I was relying on it and think it is great. Damn shame.
Offline
Access directly to ./admin.php?page=configuration§ion=history
To switch them off.
Tell me if it works.
Offline
I did exactly what you said last night prior to your post and all seems to be fine. Thanks for the reply all the same. I really needed to be sure.
Offline
After the launch of Piwigo, I will code a new plugin to remove Footer count constraints.
You will be able to have again all the counters.
Offline
VDigital wrote:
After the launch of Piwigo, I will code a new plugin to remove Footer count constraints.
You will be able to have again all the counters.
That would be great :)
In the meantime is there anything I can do on the plugins side with this code to display it on the footer?
$count_my_page = ("hitcounter.txt"); $hits = file($count_my_page); $hits[0] ++; $fp = fopen($count_my_page , "w"); fputs($fp , "$hits[0]"); fclose($fp); echo $hits[0];
I tried to do it myself last night modifying the hello world plugin, but I couldn't get it to work :( I will try again later.
Offline
I had a look at the first version of fun snow and modified the code. The only problem that I have now is that it displays echo $hits[0] instead of displaying the counter value on the footer. Otherwise, all is working.
The part I cant get to work is this
$code_hits = 'echo $hits[0]';
Here is all that I have modified.
if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } function page_hits() { global $template; $count_my_page = ("hitcounter.txt"); $hits = file($count_my_page); $hits[0] ++; $fp = fopen($count_my_page , "w"); fputs($fp , "$hits[0]"); fclose($fp); $code_hits = 'echo $hits[0]'; if (method_exists($template, 'append')) { $template->append('footer_elements', $code_hits); } else { $template->assign_block_vars('footer_element', array('CONTENT' => $code_hits)); } } add_event_handler('loc_end_page_tail', 'page_hits');
Any ideas on how I would handle that echo statement?
Offline
Got it working
The code I needed to use was
$code_hits = '<p>' . $hits[0] . '</p>';
Offline