Hi,
I'm trying to modify a spam statistics plugin to read entries from the spamblock plugin's log. To do this I need to work out what type of logging spamblock is using. How can I find the 'logtype' property of the spamblock plugin from within the spamstats plugin?
I noticed the spamblock logtype is stored in $serendipity, but with the class id(?) as the key:
["serendipity_event_spamblock:29da447ec2de49096452e6037c9a79aa/logtype"]=>
string(4) "file"
is there an efficient way to fetch the value from $serendipity (ie work out the clsid) or is there an easier/more efficient way?
Cheers.
Get properties of a plugin
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Get properties of a plugin
Hi!
The most easy way would be:
The other way would involve fetching a list of all plugins, checking which ones are of the class 'serendipity_event_spamlog', then loading that plugin and gettin gthe config via API methods. That would be slower. 
Regards,
Garvin
The most easy way would be:
Code: Select all
<?php
$q = "SELECT value FROM serendipity_config WHERE name LIKE 'serendipity_event_spamblock:%/logtype LIMIT 1";
$logtype = serendipity_db_query($q, true);
print_R($logtype);
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/