Mein erstes Textpattern-Plugin: htn_feedstats
24.08.2007 - 09:29 Textpattern, Software 9 Kommentar(e)Endlich ist es soweit, mein erstes Plugin für das Weblogleichtgewicht Textpattern erblickt heute das Licht der Welt (oder die Bits und Bytes?).
htn_feedstats ist ein Plugin zum auslesen der aktuellen Statistiken von Feeds (RSS und Atom) welche bei Feedburner gehostet werden…
Folgende Werte kann das Plugin dabei zurückgeben:
- Leseranzahl des Vortages
- Bisherige Item-Hits
- Useraktivitäten (Reach-Wert)
Damit das Plugin funktionieren kann muss die Option “FeedCount” für den jeweiligen Feed aktiviert werden, andernfalls wirft das Plugin einen Fehler aus.
Features:
- Einfaches Handling
- Die Daten werden standardmäßig nur alle 6 Stunden von Feedburner bezogen und auf dem eigenen Server zwischengespeichert, da sich ohne Caching die Performance drastisch vermindern würde.
- Das Plugin wird versuchen über 3 verschiedene Wege an die nötigen Daten zu gelangen, über open(), file_get_contents(), und zu guter letzt über die cURL-Erweiterung.
- PHP4 und PHP5 kompatibel
Die Syntax (versuchtes Englisch)
<txp:htn_feedstats />
Required attributes
- id: The ID of the feed you want to check, alternatively you can also use “name”.
The “id” OR “name” have to be given to use this plugin.
- name: The name of the feed you want to check, can be found in your Feedburner-Center. Alternatively you can use “id”.
Optional attributes
- show: Here you dan define what you want to output from the Feedburner-API. Default is “readers”. Other values can be “hits” and “reach”.
- cache: Enables or disables the caching-function of the plugin. If enabled, you have to create a file where the plugin can write the cached data. Default is “1”, “0” disables the function.
- cachefile: The Path to the cachfile. Before you use this, you have to create the file. If the Caching-File doesnt exist, the Caching will automaticly get disabled till the file exist. Default is “files/feedcache.txt”. So you can upload any file named “feedcache.txt” via your file-backend and everything will be fine. If you create the file via FTP you have to give it CHMOD777.
- cachetime: The time (in seconds) that the plugin will cache the data in the cachefile. After x seconds the plugin will automaticly update the data from the Feedburner-API. Default is “21600”, so the plugin will update every six hours. This is usefull because the Feedburner-API updates only once a day.
Bisher wurde Plugin nur von Eric, Michel und mir getestet, ich gebe es daher erstmal als “Beta” heraus. Über Erfahrungen würde ich mich natürlich freuen.
Eine grafische “Demo” zu diesem super-komplizierten Plugin findet Ihr in meiner Sidebar :)
Kommentare zum Thema Mein erstes Textpattern-Plugin: htn_feedstats:
Hi. I’m gazrang. I just downloaded your plugin, but I cannot see thee feedcount, only saw error.
The error message was “ Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration on line 53” and infinite loop started. Would you please fix it? I want to use this plugin so much.
@gazrang Mhm “Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration on line 53” – says that your server isnt able to fetch data from external domains.
This isnt a probleme with the plugin, but with the configuration of your webserver. contact your webhost-admin and ask if he enables external access to fopen() for you, or better, enable curl-functions.
Hallo Christian. Gestern habe ich dein plugin installiert und bei Konfiegurirung bemerkt dass die Adresse, die du in deinem Plugin nutzt um Feedburner zu fragen, stimmt jetzt nich/ Die neue Adresse ist https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=blogspot/tuAm
Ja und noch eine kleine Erläuterung für gazrang. Du kannst doch versuchen ausgeschaltene functionen einzuschalten durch .htaccess
Du mess blos in dem eine Spalte addiren und zwar:
php_value allow_url_fopen 1
Kommentar-Feed für diesen Artikel
Wettbewerbe als neue Form der Auftragsvergabe? CakePHP 1.2 ich komme


Thanks you very much, its hellper me to show Feedburner stat via TxP plugins. No JS anymore