Campustream 1.0
A social network MQP for WPI
|
00001 <?php 00002 /* 00003 * This file defines all routes for the framework. The array index is 00004 * a regex expression that matches an incoming URL, and the corresponding 00005 * array value is the controller/method to execute if that URL is matched. 00006 * You may also pass arguments to the controller method. See user/show below 00007 * for an example. 00008 */ 00009 00010 // Debug routes 00011 $config['debug/(flockdb|sphinx|phpinfo|rss|notify)'] = 'debug/$1'; 00012 00013 // Default route for root directory 00014 $config['_default'] = 'home/index'; 00015 00016 // Default session routes 00017 $config['session/new'] = 'session/new_action'; 00018 $config['session/create'] = 'session/create'; 00019 $config['session/destroy'] = 'session/destroy'; 00020 $config['session/twitter'] = 'session/twitter_login'; 00021 $config['session/twitter/finish'] = 'session/twitter_finish'; 00022 00023 // Confirmation routes 00024 $config['confirm/wait'] = 'confirm/wait'; 00025 $config['confirm/do'] = 'confirm/do_action'; 00026 00027 // Twitter session routes 00028 $config['twitter/create'] = 'twitter/create'; 00029 $config['twitter/new'] = 'twitter/new_action'; 00030 $config['twitter/destroy'] = 'twitter/destroy'; 00031 00032 // Facebook session routes 00033 $config['facebook/(authorize|deauthorize)'] = 'facebook/$1'; 00034 00035 // Login or Register 00036 $config['register'] = 'account.manage/register'; 00037 $config['login'] = 'account.manage/login'; 00038 00039 // User routes 00040 $config['user/([A-Za-z0-9_]+)'] = 'user/show/username:$1'; 00041 $config['user/avatar/(small|medium|large)/([A-Za-z0-9_]+)'] = 'user/avatar/size:$1/username:$2'; 00042 $config['user/([A-Za-z0-9_]+)/follows'] = 'friendship/follows/user:$1'; 00043 $config['user/([A-Za-z0-9_]+)/followers'] = 'friendship/followers/user:$1'; 00044 $config['users'] = 'user/list_users'; 00045 00046 // Status routes 00047 $config['s/([A-Za-z0-9]+)'] = 'status/show/id:$1'; 00048 00049 // News & Events routes 00050 $config['news_events'] = 'news/index/type:all'; 00051 $config['news'] = 'news/index/type:news'; 00052 $config['news/([A-Za-z0-9_]+)'] = 'news/index/type:news/slug:$1'; 00053 $config['events'] = 'news/index/type:event'; 00054 $config['event/([A-Za-z0-9_]+)'] = 'news/index/type:event/slug:$1'; 00055 $config['ne/([A-Za-z0-9]+)'] = 'news/show/short_id:$1'; 00056 $config['news/new'] = 'news/new_action'; 00057 00058 // Collaborate routes 00059 $config['collaborate'] = 'collaborate/index'; 00060 $config['collaborate/([A-Za-z_]+)'] = 'collaborate/show_section/section:$1'; 00061 $config['collaborate/q/([A-Za-z0-9]+)'] = 'collaborate/show/short_id:$1'; 00062 00063 // Messaging 00064 $config['messages'] = 'messaging/index'; 00065 00066 // User settings 00067 $config['settings/(profile|services)'] = 'account.settings/index/page:$1'; 00068 $config['settings/service_hooks'] = 'account.settings/service_hooks'; 00069 $config['settings/profile_photo/(update|remove)'] = 'account.settings/profile_photo/action:$1'; 00070 $config['settings/update_profile'] = 'account.settings/update_profile'; 00071 00072 // Site statistics 00073 $config['admin/stats'] = 'admin.stats/index'; 00074 00075 // API Routing 00076 $config['api/1/([A-Za-z_]+)/([A-Za-z_]+)'] = 'api.apiv1/dispatch/controller:$1/method:$2'; 00077 00078 ## API endpoints 00079 00080 // User APIs 00081 $api['user/authorize'] = 'user/authorize'; 00082 $api['users/(show)'] = 'user/$1'; 00083 $api['users/list'] = 'user/show_list'; 00084 00085 // Friendship APIs 00086 $api['friendships/(show|create|destroy|followers|follows)'] = 'friendship/$1'; 00087 00088 // Status APIs 00089 $api['statuses/(public_timeline|user_timeline|friend_timeline|show|comments|update|delete)'] = 'status/$1'; 00090 $api['comments/(update)'] = 'comment/$1'; 00091 00092 // Search APIs 00093 $api['search/(statuses|users|tags)'] = 'search/$1'; 00094 00095 // Collaborate APIs 00096 $api['collaborate/(create|respond|vote|show|delete)'] = 'collaborate/$1'; 00097 $api['collaborate/list'] = 'collaborate/show_list'; 00098 00099 // News and Events APIs 00100 $api['news/list'] = 'news/index'; 00101 $api['news/(show|create|vote|create_comment|delete_comment|location_search)'] = 'news/$1'; 00102 00103 // Notification APIs 00104 $api['notifications/(show|mark_as_read)'] = 'notification/$1'; 00105 00106 // Setting APIs 00107 $api['settings/(service_hooks|email)'] = 'account.settings/$1'; 00108 00109 // Debug routes 00110 $config['debug/auth'] = 'debug/auth_test'; 00111 $api['debug/auth'] = 'debug/auth_test';