Thanks. I will take a look into these hooks.

What I meant by special property was something like the 'Last modified date' . 
It was a pain to create it manually when it was not handled by the RDF export :)
I am expecting to use predefined properties for the metadata I want to track.

- Laurent


On Jul 22, 2010, at 7:57 AM, Markus Krötzsch wrote:

> On 22/07/2010 04:03, Laurent Alquier wrote:
>> Hi
>> 
>> I would like to track more properties about the pages themselves in order to
>> improve community editing.
>> That means things like, first author, last author, number of hits, number of
>> edits, and so on...
>> I am planning to separate these properties from the content using different
>> name spaces (dublin core, skos, something like that).
>> 
>> I am already using an extension that adds credits at the bottom of a page
>> (first author and all contributors).
>> It would be a perfect place to add these properties.
>> 
>> The problem is, that extension is using a hook that is triggered after the
>> semantic properties are processed, so I cannot add these using the wikitext
>> parser.
>> 
>> My question(s):
>> 
>> - Do you know of a hook that would work better at the end of a page but
>> before the wikitext is interpreted ?
> 
> SMW has two examples for this, both in the file SMW_ParseData.php:
> 
> * the hook function onParserAfterTidy hooks into parsing to fetch category 
> data, and
> * the hook function onNewRevisionFromEditComplete hooks into editing to fetch 
> modification times.
> 
> Depending on where your information is available, you can use similar hook 
> implementations to add data to SMW. The code for adding data is similar in 
> both cases.
> 
>> - Failing that, do you know where I could find a sample of code to add
>> properties directly to the store, without relying on the parser ?
> 
> Do not do this. The next update job would delete your data.
> 
>> - Is there a better way to achieve that (without adding another 'special'
>> property, which is kind of cumbersome at the moment).
> 
> If you want to address your data by some property, then you need to define 
> one. Of course, it needs not be a special property but could as well be a 
> user-defined property that you just re-use.
> 
> 
> -- Markus
> 
>> 
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> 
>> 
>> 
>> _______________________________________________
>> Semediawiki-devel mailing list
>> Semediawiki-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
> 



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to