pligg_pageviews too big

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 04-18-2008, 06:57 AM
Pligg Donor
Pligg Version: 9.9.0
Pligg Template: Custom
 
Join Date: Dec 2007
Posts: 40
Quote:
Originally Posted by Yankidank View Post
All you have to do is change the "Show last visit" option to false from /admin_config.php?page=Story. This is something we should probably have switched off by default.
I have disabled this an anything else related to page views, and still my pligg_pageviews table keep grow bigger and bigger for every day.

This question has been asked many times before in this forum, and it would be nice to get some more information about it. Can we empty pligg_pageviews table without problems? Also please give us some more information about what else this table does and how it works.
Reply With Quote
  #12 (permalink)  
Old 04-18-2008, 10:12 AM
gen3ric's Avatar
Casual Pligger
Pligg Version: 9.X
Pligg Template: Custom
 
Join Date: Jul 2007
Location: Atlanta, GA
Posts: 94
I've had show last visit disabled since I installed but my pageviews table was still filling up at the rate of nearly 3MB a day so I disabled the stats plugin just dropped the table and haven't had any problems as a result.
Reply With Quote
  #13 (permalink)  
Old 04-18-2008, 12:12 PM
Pligg Donor
Pligg Version: 9.9.0
Pligg Template: Custom
 
Join Date: Dec 2007
Posts: 40
Quote:
Originally Posted by gen3ric View Post
just dropped the table and haven't had any problems as a result.
Thank you for sharing! To be absolute sure about it: Does "dropped" mean that you deleted the table entirely?
Reply With Quote
  #14 (permalink)  
Old 04-20-2008, 06:32 AM
New Pligger
 
Join Date: Feb 2008
Posts: 24
Hello i think i fix it my pligg_pageviews table is not getting bigger anymore

If i fix it.... here is the way how i did it

(it worked for me on Pligg 9.8)

first copy your user.php, user_center.tpl and pageview.php files somewhere.

root/user.php delete
Quote:
1. lines from 54 to 56
2. line 64
3. lines from 66 to 93
root/templates/yget/user_center.tpl delete
Quote:
lines from 399 to 406
root/libs/pageview.php delete
Quote:
lines from 16 to 23
i hope i helped
Reply With Quote
  #15 (permalink)  
Old 04-21-2008, 07:01 AM
xiesi's Avatar
Constant Pligger
Pligg Version: 9.95
Pligg Template: yget + diy
 
Join Date: Jun 2007
Posts: 223
Send a message via MSN to xiesi
it don't work for 9.9.0
Reply With Quote
  #16 (permalink)  
Old 07-26-2008, 02:08 PM
peppolone's Avatar
Pligg Donor
Pligg Version: 995-54
Pligg Template: upnews.it
 
Join Date: Dec 2006
Location: rome
Posts: 177
for 9.9 remove $pageview->insert(); from story.php
Reply With Quote
  #17 (permalink)  
Old 07-26-2008, 02:38 PM
davemackey's Avatar
Pligg Donor
Pligg Version: 9.9.
Pligg Template: siChunkBlue
 
Join Date: Aug 2007
Location: Langhorne, PA
Posts: 226
I think we can actually remove more code than that. I commented out the following:
// log the pageview
// $pageview = new Pageview;
// $pageview->type='story';
// $pageview->page_id=$link->id;
// $pageview->user_id=$current_user->user_id;
require_once(mnminclude.'check_behind_proxy.php');
// $pageview->user_ip=check_ip_behind_proxy();

// find the last pageview
// $last_visit = $pageview->last_visit();
// if($last_visit != 0){$last_visit = txt_time_diff($pageview->last_visit(), time());}
// $main_smarty->assign('last_visit', $last_visit);
// $pageview->insert();
Just to note: I like removing/commenting out unnecessary code as possible. There is no need to have processes running which will consume CPU cycles if we just want to disable the functionality anyways.
David.
Reply With Quote
  #18 (permalink)  
Old 07-26-2008, 05:55 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
There are three types of page views
  • One when you view a story on story.php
  • One when you click the story title to view the external link
  • And one when you view a profile

You have to remove/disable the code for all three of these situations for your pageviews table to stop growing. It has been suggested above to turn off several features. That will not actually stop the table from getting larger. The table will continue to get larger even though you don't use it. Remove the table and the code completely to fix your problem.
Reply With Quote
  #19 (permalink)  
Old 07-27-2008, 01:31 AM
netfreak's Avatar
Casual Pligger
 
Join Date: Dec 2006
Posts: 51
I think you can have a look on this you might like this one.. >>

http://forums.pligg.com/core-develop...mizing-db.html
Reply With Quote
  #20 (permalink)  
Old 07-29-2008, 10:09 AM
micxuy's Avatar
Casual Pligger
 
Join Date: May 2007
Posts: 87
I just comments out all the functions in user.php, out.php, user.php and libs/pageview.php

Then delete database, it works cool
Reply With Quote
Reply

Thread Tools
Display Modes




Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development