Campustream 1.0
A social network MQP for WPI
|
00001 <h1>Services</h1> 00002 00003 <div id="settings-desc"> 00004 <p>Campustream allows you to connect both your Twitter and Facebook accounts, which enables many additional features on the site. If you don't use any of these services, don't worry! You will still be able to enjoy Campustream as a standalone social network.</p> 00005 00006 <p><strong>Please note that Facebook and Twitter importing are currently non-functional. However, exporting posts to both sites does work.</strong></p> 00007 </div> 00008 00009 <div id="settings-services"> 00010 <div id="settings-facebook"> 00011 <h1>Facebook</h1> 00012 00013 <? if ($user->has_facebook()): ?> 00014 <div class="service-action-nav"> 00015 <a href="/facebook/authorize">Refresh Account</a> | <a href="/facebook/deauthorize?s=<?=md5('zOmg4tehcoolz!' . $user->username)?>">Disconnect Account</a> 00016 </div> 00017 00018 <input type="hidden" id="form_auth" value="<?=md5('zOmg4tehcoolz!' . $user->username)?>" /> 00019 <table class="service-hooks"> 00020 <tr> 00021 <td><label for="facebook-import">Import Statuses</label></td> 00022 <td><input type="checkbox" id="facebook-import" <?=($user->facebook()->import_enabled) ? 'checked="checked"' : ''?> /></td> 00023 00024 <td><label for="facebook-export">Export Statuses</label></td> 00025 <td><input type="checkbox" id="facebook-export" <?=($user->facebook()->export_enabled) ? 'checked="checked"' : ''?> /></td> 00026 </tr> 00027 </table> 00028 00029 <div class="service-info"> 00030 <div class="service-profile-image"> 00031 <img style="width: 128px" src="http://graph.facebook.com/<?=$user->facebook()->username?>/picture?type=large" /> 00032 </div> 00033 <div class="service-profile-bio"> 00034 <h1><?=$user->facebook()->name?></h1> 00035 <p id="service-twitter-bio"><?=$user->facebook()->about?></p> 00036 <p id="service-twitter-website"><a href="<?=$user->facebook()->link?>" target="_blank">Facebook Profile</a></p> 00037 </div> 00038 <div style="clear:both;"></div> 00039 </div> 00040 <? else: ?> 00041 <div class="service-login"> 00042 <a href=" 00043 <?=$facebook->getLoginUrl( 00044 array( 00045 'next' => ($GLOBALS['ISDEV'] ? 'http://dev.campustream.com/facebook/authorize/' : 'http://campustream.com/facebook/authorize/'), 00046 'req_perms' => 'publish_stream, create_event, rsvp_event, offline_access, read_stream' 00047 ) 00048 ); 00049 ?>"> 00050 <img src="http://static.ak.fbcdn.net/rsrc.php/zB6N8/hash/4li2k73z.gif"> 00051 </a> 00052 </div> 00053 <? endif; ?> 00054 </div> 00055 00056 <div id="settings-twitter"> 00057 <h1>Twitter</h1> 00058 00059 <div class="service-settings"> 00060 <? if ($user->has_twitter()): ?> 00061 <div class="service-action-nav"> 00062 <a href="/twitter/new">Refresh Account</a> | <a href="/twitter/destroy?s=<?=md5('zOmg4tehcoolz!' . $user->username)?>">Disconnect Account</a> 00063 </div> 00064 00065 <input type="hidden" id="form_auth" value="<?=md5('zOmg4tehcoolz!' . $user->username)?>" /> 00066 <table class="service-hooks"> 00067 <tr> 00068 <td><label for="twitter-import">Import Tweets</label></td> 00069 <td><input type="checkbox" id="twitter-import" <?=($user->twitter()->import_enabled) ? 'checked="checked"' : ''?> /></td> 00070 00071 <td><label for="twitter-export">Export Tweets</label></td> 00072 <td><input type="checkbox" id="twitter-export" <?=($user->twitter()->export_enabled) ? 'checked="checked"' : ''?> /></td> 00073 </tr> 00074 </table> 00075 00076 <div class="service-info"> 00077 <div class="service-profile-image"> 00078 <img src="<?=str_replace('normal', 'reasonably_small', $user->twitter()->avatar_url)?>" /> 00079 </div> 00080 <div class="service-profile-bio"> 00081 <h1><?=$user->twitter()->name?></h1> 00082 <h2>@<?=$user->twitter()->username?> <span class="service-profile-loc"><?=$user->twitter()->location?></span></h2> 00083 <p id="service-twitter-bio"><?=$user->twitter()->bio?></p> 00084 <p id="service-twitter-website"><?=$user->twitter()->website_formatted?></p> 00085 </div> 00086 <div style="clear:both;"></div> 00087 </div> 00088 <? else: ?> 00089 <div class="service-login"> 00090 <a href="/twitter/new?r=/settings/services"><img src="/images/twitter-login.png" alt="Twitter" /></a> 00091 </div> 00092 <? endif; ?> 00093 </div> 00094 </div> 00095 00096 <div style="clear:both"></div> 00097 </div>