I've got a 'Most Popular' block on my drupal website that uses the core 'Node Statistics: Views Today' filter in views.
I was hoping that it would filter by node views in the past 24 hours, but instead it clears statistics and starts from scratch once a day with cron run.
This means that everyday at 5pm (as that's when cron first ran), the block clears itself and shows 5 incredibly old stories, and then changes very rapidly for the next few minutes as stories begin to rack up view counts again.
Is there any way to filter by 24 hours instead of by day? Basically I am looking for this: http://drupal.org/project/node_extended_stats for Drupal 6, but there doesn't seem to be one.
Sorry if I'm being stupid. I've looked around and can't find anyone else asking this question, but I'm sure I'm not the only one with this problem.
Have you tried the Statistics Pro module?
http://drupal.org/project/statspro
Related
Increase pagination index to start from 1 instead of 0.
So in URL instead of ?page=0 it should be ?page=1 for first page and then ?page=2 so on..
This question is documented in Drupal core issue #1818040. It looks like the patch from comment #15 needs to be re-rolled for the latest minor release. If you are working with a limited code line and have control over your content, that might be enough. However, in the long term it looks like a fix needs to be found for the fact that this implementation is going to break URLs on existing sites and potentially interfere with other contributed modules.
Side note: I would like to go ahead and call to your attention an article written by Edsger W. Dijkstra's titled "Why numbering should start at zero". When you say "such and such event is happening in three days" you do not mean the day after tomorrow but rather the day after the day after tomorrow. Your count does not begin with today but rather tomorrow, as today is when you begin counting (today = 0).
TL;DR: In the case of your book, the first page you encounter is the beginning, and you cannot begin counting before you have begun reading.
I'm stuck with building my own, simple browser game.
My program: you can upgrade your tools which allow you to gain more points per hour.
My problem:
So for example a user logs in and upgrades his tools from 0 to 1 which would double the amount of points gained. But upgrading takes 2 hours to complete. I don't expect my user to be online for 2 hours so I save the time he was last seen in an SQL table. Now when 2 hours have passed the amount of points gained need to be doubled but it's very possible that the user doesn't visit the page for another 10 hours. So my current program keeps adding 1 point per hour until the user visits the page. So in this case he'd have 12 points. But it needs to multiply after 2 hours so he needs to have 22 points.
Another, maybe simpler example is a maximum amount of points. Let's say the max is 10 points. But the user stays offline for 15 hours which means he'd earn 15 points at a rate of 1pnt/hr.
I don't have any functionally code yet because I want to know if something like this is actually possible and how for example cityVille(facebook) does it.
Now my question:
Can anyone give me a tip or give me some info on how to get started at this or at least give me the name of what I'm searching for? I've tried google'ing things like "offline database interactions" or "changing variables without user request" but nothing useful comes up.
Thanks in advance,
BlaDrzz.
You can schedule jobs with SQL server. These jobs can run at whatever frequency you like.
http://technet.microsoft.com/en-us/library/ms191439.aspx
I need a global interval template for recurring events.
I am constructing a schedule management web app. I have a set of event happening periodically up certain moment in time. For example I a have a train schedules. They repeat them selves every week for certain winter or summer periods. Using Date module I would have to enter ending and beginning dates of let say summer period for each train route.
What I want to do is to simply add a taxonomy term which would hold repetition interval with some holiday exclusions...
This more Drupal philosophy question yet I think that others had ran into similar issues before.
Maybe I am looking to this problem from a wrong angel could somebody could lend me fresh set of eyes.
I originally setup my Feed Aggregator to discard items older than 16 weeks. Unfortunately the database grew too large and caused some issues with my hosting. I have now changed the "Discard items older than:" setting to 1 week and run the cron job (about 20 times) both automatically (scheduled hourly) and manually but the items from many months ago are still showing up in the feed aggregator
Is there another setting I have to enable somewhere to delete these feed aggregator items from my database? What might I be missing?
Never mind. I set and reset the options 4 or 5 times running cron in between and finally it kicked in.
Should I keep all the articles in rss feed or just new ones? There are too many articles on my website and a new one is added in every 10-20 minutes so what would be the best approach in this case. Keep all the entries and just add new ones or add new ones and delete old ones at the same time??? If the second is better how many entries should I keep?
If new articles are added every 10-20 minutes, then after an hour you'll have 3-6, after a day you'll have 72-144, after a week you'll have around 500-1000, and after a month you'll have several thousand entries in your RSS feed. This is quickly going to become a multi-megabyte download, which is crazy unwieldy.
I think most desktop RSS readers can be configured for how often they should check for updates, and for a feed with this kind of traffic, most users would probably set their reader to check once an hour, or maybe even every 15 minutes. Online readers (like Google Reader) don't always have an option for how often to update, but I think they adapt -- they see how often new entries are added, and automatically check more often for a feed they've noticed is high-traffic.
Given that, if you put about a day's worth of entries in your feed -- for example, the most recent 100 -- that would probably be great plenty.
Keep them as long as possible, cos you don't know how regularly your readers grab the RSS.
What if you drop old articles every 30 mins and I only check every 24 hours? I'll miss so many!