Download & Extend

User configurable category filter for Drigg

Project:Drigg
Version:5.x-1.36
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

We all love the way that www.Digg.com and www.Reddit.com allow you to customize the selection of sections that you see. So if you're not interested in scoops about Paris Hilton, Microsoft or Baseball, you can uncheck them in your profile settings through Digg's "Customize" feature. What's cool about this, is if it is implemented, it will allow Drigg users to add more sections and sub-sections, and attract membership from people with more varried interests.

I would love to get something like this going for my Drigg site too. So, the closest modules that I found that do this are Taxonomy Browser and Taxonomy Sifter. (If anyone can suggest a better module, _please_ write in comments). I have started a feature request in Taxonomy Browser http://drupal.org/node/333514 asking if the selection can be saved to user's Account Settings, like in Digg (and also one for Taxonomy Sifter (for anonymous users) http://drupal.org/node/334920 ).

But then, on second thought, I thought: Because of the way that Drigg is structured (Upcoming, Popular, top24, top7days etc etc) and the way that it remembers the combination of SectionName-Upcoming-Leastpopular, would a Drigg site function smoothly with the new Taxonomy Browser module and user's customized sections seection? Or does something extra need to be done on Drigg's part to make it work?

For instance, one of my concerns is that Popular, Upcoming, top24, top7d, top30d filters at the top are not being displayed at all times, which hinders the navigation.
Please have a look at the Taxonomy Browser module and the feature request that I've posted and see if Drigg could be integrated with it, or if there are better modules to achieve this "Customize" feature.

Thanks

Comments

#1

Hi,

I *can*. But... I have to be honest, I don't think there is a very sane way to do this.
I mean, it's a "fair" request. However, it would mess up the code _so_ much, that it might not be worth it.

The big changes would be in drigg_ui, which have the lists. But, the code for those lists is already quite complicated (especially since the latest patch that allow subcategories).

So, I am resistant.

Merc.

#2

Hi,

Of course, I understand your resistant attitude at this stage, and frankly, I'm approaching this with caution too...

One of the reasons I brought this up was to make the Drigg community aware that I've got a conversation going with the maintainer of Taxonomy_Browser module. Also to see if other drigg users are looking for a smilar Digg-style "Customize" feature, and to see which other taxonomy solutions (and modules) they would suggest.

As of yet, Taxonomy Browser just sifts through the content depending on the selection (and it works OK on my Drigg test site), but my feature request to them was to also save the selection to user's account settings, effectively making it identical to Digg's "Cusomize" feature. As of yet, it is just an idea. And when the first .dev version rolls out I'll be the first one to test it. Theoretically, it should work like the "Content Blocker" or "Ignore User" modules work, and therefore should not have an impact on Drigg as such - but we''ll see...

So, I'd say, don't close this issue yet. Let's see what comes out of it all.

As for the "sanity" of having such "Customize" feature, right now I look through a variety of Drigg sites, they all have relatively low promotion threasholds and relatively small numbers of _active_ community members. 5, 10 or 15 or 20 new scoops per day is manageable (especially with autovoting ;D ). But imagine if you ask your community to look through tens and hundred(s) of new scoops, while most of them are not all that interesting to them. One way of dealing with this is making OG work smoother with Drigg; another is to allow users to easily track what their friends are recommending (voting Up); and yet another allowing people to customize the content of their own front page. From what I read about history of Digg is that the "Customize" feature (and the recent Recomendation-Engine) came as a way to deal with this sort of issue, but it was too little too late! Digg became a site with 20,000,000+ registered users, whereby only a tiny fraction of users would log in at least once a month. And I can already sense the same happening on my drigg site, and when I ask people why they don't use the site more often, one of the reasons is that they simply don't actually have a coherent mechanism of automatically seeing the content that they are more interested in, and that immediately matters to them. This is exactly the same reason why more people use StumbleUpon, than Digg, inspite of the fact that the latter has a LOT less registered accounts. Sections and Tagadelic can take us only upto a certain point. So the answer would be to introduce a more generic range of Sections with more _focused_ sub-sections, and importantly a way to allow the users to Customize what they want to see.

Let's just wait and see what comes out of this Taxonomy Browser module and my feature request with them. If you are a Drigg user and like my idea, please support me there. If there are Drupal coders who would like to see this sort of feature to materialise, please make yourselves known ;)

BTW, Merc, what did you mean by "I *can*"? You can what?

#3

We have this working on Meccho using the TAC_lite module

#4

Hi,

Licas2000: can you please elaborate on this one?
Do you think we should close this issue? And, can you give us more information about your solution?

Bye!

Merc.

#5

Hi Lukas2000 and Merc,

TAC_lite is a very interesting solution and potentially a basis for what I have in mind. Merc, please don't close this yet. Lucas2000, please elaborate on how you set this up?? if you have a hacked version of this module, please attach it.

I've tested the TAC_lite module. It seems to be a relatively close module to how Digg and Reddit are doing it, BUT it is a module that has a _completely_ different functionality in mind.

1) TAC_lite module is designed to be a RESTRICTIVE module, so that the Admins decide which sections are _forbidden_ (rather than filtered out by default) for various roles and users. In other words, it is designed to _forbid_ various users and roles from accessing various sections. Essentially, it's a Privacy module, rather than a customization module. So it doesn't follow the logic of the Content Blocker for instance. If you un-select section "Science" then you will _NEVER_ see any nodes in that section, or comments made on nodes in that section etc, or even titles of those nodes in ANY listings at all. While in Digg or Reddit, customize is a way of determining the default selection, while a Digger or a Redditer can still view sections that he disselected (should he want to).

2) TAC_lite is not very end-user friendly in terms of interface, because it is designed for Admins to restrict content. Asking end-users to press Ctrl and click multiple categories, is like rocket-science for end-users. It would be MUCH-MUCH easier if these were checkboxes.

3) TAC_lite has only one Access control permission, which is "administer_tac_lite" (There is no "administer own tac_lite") , and the only way that you can get authenticated end-users to customize their own selection is by granting them that permission. But that would also grant them permission to access /admin/user/tac_lite/scheme/1 and /admin/user/tac_lite , which means that anyone who figures out that the site is based on Drupal, can easily hack it and make it so that ALL content becomes invisible to ALL users.

4) It does not exclude the dummy category "-- Choose Section --", which we create as part of Drigg's installation settings.

5) If you have 10 sections on your site and if a user selects only 1 section, he still sees the other 9 sections as options. And when he click's those other sections, it tells him "No scoops available". This is a minor issue, but it's confusing to the end-user.

Having said these Cons, here are the Pros:
1) The TAC_lite module does not seem to affect the back-end speed of the site.
2) The Drigg navigation (Popular, Upcoming, top24, top7d etc) stays intact and remains operational, which is the ultra-good news!!! and which is why it would suit Drigg very well.
3) It's the closest module that someone mentioned so far that is closest to this Digg's/Reddit's *Customize* functionality.

My suggestion is that the Drigg maintainers create a fork for this module, address the above 3 issues (especially the first one) and adopt that new fork (under new name) as a module that works for Drigg sites.

Another module to potentially look at is the Content Blocker. It gives end users the option to block content from particular users, but the same logic could be applied to Taxonomies.

-------
@ Lukas2000 , please provide us with information on how you set this up and if you are working on your own fork version of that module.
I'm also very interested to see how to managed to address the issue (5) above.

#6

Hi drupalina,

I've implemented tac_lite as you've mentioned, and (1) you're exactly right--it's restrictive in a way reddit isn't, and if a user chooses his categories, he can't look at all the other good stuff.

(2) I eventually plan to change the multiselect to a checkbox...not sure but taxonomy_super_select might give us some hints how to do that best.

(3) you can change this by changing two lines of code, and then changing your tac_lite access control settings. The two lines are
a) the tac_lite_perm return array--> include another guy in the array, like "change categories"
b) in the function tac_lite_user, there's initially a check to make sure you have the permission to change your customization. It looks like if (!user_access('administer_tac_lite')) ... and you should change to if (!user_access('change_categories')) ... .

Then change your access control settings.

(4) I don't know about that.
(5) Not sure what you mean exactly there.

#7

I had also posted a feature request for TAC_lite module to be more in accordance with what a usual Drigg site would require, here http://drupal.org/node/348028. This is the reply that I got from the maintainer of TAC_lite module:

You said it yourself,
TAC_lite is a Privacy module, rather than end-user's customization module.
That's all it's designed to be, and it's designed to be "lite". Your talking about something very different, which should be its own module. -- Won't fix.

So we can't rely on TAC_lite module maintainers for these customizations. We have to figure this out ourselves.

@ aerodog -- thanks for all this useful suggestions. I've implemented the lines that you mentioned in part (3). It works well.

(4) should be a category that should NOT appear in the list of individual selections.
(5) is a minor issue. Not important for now.

Since TAC_lite module maintainers are not going to help us, I suggest creating our own fork for Drigg websites and deal with each of the issues one by one.

I'm attaching my own hacked version of the TAC_lite module. This version is just an implementation of the lines that you mentioned in point (3). If your version of Tac_lite is better, please attach it. Let's work through each of these issues here one step at a time. (Maybe we can also rename the module to "Drigg_Section_Customize".)

What we need now is the point (2) to make those sections selection to be Checkboxes, rather than a list that end-users can Ctrl+click, which is very confusing for the end users. Can anyone help????

AttachmentSize
tac_lite.zip 14.02 KB

#8

@ Lucas2000 --- I can see that you have this problem with the checkboxes pretty much sorted out on Meccho. And your hacked version of TAC_lite is very user friendly! Would you be kind enough to attach your version of TAC_lite module in this forum?

Thanks a bunch!!!

#9

Here you go Drupalina. I hope this is helpful, but it doesn't include much beyond what we already mentioned methinks.

AttachmentSize
tac_lite.txt 18.47 KB

#10

@ aerodog - Thanks for your version of the module. I can see that the checkboxes are done, but I couldn't get your version of this module to work at all.
I mean what I'm after is a seeting so that for everyone by default all checkboxes are ticked, and all sections are accessible by default. And when a person un-checks a box, that's when that section should disappear for him. -- Whichever way I turned the settings and schemes inside this modules I could not get it to work. It's either that the users see all content, or none at all.

I was interested to see if Lucas2000 could post his version of TAC_lite module in this thread because on Meccho site it works perfectly.

#11

Hi Drupalina,

Aerodog and I are both working on Meccho and what he posted is the module that we're using. Our module is for Drupal 5. I'm not sure which version of Drupal you're using. I'll take a look later tonight and see if we changed any other module.

#12

@ Lucas2000 -- thanks a lot for the response. I kinda suspected that it's from Meccho cause the wording in the instructions looked the same.
But I still can't get it to work. Whether the authenticated user ticks the boxes or not, it makes no difference - he still sees all the same content from all the sections. And the names of the sections are still being displayed in the sections-menu.

If you want I could create a temporary Administrative account for you to have a look at the settings on my live site.

Much appreciate your help. Thanks.

#13

@LuKas2000 and Aerodog, could you please attach the screenshots of your TAC_lite settings? Scheme 1, Scheme 2, etc... I'm getting the suspicion that I'm doing something wrong with setup of the tac_lite. Thanks.

#14

I'm attaching the screenshots and taxonomy.module. I'm not sure if we changed it but you can try this file to see if it makes a difference.

AttachmentSize
tac_lite_1.JPG 42.47 KB
tac_lite_2.JPG 35.55 KB
taxonomy.txt 56.02 KB

#15

@Lukas2000 Thanks for the screenshots. Much appreciated!
I got it to work... sort-of... even though my Scheme 1 settings were slightly different: I only selected "view" (without "unpdate" or "delete"). And the authenticated users didn't have any selections, not even < none >.

But what really made this module to work was that after meticiously comparing the two versions of the TAC_lite modules, the final paragraph in your version of the module has a bit where you defined and hard-coded the numbers of the default categories, so that the new users would have them checked by default. This was the most crucial aspect.

I will also check your attached taxonomy.module in a similar meticious manner and will get back to you.

The 2 issues that puzzle me now are:

1) How do you get the top categories to disappear once they have been unchecked??? I suspect that you put a bit of extra code in your tpl.php . Could you copy/paste it here please? Thanks.

2) The default Category in drigg, as we know it, is a dummy category, usually named " --Please Choose--", or something like that. How do you exclude that category from being displayed as a choice in /user/#/edit/categories ???

Thanks a lot for your help!

#16

@Lukas2000 (and other good people) - an Update:

I've checked the taxonomy.module that you attached. I'm assuming you are on Drupal version that is not 5.12. There were 2 very minute differences, between our taxonomy modules, but nothing that would seem to be relavant to this functionality.

Could it be possible that you altered something in your theme page.tlp.php ? I mean right now the default drigg_theme page.tpl.php reads something like this:

<?php if (module_exists('drigg')) { ?>
        <div id="header_categories">
          <?php print drigg_ui_sections() ?>
        </div>
      <?php } ?>

But I'm guessing you have some sort of an argument around that, which pulls some function from the Tac_lite module. Something like IF Tac_lite module exists, get the selection of that particular user and show only that selection.

I would appreciate if you could paste your code here.

Many thanks in advance.

#17

I think without resolving the display of customised drigg_ui_sections() this issue cannot be closed. See #16 above. The sections are still displaying. Please help!!!

And the other remaining problem that I have is that the Vocabulary name (ie "Section") and Term names (i.e. Politics, Technology, etc) are returned in English regardless of language. They should be inside t() so that hack of Tac_lite module complies with multilingual sites.

#18

@Lukas200 and @Aerodog -- you're my only hope to get this TAC_lite to work with Drigg, so please reply!

PROBLEM: the list of ALL categories is currently being displayed in the sections menu, even those that were unsellected.

After trying various things, it seems to me that you either have a special argument in your page.tpl.php or in your drigg_ui.module

If you attach them, I can have a look and hopefully figure out what new code you inserted so as not to display unselected Categories in the menu list.

Thanks a LOT in advance!!!

#19

Hi,

I am reading through this issue, and...
I don't know. Maintaining a _whole_ fork of a different module, _plus_ hacking Drigg so that it doesn't show some categories, doesn't seem like a very sane way to go about this.

Categories -- and its menus -- are managed by Drigg. What's displayed is decided by drigg_ui which is quite complex.

I think the only sane approach is to change drigg_ui so that it allows users to select/deselect specific categories. And if they deselect them, then don't see them in the menu.

It's a lot of hours, and a lot of testing, on drigg_ui which shouldn't really be touched too much.

This will need to be patch-based, on drigg_ui I think.

Merc.

#20

Title:Customize feature like on Digg or Reddit» User configurable category filter

#21

@mercmobily -- Hi, good to see you back, Merc!!!!!!!! (After you quit, my Drigg site slowly came to a halt, but now I'm thinking about giving it another go)

I saw that Lukas2000 and Aerodog managed to get a pretty solid solution for this on their site (which is one of the most popular Drigg sites), and they have been using the TAC_lite fork. I have implemented that fork on my site and I have it running too! BUT, there are just 2 very small tiny issues, which I mention in #15 (which is why I have not yet made this feature available to my users). And since I know very little PHP, I was hoping that some friendly soul would help me out and make this feature also available to others too. Other than these minor issues it works perfectly fine - AND it doesn't seem to slow down the speed of the site, like the other solutions that I tried.

In short, of course, I recognise that forking TAC_lite is not the neatest solution, but it works. If there are people who would be committed to provide a more consistent patch to drigg_ui , that would be even better. Either way, if end-users could customize the selection of categories that they are interested in, that would really be one of those *kick-ass* features to have!

#22

Hi,

Sorry Drupalina, I can't possibly support a solution based on a fork of Drupal core (taxonomy), a fork from a different module, and some problem (the "small ones" you talked about) which would have to be fixed with creating a fork of Drigg_ui itself...

The solution is in extending Drigg_ui. That's the only way I can support... This is probably not what you want to hear, but t's the only possible way for me...

Merc.

#23

Re: #22 -- Well, you are obviously the expert on the actual architecture of Drigg, so you know better what's the best way forward. So if you come up with ANY sort of sustainable solution that would help people to select Sections (taxonomies) that they are interested in, like we see in Digg, that would be absolutely awesome!

But I still get the feeling that what you're saying and what I'm proposing are actually not too far appart. The reason why I kept nagging about the other solution involving a fork of the TAC_lite module, is beacause I can see it work _perfectly_ and _flawlessly_ on www.meccho.com (which is one of the most successful and vibrant Drigg community sites), and also because I myself managed to get very-very close to getting it to work on my Drigg site. BZW, I don't think there is any forking of the core taxonomy module involved here, but only a fork of the TAC_lite module (which I'm attaching - you just need to change the taxonomy ID numbers at the end of tac_lite.module file for it to work on your drigg installation) and probably the necessary "if" arguments in the drigg_ui so that the de-selected section names are not visible to the users in the top Sections row.

Either way, I believe that the "Customize" feature is an essential one to have for any Drigg site.

AttachmentSize
tac_lite.zip 19.65 KB

#24

...basically, I would imagine inserting a simple argument in drigg_ui would do the trick. The argument would be IF Tac_lite module exists, THAN fetch this user's selected categories AND print those drigg_ui_sections() which were selected by this user; and if TAC_lite is not enabled, then work as usual.
Is that what you meant Merc?

#25

Title:User configurable category filter» User configurable category filter for Drigg

I've got the forked TAC_lite module (attached above) working for this functionality on a Drigg website!!! HOORAY!!!
Users can choose which Sections they are interested in and then when they go to "All News" they see just the scoops from their chosen sections!

But the problem is that they also see ALL Section names (even the un-selected ones) that appear in the top row. When they click on those it just shows the standard "No scoops available" available, and it creates a confusion for the users. So I need to remove those un-selected section names in accordance with the end-user's choice.

Those section names, it seems, are printed by the drigg_ui.module by the function that says
function drigg_ui_sections

and the bit in page.tpl.php that says

<?php if (module_exists('drigg')) { ?>
        <div id="header_categories">
          <?php print drigg_ui_sections() ?>
        </div>
      <?php } ?>

Now all that is left for this feature to be complete is to say "Print only those section names, which were selected by the user in the TAC_lite module". So some sort of command needs to be brought into drigg_ui.module or page.tpl from function _tac_lite_get_terms or function _tac_lite_user_tids or function tac_lite_node_grants

Can anyone help??? Please!!! This would be great addition to Drigg websites for everyone to benefit!

nobody click here