1025 posts
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 4-5 years
  • Bought between 10 and 49 items
  • Exclusive Author
  • Microlancer Beta Tester
  • United States
fillerspace says

For clients I host, I want to try a new way of charging them, based on an average of how many users are logged in at any given time (the idea is that logged-out users get a Varnish cached version, which is cheaper to serve, logged in users hit the server directly). Of course, since WordPress only tracks logins using a cookie, I’d have to use a plugin to track this. I found a plugin that tracks how many users are logged in using a db table. When a user logs in, this is recorded, and when they log out, it’s recorded. But this is useless if clients can disable the plugin. Is it possible to create a separate plugin directory that WordPress would also scan, but that users wouldn’t be able to see? I suppose I would also have to make it so they could not deactivate the plugin in the admin either.

Any ideas?

2004 posts
  • Has been a member for 4-5 years
  • Bought between 50 and 99 items
  • Exclusive Author
  • United States
Landonw says

Hard code it into WordPress.

991 posts Best-dressed man at PressNomics 2013
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Power Elite Author
+4 more
Parallelus says
LandonWilson said
Hard code it into WordPress.

That’s a good idea, code it directly into the core and they can’t disable it.

122 posts
  • Bought between 50 and 99 items
  • Denmark
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 1 000 and 5 000 dollars
jayjdk says

Put the plugin file in wp-content/mu-plugins (create it if it doesn’t exists). It stands for “must-use” plugins. Any code (plugin) placed in the folder is run automatically

1025 posts
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 4-5 years
  • Bought between 10 and 49 items
  • Exclusive Author
  • Microlancer Beta Tester
  • United States
fillerspace says
jayjdk said
Put the plugin file in wp-content/mu-plugins (create it if it doesn’t exists). It stands for “must-use” plugins. Any code (plugin) placed in the folder is run automatically

That might work perfectly. I’ll give it a try. I guess I could always hack the core if that doesn’t work, but that would be a hassle every time there’s an upgrade. The must use folder sounds like a winner. Thank everybody for the ideas!

1025 posts
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 4-5 years
  • Bought between 10 and 49 items
  • Exclusive Author
  • Microlancer Beta Tester
  • United States
fillerspace says

Update: the mu-plugins folder works like a charm. I had no idea this existed. So any plugin here is automatically included and activated, but it doesn’t show up in the plugin list. Brilliant!

by
by
by
by
by
by