Heute wurde meine APP „Devil Kernel Config“ auf der Startseite von XDA-Developers erwähnt.
Die Homepage der APP bei den XDA-Developers findet man hier.
Hilbrings-Weblog
Heute wurde meine APP „Devil Kernel Config“ auf der Startseite von XDA-Developers erwähnt.
Die Homepage der APP bei den XDA-Developers findet man hier.
Nach längerem Suchen nach einem TypoScript Syntax Highlighting für Notepad++ bin ich endlich auf der russischen Seite ValidCat fündig geworden.
Dort werden die Dateien „userDefineLang.xml“ (Syntax Highlighting) und „typoscript.api“ bzw. „typoscript.xml“ (Auto Vervollständigung) zum download angeboten.
Die Datei userDefineLang.xml muss in das Verzeichnis %appdata%\Notepad++ und die Datei typoscript.api und/oder typoscript.xml in das Verzeichnis c:\Program Files (x86)\Notepad++\plugins\APIs\ kopiert werden.
Nach einem Neustart von Notepad++ stehen die neuen Erweiterungen zur Verfügung.
Das wurde mir heute Nacht von meinem Kollegen Gregor zugeschickt 😉
Hier ist die nächste Patchrunde (Stand 30.08.2011):
--- googleCardClass.php.orig 2011-08-30 14:01:28.000000000 +0200 +++ googleCardClass.php 2011-08-30 14:02:49.000000000 +0200 @@ -124,7 +124,7 @@ protected function parseHtml() { // parse the html to look for the h4 'have X in circles' element - preg_match('/<h4 class="nPQ0Mb pD8zNd">(.*?)<\/h4>/s', $this->html, $matches); + preg_match('/<h4 class="Pv rla">(.*?)<\/h4>/s', $this->html, $matches); if (isset($matches) && !empty($matches)) { $count = $matches[1]; @@ -140,7 +140,7 @@ $name = $matches[1]; // parse the html for the img div - preg_match('/<div class="DzkbSc">(.*?)<\/div>/s', $this->html, $matches); + preg_match('/<div class="c-i-Ra-L CK Xu">(.*?)<\/div>/s', $this->html, $matches); $img_div = $matches[1]; // parse the img div for the image src
In der Datei „googleCardClass.php“ müssen wieder die beiden Regular Expressions zur Ermittlung des Zählers und der Profilbild-URL angepasst werden.
Außerdem darf nicht vergessen werden die Datei „wp-content/cache/plus_cards.txt“ zu entfernen.
Für mein Blog benutze ich das googleCards Plugin von Majubo.
Leider ändert Goggle im Moment alle paar Tage die Bezeichnung der CSS Klassen, sodass das Plugin jedes Mal angepasst werden muss. Ich habe die Regular Expressions zum Suchen des Profilbildes und des „In X people’s circles“ Elements so angepasst das die GoogleCard mit den Änderungen vom 27.08.2011 wieder korrekt angezeigt wird. Zusätzlich habe ich einen Patch für das PHP-cURL Dualstackproblem hinzugefügt.
--- googleCardClass.php.orig 2011-08-04 16:07:22.000000000 +0200 +++ googleCardClass.php 2011-08-27 16:34:51.000000000 +0200 @@ -5,6 +5,10 @@ * http://plusdevs.com * http://plusdevs.com/googlecard-googleplus-php-scraper/ * +* Modified to match google+ classes from 2011/08/27 (see lines 128, 144) +* Added cURL IPv4 Patch (see line 170) +* Peter Hilbring +* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -121,8 +125,7 @@ protected function parseHtml() { // parse the html to look for the h4 'have X in circles' element - preg_match('/</pre> <h4 class="a-b-Fa-ug">(.*?)/s', $this->html, $matches); - + preg_match('/</h4> <h4 class="nPQ0Mb pD8zNd">(.*?)/s', $this->html, $matches); if (isset($matches) && !empty($matches)) { $count = $matches[1]; @@ -138,12 +141,12 @@ $name = $matches[1]; // parse the html for the img div - preg_match('/</h4> <div class="a-R-Z-z-M">(.*?)/s', $this->html, $matches); + preg_match('/ <div class="DzkbSc">(.*?)/s', $this->html, $matches); $img_div = $matches[1]; // parse the img div for the image src preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i', $img_div, $matches); - $img = 'http:' . $matches[1]; + $img = 'https:' . $matches[1]; // put the data in an array $return = array('id' => $this->user_id, 'count' => $circles, 'name' => $name, 'img' => $img, 'url' => $this->url); @@ -164,6 +167,7 @@ curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($this->curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); // execute the call to google+ $this->html = curl_exec($this->curl); +?>
Zur Inbetriebnahme reicht es aus die Datei „googleCardClass.php“ einfach in das Verzeichnis „wp-content/plugins/googlecards/“ zu kopieren und die vorhandene Datei zu überschreiben. Die eventuell vorhandene Datei „wp-content/cache/plus_cards.txt“ muss auf jeden Fall gelöscht werden.
[attachments title=“Downloads“ force_saveas=“1″ logged_users=“0″]