From Aktivix
Revision as of 16:20, 24 May 2007 by Ekes (Talk | contribs)

Jump to: navigation, search


  • Add logging (system log - custom log)
  • Enable e-mailing of log
  • Add filtering with custom regular expressions
  • Try using node_access instead of unpublishing for nodes This would create a dramatic unnecessary overhead
  • Add menu links at admin content and comment pages to access hiddens
  • Hidden reason - serialised drupal variable editable?
  • Report for hiding link - user reporting
  • Seperate function and display make all display creating sections themeable
  • Add no index meta tags


  • _hidden_log function added
    • including writing to watchdog
    • writing to mail message
  • _help and _menu links added
  • _menu $may_cache sorted - non cachable links are created depending on the nodes hidden status. If not hidden there is no link for hidden item page, and no unhide, just a hide form callback. If hidden a hidden object is created and passed to view and unhide callbacks.
    • /admin/settings/spam should this have the filters in it too
    • /admin/content/node/list/hidden admin list of hiddens with content/node/list
    • /admin/content/comment/list/hidden admin list of hiddens with content/comment/list
    • /hidden combined listing page
    • /hidden/node node listing page
    • /hidden/comment comment listing page
    • /hidden/node/$nid non-cachable - node display
    • /hidden/node/$nid/action non-cachable - where action is hide or unhide
    • /hidden/comment/$cid non-cachable - comment display
    • /hidden/comment/$cid/action non-cachable - where action is hide or unhide
  • organised required variables and settings
  • created _comment and _nodeapi hooks
    • included delete, to remove from hidden system if deleted, were left in previously
    • ready to hook into filter
    • moved reformatting of hidden content into hook $op view (and for node also alter). Title no longer needs changing in DB. Hidden information displayed in other not /hidden/... views (admin user looking at pages sees unpublished material).
  • created _hidden_mail to send e-mail notices
  • created _cron hook for periodic e-mailing
  • made _link hook themeable
  • made hide form themeable
  • removed _update hook as hidden isn't a node type
  • altered _hidden_is_hidden to ($type, $id) now returns a hidden object or false
  • updated db query functions insert works with ($type, $nid, $cid, $reason) delete works with ($type, $id)
  • reason now filtered by drupal check_markup() filter
  • changed _hidden_check_nan() to _hidden_check_params() this now only needs to only be called by the hide form processing functions, at also sanity checks against type of content now. Other functions are using drupal menu item creation and _hidden_is_hidden() validation.
  • Hidden display list functions altered/created
    • hidden_list_nodes and theme_hidden_list_nodes - now using themeable table - title, user, reason listed
    • hidden_admin_list_nodes and theme_hidden_admin_list_nodes - new with additional info (date...) and sorting capabilities to the public user lists
    • hidden_list_comments and theme_hidden_list_comments - as nodes above
    • hidden_admin_list_comments and theme_hidden_admin_list_comments - as nodes above, not this is the only place mass operations can be added in for comments
  • removing hard coded drupal goto's from reusable functions, should handled by calling function depending on where they come from - returning to node/comment is probably a desirable option in many cases

mysql> create TABLE hidden_reasons (

   -> reason int(4) unsigned NOT NULL auto_increment,
   -> name varchar(255) NOT NULL,
   -> description text default ,
   -> PRIMARY KEY reason (reason)
   -> );


Notes in code plus:

  • upgrade script
    • remove HIDDEN: from titles of already nodes/comments - should be handled by _node _comment hooks $op=view


  • filter delay timing
  • use node and comment modules to better effect, also view in hooks - we can get to the object before and edit it if we are calling it, we can still edit it's view even if admin are viewing it