tasks:
- change hook_menu().. obviously :)
- add administer tags permission (we still need "create tags" permission for the on-the-fly creation of tags)
- Add a flag "public" to the {pm_tags}, default to 0/FALSE
- (maybe follow-up) change the page to a table with paging and sorting, so that the public flag can be displayed, with edit/delete links...
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | privatemsg_filter_tags_admin3.patch | 18.82 KB | berdir |
| #8 | privatemsg_filter_tags_admin2.patch | 12.89 KB | berdir |
| #5 | privatemsg_filter_tags_admin.patch | 9.79 KB | berdir |
Comments
Comment #1
aharown07 commentedJust to be clear, is the issue that aims (among other things) to provide for per-user tags?
Comment #2
naheemsays commentedWhile that is not the main aim of it, #442102: Replace tag checkboxes with autocomplete textfield does make tags appear as per user to the end user without mucking about with the current database schema.
If need be to go further than that, that can be made to happen in a follow up issue, however IMO that will add unnecessary restrictions to the module with no visible change to end users.
(so the answer to the asked question is "no, but it should not matter to the end user either")
On the above list of tasks, I do not think we need to do:
As we should IMO just use "administer privatemsg" permission for this. Also to expand on the role of:
The way I understand it is that in addition to the user's used tags from #442102: Replace tag checkboxes with autocomplete textfield, we may also want to expose a set of other tags to the user in the interface, probably through #444264: Add tagging actions to message listing
Comment #3
aharown07 commentedSo 442102 will result in tags that are--as far as users can tell--their own... and they will not see anyone else's?
Comment #4
naheemsays commentedA question Do we want to auto prune tags that are unused and NOT system tags?
If so, what would the valid sql be?
SELECT * FROM pm_tags WHERE tag_id NOT IN (SELECT pmt.tag_id from pm_tags pmt INNER JOIN pm_tags_index pmti on pmt.tag_id = pmti.tag_id WHERE pmti.uid = %d)^^ shows all unused tags, but replacing "SELECT *" with "DELETE" is invalid syntax according to phpmyadmin.
Comment #5
berdirAttached is a first patch, needs review.
Features
- List/Add/Edit/Delete Tags
- Adds a public flag to the pm_tags table, that allows to make tags/folders that are visible for all users, even if they don't use them.
- Lists Name, usage (how many threads have been tagged with that tag, needs better explanation) and public flag
Comment #6
naheemsays commentedLooks good - a few observations
1. privatemsg_filter_sql_taglist and privatemsg_filter_sql_used_tags and pretty similar - not identical but close, so maybe merge them into one with some way to switch for the extra arguments?
2. Do we want privatemsg_filter_sql_tags_autocomplete to be altered to show only public tags, or tags used by the user in the drop down?
3. For tags created on the view messages page, the tags will always be private - maybe have an option on the settings page to toggle this to TRUE or FALSE?
4. When adding a tag from admin/settings/messages/tags/add, the public checkbox is always checked. It would be good if 3 is handled to then also work off that same variable?
5. The pager_query has a default $limit of 10. in core, for taxonomy they had to change this to a larger value as such small pages were almost unuseable in large taxonomies - they moved to 100. Should this patch do the same?
6. in privatemsg_tags_form_submit maybe add comments along the lines of "since there is a tag id this is an existing tag, we want to update" and "no tag id implies we are creating a new tag" ?
None of these are really bugs though - just enhancements, looking for better integration etc. so leaving as cnr.
Comment #7
naheemsays commentedfrom irc, 3 and 4 from the above list are "features not bugs" and understandably so, so they are to be ignored. Number 2 can be done in a followup patch as other infrastructure parts of the filer module are also added/committed.
Comment #8
berdirUpdated...
1. Merged those and renamed used_tags to tags. It's a bit complicated now, but seems to work fine.
2. Changed
3. 4.: As discussed, this is imho a feature :)
5. Changed to 100.
6. Added some comments.
Comment #9
naheemsays commentedDo we want this to be as so?
I can see how having yes and no in there could get crowded, but yes and blank seems to be weird. It is also possible to create duplicate tags.
I still think 3 should be configurable while 4 is correct...
Other than that, it seems to be good. leaving as cnr for the above - but they are minor and this can be committed as is with them left as follow ups.
Comment #10
berdirChanges:
- Some minor string improvements ("Create tag" instead of just "Create" and so on))
- Validate function to disallow duplicate tags
- *Lots* of tests. Everything except the count row is tested, because I want to wait for the api changes in #444264: Add tagging actions to message listing
Comment #11
berdirAdded to 6.x-1.x-dev. Will port to D7 later (If anyone wants to try, go for it!)
Comment #12
berdirAdded to 7.x-1.x-dev