[imc-sf-coders] CVS update of sf-active/sf-active/sitename/scripts (cli_initialise.php)

Bart M pseudopunk at codecoop.org
Wed Dec 28 00:12:52 PST 2005


    Date: Wednesday, December 28, 2005 @ 09:12:52
  Author: pseudopunk
    Path: /cvsroot/sf-active/sf-active/sf-active/sitename/scripts

Modified: cli_initialise.php

should make most things get done


Index: sf-active/sf-active/sitename/scripts/cli_initialise.php
diff -u sf-active/sf-active/sitename/scripts/cli_initialise.php:1.1 sf-active/sf-active/sitename/scripts/cli_initialise.php:1.2
--- sf-active/sf-active/sitename/scripts/cli_initialise.php:1.1	Wed Dec 28 00:16:14 2005
+++ sf-active/sf-active/sitename/scripts/cli_initialise.php	Wed Dec 28 09:12:52 2005
@@ -5,41 +5,90 @@
  *  @pacakge	install
  */
 
-// include the config
+// include the config and needed classes
 include_once('cli.cfg');
 require_once(SF_CLASS_PATH . '/producer_class.inc');
 include_once(SF_CLASS_PATH.'/category_class.inc');
 include_once(SF_CLASS_PATH.'/gallery_class.inc');
 include_once(SF_CLASS_PATH.'/newswire_class.inc');
+include_once(SF_CLASS_PATH.'/feature_class.inc');
+include_once(SF_CLASS_PATH.'/pages/admin_cities.inc');
+include_once(SF_CLASS_PATH.'/pages/comment_latest.inc');
+include_once(SF_CALENDAR_PATH.'/common_include.inc');
 global $prod_obj;
 
+
+// some basic variables
+$year=date('Y');
+$month=date('m');
+
+
 // cache all the includes
 $prod_obj->run('all_includes');
 
+
 // setup some basic pages
 $prod_obj->run('static_page', 'index.tpl');
 $prod_obj->run('static_page', 'comment_latest.tpl');
 $prod_obj->run_rule('static_page', 'media__index.tpl');
 
+
 // cache article & newswire stuff
 $gal = new Gallery;
-$gal->set_year(date('Y'));
+$gal->set_year($year);
 $gal->render_year_index();
 $gal->render_months_in_year();
 
-
 $prod_obj->run_rule('static_page', 'news__index.tpl');
 $news = new Newswire;
-$news->set_year(date('Y'));
+$news->set_year($year);
 $news->render_year_index();
 $news->render_months_in_year();
-$news->render_days_in_month(date('Y'), date('m'));
+$news->render_days_in_month($year, $month);
+
+$com = new comment_latest;
+$com->build_latest_comments();
 
 $cat = new Category;
 $categorydata = $cat->get_category_fields(1);
 $news->render_summary($categorydata);
 $news->make_newswire_rss(1, 'production');
 
-if(is_array($prod_obj->get_error())) Cache::dump($prod_obj->get_error());
+
+// cache features/archives.
+$cat->cache_archives_index();
+$date = mktime(0,0,0,$month, 1,$year);
+$cat->render_month_cache_categories($date);
+$date = strtotime($year.'-01-01');
+$cat->render_months_in_year($date);
+$cat->render_all_feature_lists(1);
+$cat->make_features_rdf();
+$cat->make_features_rdf(1);
+$cat->cache_syndication_index();
+$cat->cache_feature_index();
+$cat->cache_left_catlisting();
+
+
+// calendar stuff
+$event = new Event;
+$event->render_calendar_index();
+$event->set_start_year($year);
+$event->check_year_cache(1);
+$event->check_all_months_in_year(1);
+$event->set_start_year($year+1);
+$event->check_year_cache(1);
+$event->check_all_months_in_year(1);
+$event->make_calendar_minical();
+
+
+// the cities list
+$cities = new admin_cities;
+$cities->execute();
+
+if(is_array($prod_obj->get_error())) {
+    Cache::dump($prod_obj->get_error());
+}else{
+    print("\n\r Your site should be properly generated \n\r\n\r");
+}
 
 ?>


More information about the imc-sf-coders mailing list