[drupal-devel] [bug] Patch adds $comment->preview flag for themed previews

Geary drupal-devel at drupal.org
Sun Mar 13 17:04:00 UTC 2005


Issue status update for http://drupal.org/node/18792

 Project:      Drupal
 Version:      cvs
-Component:    node.module
+Component:    comment.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  elonen
 Updated by:   Geary
 Status:       patch
 Attachment:   http://drupal.org/files/issues/comment.module_5.patch (290 bytes)

Here is a patch to comment.module that adds a $comment->preview flag
which themes can use to display previews appropriately. This seems like
the simplest possible core change to support styled previews.
For more information, screen shots, and a working demo using an updated
FriendsLight theme, see:
http://mg.to/2005/03/13/drupal-preview-confusion
and
http://drupal.mg.to/2005/03/13/friendslight-theme-with-styled-preview
I am submitting a similar patch to node.module.


Geary



Previous comments:
------------------------------------------------------------------------

March 12, 2005 - 11:21 : elonen

Function theme('node', $node, $teaser, $page) can't detect a preview and
therefore often renders it incorrectly. The problem is that !$page is
usually interpreted as "the node is part of a listing" in the themes
and therefore the previewed page may look, depending on the theme, very
different on the actual page.
Perhaps theme() should get somewhat more detailed context info than
just $page?


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

March 13, 2005 - 09:02 : Geary

Attachment: http://drupal.org/files/issues/node.module_5.patch (384 bytes)

Here is a patch to node.module that adds a $node->preview flag which
themes can use to display previews appropriately. This seems like the
simplest possible core change to support styled previews.
For more information, screen shots, and a working demo using an updated
FriendsLight theme, see:
http://mg.to/2005/03/13/drupal-preview-confusion
and
http://drupal.mg.to/2005/03/13/friendslight-theme-with-styled-preview
I am submitting a similar patch to comment.module.





More information about the drupal-devel mailing list