#1 2009-01-12 22:31:31

Jive Bunny
Member
2007-10-12
50

Remove history in admin completely

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

 

#2 2009-01-13 11:03:21

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Remove history in admin completely

Access directly to ./admin.php?page=configuration&section=history
To switch them off.

Tell me if it works.


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#3 2009-01-13 21:50:35

Jive Bunny
Member
2007-10-12
50

Re: Remove history in admin completely

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

 

#4 2009-01-14 08:15:47

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Remove history in admin completely

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.


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#5 2009-01-14 18:45:08

Jive Bunny
Member
2007-10-12
50

Re: Remove history in admin completely

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?

Code:

$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

 

#6 2009-01-14 19:40:29

Jive Bunny
Member
2007-10-12
50

Re: Remove history in admin completely

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:

 $code_hits = 'echo $hits[0]';

Here is all that I have modified.

Code:

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

 

#7 2009-01-14 19:57:29

Jive Bunny
Member
2007-10-12
50

Re: Remove history in admin completely

Got it working

The code I needed to use was

Code:

$code_hits = '<p>' . $hits[0] . '</p>';

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact