Changeset 1531 in ExiteCMS
- Timestamp:
- 07/08/08 18:12:41 (4 years ago)
- Location:
- modules/common/download_statistics/php-files/modules/download_statistics
- Files:
-
- 3 edited
-
batch/get_statistics.php (modified) (1 diff)
-
batch/migrate_download_statistics.php (modified) (2 diffs)
-
module_installer.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/common/download_statistics/php-files/modules/download_statistics/batch/get_statistics.php
r1492 r1531 172 172 $oldfile = $newfile; 173 173 } 174 // update download counters if need be 175 if ($settings['dlstats_remote']) { 176 // do we have a download record for this URL? 177 $result2 = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_url LIKE '%".$download['path']."' AND download_external = 1"); 178 while ($data2 = dbarray($result2)) { 179 // check if this is a full URL match 180 $data2['url'] = parse_url($data2['download_url']); 181 if ($download['path'] == $data2['url']['path']) { 182 // match found, update the counter 183 $result3 = dbquery("UPDATE ".$db_prefix."downloads SET download_counter=download_counter+1 WHERE download_id = '".$data2['download_id']."'"); 184 } 185 } 186 } 174 187 // create a log record 175 188 // -
modules/common/download_statistics/php-files/modules/download_statistics/batch/migrate_download_statistics.php
r1492 r1531 97 97 $data = mysql_fetch_assoc($result); 98 98 } 99 // fill the file_ipss table from the old statistics table and create the logfiles 99 100 // fill the file_ips table from the old statistics table and create the logfiles 100 101 display("Creating the new download logfiles:"); 101 102 $result = mysql_query("SELECT * FROM ".$db_prefix.$table." ORDER BY ds_timestamp"); … … 153 154 } 154 155 156 display("Update counters of the items in the download section"); 157 $result = mysql_query("SELECT * FROM ".$db_prefix."downloads WHERE download_external = 1") 158 display("-> updating ".dbrows($result)." download records!"); 159 $data = mysql_fetch_assoc($result); 160 while ($data !== false) { 161 // get the filename from the URL 162 $url = parse_url($data['download_url']); 163 // do we have a counter for it? 164 $result2 = mysql_query("SELECT * FROM ".$db_prefix."dlstats_files WHERE dlsf_file = '".$url['path']."' LIMIT 1"); 165 if ($result2) { 166 // update the counter 167 $data2 = mysql_fetch_assoc($result2); 168 $result2 = mysql_query("UPDATE ".$db_prefix."downloads SET download_counter = '".$data2['dlsf_counter']."' WHERE download_id = '".$data['download_id']."'"); 169 } 170 $data = mysql_fetch_assoc($result); 171 } 172 155 173 display(" "); 156 174 display("Migration finished!"); -
modules/common/download_statistics/php-files/modules/download_statistics/module_installer.php
r1528 r1531 17 17 $mod_title = "Download Statistics"; 18 18 $mod_description = "Gather and display download statistics from download mirror logs. includes a Google Map with downloaders per country"; 19 $mod_version = "1.1. 2";19 $mod_version = "1.1.0"; 20 20 $mod_developer = "WanWizard"; 21 21 $mod_email = "wanwizard@gmail.com"; … … 89 89 $localestrings['en']['dls506'] = "No"; 90 90 $localestrings['en']['dls507'] = "Yes"; 91 $localestrings['en']['dls508'] = " Update download counters:";92 $localestrings['en']['dls509'] = "If No, only downloads from the download pages are counted. If Yes, the batch program 'get_statistics.php' willupdate the counters";91 $localestrings['en']['dls508'] = "External download counter updates:"; 92 $localestrings['en']['dls509'] = "If No, downloads are counted by the download section, when the user clicks on a link. If Yes, the batch program like 'get_statistics.php' has to update the counters"; 93 93 $localestrings['en']['dls510'] = "Access to download statistics for:"; 94 94 $localestrings['en']['dls511'] = "Google Maps API key:"; … … 155 155 $localestrings['en']['dls950'] = "The report could not be generated:"; 156 156 157 $localestrings['nl'] = array(); 158 $localestrings['nl']['dls110'] = "De Download Statistics module is niet geinstalleerd. Dit moet gebeuren voordat deze processor gebruikt kan worden."; 159 // Geo Mapping using Google Maps panel 160 $localestrings['nl']['dls400'] = "Geografische verdeling van de gebruikers"; 161 // Admin panel 162 $localestrings['nl']['dls500'] = "Download statistieken configuratie"; 163 $localestrings['nl']['dls501'] = "GeoMap bestandsnaam regex:"; 164 $localestrings['nl']['dls502'] = "IP addressen van gedownloade bestanden die voldoen aan deze reguliere expressie zullen aan de GeoMap worden toegevoegd. Blanco betekent ALLE bestanden!"; 165 $localestrings['nl']['dls503'] = "Locatie van de log bestanden:"; 166 $localestrings['nl']['dls504'] = "Pad is relatief ten opzichte van de webroot. Start met een / om een absoluut pad te gebruiken"; 167 $localestrings['nl']['dls505'] = "Bewaren"; 168 $localestrings['nl']['dls506'] = "Nee"; 169 $localestrings['nl']['dls507'] = "Ja"; 170 $localestrings['nl']['dls508'] = "Download teller extern bijwerken:"; 171 $localestrings['nl']['dls509'] = "Bij Nee worden downloads geteld als de gebruiker klikt op een link in de download sectie. Bij Ja moet er een extern programma als 'get_statistics.php' gebruikt worden."; 172 $localestrings['nl']['dls510'] = "Toegang tot de statistieken voor:"; 173 $localestrings['nl']['dls511'] = "Google Maps API key:"; 174 $localestrings['nl']['dls512'] = "Klik <a href='http://code.google.com/apis/maps/signup.html' target='_blank'>hier</a> om u in te schrijven bij Google Maps."; 175 $localestrings['nl']['dls513'] = "Titel download statistieken"; 176 $localestrings['nl']['dls514'] = "Gebruikt als titel voor het statistieken paneel. U kunt %s gebruiken om het totaal aantal downloads in te voegen."; 177 // Statistics counter panel 178 $localestrings['nl']['dls600'] = "Download statistieken"; 179 $localestrings['nl']['dls601'] = "Korte naam"; 180 $localestrings['nl']['dls602'] = "Volgorde"; 181 $localestrings['nl']['dls603'] = "Opties"; 182 $localestrings['nl']['dls604'] = "Er zijn geen statistiek tellers gedefinieerd op dit moment"; 183 $localestrings['nl']['dls605'] = "Toevoegen"; 184 $localestrings['nl']['dls606'] = "Verplaats deze regel naar boven"; 185 $localestrings['nl']['dls607'] = "Verplaats deze regel naar beneden"; 186 $localestrings['nl']['dls608'] = "Wijzig deze definitie"; 187 $localestrings['nl']['dls609'] = "Verwijder deze definitie"; 188 $localestrings['nl']['dls610'] = "Naam:"; 189 $localestrings['nl']['dls611'] = "Omschrijving:"; 190 $localestrings['nl']['dls612'] = "Gebruik de teller van dit download item:"; 191 $localestrings['nl']['dls613'] = "Gebruik de tellers van deze gedownloade bestanden:"; 192 $localestrings['nl']['dls614'] = "Bewaren"; 193 $localestrings['nl']['dls615'] = "Dit zijn de bestanden die tot op heden gedownload zijn. Klik op een bestandsnaam om deze aan de lijst toe te voegen:"; 194 $localestrings['nl']['dls616'] = "Download statistieken teller"; 195 // Messages: reports 196 $localestrings['nl']['dls800'] = "Top gedownloade bestanden"; 197 $localestrings['nl']['dls801'] = "Bestandsnaam filter"; 198 $localestrings['nl']['dls802'] = "Dit is een reguliere expressie"; 199 $localestrings['nl']['dls803'] = "Toon mij"; 200 $localestrings['nl']['dls804'] = "de top"; 201 $localestrings['nl']['dls805'] = "alle"; 202 $localestrings['nl']['dls806'] = "resultaten in het rapport, en sorteer het"; 203 $localestrings['nl']['dls807'] = "Oplopend"; 204 $localestrings['nl']['dls808'] = "Aflopend"; 205 $localestrings['nl']['dls809'] = "Fout in reguliere expressie:"; 206 $localestrings['nl']['dls810'] = "Bestandsnaam"; 207 $localestrings['nl']['dls811'] = "Download teller"; 208 // Messages: searches 209 $localestrings['nl']['dls850'] = "Gedownloade bestanden"; 210 // Messages: geomap 211 $localestrings['nl']['dls900'] = "<center>Geen valide Google Maps key gevonden voor de URL: %s!</center>"; 212 $localestrings['nl']['dls901'] = "In totaal konden %u gebruikers worden gemapt."; 213 $localestrings['nl']['dls902'] = "Plaats uw muis op een markering om meer informatie te zien over een bepaald land"; 214 $localestrings['nl']['dls903'] = "Sorry, de Google Maps API is niet compatibel met uw browser"; 215 $localestrings['nl']['dls904'] = "Voor %u gebruiker kon geen locatie worden bepaald"; 216 $localestrings['nl']['dls905'] = "Voor %u gebruikers kon geen locatie worden bepaald"; 217 // Messages: admin 218 $localestrings['nl']['dls910'] = "Groep selectie is niet correct."; 219 $localestrings['nl']['dls911'] = "Reguliere expressie is foutief. De fout is: "; 220 $localestrings['nl']['dls912'] = "Opgegeven log pad naam bestaat niet."; 221 $localestrings['nl']['dls913'] = "Geen schrijftoegang tot het opgegeven pad."; 222 // Messages: Statistics counter panel 223 $localestrings['nl']['dls920'] = "Statistiek definitie is verwijderd."; 224 $localestrings['nl']['dls921'] = "Statistiek definitie is bewaard."; 225 $localestrings['nl']['dls922'] = "Het gevraagde statistiek ID bestaat niet."; 226 $localestrings['nl']['dls923'] = "Resultaat:"; 227 $localestrings['nl']['dls924'] = "Statistiek definitie succesvol toegevoegd."; 228 $localestrings['nl']['dls925'] = "Statistiek definitie succesvol bijgewerkt."; 229 $localestrings['nl']['dls926'] = "U dient een korte naam in te geven voor deze definitie"; 230 $localestrings['nl']['dls927'] = "U dient een omschrijving in te geven voor deze definitie"; 231 $localestrings['nl']['dls928'] = "U moet of een download item, of bestandsnamen selecteren. Of beide."; 232 $localestrings['nl']['dls929'] = "Weet u zeker dat u deze definitie wilt verwijderen?"; 233 // Messages: Reports 234 $localestrings['nl']['dls950'] = "Het rapport kon niet worden aangemaakt:"; 235 157 236 /*---------------------------------------------------+ 158 237 | commands to execute when installing this module | … … 268 347 269 348 switch ($current_version) { 270 case "1.1.0": 271 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('dlstats_title', '')"); 272 273 case "1.1.1": // current release version 349 case "1.1.0": // current release version 274 350 275 351 }
Note: See TracChangeset
for help on using the changeset viewer.
