Difference between revisions of "IMC-Drupal/Development/Hiddens"

From Aktivix
Jump to: navigation, search
Line 30: Line 30:
 
* organised required variables and settings
 
* organised required variables and settings
 
* created _comment and _nodeapi hooks
 
* created _comment and _nodeapi hooks
** included delete, to remove from hidden system if deleted, were left in previously
+
** included delete, to remove from hidden system if deleted, were left in previously (see note below about deleting comments with nodes)
 
** ready to hook into filter
 
** ready to hook into filter
 +
** moved reformatting of hidden content into hook $op view. 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 _hidden_mail to send e-mail notices
 
* created _cron hook for periodic e-mailing
 
* created _cron hook for periodic e-mailing
Line 46: Line 47:
 
* upgrade script
 
* upgrade script
 
** remove HIDDEN: from titles of already nodes/comments - should be handled by _node _comment hooks $op=view
 
** remove HIDDEN: from titles of already nodes/comments - should be handled by _node _comment hooks $op=view
** remove nid value from comment hides - prevent accidental deletion by new $type based _hidden_unhide_do()
+
** remove nid value from comment hides - prevent accidental deletion by new $type based _hidden_unhide_do() - only time this is inconvenient is node deletion where comments are deleted using comment_nodeapi which doesn't call the normal comment deletion procedure - worth reworking to retain the info for this one occasion?
  
 
== Thoughts ==
 
== Thoughts ==

Revision as of 17:58, 7 May 2007

Suggestions

  • 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
  • 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

Notes

  • _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 (see note below about deleting comments with nodes)
    • ready to hook into filter
    • moved reformatting of hidden content into hook $op view. 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
  • changed _hidden_check_nan() to _hidden_check_params() this now only needs to only be called by the hide form processing functions, other functions are using drupal menu item creation and _hidden_is_hidden() validation

TODO

Notes in code plus:

  • upgrade script
    • remove HIDDEN: from titles of already nodes/comments - should be handled by _node _comment hooks $op=view
    • remove nid value from comment hides - prevent accidental deletion by new $type based _hidden_unhide_do() - only time this is inconvenient is node deletion where comments are deleted using comment_nodeapi which doesn't call the normal comment deletion procedure - worth reworking to retain the info for this one occasion?

Thoughts

  • 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