[daisy] Document Hit Counter

Marc Portier mpo at outerthought.org
Thu Aug 10 02:32:47 CDT 2006



Scott Warren wrote:
> My solution is very quick and dirty and creates a dependency on MySQL in the
> Wiki. I would rather it be part of the Repository but have not had the time
> to make it work that way.
> 

no worries, I think having smart hacks for anyone to use is not
preventing anyone of solving things later in a more fundamental way

apart from helping each other (you might get useful feedback as well), I
think in fact that sharing solutions like these just helps us
understanding the various ways people are starting to use the Daisy CMS

additionally, it allows solutions to mature before implementing them in
the core

> I am happy to share the code with you if you like. 
> 

would be cool if you could make some description about it on the
scratchpad-wiki (let us know your registration-name if you need any
edit-rights there)

you could attach any tarball with common shared code or reference a
download-point as you see fit

regards,
-marc=

> Regards
>  
>  
> Scott Warren
> Ocom Software
> email | mailto:scottwarren at ocom.com.au
> web | ocom.com.au
> 
> 
>> -----Original Message-----
>> From: daisy-bounces at lists.cocoondev.org [mailto:daisy-
>> bounces at lists.cocoondev.org] On Behalf Of Marc Portier
>> Sent: Thursday, 10 August 2006 5:04 PM
>> To: Daisy at outerthought.net :open source CMS - general mailinglist
>> Subject: Re: [daisy] Document Hit Counter
>>
>> sweet,
>>
>> maybe we should think about some formal packaging for extensions like
>> these, and start to share them via the community-wiki (scratchpad) ?
>>
>> wdyt?
>>
>> -marc=
>>
>> Scott Warren wrote:
>>> I have a similar requirement which records who, what and when a document
>> was
>>> read. I wrote an extension and used a skin to silently call my
>> extension.
>>> Ie create an extension. In your document-to-html.xsl
>>>
>>> Add lines like
>>>
>>>       <form method="post" >
>>>         <xsl:attribute name="action"><xsl:value-of
>>> select="$basePath"/>/ext/forms/audit</xsl:attribute>
>>>         <input type="hidden" name="langid"><xsl:attribute
>>> name="value"><xsl:value-of select="/page/context/site/@languageId"
>>> /></xsl:attribute></input>
>>>         <input type="hidden" name="branchid"><xsl:attribute
>>> name="value"><xsl:value-of select="/page/context/site/@branchId"
>>> /></xsl:attribute></input>
>>>         <input type="hidden" name="userid"><xsl:attribute
>>> name="value"><xsl:value-of select="/page/context/user/id"
>>> /></xsl:attribute></input>
>>>         <input type="hidden" name="versionid"><xsl:attribute
>>> name="value"><xsl:value-of select="$document/@dataVersionId"
>>> /></xsl:attribute></input>
>>>         <input type="hidden" name="docid"><xsl:attribute
>>> name="value"><xsl:value-of select="$document/@id"
>> /></xsl:attribute></input>
>>>         <input type="hidden" name="ref"><xsl:attribute
>>> name="value"><xsl:value-of
>>> select="/page/context/request/@uri"/></xsl:attribute></input>
>>>         <input type="submit" value="Read and Understood" />
>>>       </form>
>>>
>>> In my case I used a form with a button but you could use an image for
>>> example
>>> <image
>>>
>> src="/daisy/site/ext/hitcounter?langid=1&branched=2&userid=12&versionid=3&
>> do
>>> cid=100" height="0" width="0" />
>>>
>>> The extention will take the parameters and insert a record into the
>>> database.
>>>
>>> Hope this helps.
>>>
>>> Regards
>>>
>>>
>>> Scott Warren
>>> Ocom Software
>>> ... Exceeding Quality.....
>>> web | ocom.com.au
>>>
>>>
>>>> -----Original Message-----
>>>> From: daisy-bounces at lists.cocoondev.org [mailto:daisy-
>>>> bounces at lists.cocoondev.org] On Behalf Of Eric Rich
>>>> Sent: Wednesday, 9 August 2006 11:14 PM
>>>> To: daisy at lists.cocoondev.org
>>>> Subject: [daisy] Document Hit Counter
>>>>
>>>> Hi,
>>>>
>>>> Are there any plans to add the ability to track how many times a
>>>> document has been accessed?
>>>>
>>>> I'd like to display a list of "most popular" documents. As such,
>> sorting
>>>> a query by hit count would be really ideal.
>>>>
>>>> I can hack the code to get this functionality, but I was wondering if
>>>> this is a common request?
>>>>
>>>> Thanks!
>>>>
>>>> -Eric
>>>>
>>>> _______________________________________________
>>>> daisy community mailing list
>>>> Professional Daisy support:
>>>> http://outerthought.org/site/services/daisy/daisysupport.html
>>>> mail to: daisy at lists.cocoondev.org
>>>> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
>>> _______________________________________________
>>> daisy community mailing list
>>> Professional Daisy support:
>> http://outerthought.org/site/services/daisy/daisysupport.html
>>> mail to: daisy at lists.cocoondev.org
>>> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
>>>
>> --
>> Marc Portier                            http://outerthought.org/
>> Outerthought - Open Source, Java & XML Competence Support Center
>> Read my weblog at                http://blogs.cocoondev.org/mpo/
>> mpo at outerthought.org                              mpo at apache.org
>> _______________________________________________
>> daisy community mailing list
>> Professional Daisy support:
>> http://outerthought.org/site/services/daisy/daisysupport.html
>> mail to: daisy at lists.cocoondev.org
>> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
> 
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/site/services/daisy/daisysupport.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
> 

-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo at outerthought.org                              mpo at apache.org


More information about the daisy mailing list