Changeset 152 for dev/mods/feed_syndication/settings.php
- Timestamp:
- 12/13/06 17:22:00 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/mods/feed_syndication/settings.php
r148 r152 1 <? 1 <?php 2 ////// 3 ////// ////// 4 ////// liq's feed syndication mod v1.3 5 //////////// 6 //////////// 7 //////////// 8 //////////// 2 9 3 // liq's feed syndication mod v1.2 10 11 // set this to 1 if you are running a master killboard and want 12 // to even fetch mails not related to your corp / alliance 13 define( MASTER, 0 ); 14 15 4 16 5 17 @set_time_limit(0); 18 require_once( "feed_fetcher.php" ); 6 19 require_once( "common/class.page.php" ); 7 20 require_once( "common/admin_menu.php" ); 8 require_once( "common/feed_fetcher.php" );9 21 require_once( 'common/class.corp.php' ); 10 22 require_once( 'common/class.alliance.php' ); … … 35 47 else 36 48 setConfig('fetch_verbose', '0'); 49 50 if ( $_POST['fetch_compress'] ) 51 setConfig('fetch_compress', '0'); 52 else 53 setConfig('fetch_compress', '1'); 37 54 38 55 if ( $_POST['fetch_comment'] ) … … 61 78 62 79 if ( $_POST['fetch'] ) { 63 if (CORP_ID ) {64 80 if (CORP_ID && !MASTER) { 81 $corp = new Corporation(CORP_ID); 65 82 $myid = '&corp='.urlencode($corp->getName()); 66 83 } 67 if (ALLIANCE_ID ) {84 if (ALLIANCE_ID && !MASTER) { 68 85 $alli = new Alliance(ALLIANCE_ID); 69 86 $myid = '&alli='.urlencode($alli->getName()); 70 87 } 71 88 72 89 for ($i=1; $i<=$feedcount; $i++) { … … 79 96 if ( $_POST['fetch_losses'] ) 80 97 $str .= "&losses=1"; 98 if ( !getConfig('fetch_compress') ) 99 $str .= "&gz=1"; 81 100 if ( $_POST['graball'] ) { 82 101 for ($l = 1; $l<=52; $l++) { 83 102 $html .= "<b>Week: ". $l ."</b><br>"; 84 $html .= $feedfetch->grab( $feed[$i]. $myid.$str."&week=".$l);103 $html .= $feedfetch->grab( $feed[$i]."&week=".$l, $myid.$str ); 85 104 } 86 105 } else 87 $html .= $feedfetch->grab( $feed[$i] .$myid.$str );106 $html .= $feedfetch->grab( $feed[$i], $myid.$str ); 88 107 } 89 108 … … 93 112 } 94 113 95 $html .= "<form id=options name=options method=post action=?a= admin_feed>";114 $html .= "<form id=options name=options method=post action=?a=settings_feed>"; 96 115 $html .= "</table>"; 97 116 … … 133 152 $html .= "\"><br><i> (leave blank for none)</i><br></td></tr>"; 134 153 154 $html .= "<tr><td height=30px width=150px><b>Enable compression?</b></td>"; 155 $html .= "<td><input type=checkbox name=fetch_compress id=fetch_compress"; 156 if ( !getConfig('fetch_compress') ) 157 $html .= " checked=\"checked\""; 158 $html .= "><i> (enables GZip compression for feeds that support this feature, for streams that do not support GZip compression regular html mode will be used automatically)</i></td>"; 159 $html .= "</tr>"; 160 135 161 $html .= "<tr><td height=30px width=150px><b>Verbose mode?</b></td>"; 136 162 $html .= "<td><input type=checkbox name=fetch_verbose id=fetch_verbose"; 137 163 if ( getConfig('fetch_verbose') ) 138 164 $html .= " checked=\"checked\""; 139 $html .= "><i> (displays errormessages when the imported mail is malformed, already exists, is notrelated etc.)</i></td>";165 $html .= "><i> (displays errormessages when the imported mail is rejected for being malformed, already existing, not being related etc.)</i></td>"; 140 166 $html .= "</tr></table><br><br>"; 141 167