Closed (won't fix)
Project:
Front Page
Version:
-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
22 Mar 2005 at 23:37 UTC
Updated:
13 Apr 2005 at 10:20 UTC
I don't know if this is possible with this module, but here's what I'd like to see.
My Drupal site ( http://www.bloggator.com ) is mainly aggregator-based. I'm building multiple aggregator feeds in various categories that reflect the different interests of my users. They can pick a category - say, Macintosh blogs - and read the RSS feeds from dozens of Mac blogs.
It would make things easier for my users to have a button on the category aggregator that would say, "Make Mac Bloggator my main page" so they don't have to go through the categories to find it on their next visit.
Would this be possible with this module?
Thanks,
Jeff
Comments
Comment #1
dublin drupaller commentedHiya Jeff,
Yep.
it is possible to do with the front_page.module but it would be replicating existing module functionality...
Can I suggest the following?
(a) download and install MYPAGE.MODULE
the Mupage.module provides users with the ability to select among all your site's taxonomy terms, and then get a customized "mypage" with nodes from those selected terms only. Also allows for personalized RSS feeds.
(b) On your FRONT_PAGE.MODULE settings under ADMINISTER -->> SETTINGS -->> FRONT_PAGE. set a REDIRECT for LOGGED IN USERS to point to the mypage.module output..
the result: If the person is NOT LOGGED IN...they will get your front_page message specific to them. If they are Logged in they will be automatically redirected to their Custom "mypage".
Hope that helps...and makes sense..
Dub
Comment #2
dublin drupaller commentedlink to mypage.module
http://drupal.org/node/10083
Hope that helps
Dub
Comment #3
bloggator commentedIt definitely does help. I'll try it out tonight.
Thanks!
Jeff
Comment #4
dublin drupaller commentedComment #5
bloggator commentedHi Dub,
Thanks again for the suggestion. I tried it out and it didn't work for my needs. I don't want my users to create their own page for their front page, I just want them to choose from one of my aggregator feed categories as their front page. But your suggestion will probably be just what someone else on Drupal is looking for.
After playing with your module, I think I see a way to hack it to do as I need (although I'm a pretty new coder).
It seems to me that I could create a field called "frontpage" in the "users" table of my database.
I could then hack the module to do the following:
1. Display a link at the top of each aggregator category page that says "Click here to make this your Front Page," that - when clicked - would store the page's URL in the database.
2. Modify the last section of your module to call the URL from the database as front_page.
Think this might work?
Jeff
Comment #6
dublin drupaller commentedHiya Jeff,
I see what you mean...and to answer your question...yeah.. I think that might work...
Although you don't need to hack the front_page.module...
All you have to do is put a few PHP lines into the front_page for logged in users...and make it THEMED.
As an example...the following php snippet automatically redirects users to their own WEBLOG
All I think you would have to do is query the extra $USER field you mentioned in the users table...check to see it's not empty...if it is empty point the user to a default...and if it isn't empty bring them to the page/aggregator/category they have selected...
if you do it the way I have outlined..you only need to "hack" one module...i.e. the aggregator module..as opposed to two.
As an alternative....would it be an idea to avoid hacking all together and use the Extended PROFILEs facility in drupal?
i.e. under ADMINISTER - USERS - CONFIGURE - PROFILES
Setup a new User Profile Field to store the new "frontpage" setting field...which allows people to edit the front page in their their edit account link as well as from the aggregator page...
That approach might be simpler...i'm not sure..but at least it offers added control to the user to change/modify their front page field later, should they change their minds and want to..as well as from the link you plan to put in on the aggregator page.
The final link in the chain would be to use a conditional block, as opposed to hacking a module to insert the "make this your front page" form/link/button....
not sure if that is clear..but I hope it sparks an idea...
Dub
Comment #7
bloggator commentedHi Dub,
It does spark many ideas. I'm going to give it a try now. Haven't really done anything in the user profiles before or with conditional blocks.
Time to learn!
Thanks,
Jeff
Comment #8
dublin drupaller commenteddon't get me wrong Jeff....I'm not trying to avoid your original question..I just found from experience that the more modules you install...the more likely there are going to be problems...and the more little hacks to modules that are done..the more difficult it is to update or upgrade a site or even apply a patch.
There is a fantastic handbook page about conditional blocks which is here:
http://drupal.org/node/17170
Armed with that it should also be fairly simple to make a conditional PHP block to display your "make this your home page" buttons..that only appears when you want it to appear.
Hope that helps. It's tempting to tweak a module here and there just to do something..but I have just found that it can cause headaches later on.
Please post back up here if you make any headway...as I think other users (myself included) will be interested to know the best way to do what you're doing.
if you run into hassles..will try and help in any way I can
Dub
Comment #9
bloggator commentedHi Dub,
Okay, I must be a complete moron. I've worked on this all night and I still can't get it to work.
I added the"frontpage" field to the "users" table on my database. That's about the only part of this that I've done right. (At least I *think* I did. At this point, who knows?)
First I tried to use the "profiles" idea. I agreed with what you mentioned in your last post, that this might be a better solution since I'm afraid of too much hacking of the modules, as well. And upgrading Drupal later could create quite a problem if a lot of my site's functionality comes from hacked modules.
But I quickly realized that I can't seem to figure out how this integrates into the plan. I see where I can create text fields and drop-down menus, but I don't understand where this information would be called from or how having the user choosing a bit of text could tell the front_page.module what to do. I read the documentation and still didn't get it.
So I decided to try it the other way. At least if I could get it functioning, it might spark my understanding of how to do it better. My plan was to add the link to the aggregator.module and get the "add the current URL to the database field"-part working. Then I would get the "front_page.module retrieving the database field information"-part working.
So I started to work with the aggregator.module to add my link that says "Make this page your Front Page." I added every variation of PHP code I could figure out into dozens of places in the module and all I ever did was create errors when trying to load the page. At 5:30AM, I gave up and went to watch some TV.
I came back at 6:15, full of ideas on how to solve this...none of which worked.
So I went back to the "profiles" idea, but to no avail. Maybe I'm just too tired to think right now.
Sorry for the rant, I know we've all had nights like this.
Jeff (off to bed) Smith
Comment #10
dublin drupaller commentedhave created a QUICKLINKS.MODULE (based on bookmarks.module) that allows users to set their own front page to a site.
I'm not going to make it for general release as it repeats the functionality of the bookmarks.module too much. Email me if anyone wants it.
Dub