ugrás a tartalomhoz

MediaWiki + SimpleFeed kiegészítő

NetBandita · 2008. Aug. 4. (H), 18.49
Sziasztok!

Hálás lennék a segítségetekért, mert már lassan egy egész napot áldoztam arra, hogy kezdjek valami a hibával, de nem jutottam semmire. Előrebocsátom, hogy nem értek a PHP-hez, de nem is idegenkedek ettől. Remélem, van köztetek olyasvalaki, aki járatos ebben a wikiben (v1.12).

Tehát a probléma: Installáltam a SimpleFeed RSS olvasó kiegészítőt, melyről bővebben itt lehet olvasni. Külön felhívnám a figyelmeteket az itt elérhető simplepie.inc fájlra, melynek még komoly szerepe lesz a későbbiekben.

Annak rendje és módja szerint installáltam a kiegészítőt, de az oldalon, amire elhelyeztem az olvasót, sajnos a PHP hibaüzeneteitől omlott össze. A következő hibaüzeneteket adta ki:
  1. Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 551 in /home/hardcore/www/jogilexikon/extensions/simplepie.inc on line 12967  
  2.   
  3. Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 497 in /home/hardcore/www/jogilexikon/extensions/simplepie.inc on line 13055  
  4.   
  5. Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 497 in /home/hardcore/www/jogilexikon/extensions/simplepie.inc on line 13121  
Ami ennek ellenérő furcsa, hogy a kiegészítő működik - eme hibáját leszámítva - problémamentesen.

Adalékkén bemásolom azokat, amire a hibaüzenetek hivatkoznak.

offset 497-es sor
  1. /** 
  2.      * @var string Cache location (relative to executing script) /* <span style="font-weight:bold">ez itt a 497-es</span> */  
  3.      * @see SimplePie::set_cache_location()   
  4.      * @access private  
  5.      */  
  6.     var $cache_location = './cache';  
offset 551-es sor
  1. /** 
  2.      * @var string Class used for parsing feeds 
  3.      * @see SimplePie::set_parser_class() 
  4.      * @access private 
  5.      */  
  6.     var $parser_class = 'SimplePie_Parser'/* <span style="font-weight:bold">ez itt az 551-es</span>*/  
12967-es sor
  1. if (preg_match($pcre$this->remove_rfc2822_comments($date), $match)) /* <span style="font-weight:bold">ez itt a 12967-es sor</span>*/  
  2.         {  
  3.             /* 
  4.             Capturing subpatterns: 
  5.             1: Day name 
  6.             2: Day 
  7.             3: Month 
  8.             4: Year 
  9.             5: Hour 
  10.             6: Minute 
  11.             7: Second 
  12.             8: Timezone ± 
  13.             9: Timezone hours 
  14.             10: Timezone minutes 
  15.             11: Alphabetic timezone 
  16.             */  
  17.   
  18.             // Find the month number  
  19.             $month = $this->month[strtolower($match[3])];  
  20.   
  21.             // Numeric timezone  
  22.             if ($match[8] !== '')  
  23.             {  
  24.                 $timezone = $match[9] * 3600;  
  25.                 $timezone += $match[10] * 60;  
  26.                 if ($match[8] === '-')  
  27.                 {  
  28.                     $timezone = 0 - $timezone;  
  29.                 }  
  30.             }  
  31.             // Character timezone  
  32.             elseif (isset($this->timezone[strtoupper($match[11])]))  
  33.             {  
  34.                 $timezone = $this->timezone[strtoupper($match[11])];  
  35.             }  
  36.             // Assume everything else to be -0000  
  37.             else  
  38.             {  
  39.                 $timezone = 0;  
  40.             }  
  41.   
  42.             // Deal with 2/3 digit years  
  43.             if ($match[4] < 50)  
  44.             {  
  45.                 $match[4] += 2000;  
  46.             }  
  47.             elseif ($match[4] < 1000)  
  48.             {  
  49.                 $match[4] += 1900;  
  50.             }  
  51.   
  52.             // Second is optional, if it is empty set it to zero  
  53.             if ($match[7] !== '')  
  54.             {  
  55.                 $second = $match[7];  
  56.             }  
  57.             else  
  58.             {  
  59.                 $second = 0;  
  60.             }  
  61.   
  62.             return gmmktime($match[5], $match[6], $second$month$match[2], $match[4]) - $timezone;  
  63.         }  
  64.         else  
  65.         {  
  66.             return false;  
  67.         }  
13055-ös sor
  1. if (preg_match($pcre$date$match)) /*<span style="font-weight:bold">13055-ös sor</span>*/  
  2.         {  
  3.             /* 
  4.             Capturing subpatterns: 
  5.             1: Day name 
  6.             2: Day 
  7.             3: Month 
  8.             4: Year 
  9.             5: Hour 
  10.             6: Minute 
  11.             7: Second 
  12.             8: Timezone 
  13.             */  
  14.   
  15.             // Month  
  16.             $month = $this->month[strtolower($match[3])];  
  17.   
  18.             // Character timezone  
  19.             if (isset($this->timezone[strtoupper($match[8])]))  
  20.             {  
  21.                 $timezone = $this->timezone[strtoupper($match[8])];  
  22.             }  
  23.             // Assume everything else to be -0000  
  24.             else  
  25.             {  
  26.                 $timezone = 0;  
  27.             }  
  28.   
  29.             // Deal with 2 digit year  
  30.             if ($match[4] < 50)  
  31.             {  
  32.                 $match[4] += 2000;  
  33.             }  
  34.             else  
  35.             {  
  36.                 $match[4] += 1900;  
  37.             }  
  38.   
  39.             return gmmktime($match[5], $match[6], $match[7], $month$match[2], $match[4]) - $timezone;  
  40.         }  
  41.         else  
  42.         {  
  43.             return false;  
  44.         }  
13121-es sor
  1. if (preg_match($pcre$date$match)) /* <span style="font-weight:bold">ez a szóban forgó sor</span> */  
  2.         {  
  3.             /* 
  4.             Capturing subpatterns: 
  5.             1: Day name 
  6.             2: Month 
  7.             3: Day 
  8.             4: Hour 
  9.             5: Minute 
  10.             6: Second 
  11.             7: Year 
  12.             */  
  13.   
  14.             $month = $this->month[strtolower($match[2])];  
  15.             return gmmktime($match[4], $match[5], $match[6], $month$match[3], $match[7]);  
  16.         }  
  17.         else  
  18.         {  
  19.             return false;  
  20.         }  
Köszönöm a segítséget!
 
1

Megoldva

NetBandita · 2008. Aug. 4. (H), 22.21
Köszönöm, megoldottam egy másik kiegészítővel, így ez sztornó. Viszont aki tudja, hogy miképp lehet kivédeni, hogy az 'Ő' és 'ő' helyett '?' jelenjenek meg, megmondhatná. :)