Development
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
January 2005
- 54 participants
- 341 discussions
16 Jan '05
Project: Drupal
Version: 4.5.2
Component: tracker.module
Category: bug reports
Priority: normal
Assigned to: Morbus Iff
Reported by: Morbus Iff
Updated by: grohk
-Status: active
+Status: patch
So far so good. This patch seems to have fixed my tracker. Thanks Zed,
I really appreciate it.
grohk
Previous comments:
------------------------------------------------------------------------
January 12, 2005 - 12:02 : Morbus Iff
The automated unpublishing is great for stopping spam from being
displayed, but it doesn't stop spam from corrupting another feature: my
"recent posts" (tracker.module). I'll regularly get bursts of 200
auto-unpublished spams which make the "recent posts" page useless - an
unpublished spam still affects the modification date of a node, which
makes "recent posts" display craploads of updates, even though there
really isn't any. Thus, the feature request would be:
- treat an unpublished spam as a deleted spam
- when a spam is automatically unpublished, revert the node
modification date to its previous value.
I'm not entirely sure how easily possible this is, as you'd have to
make sure the date is properly set when someone says "nah, this
unpublished spam was actual ham", and then republishes it.
------------------------------------------------------------------------
January 12, 2005 - 15:41 : Jeremy(a)kerneltrap.org
This is a known and annoying bug. As it affects me too, I assure you
I'll get to fixing this eventually...
Any ideas on how to cleanly implement this are welcome.
------------------------------------------------------------------------
January 13, 2005 - 17:27 : Morbus Iff
Would it seem to you that this behavior should be part of core? Ignoring
spam.module entirely, if a node is updated at 11:00, and then updated
with a comment at 12:00, the 12:00 is saved in there as the node's
modification time. But if a comment is unpublished, shouldn't the node
also be reverted back to its previous state (being 11:00)? How is the
deletion of data (permanently hiding it) different from merely
temporarily hiding it (ie., unpublishing it)?
Perhaps I should move request to Drupal.
------------------------------------------------------------------------
January 13, 2005 - 17:32 : Jeremy(a)kerneltrap.org
Feel free to move it. If I come up with a clean solution (at least as
far as spam is concerned), I'll update the issue wherever it is.
------------------------------------------------------------------------
January 13, 2005 - 17:39 : Morbus Iff
Was talking about this with killes (who "frankly [doesn't] care too much
about comments"), and I'm now wondering if I'm going nutty with all this
talk about node and comment timestamps. We should investigate to see if
tracker.module looks at /unpublished/ comment timestamps instead of
just published ones. If it doesn't make a distinction, then it would
theoretically be a quickie patch to a SQL statement to only check
against published comment timestamps, not unpublished.
------------------------------------------------------------------------
January 13, 2005 - 17:42 : Morbus Iff
With a quick look, it looks like tracker_page() only checks node.status,
and not comment.status. We should be able to put a patch in for
comment.status = 1 (unpublished being 2), and that should solve our
problem, right?
------------------------------------------------------------------------
January 13, 2005 - 17:55 : Morbus Iff
Apologies... "AND c.status = 0". Modifying the two queries in
tracker_page() made things, seemingly, work as I desire. Can you
confirm?
------------------------------------------------------------------------
January 13, 2005 - 18:02 : Jeremy(a)kerneltrap.org
It didn't appear to help with regards to the spam module. I had a
recent spam flood, and with or without the 'AND c.status = 0' I saw the
same posts, including those with recently unpublished spam comments.
------------------------------------------------------------------------
January 13, 2005 - 18:08 : Morbus Iff
Odd - I had one unpublished piece of spam that I tested against (for
4.5.0, not CVS), and modifying tracker.module seemed to work as I
intended. So, the following bit of SQL still shows you erroneous nodes
with unpublished comments?
SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name,
MAX(GREATEST(n.changed, c.timestamp)) AS last_post FROM node n LEFT
JOIN comments c ON n.nid = c.nid INNER JOIN users u ON n.uid = u.uid
WHERE n.status = 1 AND c.status = 0 AND '1' GROUP BY n.nid, n.title,
n.type, n.changed, n.uid, u.name ORDER BY last_post DESC LIMIT 10;
The above is what is actually run against my database with the proposed
tracker.module change. (This code is currently active on gamegrene.com,
so we can test live if need be. Submit a comment as an anonymous user
with the words "poker" or "texas hold'em", and it should be a)
unpublished automatically via your module, and b) not shown in the
tracker.
------------------------------------------------------------------------
January 14, 2005 - 08:52 : Morbus Iff
For what it's worth, I just woke up to another flood of 150 spams, and
no corruption of my recent posts.
------------------------------------------------------------------------
January 14, 2005 - 09:05 : Jeremy(a)kerneltrap.org
Then it sounds like a patch is in order... For the tracker module.
------------------------------------------------------------------------
January 14, 2005 - 09:59 : Morbus Iff
Have you been able to confirm this though?
------------------------------------------------------------------------
January 14, 2005 - 10:46 : Morbus Iff
Attachment: http://drupal.org/files/issues/tracker_0.patch (2.59 KB)
Patch attached for 4.5.0. Haven't tried applying it to CVS, but it needs
to go there too.
------------------------------------------------------------------------
January 14, 2005 - 10:56 : killes(a)www.drop.org
I think it makes sense to only select published comments. I think this
bugfix should go in both 4.5 and cvs. +1
------------------------------------------------------------------------
January 14, 2005 - 11:43 : Dries
Committed to DRUPAL-4-5.
------------------------------------------------------------------------
January 15, 2005 - 14:55 : grohk
Reopening this issue. I just upgraded to 4.5.2 and noticed that this
patch did indeed filter out the nodes with unpublished comments, but it
also seems to be causing a new problem in the tracker. I have observed
that new posts do not show up in the tracker until they have been
commented on. I rolled back the tracker.module installed on my site to
revision 1.100 and the problem was resolved, but the phantom comments
(unpublished spam) were back. I am going to do some more
investigations, but I am rather inexperienced in this realm. Anyone
have an ideas?
------------------------------------------------------------------------
January 16, 2005 - 07:13 : Zed Pobre
Attachment: http://drupal.org/files/issues/tracker.diff (2.67 KB)
To fix this, instead of just checking c.status = 0, check (c.status = 0
OR c.status IS NULL). I've attached a patch to do this.
--
View: http://drupal.org/node/15500
Edit: http://drupal.org/project/comments/add/15500
1
0
File: /translations/it/node-module.po 1.6
Date: January 16, 2005 - 12:35
User: michelef
Drupal 4.5.2 translation; automatic translation, under review.
----------------------------------------------------------------------
File: /sandbox/robertdouglass/image_module/image.module.patch 1.1
/sandbox/robertdouglass/image_module/README.txt 1.1
/sandbox/robertdouglass/image_module/taxonomy.module.patch 1.1
/sandbox/robertdouglass/image_module/taxonomy_otf.module 1.1
Date: January 16, 2005 - 11:54
User: robertDouglass
patches and files that alter the gallery creation mechanism of the image.module.
* each user gets his/her own public gallery
* each user can alter the structure of their gallery (subgalleries) using a branch of taxonomy_otf
* users can only upload into their gallery or a subgallery thereof
----------------------------------------------------------------------
File: /translations/it/ping-module.po 1.5
Date: January 16, 2005 - 09:47
User: michelef
Drupal 4.5.2 translation; automatic translation, may contain errors.
----------------------------------------------------------------------
File: /translations/it/ping-module.po 1.4
Date: January 16, 2005 - 09:44
User: michelef
Complete; template updated to fit Drupal 4.5;
----------------------------------------------------------------------
File: /modules/paypal_framework/LICENSE NONE DRUPAL-4-5
/modules/paypal_framework/paypal_framework.module 1.18.2.2 DRUPAL-4-5
/modules/paypal_framework/paypal_framework.mysql 1.4.2.1 DRUPAL-4-5
/modules/paypal_framework/README NONE DRUPAL-4-5
Date: January 16, 2005 - 07:35
User: crackerjm
Merged some changes from HEAD to DRUPAL-4-5
----------------------------------------------------------------------
File: /modules/paypal_framework/paypal_framework.mysql 1.7
Date: January 16, 2005 - 07:27
User: crackerjm
Fixed mysql create table bugs http://drupal.org/node/15677
----------------------------------------------------------------------
File: /modules/mail_archive/CHANGELOG.txt 1.6
/modules/mail_archive/mail_archive.module 1.7
/modules/mail_archive/mail_archive.mysql 1.4
Date: January 16, 2005 - 07:06
User: jeremy
- mail_archive.module:
o fix 'next thread' and 'previous thread' links to really link to next
and previous thread (have to reference from parent of thread, not
current message)
o provide 'top of thread' tab when in thread view and not at top of thread
o weight down administrative tabs to always appear at the far right
o term change: "original message" becomes "raw message"
o add logic to deal with in_reply_to header lines that have multiple <>'s
as done by some MTAs
o odd logic when rethreading to prevent infinite loops
o misc cleanup
----------------------------------------------------------------------
File: /translations/it/taxonomy-module.po 1.7
Date: January 16, 2005 - 00:06
User: michelef
Drupal 4.5.2 translation; automatic translation, may contain errors.
----------------------------------------------------------------------
File: /translations/it/search-module.po 1.5
/translations/it/story-module.po 1.6
/translations/it/system-module.po 1.5
/translations/it/upload-module.po 1.4
Date: January 16, 2005 - 00:03
User: michelef
Drupal 4.5.2 translation; automatic translation, may contain errors.
----------------------------------------------------------------------
File: /translations/it/poll-module.po 1.4
/translations/it/profile-module.po 1.5
/translations/it/queue-module.po 1.5
Date: January 15, 2005 - 23:16
User: michelef
Drupal 4.5.2 translation; automatic translation, may contain errors.
----------------------------------------------------------------------
File: /translations/it/user-module.po 1.10
Date: January 15, 2005 - 23:14
User: michelef
Drupal 4.5.2 translation; automatic translation, may contain errors.
----------------------------------------------------------------------
File: /translations/it/watchdog-module.po 1.4
Date: January 15, 2005 - 23:13
User: michelef
Drupal 4.5.2 translation; automatic translation, may contain errors.
----------------------------------------------------------------------
File: /translations/it/blog-module.po 1.7
/translations/it/blogapi-module.po 1.6
/translations/it/book-module.po 1.7
/translations/it/comment-module.po 1.6
/translations/it/drupal-module.po 1.4
/translations/it/filter-module.po 1.5
/translations/it/forum-module.po 1.5
/translations/it/general.po 1.6
/translations/it/locale-module.po 1.8
/translations/it/menu-module.po 1.5
/translations/it/node-module.po 1.5
/translations/it/path-module.po 1.5
Date: January 15, 2005 - 23:13
User: michelef
Drupal 4.5.2 translation; automatic translation, may contain errors.
----------------------------------------------------------------------
File: /translations/it/block-module.po 1.6
Date: January 15, 2005 - 22:30
User: michelef
Drupal 4.5.2 translation; automatic translation, may contain errors.
----------------------------------------------------------------------
File: /translations/it/archive-module.po 1.5
Date: January 15, 2005 - 22:28
User: michelef
----------------------------------------------------------------------
File: /translations/it/aggregator-module.po 1.8
Date: January 15, 2005 - 22:22
User: michelef
Drupal 4.5.2 translation; automatic translation, may contain errors.
----------------------------------------------------------------------
File: /translations/it/tracker-module.po 1.1
Date: January 15, 2005 - 21:20
User: michelef
Drupal 4.5.2 translation; complete.
----------------------------------------------------------------------
File: /modules/wiki/wiki.module 1.13.2.1 DRUPAL-4-5
Date: January 15, 2005 - 21:07
User: veridicus
Fixed node link
----------------------------------------------------------------------
File: /modules/wiki/wiki.module 1.14
Date: January 15, 2005 - 20:55
User: veridicus
Fixed node link
----------------------------------------------------------------------
File: /modules/wiki/README.txt 1.3
Date: January 15, 2005 - 19:33
User: veridicus
Recommend looking at filter tips for formatting options
----------------------------------------------------------------------
File: /modules/wiki/INSTALL.txt 1.2
Date: January 15, 2005 - 19:32
User: veridicus
Clarified configuration options
----------------------------------------------------------------------
File: /modules/wiki/CHANGELOG.txt 1.2
/modules/wiki/wiki.module 1.13
Date: January 15, 2005 - 19:31
User: veridicus
- Fixed protected blocks {{{ }}}
- Properly escape HTML
- Inline images displayed by theme
- Changed filter help text to match current rules
----------------------------------------------------------------------
File: /translations/it/path-module.po 1.4
Date: January 15, 2005 - 18:56
User: michelef
Complete; template updated to fit Drupal 4.5;
----------------------------------------------------------------------
1
0
Since I was unable to get in contact with someone who
is writing a full fledged gallery/album module for
drupal, I decided to try and write my own. I made a
list of everything that i wanted it to do, and this is
what I came up with. Let me know what you think.
--
Album/Gallery Module
Goal: Every user will not only be able to create their
own blog but also their own photo galleries. These
galleries must be easy to create. Users should not
have to learn about taxonomy. Folksonomy should be
enabled but not required. It also should be possible
to list names or users that are present in the
pictures or who own the pics (can be used to generate
virtual galleries on the fly of pictures with a
certain user or person, and it can be used to send
notifications).
-User based galleries
-can organized by folksonomy
-organized by user (by hand or mass upload) into
albums and images are not required to have the same
taxonomy terms to do this.
-Virtual Galleries generated on the fly based on
timestamp of image (provided jhead is installed)
and/or taxonomy term(s) and/or folksonomy term(s)
and/or user who posted.
-Albums are containers that can contain other albums.
-mass upload via zipped or tar.gzed pictures (just a
feature I want but I think this is already going to be
a part of image.module and does not belong in an album
module).
-Personal images should be stored in their own
directories organized by user. (ie images/username)
-Image deletion should be able to happen on a massive
scale (ie all by user, all by album)
I also think clicking Image Galleries should list
users with Image galleries not the image galleries
themselves. I would also list how many albums and
pictures they have.
---
I am new to the drupal system so my work will progress
slowly (that and I have a hard schedule at the
university, but lack a real job so i need something to
fill the time). If there is someone already working on
this, I would be glad to help instead of starting a
new project. I also want input so I will not be
working against the grain (or hacking up what I
shouldn't be).
Thanks for your time,
--David
moejoe16.geo(a)yahoo.com
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
2
2
Project: Drupal
Version: cvs
Component: node.module
Category: feature requests
Priority: normal
Assigned to: Steven
Reported by: Anonymous
Updated by: Dries
Status: patch
Chris' mockup looks better but there is still room for improvement:
1. The titles of the two /form groups/ are not consistent.
2. Removing the (mostly) brain-death help text might help to reduce the
visual clutter. The help text is incorrect: clicking the username opens
the user's profile page as one would expect.
3. The indentation looks pretty random.
Dries
Previous comments:
------------------------------------------------------------------------
August 23, 2004 - 18:09 : Anonymous
Attachment: http://drupal.org/files/issues/node_admin_filter.patch (3.8 KB)
Here's a patch for the current CVS version which adds the option to
filter nodes by type on the node admin page.
Having built a few sites recently which make heavy use of flexinodes,
the ability to filter out particular node types would have been
extremely useful, so I hope this makes it to 4.5.0.
------------------------------------------------------------------------
August 23, 2004 - 22:06 : leafish_dylan
This would be a great feature.
------------------------------------------------------------------------
August 23, 2004 - 22:06 : leafish_dylan
This would be a great feature.
------------------------------------------------------------------------
September 4, 2004 - 01:38 : Bèr Kessels
I think we should really come up with a good solution for this screen.
In the past, I went looking for such a solution and found that the
various MP3 library tools might come to help.
They deal with large amounts of metadata, some of wch are important,
other are not.
I summarise here what the UI could be like:
** The menu-based (tree) approach: Most mp3 collections use this idea.
In a tree like structure on the side, you can make selections. The list
in the main area will follow this selection. (Itunes:
http://www.apple.com/itunes/playlists.html , Juk:
http://developer.kde.org/~wheeler/images/juk-2.0/juk-2.png,
finf/freeamp: http://www.zinf.org/images/zinf_mymusic_shot.png)
In drupal that would mean a menu-based filtering method. I once made a
patch for that, but that was rejected:
http://drupal.org/node/view/7766
The good thing here, is that it is virtually endless scalable. So in
theory, flexinode coud add menu items to show only nodes where foo is
bar.
|
- nodetype
| |- blog
| |= Flexinode
| | |=foo
| | | |=bar
| |- page
** The multiple selectlist UI: Another moethod is a extended method of
what we have now: select items from select boxes and press submit.
Above the main area one will find some selection UI where one can in-
and exlude sertain criteria. (rhythmbox:
http://www.rhythmbox.org/screenshots/Screenshot-Rhythmbox.png, and
winamp http://www.winamp.com/player/walkthrough.php) Note that both
still show some form of tree navigation.
In drupal that would mean multiple selects in three columns (rhytmbox
and winamp show only two artist and album) For drupal we need three of
thos blocks: one for node-types, one for node-settings (promoted, etc)
and one for taxonomy terms. The node settings should be logical too: If
a criteria is selected it it true, if not: false. That way we can also
get rod of the annoying logic: "view posts that are not promoted" and
the likes.
In both solutions the "perform batch action" needs to move somewhere
else. I would plead for moving it to the bottom of the list. A lot of
webmail cleints do it that way. The reason being simple: the steps you
take to perform the update are:
1) select criteria (find nodes)
2) checkmark the chages (we need columns of checkboxes)
3) perform the update.
Logically the way you go through the UI is left->right, top-> down (not
taking into consideration japanese/hebrew/arabs etc)
So all in all: i think indeed the UI needs serious work. I am willing
to take this one me, bu I do need some consensus first. I am not
willing to spend hours on a new UI (like the menu-based approach) to
find the patch being rejected.Therefore I like some discussion up fron,
rather than the " code first see later" approach.
Regards, Ber
------------------------------------------------------------------------
September 6, 2004 - 00:42 : Bèr Kessels
Attachment: http://drupal.org/files/issues/new_UI_proposal.png (175.31 KB)
Here is a gimped mockup from what option 2) could look like.
WE could add a fouth box with users too, but I am not sure how that
would go with permissions and the like. I need to do some thinking
about selecatibility by users first.
------------------------------------------------------------------------
September 6, 2004 - 01:01 : Bèr Kessels
Sorry for the spam: but I forgot to mention that there are a few
issues:
The "perform action dropdown" should list stuff as: promote, demote,
etc. But that list needs to be generated with the selection above in
mind. So if you choose " published" the action list should not have
"publish these nodes"
Also the action list could contain "recategorise" wich would need
another screen after the one in the "ugly screendump-gimp-mockup", to
be able to choose the categories in wich the selection should be
placed.
And of course the delete these items with a confimation dialog.
(http://drupal.org/node/view/7743#comment-11624)
------------------------------------------------------------------------
September 6, 2004 - 15:32 : Bèr Kessels
Attachment: http://drupal.org/files/issues/node_admin.html (29.95 KB)
After a long discussion with Steven And gerhard, I designed the page in
HTML, to let you all try it in some way.
Beware: the html is an ugly mock, It is meant as scetch, not as valid
html.
Some notes on the page:
"View all nodes that are:" contains three differnet possibilities for
searching. The first two (above the blank line) are there for
simplicity, but they might confuse users, because they need a lot of
text. The second idea uses a checkbox to enable the select next to it.
The third one uses some ajvascript to improve useablity.
We should of course choose one of these three methods.
"View all nodes that are classified in:"
There are quite some people that have questions with whether or not we
should include this selection aat all. Here is why I think it should
definately go Because most sites have only one purpose and thus a lot
of nodes of one type in one state. For example a personal blog site:
99% of the nodes are blogs. 99% are promoted. Only 1 or 2 are not
promoted, not published or of type page.
Or take a photo-album-site. All posts will be images, the main
difference is the classification (the galleries) I placed them in.
"any/all" There must be a way to choose whether the sected options
should be an AND or an OR. I tried three different methods, each block
has one method. We should choose one.
Please give me feedback, for I still have to decide whether or not to
make this a contributed module or start lobby-ing to get it in core.
------------------------------------------------------------------------
September 13, 2004 - 12:50 : moshe weitzman
looking good, and really useful. a few small comments:
- consider upping the number of nodes that appear on this page. it is
nearly pointless to use paging on this sort of UI
- i like the second idea of an 'enabled' checkbox, without the
javascript. i think you can use 2 checkboxes, where the second one is
called 'publish', 'promote', and 'has comments'
- I prefer the horizontal configuration of the 'Require: all any' radio
buttons
- don't repeat 'the selected posts' in the choices for the bottom
dropdown. perhaps use a title for that form_select() instead.
- the last choice in that dropdown is 'reclassify'. i don't see how
this screen could support that. instead, use my
taxonomy_multi_edit.module from contrib :)
i suggest making this a contrib module at first. it can be a tab off of
the current page. thats how taxonomy_multi_edit.module appears.
------------------------------------------------------------------------
September 13, 2004 - 14:03 : Bèr Kessels
About that reclassify:
That was exactly my intention: using the taxonomy_muliti_edit module
for that. All I wanted to do is pass a list of nids to your module and
open a screen using that module with the previously selected nodes!
About the other comments: Yes upping the number of nodes might be a
good idea. Anyone any idea what number would still be usefull. 10.000
nodes (on drupal.org) in one list is not a good idea, IMO, so some
paging is needed.
indeed: repeatinf words in dropdowns is considered "bad UI design"
thank you for pointing it out.
Regards, Ber
------------------------------------------------------------------------
September 28, 2004 - 14:37 : eafarris
Attachment: http://drupal.org/files/issues/admin_node_filter_by_type.patch (1.96 KB)
here is an updated version of this patch, syncing it with CVS HEAD.
Also, i did change the functionality somewhat: previous versions of the
patch asked the modules what node types were out there (via
hook_node_name()). This version asks the node table what types are in
there (via SELECT DISTINCT type FROM {node}). I find this more useful,
because it's entirely possible that, over time, modules will be removed
from the system, yet they still have rows in the node table. This method
gives a more accurate view of the types of nodes on the system.
The new UI looks excellent, but this patch does not address it.
------------------------------------------------------------------------
September 28, 2004 - 20:05 : drumm
-1
I applied and tested and it did not work at all for me. The type
options selection only contains 's' and 'W', selecting one does not
work. The list of types seems to come from the DB which is probably an
unnecessary query.
------------------------------------------------------------------------
September 29, 2004 - 13:51 : eafarris
Attachment: http://drupal.org/files/issues/admin_node_filter_by_type_1.patch (2.31 KB)
Here's a version of that patch that should work. Sorry.
I think that getting the types from the node table is necessary. The
list of installed nodes is not the authority on what types of nodes are
in the db; we should ask the db directly. It's a small query on one
admin page; the result is that the dropdown has in it the most accurate
information available. That's worth it, imo.
------------------------------------------------------------------------
September 29, 2004 - 13:52 : eafarris
s/list of installed nodes/list of installed modules/ . sheesh. teach me
to post before my tea.
------------------------------------------------------------------------
October 21, 2004 - 19:15 : Bèr Kessels
Attachment: http://drupal.org/files/issues/node.html (29.33 KB)
I do not know where it weant, but my proposal had a HTML mockup.
Attaching it here to see what i meant.
------------------------------------------------------------------------
October 23, 2004 - 14:14 : com2
Nice filter options, but what I really miss it the possibility to select
all checkboxes. Really boring job when you have to click the whole list
one by one.
------------------------------------------------------------------------
October 24, 2004 - 11:41 : Bèr Kessels
I am not a big fan of those options in forms.
They more often break things than that thy fix them. Rahter use a
bookmarklet r so for that:
http://www.squarefree.com/bookmarklets/forms.html
Ber
------------------------------------------------------------------------
October 25, 2004 - 02:03 : Steven
Attachment: http://drupal.org/files/issues/node_admin_ucd.html (29.83 KB)
Based on some more IRC discussion, I came up with this (attachment). It
is based on an earlier mockup.
It does use Javascript and doesn't degrade without script (yet), but I
think it's worth considering. It can be implemented quite cleanly. The
idea would be to have a filter like this initially, and after clicking
'Go', to show the current filter as well as the form again, allowing
you to refine your search.
I haven't tested browser compatibility, but it should work on most
browsers. The only ones I know for sure won't work are IE4 and NS4,
which are old enough to ignore IMO: after all, this is admin only, and
we can put some stricter browser requirements on that. Recent versions
of other browsers should work (it only does a simple visibility
toggle).
I like it because it's not an airplane cockpit, but still offers
complex filtering options through refinement. It is also quite similar
to the search/filtering UI in e.g. mail applications.
The question is of course, how to degrade it for people without
Javascript. My suggestion would be to simply show all filter options,
and put a radiobutton in front of each:
( ) Where type is [ blog | v ]
( ) Where published status is ( ) published ( ) unpublished
( ) Where category is [ term1 | v ]
...
It has more visual clutter, but the same principle of use.
------------------------------------------------------------------------
October 25, 2004 - 02:13 : Steven
In fact, I just realized that the radio-button version can be coded to
send exactly the same form data as the scripted version, which makes it
more interesting.
------------------------------------------------------------------------
October 29, 2004 - 01:52 : Steven
If you guys approve of my idea, I'll start coding. Assigning to myself
for now.
------------------------------------------------------------------------
November 1, 2004 - 18:35 : Bèr Kessels
I like this idea much more than my previous approaches. Gave it some
thought and came with the follwing behaviour:
* I think we need to discuss or at least design the tabular data too:
It makes 0 sense to show the "types" column, if you chose "type =
image"
* I think we need to introduce a hook to add info to that tabulat view.
Images can output thumbnails, for example
* In tabular view, we should make: title a textfield, type and author a
select and satus a select too.
* I think we should introduce another range of options: "where content
contains" [ ] and "where title contains" [ ]
* I would like to get some feedback on how many drupal-using people are
firmly against javascript, with a reason why. I bet that this is < 1% !
Bèr
------------------------------------------------------------------------
November 1, 2004 - 18:42 : Steven
We don't have an anti-JS policy in Drupal. It's just that until
recently, doing cross browser JS was a chore and making it accessible
and degradable would be a disaster.
This form can be implemented cleanly and will degrade without problems.
Anyone who opposes it because it is JS can bugger off ;).
------------------------------------------------------------------------
November 3, 2004 - 20:24 : com2
There is a more radical way around JS. You could forget the table idea
alltogether and present the nodes in Listbox. Then selecting becomes
much easier with Ctrl-Click and Shift-Click
------------------------------------------------------------------------
November 4, 2004 - 01:02 : Bèr Kessels
Did you have a look at the previous applied UI improvements? Did you
consider the pre's and cons of those earlier posts?
It seams you are repeating passed issues here, please reply with miore
detailed issues here,
Bèr
------------------------------------------------------------------------
December 3, 2004 - 11:49 : Steven
Attachment: http://drupal.org/files/issues/node-admin.patch (13.1 KB)
Here's a patch which implements the JS approach of refining the
selection.
------------------------------------------------------------------------
December 3, 2004 - 11:50 : Steven
Attachment: http://drupal.org/files/issues/node_admin.png (34.38 KB)
And here's a screenshot of how it looks.
------------------------------------------------------------------------
December 3, 2004 - 20:23 : FactoryJoe(a)civicspacelabs.org
This is looking better and better. I'm going to do a UI review of this a
post any additional thoughts or comments.
Chris
------------------------------------------------------------------------
December 3, 2004 - 22:50 : Anonymous
Ack, I tested this using the bluebeach theme, but there's a small CSS
bug with bluemarine, where the header for the operations form is stuck
to the right of the filter form. I'll make an updated patch later. In
the meantime, comments are much appreciated.
------------------------------------------------------------------------
December 4, 2004 - 00:15 : killes(a)www.drop.org
I actually prefer the non-JS menu over the JS menu. Not (only) because
of the JS but because I prefer radiobuttons over pulldown menus. The
argument that the non-JS approach uses more vertical space can be
mitigated by redirecting to a #results anchor.
------------------------------------------------------------------------
January 15, 2005 - 07:32 : Steven
Attachment: http://drupal.org/files/issues/node.admin.patch (14.41 KB)
Here's an updated patch... I have exams in a week, so I don't have time
to finish up the Javascript version, so I removed it (it can be added
later easily). However, the non-JS version is still very usable.
Changes since last time:
- Uses semantic XHTML (definition list, and yes, they are for more than
just definitions, even w3c agrees).
- Merges the various node flags (promoted, published, ...) into one
"status" dropdown. This keeps the whole selector shorter, and is better
UI-wise IMO.
- Adds drupal_gotos, they were missing.
- Updates node admin watchog messages to properly display the type. The
code used t($node->type) which is a big no-no. hook_node_name() is now
invoked instead.
- Removes some dead code.
- I rolled Ber's node mass deletion patch in as it affects the same
piece of code. Updating either patch for the other separately would be
a waste of time. I also added some more improvements to Bèr's code,
such as removing the incorrect help from the confirmation page,
cleaning up the code style a bit, not loading every node just to
display its title and displaying a single drupal_set_message() after
the deleting rather than one per node.
The old issue is here: http://drupal.org/node/7743
------------------------------------------------------------------------
January 15, 2005 - 07:32 : Steven
Attachment: http://drupal.org/files/issues/node admin.png (30.19 KB)
------------------------------------------------------------------------
January 15, 2005 - 10:55 : Bèr Kessels
Thanks for integrating the batch delete patch, Steven!
------------------------------------------------------------------------
January 15, 2005 - 14:47 : Dries
Attachment: http://drupal.org/files/issues/node-filter-wrap.png (34.55 KB)
It looks good but:
1. It makes the UI looks cluttered. I suggest visually grouping the
varios form elements so it becomes easier for they eye to skip over
them.
2. It is too wide. Try using the Chameleon theme with a sidebar on the
right at 1024x768 (eg. my laptop's resolution) and you'll find that the
form elements wrap, and wrap in an awkward order. See screenshot.
Maybe we should group the form elements using from_group() and make
"Show only items where" the form_group()'s title. It would save space.
------------------------------------------------------------------------
January 15, 2005 - 17:14 : Bèr Kessels
Steven,
Is there a reason why you do not use theme_box, but hardcode HTML in
your forms? If there is none, I will spend some time monday to fix it.
Bèr
------------------------------------------------------------------------
January 15, 2005 - 18:48 : Steven
Simple. There aren't any guidelines on theme box usage :P. Plus, theming
the admin interface is probably not a big priority.
------------------------------------------------------------------------
January 15, 2005 - 20:44 : FactoryJoe(a)civicspacelabs.org
Attachment: http://drupal.org/files/issues/node-filter-wrap-v2.png (14.23 KB)
I simplified the layout and added some visual separation between
elements (the rounded boxes). I imagine that pretty much the same
markup as exists now could be used with some slight tweaks.
Probably the most significant change, horizontally, is moving the
filter button below the filters.
------------------------------------------------------------------------
January 15, 2005 - 21:13 : Steven
This way they take up even more space though. I'd like to at least have
the user see part of the results table without scrolling. Also, the
rounded boxes are definitely a theme thing and don't really belong in
core.
The markup would need some changes too, as right now the structure is
vertical nested inside horizontal, while yours is horizontal nested in
vertical.
I was also wondering about the wording... "Show items where A is B"
sounds a bit bumpy. Alternatives "... items whose A is B" "items with A
of B", etc.
--
View: http://drupal.org/node/10296
Edit: http://drupal.org/project/comments/add/10296
1
0
Project: Drupal
Version: cvs
Component: node system
Category: feature requests
Priority: normal
Assigned to: chx
Reported by: chx
Updated by: Dries
Status: patch
Benchmarked some more: the main page (q=node) is 64% faster, the forum
listing page (q=forum) is 416% faster and the forum topic listing
(q=forum/1) is 57% faster. All pages had a 'Forum topics' block.
Dries
Previous comments:
------------------------------------------------------------------------
December 23, 2004 - 23:25 : chx
Attachment: http://drupal.org/files/issues/node_builder.patch (5.56 KB)
Although I have posted this to the devel list, as Steve pointed out,
putting patches to sandbox is not the best way to do things. So I open
this thread. I have measured the time for build a node query in this is
about 0.22-0.24ms (on an Athlon 933 MHz machine).
------------------------------------------------------------------------
December 24, 2004 - 00:33 : Dries
I'm not likely to commit this. It's not conform with Drupal's coding
conventions, but more importantly, a node query builder doesn't solve
any real problems. It just adds a different way of doing things
without offering a significant advantage.
------------------------------------------------------------------------
December 24, 2004 - 00:51 : chx
Attachment: http://drupal.org/files/issues/node_builder_0.patch (5.67 KB)
At this moment there are direct queries into the node table everywhere.
After node_access_*_sql calls were invented, a lot of queries needed to
be changed, and I think we will find more to be inserted. If someone
does sg. else with the queries, permission, language etc. he needs to
patch 60+ quieries in core alone. This is not a good thing. That's why
I am proposing a central node query builder.
As for code standards, code-style.pl node.module returns 17 errors,
none of them comes from my patch. However, I should admit, there were a
few spaces missing from the database.inc patch. So I resubmit.
------------------------------------------------------------------------
December 24, 2004 - 00:56 : chx
Attachment: http://drupal.org/files/issues/node_builder_1.patch (5.67 KB)
OK, I was wrong, there is a space missing in one of the rewritten
queries. But I doubt this matters too much, as this is only a proposal
and I think there will be a lot of revisions before it gets to the
core.
------------------------------------------------------------------------
December 24, 2004 - 01:26 : drumm
The blank lines between the comments and function starts will confuse
the documentation parser on drupaldocs.org.
I'm not sure if I support this quite yet. Reducing the number of
queries and whatnot is great, but this patch doesn't do that quite yet.
I'd only want this if the new system is more readable and easy to write.
I'm not sure if this is true.
As for code-style.pl, I don't think this is actually used much and it
doesn't catch everything. Such as, most operators (=, =>, +, etc) like
a space on either side of themselves. I'd support removing
code-style.pl and throwing it in contributions somewhere. (If this
needs further discussion or action, please file another issue, lets
keep this focused on this patch).
I'm going to wait for a few more revisions of this before I weigh in a
+1 or -1.
------------------------------------------------------------------------
December 24, 2004 - 01:58 : Jose A Reyero
I can really think of a number of advantages of this, and though not
really for committing it yet, think is very good to see some discussion
on the issue and some concrete implementations.
When implementing i18n I run into this problem, of having to patch lots
of queries -actually too many- in about all the modules doing any kind
of node listing. This far, I'm stuck at this point. Then I realized it
was just the same for node permissions, and will be the same again for
whatever new functionality you want to add in the future which affects
node listings.
I think actually that direct access to 'node' table should be avoided
when possible out of the node.module. And the only way to achieve this
is to have some kind of query builder. And also think that chx's
approach is very good. it provides some upper layer at the 'node'
level, which can use some object level semantics while relying on a db
layer query builder, which could be used later for other objects
-users, taxonomy terms...-
Just think of all the work that this could have saved when implementing
permissions system, which I think is ugly and dirty anyway because of
all that node_join, node_where...
In the long run, adding such complex logic as sql code, patching and
re-patching queries is bad, very bad, making any new change one higher
level of complexity and driving us away from a OO model, which I think
we should tend to. It's not using PHP objects. It is thinking of nodes
as 'objects' and coding according to it.
Oh, yes, sorry, this is growing too long to write it here :-). But we
could talk also about db portability...
------------------------------------------------------------------------
December 24, 2004 - 02:14 : moshe weitzman
I should add that the Organic Groups module could benefit from this node
listing SQL builder. I have awkwardly worked around the problem for now
but I don't like it.
I don't know if this patch is good or not, but I do lean toward the
functionality that it offers. Remember that any developer is free not
to use the query builder and issue direct SQL as needed. If the query
builder is making life hard, simply don't use, just like today.
------------------------------------------------------------------------
December 24, 2004 - 11:35 : Bèr Kessels
I +1 for this functionality (i have no time to comment on coding style
etc).
It will not only improve maintainability, but will allow a far easier
implementation of the i18n.
i18n currently has a lot of patches, simpley to add logic to all those
node sql queries referred to.
------------------------------------------------------------------------
December 24, 2004 - 14:20 : chx
Attachment: http://drupal.org/files/issues/node_builder_2.patch (1.63 KB)
OK, maybe the former approach was too complex. How about this? This
requires a lot less change to the queries and no change to database.inc
and ten times faster.
As usual, a sample query is rewritten and an example of the proposed
hook is provided.
------------------------------------------------------------------------
December 25, 2004 - 01:09 : chx
Final thoughts for this day. If you like the last version, there is a
possibility to automate the whole thing by adding the following three
lines to the beginning of db_prefix_tables:
Of course, there is very small chance of a loop here, so this would
require more thought, but I think at the end this would be a good
thing.
------------------------------------------------------------------------
December 27, 2004 - 13:55 : Dries
I like the second approach better as it keep things readable and gives
me a bit more control over the order in which things are written.
Looking for more feedback from the others. Did you try updating more
queries to make sure it works as intended in all cases?
------------------------------------------------------------------------
December 27, 2004 - 20:48 : chx
Attachment: http://drupal.org/files/issues/node_builder_3.patch (1.23 KB)
Yes, I tried with many different queries. And I have found one bug --
forgot the underscore in the regexp following FORM so I have rewritten
the whole regexp. It is now a lot simpler :)
And node_query is now reentrant, so if a function in the process of
hook_sql calls node_query, it won't fall into an infinite loop. This
situation did not occur but it's better to forestall such things.
------------------------------------------------------------------------
December 28, 2004 - 06:48 : moshe weitzman
This patch is a step forward. I thought of another feature which becomes
easier with the proposed hook_sql(). think of filtering like
freshmeat.net. At freshmeat, you can say that you only want to see
projects where OS=Windows and License=GPL (for example). A Drupal
equivalent is 'only show me nodes related to Democrats and Poverty'.
This sort if global node filtering is very hard in Drupal today. With
this hook, it becomes easy.
------------------------------------------------------------------------
December 28, 2004 - 13:37 : Dries
It's starting to look good (and you're getting more support)!
Have you read the following threads:
http://lists.drupal.org/archives/drupal-devel/2004-11/msg00198.html and
http://lists.drupal.org/archives/drupal-devel/2004-11/msg00230.html?
It's an open issue related to your work. If you start joining tables,
you might have to add DISTINCT()s. When you are not joining tables, it
would be nice if we'd not pay the cost of a DISTINCT().
It would be good if you could update the node queries in core to take
advantage of it. It's not necessary while prototyping though.
It would be good if the il8n team could take a closer look at this
patch by trying to use it.
It would be good if you could add some PHPDoc.
------------------------------------------------------------------------
January 4, 2005 - 08:55 : chx
Here is a sum of changes in this new revision:
Following Dries' advice, I read those threads and now DISTINCT(nid) is
used only if there is something joined. Whether the access_grants
system is used or not, is determined at the module configuration
screen, so for efficiency reasons, I have patched system.module.
I the very first version of my patch (you know, with arrays) I passed
on the whole query so hook_sql implementations could easily determine
whether they are interested in this query or not. In a very cool
brainstorming with Jose, we found out, that passing the whole query is
not a good thing, hints are enough. So when I will patch the forum
queries, I will define a NODE_SQL_FORUM hint, and a filter which does
something cool with forums (I have heard something about private forums
not implemented -- I maybe wrong here) may do so.
We now have a separate helper function to call hook_sql which is cool,
'cos with it the last node_access_*_sql calls which were lurking in
node_search could be elinimated.
------------------------------------------------------------------------
January 4, 2005 - 08:56 : chx
Attachment: http://drupal.org/files/issues/central_node_query.patch (6.46 KB)
Funny thing. Forgot to attach the patch.
------------------------------------------------------------------------
January 6, 2005 - 01:46 : chx
Another day, another revision. As this patch now has nothing to do with
queries, but it is about rewriting node SQL statements, I have renamed
it node_rewrite_sql, the helper _node_rewrite_sql and there is
hook_node_rewrite_sql. hook_node_rewrite_sql expected return value has
changed: it can return an array('join'=> ..., 'where'=>...,
'distinct'=> ) so it may determine whether DISTINCT is needed or not.
Neither index is mandatory. That hook_node_rewrite_sql impementations
will decide whether they are asking for DISTINCT or not, is -- I think
-- a good opportunity to optimize for speed. For eg. I doubt every node
access mechanism requires DISTINCT.
One last note: hook return value can be also can be a string with a
WHERE statement for the sake of simplicity.
node_rewrite_sql now works with multiline queries.
------------------------------------------------------------------------
January 6, 2005 - 01:46 : chx
Attachment: http://drupal.org/files/issues/central_node_query_0.patch (7.43 KB)
I can't believe I once again did not attach the patch
------------------------------------------------------------------------
January 6, 2005 - 18:22 : chx
Attachment: http://drupal.org/files/issues/central_node_query_1.patch (6.65 KB)
Moshe, thanks for your patience and wisdom.
Extract is thrown out, list is used.
node_node_rewrite_sql looks better now.
access_grants_present is determined in run time, once per page.
------------------------------------------------------------------------
January 6, 2005 - 22:35 : Dries
The hint-stuff looks a bit hairy to me. It would be nice if this could
be avoided but I see what it is necessary.
The semaphore stuff is vague too. I don't see how you'd be able to get
into an endless loop.
It might actually be useful to turn node_access_grants_present() into a
more generic module.inc function. Maybe something along the lines of
module_implements($hook), which would return a list of modules
implementing the specified $hook.
I suggest you update more core modules. If you do, I'll measure the
performance gain against a copy of drupal.org's database.
------------------------------------------------------------------------
January 6, 2005 - 23:47 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql.patch (15.72 KB)
The hint stuff is something is pretty useful: hook implementations can
fine tune themselves when to fire and when not. Good for features and
performance, too.
module_implements is done.
Semaphore -- we will have tons of node_rewrite_sql calls in the core.
Now someone writes a hook_node_rewrite_sql implementation which calls a
function which in turn calls another one which calls node_rewrite_sql .
I would rather not be the one who debugs such a scenario.
Thanks for the offer! forum.module is now patched. Others will follow
tomorrow.
------------------------------------------------------------------------
January 7, 2005 - 00:21 : Jose A Reyero
I think this looks good enough, so I'm starting to test and use this for
i18n. If this get into the node module, I don't think I will need any
node.module patch anymore...
A pair of performance hints:
- As this node_rewrite_sql is going to be called several times for each
page, we can cache the list of modules implementing the hook in a static
variable.
- We can even cache the whole result for each 'hint' value, so the
whole hook will only be called once or twice for each page.
Some suggested 'hint' values to be defined:
NODE_REWRITE_SQL_LIST -> This one for simple generic list of nodes for
the main page, could be default.
NODE_REWRITE_SQL_ADMIN_LIST -> List of nodes for administration pages
NODE_REWRITE_SQL_RELATED_LIST -> List of objects related to nodes, but
no nodes themselves -like
comments-, node table may have to be joined...
NODE_REWRITE_SQL_BLOCK_LIST -> Listing for a block
NODE_REWRITE_SQL_NO_LANGUAGE -> No need to add language conditions.
This could hapen when you need a listing for other languages, or mixed
languages, for translators or for administrators..
I would need something like this last one for i18n, just to have the
permissions working and some flexibility with language conditions.
And also the one you already have in place ...._SEARCH.
All this will allow for options like search, admin, list current/all
languages...
------------------------------------------------------------------------
January 7, 2005 - 18:30 : Jose A Reyero
Attachment: http://drupal.org/files/issues/central_node_query_node_module.patch (7.07 KB)
I found some problems when using the patch. The where conditions are not
merged well if there are more than once, and also conditions need some
parenthesis around.
So I replaced the $where and $join strings in _node_rewrite_sql by
arrays which are imploded at the end.
Also added some 'hint' definitions. Patches for i18n module are coming
next.
This works like charm for node listings, comment listings, searches,
etc...
Btw, I also think 'semaphores' are not really needed.
------------------------------------------------------------------------
January 7, 2005 - 20:04 : Dries
I don't see how the hint system can be portable: are contributed modules
supposed to define their own hits?
------------------------------------------------------------------------
January 7, 2005 - 23:54 : chx
The hints -- I was in a hurry yesterday evening, so I have forgot to
define a NODE_REWRITE_SQL_FORUM in the forum.module patch and also
forgot to use the hints. So I think core node types will have their
hint defined.
I have a vague idea about how contrib modules could define their own
hint type: we shall have a NODE_REWRITE_SQL_HINT_MAX, and every hint
define should like this -- beware this is not working! This is just an
idea.
Well, if defines does not work, maybe a global node_rewrite_sql_hints
array should be introduced...?
------------------------------------------------------------------------
January 8, 2005 - 10:54 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_0.patch (16.69 KB)
Here is a list of changes:
Complete rethought of hint system. Uses array of strings instead of
defines. There are a number of examples.
the new comment.module patch shows a good usage example for the third
parameter of node_rewrite_sql which is at the moment called node_alias.
It's really not a good name, it should be "the alias of the table which
holds the nid field for this query". BTW. there should be an index on
comment.nid.
Incorporated Jose's "replaced the $where and $join strings in
_node_rewrite_sql by arrays which are imploded at the end". I was a
fool to lose these, the first version (which used array) used a proper
implode for WHEREs.
------------------------------------------------------------------------
January 8, 2005 - 12:27 : Dries
I have two fundamental problems with it this patch:
The loop detection mechanism has to go.
The hints are difficult to understand and I'm not convinced they are
good/needed. Does the patch contain a good example of a
node_rewrite_sql function/hook that uses these hints? I can't find
one. I won't like these hints until I'm convinced they are needed and
that they represent the best possible solution. Convince me.
Could you extend the documentation about the hint-system? Currently it
reads "An array of hint strings about the query, passed on to hook_sql
handlers.". Clearly, that doesn't help me at all. The documentation
should answer the following questions: (1) what are the hints for, (2)
when should I use them (or not use them) and (3) what does hints look
like (what is their format/syntax)?
Note that I can't compare performance unless more queries have been
updated.
Thanks chx.
------------------------------------------------------------------------
January 8, 2005 - 12:30 : Dries
Why does the hints in the comment module include 'related_list'. This
is confusing.
------------------------------------------------------------------------
January 8, 2005 - 13:52 : Jose A Reyero
Well, it seems we have different views about the 'hints'.
At this point, the node_rewrite has two main uses: permissions and
language conditions (i18n). I don't know whether they could have any
use for permission system, but for i18n, some extra information about
the rewritten queries will be needed:
- Most of the queries will just select fields in the node table. Here,
only a where condition is needed, but language condition may be added
or not depending on the kind of query:
_LIST would be a list for the main page, so only in this case,
decissions can be made depending on the path. For some pages, you may
want a list of nodes for all languages and for some others, only
current language.
_ADMIN_LIST is a list of nodes for administration. An option will be
added in i18n for 'administering all languages together' or 'administer
each language separately', or even a language field could be added in
the search form. So language conditions will be merged diferently
_BLOCK_LIST is a list of nodes for blocks. I'm thinking here of a
global option like 'show mixed languages in blocks'. Anyway, this is a
list for a block and you cannot have any logic depending on path
here.
_SEARCH, would be only for searching, and in this case you may decide
to search 'all languages' or only the current one. This can be a global
option or some extra field in search form. When doing text searches,
searching all languages together will make a lot of sense, but also
restricting search by language.
About _RELATED_LIST, this is the case of comments, is a list of objects
which are not nodes themselves, but related objects in a different
table. Here, the node table itself may have to be joined as it is not
yet in the query.
When dealing with the translation system, the language conditions will
be added or not by the module requesting the query itself, so no
further language conditions will be needed. Queries will have to be run
anyway through 'node_rewrite_sql' to have permissions in place.
That's what the _NO_LANGUAGE hint is about.
So this is my proposed use for the 'hint' thing, though maybe the hints
themselves could be better defined or elaborated, but this is the main
idea. I mean no specific hints for modules but generic ones for 'kind
of listing' you are requesting.
Maybe for the permission system, it could be also some use, as you
could decide you want to show a list of objects to anyone, but deny
access to the objects themselves, something like 'subscribe or register
if you want to read the article'. So permissions here will apply
differently depending on what you are doing.
We can think also about more creative use of permissions like 'you can
read latest articles' but old ones will be available only for selected
people, or the opposite 'only old content available for everybody'. Or
even 'you can read articles but not comments'. This kind of permissions
would need also some 'hints'.
------------------------------------------------------------------------
January 8, 2005 - 14:17 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_1.patch (26.89 KB)
More queries rewritten. Loop detection gone. Will gather my thoughts on
hint system later, but I do hope this amount of queries will be enough
for a performance measurement. Now only blogapi, blog, book calls
node_access_*_sql, all others are done.
------------------------------------------------------------------------
January 8, 2005 - 14:20 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_2.patch (26.88 KB)
Forgot to save taxonomy.module before rolling the patch, so a DISTINCT
remained :(
------------------------------------------------------------------------
January 8, 2005 - 14:38 : chx
I see Jose has written a lot about hints, thanks! "Well, it seems we
have different views about the 'hints'." -- "we" probably means Dries
vs. "Jose and I" 'cos I agree with Jose, but I see some more uses,
namely what I have said before on making a filter on forums. If you
want to that, you need to know which queries are coming from the
forum.module. What shall we do? Pass on the whole query, and let the
filter proccess the query to decide whether now it is the forum block
it hunts for? I doubt. Let's give it a hint it's a forum and a block
query.
Some kind of extensionable hint mechanism is necessary, 'cos what about
a contrib module which filters another contrib node, say flexinode?
------------------------------------------------------------------------
January 9, 2005 - 16:05 : Dries
Could we drop the hint system if we'd choose not to support the il8n
module for now?
------------------------------------------------------------------------
January 9, 2005 - 17:54 : Jose A Reyero
:-(
Ok, let's try to think positively.
Could we at least pass the query along so i18n -or whatever module
tries to implement this hook- could support itself?
------------------------------------------------------------------------
January 9, 2005 - 19:32 : chx
Well, passing along the query would mean no problems, but I wonder
whether a better documented hint system would be better? I had no
problems with letting the loop detection system go it was just a safety
belt for some distant future possibility. But the hint system is -- in
my point -- is needed.
So, here are the valid hint strings:
node, forum, comment etc.name of the module from the query originates,
like forum, comment, flexinode etc.
genericthis would be be for generic listings, like node_default_page,
forum_get_forums etc.
relatednode table is not joined so if you want to use other fields from
node table than nid you shall join node table yourself. However, if you
have your table which is like JOIN {mytable} ON mt.nid=$nid_alias.nid
that's fine.
adminsomething meant only for administrators.
blocknodes in a block
searchsomething to do with a search
------------------------------------------------------------------------
January 9, 2005 - 19:36 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_3.patch (28.31 KB)
Killes said I did not had -F^f in the last version.
------------------------------------------------------------------------
January 9, 2005 - 23:37 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_4.patch (28.77 KB)
Automatic version as discussed and args for Killes.
------------------------------------------------------------------------
January 9, 2005 - 23:55 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_5.patch (28.31 KB)
Hm. It seems we have agreed on no automatization. However, arbitrary
arguments are kept for Killes.
------------------------------------------------------------------------
January 10, 2005 - 22:02 : Dries
The last version of this patch improved the performance of my test
site's main page by 257%. That is, my machine can serve 2.57 times as
much pages in the same time interval.
Out of curiousity, I investigated this some more and it turns out this
can be tracked down to the useless DISTINCT's which this patch
removes.
Unless someone objects to this patch or the approach taken, I'm going
to commit this shortly. Please review this patch carefully as it marks
an important change.
------------------------------------------------------------------------
January 10, 2005 - 23:39 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_6.patch (44.18 KB)
More DISTINCTs cleared, now there are no more node_access_*_sql calls in
the core modules. This may be a final version.
Or we can find a few more to rewrite. I've searched for {node} selects,
dropped those which had nid = %d as I thought those do not need rewrite
(I may be wrong) and dropped also those that are rewritten, dropped
those that are indexing or cron. Here are the remaining queries, which
may need rewriting:
------------------------------------------------------------------------
January 11, 2005 - 00:02 : Chris Johnson
This patch seems like both a Good Thing and a Bad Thing to me.
The idea of centralizing node queries is a good one, I think. It seems
to be the original motivation for this patch. It allows better SQL
optmization and hence performance. It puts all the code in one place
for better future maintenance and enhancement.
On the other hand, constructing complex SQL statements from
programmatic logic is full of peril. The task quickly becomes very
large and complex.
Manipulating the SQL language elements via code means it is harder to
see when one has made a syntactic mistake. Most such errors will be
fatal. As the SQL construction code becomes more complex with
development, the number of paths through it become huge and impossible
to exhaustively test. Some day, someone will pass parameters that
cause fatal SQL syntax to be generated in a "production" system.
It also obscures SQL syntax differences between supported databases.
It's more likely to introduce usage that works with MySQL but fails
with Postgres.
I've long been in favor of unifying and centralizing all of the
database access in Drupal, to the greatest extent which does not
adversely affect performance. So in this way, I think this patch is a
big step in that general direction.
But I've also been involved in maintaining a search engine which used
this technique to create the SQL statements on the fly. It became
extremely complex over time as one, then two, then three, etc. new
possibilities were added (e.g. new usage, new search criteria). The
more complex it became, the more regression errors we had and the
harder to debug it became. It got to the point where making one small
addition would result in 3 new bugs. It worked most of the time, and
when it worked, it was fast. But it failed fatally in a significant
number of ways.
I'm not sure whether to vote +3 or -4 on this one. It might be good;
it might be terrible.
------------------------------------------------------------------------
January 11, 2005 - 00:19 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_7.patch (44.18 KB)
Chris, I understand your concerns, but this method -- unlike the
original -- tries to keep things as simple as possible. You can only
JOIN tables and add WHERE conditions. We are not creating complex SQL
on the fly, I tried that originally, just read comment #1 for the warm
welcome by Dries: "I'm not likely to commit this". So do not worry,
while I may be a little hotheaded, Dries keeps order with an iron
hand.
And the actual rewrite mechanism is also very simple.
Ps. Two typos corrected in this version.
------------------------------------------------------------------------
January 14, 2005 - 00:20 : Dries
I'm going to test and benchmark the latest version of this patch over
the weekend. If all goes well, I'll commit this to HEAD as no concrete
alternatives have been proposed. (I can't think of a better approach
and believe that this patch does a good job balancing different
values/requirements.)
It would be much appreciated if those who maintain node-level
permission modules could take a look at this patch to evaluate its
usefulness/performance. If you maintain a module that queries the node
table you might want to look at this as well -- after all, you'll have
to update your module if this hits core.
(Note that the PHPdoc code in the patch is not up-to-date.)
------------------------------------------------------------------------
January 14, 2005 - 14:47 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_8.patch (43.97 KB)
PHPdoc is upgraded, I hope now it is up to date.
------------------------------------------------------------------------
January 15, 2005 - 10:39 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_9.patch (43.98 KB)
module_implementations had a minor, but performance eating bug, it's
caching was broken.
------------------------------------------------------------------------
January 15, 2005 - 14:44 : Jose A Reyero
The function _node_rewrite_sql shoult have a default value for the
$query param, as it is called at least once with no arguments. You get
a 'warning' otherwise.
------------------------------------------------------------------------
January 15, 2005 - 17:58 : chx
Attachment: http://drupal.org/files/issues/node_rewrite_sql_10.patch (43.99 KB)
Yes, that's true. Default value of query added to helper
_node_rewrite_sql.
--
View: http://drupal.org/node/14731
Edit: http://drupal.org/project/comments/add/14731
1
0
Hi,
Because i do not believe in telling others what they should do, I started the
node-redesign mock-up in the way I think it needs to be done: Bottom-up.
(http://drupal.org/node/15506#comment-25337_
Chris, I really hope you do not mistake my comments for criticism, or as
working against your project. In contrary, I am merely trying to help this
project move forward.
Drupal has a huge difficulty: its modularity. That has prevented us to make or
fix the UI in a good way. The modularity dictates us to make changes to the
UI structural, not on a per-case basis. That actually goes for all changes:
They cannot be on a per-case basis, but need to be somehow structural.
The places where that has been done, are in fact the places where problems
start occurring; those places will become inconsistent.
A slightly off-topic example of this happened to me yesterday: a client of
mine phoned me about wanting to change something to the comment settings. And
he simply could not find the comment settings. That is because he expected
all site settings to be under administrate > settings. But the comment
settings are not there, no, they are inconsistently placed under a tab on the
comment-moderation page!
I really want to avoid introducing yet another amount of possible
inconsistencies, by designing a page for each node-type, each node-type in
each case, hell, even each node-type for each role, in each case. Because it
is not so that they *can* look different for each site, each role, each node
type, they simply *will*, eventually appear different. That's where we have
the nodeapis for: To make them different for each case.
This all dictates we take this project structurally, start bottom up: What can
nodeapi do, where can it do that, what can appear, what not etc.
The only thing that is required, ATM is the title, all other elements might
(and thus eventually will) appear or disappear.
Bèr
--
| Bèr Kessels | webschuur.com | website development |
| Turnhoutsebaan 34/3 | 2140 Antwerpen | België |
| IM: ber(a)jabber.org.uk | MSN: berkessels(a)gmx.net |
| pers: bler.webschuur.com | prof: www.webschuur.com |
--
Regards,
Bèr
--
[ Bèr Kessels | Drupal services www.webschuur.com ]
2
2
Project: Drupal
Version: 4.5.0
Component: archive.module
Category: feature requests
Priority: normal
Assigned to: Goba
Reported by: Goba
Updated by: Goba
-Status: active
+Status: patch
Attachment: http://drupal.org/files/issues/Drupal.allow.themeing.blank.days.patch (1.28 KB)
Here is a proposed patch, which simply makes the blank days themeable,
so that I can use str_repeat("�\n", $blankdays) in my theme.
Goba
Previous comments:
------------------------------------------------------------------------
January 15, 2005 - 20:30 : Goba
Attachment: http://drupal.org/files/issues/drupalcal.png (16.16 KB)
I would like to have a calendar which has stlyes for every blank day, as
opposed to what is supported by current Drupal HEAD. It should look
something like:
I see that it would only be possible if we make the blank days
themeable. It would be possible to make the whole calendar themeable,
but that would open up a lot more stuff, since then the calendar code
would need to be abstracted out from the archive table assembler code.
--
View: http://drupal.org/node/15655
Edit: http://drupal.org/project/comments/add/15655
1
0
Project: Drupal
Version: cvs
Component: node.module
Category: feature requests
Priority: normal
Assigned to: Steven
Reported by: Anonymous
Updated by: Steven
Status: patch
This way they take up even more space though. I'd like to at least have
the user see part of the results table without scrolling. Also, the
rounded boxes are definitely a theme thing and don't really belong in
core.
The markup would need some changes too, as right now the structure is
vertical nested inside horizontal, while yours is horizontal nested in
vertical.
I was also wondering about the wording... "Show items where A is B"
sounds a bit bumpy. Alternatives "... items whose A is B" "items with A
of B", etc.
Steven
Previous comments:
------------------------------------------------------------------------
August 23, 2004 - 17:09 : Anonymous
Attachment: http://drupal.org/files/issues/node_admin_filter.patch (3.8 KB)
Here's a patch for the current CVS version which adds the option to
filter nodes by type on the node admin page.
Having built a few sites recently which make heavy use of flexinodes,
the ability to filter out particular node types would have been
extremely useful, so I hope this makes it to 4.5.0.
------------------------------------------------------------------------
August 23, 2004 - 21:06 : leafish_dylan
This would be a great feature.
------------------------------------------------------------------------
August 23, 2004 - 21:06 : leafish_dylan
This would be a great feature.
------------------------------------------------------------------------
September 4, 2004 - 00:38 : Bèr Kessels
I think we should really come up with a good solution for this screen.
In the past, I went looking for such a solution and found that the
various MP3 library tools might come to help.
They deal with large amounts of metadata, some of wch are important,
other are not.
I summarise here what the UI could be like:
** The menu-based (tree) approach: Most mp3 collections use this idea.
In a tree like structure on the side, you can make selections. The list
in the main area will follow this selection. (Itunes:
http://www.apple.com/itunes/playlists.html , Juk:
http://developer.kde.org/~wheeler/images/juk-2.0/juk-2.png,
finf/freeamp: http://www.zinf.org/images/zinf_mymusic_shot.png)
In drupal that would mean a menu-based filtering method. I once made a
patch for that, but that was rejected:
http://drupal.org/node/view/7766
The good thing here, is that it is virtually endless scalable. So in
theory, flexinode coud add menu items to show only nodes where foo is
bar.
|
- nodetype
| |- blog
| |= Flexinode
| | |=foo
| | | |=bar
| |- page
** The multiple selectlist UI: Another moethod is a extended method of
what we have now: select items from select boxes and press submit.
Above the main area one will find some selection UI where one can in-
and exlude sertain criteria. (rhythmbox:
http://www.rhythmbox.org/screenshots/Screenshot-Rhythmbox.png, and
winamp http://www.winamp.com/player/walkthrough.php) Note that both
still show some form of tree navigation.
In drupal that would mean multiple selects in three columns (rhytmbox
and winamp show only two artist and album) For drupal we need three of
thos blocks: one for node-types, one for node-settings (promoted, etc)
and one for taxonomy terms. The node settings should be logical too: If
a criteria is selected it it true, if not: false. That way we can also
get rod of the annoying logic: "view posts that are not promoted" and
the likes.
In both solutions the "perform batch action" needs to move somewhere
else. I would plead for moving it to the bottom of the list. A lot of
webmail cleints do it that way. The reason being simple: the steps you
take to perform the update are:
1) select criteria (find nodes)
2) checkmark the chages (we need columns of checkboxes)
3) perform the update.
Logically the way you go through the UI is left->right, top-> down (not
taking into consideration japanese/hebrew/arabs etc)
So all in all: i think indeed the UI needs serious work. I am willing
to take this one me, bu I do need some consensus first. I am not
willing to spend hours on a new UI (like the menu-based approach) to
find the patch being rejected.Therefore I like some discussion up fron,
rather than the " code first see later" approach.
Regards, Ber
------------------------------------------------------------------------
September 5, 2004 - 23:42 : Bèr Kessels
Attachment: http://drupal.org/files/issues/new_UI_proposal.png (175.31 KB)
Here is a gimped mockup from what option 2) could look like.
WE could add a fouth box with users too, but I am not sure how that
would go with permissions and the like. I need to do some thinking
about selecatibility by users first.
------------------------------------------------------------------------
September 6, 2004 - 00:01 : Bèr Kessels
Sorry for the spam: but I forgot to mention that there are a few
issues:
The "perform action dropdown" should list stuff as: promote, demote,
etc. But that list needs to be generated with the selection above in
mind. So if you choose " published" the action list should not have
"publish these nodes"
Also the action list could contain "recategorise" wich would need
another screen after the one in the "ugly screendump-gimp-mockup", to
be able to choose the categories in wich the selection should be
placed.
And of course the delete these items with a confimation dialog.
(http://drupal.org/node/view/7743#comment-11624)
------------------------------------------------------------------------
September 6, 2004 - 14:32 : Bèr Kessels
Attachment: http://drupal.org/files/issues/node_admin.html (29.95 KB)
After a long discussion with Steven And gerhard, I designed the page in
HTML, to let you all try it in some way.
Beware: the html is an ugly mock, It is meant as scetch, not as valid
html.
Some notes on the page:
"View all nodes that are:" contains three differnet possibilities for
searching. The first two (above the blank line) are there for
simplicity, but they might confuse users, because they need a lot of
text. The second idea uses a checkbox to enable the select next to it.
The third one uses some ajvascript to improve useablity.
We should of course choose one of these three methods.
"View all nodes that are classified in:"
There are quite some people that have questions with whether or not we
should include this selection aat all. Here is why I think it should
definately go Because most sites have only one purpose and thus a lot
of nodes of one type in one state. For example a personal blog site:
99% of the nodes are blogs. 99% are promoted. Only 1 or 2 are not
promoted, not published or of type page.
Or take a photo-album-site. All posts will be images, the main
difference is the classification (the galleries) I placed them in.
"any/all" There must be a way to choose whether the sected options
should be an AND or an OR. I tried three different methods, each block
has one method. We should choose one.
Please give me feedback, for I still have to decide whether or not to
make this a contributed module or start lobby-ing to get it in core.
------------------------------------------------------------------------
September 13, 2004 - 11:50 : moshe weitzman
looking good, and really useful. a few small comments:
- consider upping the number of nodes that appear on this page. it is
nearly pointless to use paging on this sort of UI
- i like the second idea of an 'enabled' checkbox, without the
javascript. i think you can use 2 checkboxes, where the second one is
called 'publish', 'promote', and 'has comments'
- I prefer the horizontal configuration of the 'Require: all any' radio
buttons
- don't repeat 'the selected posts' in the choices for the bottom
dropdown. perhaps use a title for that form_select() instead.
- the last choice in that dropdown is 'reclassify'. i don't see how
this screen could support that. instead, use my
taxonomy_multi_edit.module from contrib :)
i suggest making this a contrib module at first. it can be a tab off of
the current page. thats how taxonomy_multi_edit.module appears.
------------------------------------------------------------------------
September 13, 2004 - 13:03 : Bèr Kessels
About that reclassify:
That was exactly my intention: using the taxonomy_muliti_edit module
for that. All I wanted to do is pass a list of nids to your module and
open a screen using that module with the previously selected nodes!
About the other comments: Yes upping the number of nodes might be a
good idea. Anyone any idea what number would still be usefull. 10.000
nodes (on drupal.org) in one list is not a good idea, IMO, so some
paging is needed.
indeed: repeatinf words in dropdowns is considered "bad UI design"
thank you for pointing it out.
Regards, Ber
------------------------------------------------------------------------
September 28, 2004 - 13:37 : eafarris
Attachment: http://drupal.org/files/issues/admin_node_filter_by_type.patch (1.96 KB)
here is an updated version of this patch, syncing it with CVS HEAD.
Also, i did change the functionality somewhat: previous versions of the
patch asked the modules what node types were out there (via
hook_node_name()). This version asks the node table what types are in
there (via SELECT DISTINCT type FROM {node}). I find this more useful,
because it's entirely possible that, over time, modules will be removed
from the system, yet they still have rows in the node table. This method
gives a more accurate view of the types of nodes on the system.
The new UI looks excellent, but this patch does not address it.
------------------------------------------------------------------------
September 28, 2004 - 19:05 : drumm
-1
I applied and tested and it did not work at all for me. The type
options selection only contains 's' and 'W', selecting one does not
work. The list of types seems to come from the DB which is probably an
unnecessary query.
------------------------------------------------------------------------
September 29, 2004 - 12:51 : eafarris
Attachment: http://drupal.org/files/issues/admin_node_filter_by_type_1.patch (2.31 KB)
Here's a version of that patch that should work. Sorry.
I think that getting the types from the node table is necessary. The
list of installed nodes is not the authority on what types of nodes are
in the db; we should ask the db directly. It's a small query on one
admin page; the result is that the dropdown has in it the most accurate
information available. That's worth it, imo.
------------------------------------------------------------------------
September 29, 2004 - 12:52 : eafarris
s/list of installed nodes/list of installed modules/ . sheesh. teach me
to post before my tea.
------------------------------------------------------------------------
October 21, 2004 - 18:15 : Bèr Kessels
Attachment: http://drupal.org/files/issues/node.html (29.33 KB)
I do not know where it weant, but my proposal had a HTML mockup.
Attaching it here to see what i meant.
------------------------------------------------------------------------
October 23, 2004 - 13:14 : com2
Nice filter options, but what I really miss it the possibility to select
all checkboxes. Really boring job when you have to click the whole list
one by one.
------------------------------------------------------------------------
October 24, 2004 - 10:41 : Bèr Kessels
I am not a big fan of those options in forms.
They more often break things than that thy fix them. Rahter use a
bookmarklet r so for that:
http://www.squarefree.com/bookmarklets/forms.html
Ber
------------------------------------------------------------------------
October 25, 2004 - 01:03 : Steven
Attachment: http://drupal.org/files/issues/node_admin_ucd.html (29.83 KB)
Based on some more IRC discussion, I came up with this (attachment). It
is based on an earlier mockup.
It does use Javascript and doesn't degrade without script (yet), but I
think it's worth considering. It can be implemented quite cleanly. The
idea would be to have a filter like this initially, and after clicking
'Go', to show the current filter as well as the form again, allowing
you to refine your search.
I haven't tested browser compatibility, but it should work on most
browsers. The only ones I know for sure won't work are IE4 and NS4,
which are old enough to ignore IMO: after all, this is admin only, and
we can put some stricter browser requirements on that. Recent versions
of other browsers should work (it only does a simple visibility
toggle).
I like it because it's not an airplane cockpit, but still offers
complex filtering options through refinement. It is also quite similar
to the search/filtering UI in e.g. mail applications.
The question is of course, how to degrade it for people without
Javascript. My suggestion would be to simply show all filter options,
and put a radiobutton in front of each:
( ) Where type is [ blog | v ]
( ) Where published status is ( ) published ( ) unpublished
( ) Where category is [ term1 | v ]
...
It has more visual clutter, but the same principle of use.
------------------------------------------------------------------------
October 25, 2004 - 01:13 : Steven
In fact, I just realized that the radio-button version can be coded to
send exactly the same form data as the scripted version, which makes it
more interesting.
------------------------------------------------------------------------
October 29, 2004 - 00:52 : Steven
If you guys approve of my idea, I'll start coding. Assigning to myself
for now.
------------------------------------------------------------------------
November 1, 2004 - 17:35 : Bèr Kessels
I like this idea much more than my previous approaches. Gave it some
thought and came with the follwing behaviour:
* I think we need to discuss or at least design the tabular data too:
It makes 0 sense to show the "types" column, if you chose "type =
image"
* I think we need to introduce a hook to add info to that tabulat view.
Images can output thumbnails, for example
* In tabular view, we should make: title a textfield, type and author a
select and satus a select too.
* I think we should introduce another range of options: "where content
contains" [ ] and "where title contains" [ ]
* I would like to get some feedback on how many drupal-using people are
firmly against javascript, with a reason why. I bet that this is < 1% !
Bèr
------------------------------------------------------------------------
November 1, 2004 - 17:42 : Steven
We don't have an anti-JS policy in Drupal. It's just that until
recently, doing cross browser JS was a chore and making it accessible
and degradable would be a disaster.
This form can be implemented cleanly and will degrade without problems.
Anyone who opposes it because it is JS can bugger off ;).
------------------------------------------------------------------------
November 3, 2004 - 19:24 : com2
There is a more radical way around JS. You could forget the table idea
alltogether and present the nodes in Listbox. Then selecting becomes
much easier with Ctrl-Click and Shift-Click
------------------------------------------------------------------------
November 4, 2004 - 00:02 : Bèr Kessels
Did you have a look at the previous applied UI improvements? Did you
consider the pre's and cons of those earlier posts?
It seams you are repeating passed issues here, please reply with miore
detailed issues here,
Bèr
------------------------------------------------------------------------
December 3, 2004 - 10:49 : Steven
Attachment: http://drupal.org/files/issues/node-admin.patch (13.1 KB)
Here's a patch which implements the JS approach of refining the
selection.
------------------------------------------------------------------------
December 3, 2004 - 10:50 : Steven
Attachment: http://drupal.org/files/issues/node_admin.png (34.38 KB)
And here's a screenshot of how it looks.
------------------------------------------------------------------------
December 3, 2004 - 19:23 : FactoryJoe(a)civicspacelabs.org
This is looking better and better. I'm going to do a UI review of this a
post any additional thoughts or comments.
Chris
------------------------------------------------------------------------
December 3, 2004 - 21:50 : Anonymous
Ack, I tested this using the bluebeach theme, but there's a small CSS
bug with bluemarine, where the header for the operations form is stuck
to the right of the filter form. I'll make an updated patch later. In
the meantime, comments are much appreciated.
------------------------------------------------------------------------
December 3, 2004 - 23:15 : killes(a)www.drop.org
I actually prefer the non-JS menu over the JS menu. Not (only) because
of the JS but because I prefer radiobuttons over pulldown menus. The
argument that the non-JS approach uses more vertical space can be
mitigated by redirecting to a #results anchor.
------------------------------------------------------------------------
January 15, 2005 - 06:32 : Steven
Attachment: http://drupal.org/files/issues/node.admin.patch (14.41 KB)
Here's an updated patch... I have exams in a week, so I don't have time
to finish up the Javascript version, so I removed it (it can be added
later easily). However, the non-JS version is still very usable.
Changes since last time:
- Uses semantic XHTML (definition list, and yes, they are for more than
just definitions, even w3c agrees).
- Merges the various node flags (promoted, published, ...) into one
"status" dropdown. This keeps the whole selector shorter, and is better
UI-wise IMO.
- Adds drupal_gotos, they were missing.
- Updates node admin watchog messages to properly display the type. The
code used t($node->type) which is a big no-no. hook_node_name() is now
invoked instead.
- Removes some dead code.
- I rolled Ber's node mass deletion patch in as it affects the same
piece of code. Updating either patch for the other separately would be
a waste of time. I also added some more improvements to Bèr's code,
such as removing the incorrect help from the confirmation page,
cleaning up the code style a bit, not loading every node just to
display its title and displaying a single drupal_set_message() after
the deleting rather than one per node.
The old issue is here: http://drupal.org/node/7743
------------------------------------------------------------------------
January 15, 2005 - 06:32 : Steven
Attachment: http://drupal.org/files/issues/node admin.png (30.19 KB)
------------------------------------------------------------------------
January 15, 2005 - 09:55 : Bèr Kessels
Thanks for integrating the batch delete patch, Steven!
------------------------------------------------------------------------
January 15, 2005 - 13:47 : Dries
Attachment: http://drupal.org/files/issues/node-filter-wrap.png (34.55 KB)
It looks good but:
1. It makes the UI looks cluttered. I suggest visually grouping the
varios form elements so it becomes easier for they eye to skip over
them.
2. It is too wide. Try using the Chameleon theme with a sidebar on the
right at 1024x768 (eg. my laptop's resolution) and you'll find that the
form elements wrap, and wrap in an awkward order. See screenshot.
Maybe we should group the form elements using from_group() and make
"Show only items where" the form_group()'s title. It would save space.
------------------------------------------------------------------------
January 15, 2005 - 16:14 : Bèr Kessels
Steven,
Is there a reason why you do not use theme_box, but hardcode HTML in
your forms? If there is none, I will spend some time monday to fix it.
Bèr
------------------------------------------------------------------------
January 15, 2005 - 17:48 : Steven
Simple. There aren't any guidelines on theme box usage :P. Plus, theming
the admin interface is probably not a big priority.
------------------------------------------------------------------------
January 15, 2005 - 19:44 : FactoryJoe(a)civicspacelabs.org
Attachment: http://drupal.org/files/issues/node-filter-wrap-v2.png (14.23 KB)
I simplified the layout and added some visual separation between
elements (the rounded boxes). I imagine that pretty much the same
markup as exists now could be used with some slight tweaks.
Probably the most significant change, horizontally, is moving the
filter button below the filters.
--
View: http://drupal.org/node/10296
Edit: http://drupal.org/project/comments/add/10296
1
0
Project: Drupal
Version: cvs
Component: story.module
Category: tasks
Priority: normal
Assigned to: Bèr Kessels
Reported by: Bèr Kessels
Updated by: Goba
-Status: fixed
+Status: patch
Attachment: http://drupal.org/files/issues/Drupal.simplify.story.help.patch (2.18 KB)
Well, this was a bogus fix after all. The patch removed the paragraph
tags used in some help texts. These were introduced lately in most of
the help texts to improve consistency in displaying help texts. I am
unsure however, whether such paragraphs are going to be used on node
add pages...
What is worse, that the committed patch contained the exact same
sentence sequeces three times in the code, two times identical, one
time with an extension. Being in a switch() statement, it is quite
simple to overcome the duplicate, and it is also not hard to watch out
for the extended part. A patch attached to remedy this.
BUT this still does not restore the paragpraph wrapping around the help
text in the admin helps, since I am unsure, whether that would be
applicable to the 'node add' page descriptions.
Goba
Previous comments:
------------------------------------------------------------------------
January 7, 2005 - 14:19 : Bèr Kessels
Attachment: http://drupal.org/files/issues/story_help.patch (3.06 KB)
Because of historical reasons the story module help contained all sortts
of odd texts, that are partly even untrue.
This patch changes the help so that it:
* stresses that stories are nodes in their simplest form
* removes all the bloat about workflow. workflow can be configured for
any node type, why should nstories mention it?
* removes parts of voting, queues, promotion, comments etc. Any node
type can have this.
* adds a note that you can use stories for personal blogging, and as
general pages, pages with no specific purpose (I consider, for example,
a forum node a node with a special purpose)
* stresses that you should use other modules (taxonnomy, menu) to give
the node a place on your site.
set to CVS but will apply to 4.5 too.....
------------------------------------------------------------------------
January 10, 2005 - 17:41 : Bèr Kessels
Attachment: http://drupal.org/files/issues/story_help_0.patch (3.06 KB)
previous patch was the one before spellchecking. This one is without the
two spelling errors.
------------------------------------------------------------------------
January 10, 2005 - 20:29 : Dries
Can someone review this please?
------------------------------------------------------------------------
January 12, 2005 - 14:53 : Bèr Kessels
Attachment: http://drupal.org/files/issues/story_help_1.patch (3.01 KB)
After some discussion on the drupal-docs ML, i came up with the
following help-texts:
Short:
Stories are articles in their simplest form: they have a title, a
teaser and a body, but can be extended by other modules. The teaser is
part of the body too. Stories may be used as a personal blog or for
news
articles.
Longer:
Stories are articles in their simplest form: they have a title, a
teaser and a body, but can be extended by other modules. The teaser is
part of the body too. Stories may be used as a personal blog or for
news
articles. By default, no menu item, or navigation element is
created for a story. An extra feature of a
story is, that an administrator can specify a submission guideline and
enforce a minimum word count for user submitted stories
------------------------------------------------------------------------
January 13, 2005 - 20:42 : Dries
This patch doesn't apply against HEAD.
patching file modules/story.module
Hunk #1 FAILED at 14.
Hunk #2 FAILED at 26.
2 out of 2 hunks FAILED -- saving rejects to file
modules/story.module.rej
------------------------------------------------------------------------
January 14, 2005 - 23:55 : Bèr Kessels
AARHGH, such a simple patch, so much hassle. My mistake, uplaoded the
wrong one again.
This one should be right.
------------------------------------------------------------------------
January 15, 2005 - 00:05 : Bèr Kessels
Attachment: http://drupal.org/files/issues/story_improve_help.patch (3.19 KB)
**sigh**
------------------------------------------------------------------------
January 15, 2005 - 09:01 : Dries
Committed to HEAD.
--
View: http://drupal.org/node/15264
Edit: http://drupal.org/project/comments/add/15264
1
0
Project: Drupal
Version: cvs
Component: node.module
Category: feature requests
Priority: normal
Assigned to: Steven
Reported by: Anonymous
Updated by: FactoryJoe(a)civicspacelabs.org
Status: patch
Attachment: http://drupal.org/files/issues/node-filter-wrap-v2.png (14.23 KB)
I simplified the layout and added some visual separation between
elements (the rounded boxes). I imagine that pretty much the same
markup as exists now could be used with some slight tweaks.
Probably the most significant change, horizontally, is moving the
filter button below the filters.
FactoryJoe(a)civicspacelabs.org
Previous comments:
------------------------------------------------------------------------
August 23, 2004 - 08:09 : Anonymous
Attachment: http://drupal.org/files/issues/node_admin_filter.patch (3.8 KB)
Here's a patch for the current CVS version which adds the option to
filter nodes by type on the node admin page.
Having built a few sites recently which make heavy use of flexinodes,
the ability to filter out particular node types would have been
extremely useful, so I hope this makes it to 4.5.0.
------------------------------------------------------------------------
August 23, 2004 - 12:06 : leafish_dylan
This would be a great feature.
------------------------------------------------------------------------
August 23, 2004 - 12:06 : leafish_dylan
This would be a great feature.
------------------------------------------------------------------------
September 3, 2004 - 15:38 : Bèr Kessels
I think we should really come up with a good solution for this screen.
In the past, I went looking for such a solution and found that the
various MP3 library tools might come to help.
They deal with large amounts of metadata, some of wch are important,
other are not.
I summarise here what the UI could be like:
** The menu-based (tree) approach: Most mp3 collections use this idea.
In a tree like structure on the side, you can make selections. The list
in the main area will follow this selection. (Itunes:
http://www.apple.com/itunes/playlists.html , Juk:
http://developer.kde.org/~wheeler/images/juk-2.0/juk-2.png,
finf/freeamp: http://www.zinf.org/images/zinf_mymusic_shot.png)
In drupal that would mean a menu-based filtering method. I once made a
patch for that, but that was rejected:
http://drupal.org/node/view/7766
The good thing here, is that it is virtually endless scalable. So in
theory, flexinode coud add menu items to show only nodes where foo is
bar.
|
- nodetype
| |- blog
| |= Flexinode
| | |=foo
| | | |=bar
| |- page
** The multiple selectlist UI: Another moethod is a extended method of
what we have now: select items from select boxes and press submit.
Above the main area one will find some selection UI where one can in-
and exlude sertain criteria. (rhythmbox:
http://www.rhythmbox.org/screenshots/Screenshot-Rhythmbox.png, and
winamp http://www.winamp.com/player/walkthrough.php) Note that both
still show some form of tree navigation.
In drupal that would mean multiple selects in three columns (rhytmbox
and winamp show only two artist and album) For drupal we need three of
thos blocks: one for node-types, one for node-settings (promoted, etc)
and one for taxonomy terms. The node settings should be logical too: If
a criteria is selected it it true, if not: false. That way we can also
get rod of the annoying logic: "view posts that are not promoted" and
the likes.
In both solutions the "perform batch action" needs to move somewhere
else. I would plead for moving it to the bottom of the list. A lot of
webmail cleints do it that way. The reason being simple: the steps you
take to perform the update are:
1) select criteria (find nodes)
2) checkmark the chages (we need columns of checkboxes)
3) perform the update.
Logically the way you go through the UI is left->right, top-> down (not
taking into consideration japanese/hebrew/arabs etc)
So all in all: i think indeed the UI needs serious work. I am willing
to take this one me, bu I do need some consensus first. I am not
willing to spend hours on a new UI (like the menu-based approach) to
find the patch being rejected.Therefore I like some discussion up fron,
rather than the " code first see later" approach.
Regards, Ber
------------------------------------------------------------------------
September 5, 2004 - 14:42 : Bèr Kessels
Attachment: http://drupal.org/files/issues/new_UI_proposal.png (175.31 KB)
Here is a gimped mockup from what option 2) could look like.
WE could add a fouth box with users too, but I am not sure how that
would go with permissions and the like. I need to do some thinking
about selecatibility by users first.
------------------------------------------------------------------------
September 5, 2004 - 15:01 : Bèr Kessels
Sorry for the spam: but I forgot to mention that there are a few
issues:
The "perform action dropdown" should list stuff as: promote, demote,
etc. But that list needs to be generated with the selection above in
mind. So if you choose " published" the action list should not have
"publish these nodes"
Also the action list could contain "recategorise" wich would need
another screen after the one in the "ugly screendump-gimp-mockup", to
be able to choose the categories in wich the selection should be
placed.
And of course the delete these items with a confimation dialog.
(http://drupal.org/node/view/7743#comment-11624)
------------------------------------------------------------------------
September 6, 2004 - 05:32 : Bèr Kessels
Attachment: http://drupal.org/files/issues/node_admin.html (29.95 KB)
After a long discussion with Steven And gerhard, I designed the page in
HTML, to let you all try it in some way.
Beware: the html is an ugly mock, It is meant as scetch, not as valid
html.
Some notes on the page:
"View all nodes that are:" contains three differnet possibilities for
searching. The first two (above the blank line) are there for
simplicity, but they might confuse users, because they need a lot of
text. The second idea uses a checkbox to enable the select next to it.
The third one uses some ajvascript to improve useablity.
We should of course choose one of these three methods.
"View all nodes that are classified in:"
There are quite some people that have questions with whether or not we
should include this selection aat all. Here is why I think it should
definately go Because most sites have only one purpose and thus a lot
of nodes of one type in one state. For example a personal blog site:
99% of the nodes are blogs. 99% are promoted. Only 1 or 2 are not
promoted, not published or of type page.
Or take a photo-album-site. All posts will be images, the main
difference is the classification (the galleries) I placed them in.
"any/all" There must be a way to choose whether the sected options
should be an AND or an OR. I tried three different methods, each block
has one method. We should choose one.
Please give me feedback, for I still have to decide whether or not to
make this a contributed module or start lobby-ing to get it in core.
------------------------------------------------------------------------
September 13, 2004 - 02:50 : moshe weitzman
looking good, and really useful. a few small comments:
- consider upping the number of nodes that appear on this page. it is
nearly pointless to use paging on this sort of UI
- i like the second idea of an 'enabled' checkbox, without the
javascript. i think you can use 2 checkboxes, where the second one is
called 'publish', 'promote', and 'has comments'
- I prefer the horizontal configuration of the 'Require: all any' radio
buttons
- don't repeat 'the selected posts' in the choices for the bottom
dropdown. perhaps use a title for that form_select() instead.
- the last choice in that dropdown is 'reclassify'. i don't see how
this screen could support that. instead, use my
taxonomy_multi_edit.module from contrib :)
i suggest making this a contrib module at first. it can be a tab off of
the current page. thats how taxonomy_multi_edit.module appears.
------------------------------------------------------------------------
September 13, 2004 - 04:03 : Bèr Kessels
About that reclassify:
That was exactly my intention: using the taxonomy_muliti_edit module
for that. All I wanted to do is pass a list of nids to your module and
open a screen using that module with the previously selected nodes!
About the other comments: Yes upping the number of nodes might be a
good idea. Anyone any idea what number would still be usefull. 10.000
nodes (on drupal.org) in one list is not a good idea, IMO, so some
paging is needed.
indeed: repeatinf words in dropdowns is considered "bad UI design"
thank you for pointing it out.
Regards, Ber
------------------------------------------------------------------------
September 28, 2004 - 04:37 : eafarris
Attachment: http://drupal.org/files/issues/admin_node_filter_by_type.patch (1.96 KB)
here is an updated version of this patch, syncing it with CVS HEAD.
Also, i did change the functionality somewhat: previous versions of the
patch asked the modules what node types were out there (via
hook_node_name()). This version asks the node table what types are in
there (via SELECT DISTINCT type FROM {node}). I find this more useful,
because it's entirely possible that, over time, modules will be removed
from the system, yet they still have rows in the node table. This method
gives a more accurate view of the types of nodes on the system.
The new UI looks excellent, but this patch does not address it.
------------------------------------------------------------------------
September 28, 2004 - 10:05 : drumm
-1
I applied and tested and it did not work at all for me. The type
options selection only contains 's' and 'W', selecting one does not
work. The list of types seems to come from the DB which is probably an
unnecessary query.
------------------------------------------------------------------------
September 29, 2004 - 03:51 : eafarris
Attachment: http://drupal.org/files/issues/admin_node_filter_by_type_1.patch (2.31 KB)
Here's a version of that patch that should work. Sorry.
I think that getting the types from the node table is necessary. The
list of installed nodes is not the authority on what types of nodes are
in the db; we should ask the db directly. It's a small query on one
admin page; the result is that the dropdown has in it the most accurate
information available. That's worth it, imo.
------------------------------------------------------------------------
September 29, 2004 - 03:52 : eafarris
s/list of installed nodes/list of installed modules/ . sheesh. teach me
to post before my tea.
------------------------------------------------------------------------
October 21, 2004 - 09:15 : Bèr Kessels
Attachment: http://drupal.org/files/issues/node.html (29.33 KB)
I do not know where it weant, but my proposal had a HTML mockup.
Attaching it here to see what i meant.
------------------------------------------------------------------------
October 23, 2004 - 04:14 : com2
Nice filter options, but what I really miss it the possibility to select
all checkboxes. Really boring job when you have to click the whole list
one by one.
------------------------------------------------------------------------
October 24, 2004 - 01:41 : Bèr Kessels
I am not a big fan of those options in forms.
They more often break things than that thy fix them. Rahter use a
bookmarklet r so for that:
http://www.squarefree.com/bookmarklets/forms.html
Ber
------------------------------------------------------------------------
October 24, 2004 - 16:03 : Steven
Attachment: http://drupal.org/files/issues/node_admin_ucd.html (29.83 KB)
Based on some more IRC discussion, I came up with this (attachment). It
is based on an earlier mockup.
It does use Javascript and doesn't degrade without script (yet), but I
think it's worth considering. It can be implemented quite cleanly. The
idea would be to have a filter like this initially, and after clicking
'Go', to show the current filter as well as the form again, allowing
you to refine your search.
I haven't tested browser compatibility, but it should work on most
browsers. The only ones I know for sure won't work are IE4 and NS4,
which are old enough to ignore IMO: after all, this is admin only, and
we can put some stricter browser requirements on that. Recent versions
of other browsers should work (it only does a simple visibility
toggle).
I like it because it's not an airplane cockpit, but still offers
complex filtering options through refinement. It is also quite similar
to the search/filtering UI in e.g. mail applications.
The question is of course, how to degrade it for people without
Javascript. My suggestion would be to simply show all filter options,
and put a radiobutton in front of each:
( ) Where type is [ blog | v ]
( ) Where published status is ( ) published ( ) unpublished
( ) Where category is [ term1 | v ]
...
It has more visual clutter, but the same principle of use.
------------------------------------------------------------------------
October 24, 2004 - 16:13 : Steven
In fact, I just realized that the radio-button version can be coded to
send exactly the same form data as the scripted version, which makes it
more interesting.
------------------------------------------------------------------------
October 28, 2004 - 15:52 : Steven
If you guys approve of my idea, I'll start coding. Assigning to myself
for now.
------------------------------------------------------------------------
November 1, 2004 - 08:35 : Bèr Kessels
I like this idea much more than my previous approaches. Gave it some
thought and came with the follwing behaviour:
* I think we need to discuss or at least design the tabular data too:
It makes 0 sense to show the "types" column, if you chose "type =
image"
* I think we need to introduce a hook to add info to that tabulat view.
Images can output thumbnails, for example
* In tabular view, we should make: title a textfield, type and author a
select and satus a select too.
* I think we should introduce another range of options: "where content
contains" [ ] and "where title contains" [ ]
* I would like to get some feedback on how many drupal-using people are
firmly against javascript, with a reason why. I bet that this is < 1% !
Bèr
------------------------------------------------------------------------
November 1, 2004 - 08:42 : Steven
We don't have an anti-JS policy in Drupal. It's just that until
recently, doing cross browser JS was a chore and making it accessible
and degradable would be a disaster.
This form can be implemented cleanly and will degrade without problems.
Anyone who opposes it because it is JS can bugger off ;).
------------------------------------------------------------------------
November 3, 2004 - 10:24 : com2
There is a more radical way around JS. You could forget the table idea
alltogether and present the nodes in Listbox. Then selecting becomes
much easier with Ctrl-Click and Shift-Click
------------------------------------------------------------------------
November 3, 2004 - 15:02 : Bèr Kessels
Did you have a look at the previous applied UI improvements? Did you
consider the pre's and cons of those earlier posts?
It seams you are repeating passed issues here, please reply with miore
detailed issues here,
Bèr
------------------------------------------------------------------------
December 3, 2004 - 01:49 : Steven
Attachment: http://drupal.org/files/issues/node-admin.patch (13.1 KB)
Here's a patch which implements the JS approach of refining the
selection.
------------------------------------------------------------------------
December 3, 2004 - 01:50 : Steven
Attachment: http://drupal.org/files/issues/node_admin.png (34.38 KB)
And here's a screenshot of how it looks.
------------------------------------------------------------------------
December 3, 2004 - 10:23 : FactoryJoe(a)civicspacelabs.org
This is looking better and better. I'm going to do a UI review of this a
post any additional thoughts or comments.
Chris
------------------------------------------------------------------------
December 3, 2004 - 12:50 : Anonymous
Ack, I tested this using the bluebeach theme, but there's a small CSS
bug with bluemarine, where the header for the operations form is stuck
to the right of the filter form. I'll make an updated patch later. In
the meantime, comments are much appreciated.
------------------------------------------------------------------------
December 3, 2004 - 14:15 : killes(a)www.drop.org
I actually prefer the non-JS menu over the JS menu. Not (only) because
of the JS but because I prefer radiobuttons over pulldown menus. The
argument that the non-JS approach uses more vertical space can be
mitigated by redirecting to a #results anchor.
------------------------------------------------------------------------
January 14, 2005 - 21:32 : Steven
Attachment: http://drupal.org/files/issues/node.admin.patch (14.41 KB)
Here's an updated patch... I have exams in a week, so I don't have time
to finish up the Javascript version, so I removed it (it can be added
later easily). However, the non-JS version is still very usable.
Changes since last time:
- Uses semantic XHTML (definition list, and yes, they are for more than
just definitions, even w3c agrees).
- Merges the various node flags (promoted, published, ...) into one
"status" dropdown. This keeps the whole selector shorter, and is better
UI-wise IMO.
- Adds drupal_gotos, they were missing.
- Updates node admin watchog messages to properly display the type. The
code used t($node->type) which is a big no-no. hook_node_name() is now
invoked instead.
- Removes some dead code.
- I rolled Ber's node mass deletion patch in as it affects the same
piece of code. Updating either patch for the other separately would be
a waste of time. I also added some more improvements to Bèr's code,
such as removing the incorrect help from the confirmation page,
cleaning up the code style a bit, not loading every node just to
display its title and displaying a single drupal_set_message() after
the deleting rather than one per node.
The old issue is here: http://drupal.org/node/7743
------------------------------------------------------------------------
January 14, 2005 - 21:32 : Steven
Attachment: http://drupal.org/files/issues/node admin.png (30.19 KB)
------------------------------------------------------------------------
January 15, 2005 - 00:55 : Bèr Kessels
Thanks for integrating the batch delete patch, Steven!
------------------------------------------------------------------------
January 15, 2005 - 04:47 : Dries
Attachment: http://drupal.org/files/issues/node-filter-wrap.png (34.55 KB)
It looks good but:
1. It makes the UI looks cluttered. I suggest visually grouping the
varios form elements so it becomes easier for they eye to skip over
them.
2. It is too wide. Try using the Chameleon theme with a sidebar on the
right at 1024x768 (eg. my laptop's resolution) and you'll find that the
form elements wrap, and wrap in an awkward order. See screenshot.
Maybe we should group the form elements using from_group() and make
"Show only items where" the form_group()'s title. It would save space.
------------------------------------------------------------------------
January 15, 2005 - 07:14 : Bèr Kessels
Steven,
Is there a reason why you do not use theme_box, but hardcode HTML in
your forms? If there is none, I will spend some time monday to fix it.
Bèr
------------------------------------------------------------------------
January 15, 2005 - 08:48 : Steven
Simple. There aren't any guidelines on theme box usage :P. Plus, theming
the admin interface is probably not a big priority.
--
View: http://drupal.org/node/10296
Edit: http://drupal.org/project/comments/add/10296
1
0