rss_setup.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /*
  3. * e107 website system
  4. *
  5. * Copyright (c) 2008-2016 e107 Inc (e107.org)
  6. * Released under the terms and conditions of the
  7. * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
  8. *
  9. * Custom FAQ install/uninstall/update routines
  10. *
  11. */
  12. class rss_menu_setup
  13. {
  14. /*
  15. function install_pre($var)
  16. {
  17. // print_a($var);
  18. // echo "custom install 'pre' function<br /><br />";
  19. }
  20. */
  21. function install_post($var)
  22. {
  23. $sql = e107::getDb();
  24. $mes = e107::getMessage();
  25. $insert = array(
  26. 'rss_id' => 0,
  27. 'rss_name' => 'News',
  28. 'rss_url' => 'news',
  29. 'rss_topicid' => '',
  30. 'rss_path' => 'news',
  31. 'rss_text' => 'The rss feed of the news',
  32. 'rss_datestamp' => time(),
  33. 'rss_class' => '0',
  34. 'rss_limit' => '9'
  35. );
  36. // $mes->addInfo(print_a($insert,true));
  37. $status = ($sql->insert('rss', $insert)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
  38. $mes->add(LAN_DEFAULT_TABLE_DATA.": rss",$status);
  39. }
  40. /*
  41. function uninstall_options()
  42. {
  43. }
  44. function uninstall_post($var)
  45. {
  46. // print_a($var);
  47. }
  48. function upgrade_post($var)
  49. {
  50. // $sql = e107::getDb();
  51. }
  52. */
  53. }