The Community Site has become a read-only archive. Please refer to the Help Center for new content and discussions

Sample ContentStation Script : Show Object History

It is possible to add functions to the Right Mouse Button of ContentStation. These functions will appear when the RightMouseButton is clicked on an object.

This sample is using this technology to diplay the history of an object. 

In ContentStation, an overview like below will then be shown.


 

 

Installing:

1) Create a folder called 'CS-scripts' in  <enterprise>/config/

2) Unzip the attached ObjectHistiry.zip in this folder (<enterprise>/config/CS-scripts)


Configuration on Client

1) Open wwsettings.xml, add a line like below in the section '<ObjectContextMenuActions>'

<ObjectContextMenuAction label="ObjectHistory" url="{SERVER_URL}config/CS-scripts/ObjectHistory.php?ticket={SESSION_ID}" objtypes="Image,Article,Layout"/>

 

Configuration on Server

1) Open your configserver.php, look for LOGLEVEL and set this to '2', see below.

// LOGLEVEL:
// High-level monitoring (audit trails). Possible values are:
// '0' High-level logging not enabled. Default option.
// '1' Logon and Logoff only.
// '2' All SOAP calls (note that this creates a large number of rows in the smartlog table.)
//
define ('LOGLEVEL', '2');
 

Testing
Because the audit trial of an object will only be saved from the moment the LOGLEVEL setting is set to '2' we will start with a new object for testing

1. Create a new article 'MyHistoryArticle'

2. Change the state of this article

3. Use search to find this article, press the right mouse button and select "ObjectHistory" if you do not see this function, then something in your wwsettings.xml is not correct
    - a new tab should now be openend. 
    - you should see an overview of the objects history with a create and SetObjectProperties 

 

 

Limitations and known problems

The function has been build as an example. It has limited configuration options, and limited error handling. 

Also: Please keep in mind that by switching on 'LOGLEVEL' the smart_log table will fill and enlarge your database. 

Disclaimer


WoodWing provides this plug-in as a sample implementation. This plug-in is provided ‘as is’ without support from WoodWing. The current status of this integration is not ready for production, it would require further development and proper QA.

Usage is at your own risk.

Copyright 2008-2010 WoodWing Software BV. Licensed under the Apache License, Version 2.0


AttachmentSize
ObjectHistory.php_.zip2.39 KB
fraser.crozier †
.
fraser.crozier †'s picture
This is pretty cool

Winfried

I had a play with this. Very useful.

Fraser Crozier • Head of Publishing Technologies • Pacific Magazines, Seven West Media
www.pacificmags.com.au[/url] www.sevengroup.com.au[/url]

steve.hazelden
Automated Publishing Services
(Solution Partner)
steve.hazelden's picture
Reporting for later versions

Hi there

Has anyone managed to get this plugin or something similar to work on a more recent version.

We arre looking for a way to generate this kind of reporting ( CS Publication overview with version history) on the later versions we have.

Please let me know any help / direction will be greatly appreciated.

Cheers

Steve

winfried.de.vries
WWSW
winfried.de.vries's picture
Hi Steve Just tested this

Hi Steve

Just tested this with Enterprise 7.6.4 and this seems to work without problems.

Most important is that you set the LOGLEVEL in configserver.php to '2' so that the audit trail for objects is being written from that moment onwards.

Then the page that is used to display the objectHistory can be modified to your needs.

Basically the page uses the information from the database tables and displays it to the user.

the table holing the audit info is 'smart_log'

Kind Regards
Winfried de Vries

thomas.h
mpm media process management GmbH
thomas.h's picture
9.x.x

Hello all!

Same question from me: Does the script run under 9.x.x? After installing, all I get is a white screen.

 

Greetings

Thomas

matthew.fry
The Villages Daily Sun
matthew.fry's picture
Works for us

We installed the script and it is working great so far.

Matthew Fry
Associate Editor
The Villages Daily Sun
1100 Main Street
The Villages, FL 32159
352-751-7935

charles.thompson
Villages Media Management
charles.thompson's picture
Hi All!

Hi All!

As Matt wrote, it works well for our server.  It does cause database bloat as the history is stored.  I got around this with a Smart Mover executed script that hits our MySQL database and deletes any history that is older than 10 days.  The script can be modified to different time periods.  I would be glad to share with anyone interested.

Thanks,
Charlie Thompson
============
Systems Administrator, Office 352- 751- 7924 (direct)

Villages Media Management, 1100 Main Street
The Villages, FL 32159, USA
(352) 753- 1119, x9005
* The Daily Sun * The Villages Magazine * VNN * WVLG

pmc.team
Multimedia Solutions AG
pmc.team's picture
Cool stuff!

Winfried

Would be great if it would work within Smart Connection as well!

Philippe

winfried.de.vries
WWSW
winfried.de.vries's picture
Hi Philipe The actions done

Hi Philipe

The actions done by SmartConnection are also tracked.

Or do you mean that you want to see the History/overview in SmartConnection?

Thx
Winfried

pmc.team
Multimedia Solutions AG
pmc.team's picture
Hi Winfried I mean we would

Hi Winfried

I mean we would like to see the history/overview in Smart Connection. Most of our users (we are a Corporate Publisher) are still using InCopy as text editor. Unfortunately MCEditor is still miles away from an alternative to InCopy.

Philippe

ivan.breziansky
Ringier Axel Springer Slovakia
ivan.breziansky's picture
Hello,

Hello,

 

has anyone tested/tune it for WW9.x..?

Thank you.

Peter.Gersmann
Attention Solutions
(Solution Partner)
Peter.Gersmann's picture
Show Object History works

 

Show Object History works very well with 9.8.2 and above - and 10.x (tested with 10.0.1). You can gain a lot from adjusting this - including information about status changes, approvals, routings, production analytics, and more...

If you get a blank page in Content Station then add the following to the setting and restart Content Station: displayMode="external"

If you don't get any detailed results and have enabled LOGLEVEL then it is probably due to the PHP-version on the server having mysqli enabled (or being compiled with mysqli). If so, you need to change the mysql_fetch_array to mysqli_fetch_array

By adding MultiSetObjectProperties and SetObjectProperties to the service types (look for the word "service" around line 120) you will be able to track metadata changes. That will show you when files have been approved etc.

Events that are not used should be deleted every day from smart_logs.

//Peter Gersmann
Attention Solutions
Scandinavia

david.keller
Emerge Consulting
(Solution Partner)
david.keller's picture
Mandatory Workaround for my Build

I have to add the url parameter {{ids=<objId>}} from my browser, otherwise there's a null objectId (resulting in the expected s1029 and a blank rendered html page). I'm looking at the code and I'm not sure how the server is sent the objId besides a get or post in the webrequest. I'm using the latest CS9.8.4, and Enterprise 9.8.1. I'm not sure what I'm missing. Any suggestions?

Thanks,

David Keller

Peter.Gersmann
Attention Solutions
(Solution Partner)
Peter.Gersmann's picture
Hi David,

Hi David,

Try this:

<ObjectContextMenuAction label="Show History..." url="{SERVER_URL}config/CS-scripts/ObjectHistory.php?ticket={SESSION_ID}&amp;ids={OBJECT_IDS}" objtypes="Image,Article,Layout" displayMode="external"/>

//Peter Gersmann
Attention Solutions
Scandinavia

david.keller
Emerge Consulting
(Solution Partner)
david.keller's picture
Thanks Peter. That populates

Thanks Peter. That populates the missing parameter in the request.