Jump to content

thompsone

Clients
  • Posts

    326
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by thompsone

  1. Can you provide a live use example of how and where you've deployed this? How do you handle ads after the first post where you want some but not others depending on location?
  2. Part of your solution is here: IPS Thread I have personally battled with this and keeping Adsense happy is goal number one. Now you'll have to combine that with a ELSE statement so if it doesn't show ads because it's excluded then show another ad. I'm not an expert but I imagine it would look something like this. {{if ( \IPS\Request::i()->controller == 'forums' AND isset( \IPS\Request::i()->id ) AND ! in_array( \IPS\Request::i()->id, array( forum_id1, forum_id2, forum_id3, forum_id4 ) ) ) OR !( in_array( \IPS\Request::i()->controller, array( 'system_app1', 'system_app2', 'system_app3', 'forums' ) ) OR in_array( \IPS\Request::i()->app, array( 'external_app1', 'external_app2') ) )}} {advertisement="ad_tag_adsense"} {{else}} {advertisement="ad_tag_other"} {{endif}}
  3. :thumbsup: Once you've had to recover from backups you learn how important they are, not just the backup file itself but the ability to recover from that file. You can make backups all day long and if you can't recover from them they are useless. Along these lines however this post is a nice clean way to dump your sql tables. I run a series of cron tasks nightly that perform these functions without the need of taking any of the services offline. 1) Just prior to the dump I remove the old backup (I keep only 1 good copy locally as I keep a 7 day rotation completely offsite in addition to this) 50 22 * * * rm -f /path_to_archives/database.sql.gz 2) I run the mysqldump with compression 0 23 * * * mysqldump -u your_user -p'your_password' --all-database | gzip > /path_to_archives/database.sql.gz A) I then use scp to move the compressed file to another machine offsite which also manages a rotation of the files keeping only the last 7 days archived as our dump file is 480G in size even with compression. (Optional - Advanced) B) In addition to this I also use rsnapshot which handles nice neat backups. (Optional - Advanced) C) Some other ways I can imagine handling this might be pulling the dump from the server to your local machine by installing MySQL Administrator locally and setting up the backup task. (Optional - Moderate) Either way you handle it, it's still a good idea to have backups.
×
×
  • Create New...