Page 1 of 1

Archiver 0.2 - Archive Manager Module Fixes

Posted: Mon Jan 21, 2008 11:37 pm
by greenmile
I just installed Archiver 0.2 today and I'm thrilled that somebody had already implemented something I so desperately needed. It serves its purpose as a simple versioning system within CMSMS.

However, I noticed a few problems early on which I've already fixed following the patch found here:

http://dev.cmsmadesimple.org/tracker/in ... 6&atid=299

After applying the patch, though, I was still having the following problems:

  1. Column Sorting didn't work
  2. Clicking on an item title from the "Simple View" did not properly display its expanded view (would not show any revisions for that item)
  3. Filtering didn't work
  4. Horribly-ugly magenta/purple link color on sorted column

So, here are the fixes:

File: /modules/Archiver/Archiver.module.php

Lines 478-481 change to:

Code: Select all

if  (!isset($params['start']) || !$params['start'])
{
    $params['start'] = 0;
}
Lines 822-825 change to:

Code: Select all

if  (!isset($params['start']) || !$params['start'])
{
    $params['start'] = 0;
}
The problem was that $param['start'] was coming back true on "isset()", even though it was null. Therefore it never went into the block which set $params['start'] = 0;  This fixed all column sorting, filtering, and clicking and item from Simple view into Expanded view

-------------------------------------------------------------

Now, let's change that ugly purple text/link color on the sorted column heading (if you're using the default theme):

File: /admin/themes/default/css/style.css 

Line 656 and Line 660 to

Code: Select all

color:#FEFFAF;
Note: You may also want to do this to style_rtl.css. This is a global change (to all active column headings). Be careful if you like the purple. Those hex values will change the color to a much more appealing light yellow.


-------------------------------------------------------------


Finally, you may want to increase the maximum length of the "item_name" database field for all revision records. For some people that use long names.

To do that, run this database script (will change from 32 to 150 maximum length):

Code: Select all

ALTER TABLE `cms_module_archiver_item_info` CHANGE `item_name` `item_name` VARCHAR( 150 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL  
Note: My CMSMS table prefix is "cms_", so make sure you match that up correctly.

Re: Archiver 0.2 - Archive Manager Module Fixes

Posted: Thu Jul 24, 2008 10:48 am
by Charles Butcher
Thanks very much for this. With the original patch, filtering didn't work for me, though column sorting and clicking on an item to go from Simple to Expanded view both did. With your changes, filtering now works too.

I notice that if you sort in descending order (triangle pointing down), and then click the preview icon, the sort order reverts to ascending. It's a minor irritation; any ideas for a fix?