From 76387698e77d3b8409d1856d1883fa23387f571e Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 25 Feb 2008 06:53:47 +0000 Subject: delay random albums a bit to improve inital load, also add a refresh button so you can flip them without refreshing the whole page --- lib/class/update.class.php | 3 +++ server/ajax.server.php | 4 ++++ server/index.ajax.php | 44 ++++++++++++++++++++++++++++++++++++ templates/show_index.inc.php | 6 ++--- templates/show_random_albums.inc.php | 3 ++- 5 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 server/index.ajax.php diff --git a/lib/class/update.class.php b/lib/class/update.class.php index 58da8330..9e902d52 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -1138,6 +1138,9 @@ class Update { $sql = "ALTER TABLE `rating` CHANGE `rating` TINYINT ( 4 ) NOT NULL"; $db_results = Dba::query($sql); +// $sql = "ALTER TABLE `user` CHANGE `validation` VARCHAR ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL"; +// $db_results = Dba::query($sql); + self::set_version('db_version','340015'); } // update_340015 diff --git a/server/ajax.server.php b/server/ajax.server.php index d231d9d8..9d6ccb83 100644 --- a/server/ajax.server.php +++ b/server/ajax.server.php @@ -73,6 +73,10 @@ switch ($_REQUEST['page']) { require_once Config::get('prefix') . '/server/democratic.ajax.php'; exit; break; + case 'index': + require_once Config::get('prefix') . '/server/index.ajax.php'; + exit; + break; default: // A taste of compatibility break; diff --git a/server/index.ajax.php b/server/index.ajax.php new file mode 100644 index 00000000..f7bf9ea5 --- /dev/null +++ b/server/index.ajax.php @@ -0,0 +1,44 @@ + diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php index 50637547..ee231859 100644 --- a/templates/show_index.inc.php +++ b/templates/show_index.inc.php @@ -29,11 +29,9 @@ if (isset($_REQUEST['xspf']) && isset ($_REQUEST['play_info'])){ +
- +
diff --git a/templates/show_random_albums.inc.php b/templates/show_random_albums.inc.php index 8a879f9e..fe8c4972 100644 --- a/templates/show_random_albums.inc.php +++ b/templates/show_random_albums.inc.php @@ -19,8 +19,9 @@ */ $web_path = Config::get('web_path'); +$button = Ajax::button('?page=index&action=random_albums','random',_('Refresh'),'random_refresh'); ?> - +