How do I let new users to automatically subscribe to the fee

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: How do I let new users to automatically subscribe to the

Postby fox » 04 Jul 2013, 16:44

>Thanks for replying sleeper. Can you please be energetic? I really need this done :D

Yeah, hop on it.

AngryChris
Bear Rating Master
Bear Rating Master
Posts: 135
Joined: 08 Apr 2013, 02:42

Re: How do I let new users to automatically subscribe to the

Postby AngryChris » 04 Jul 2013, 22:54

msilvya wrote:Thanks for replying Chris.

Does this mean that I add the following to function initialize_user($uid) {

Code: Select all

db_query("INSERT INTO ttrss_feed_categories (owner_uid,title,parent_cat)
VALUES ('$uid', 'some category', '1');");


Sorry, I'm no programmer but trying my best to get this to work. :oops:

Actually, I believe you'll want something more like this:

Code: Select all

db_query("INSERT INTO ttrss_feed_categories (owner_uid, title) VALUES ('$uid', 'some category');");

If someone else can correct me, I'm open to it. But remember, the parent_cat value (parent category) is normally null. This means there is no parent and the category should appear at the top level of the left-hand category view (i.e.; not nested under another category).

Code: Select all

ttrssdb=> select count(id) from ttrss_feed_categories where parent_cat is not null;
 count
-------
     0
(1 row)

ttrssdb=> select count(id) from ttrss_feed_categories where parent_cat is null;
 count
-------
    22
(1 row)

ttrssdb=>

You would want to execute these queries before any query that inserts a feed under that category. So, your steps are basically as follows:

  • Create new user
  • Create categories you want to use
  • Create feeds for new user
  • Assign the newly created feeds to the categories you've created
So far you've been able to create some custom feeds and some categories. You're going to need to then assign your newly created custom feeds to the categories you've just created.

Honestly all of this sounds like a a job for plugin. Something that has the equivalent functionality of /etc/skel under Unix that's called when a new user is created. This plugin (which I can't write) would provide an interface to the administrator in the same way the af_feedmod plugin does and would allow the administrator to setup a set of default feeds that are added to each new user at the time of creation.

If anyone else has this itch to scratch and feels up to coding it, what do you think?

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: How do I let new users to automatically subscribe to the

Postby sleeper_service » 05 Jul 2013, 02:15

fox wrote:>Thanks for replying sleeper. Can you please be energetic? I really need this done :D

Yeah, hop on it.
what do I look like to you, the easter bunny?

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: How do I let new users to automatically subscribe to the

Postby sleeper_service » 05 Jul 2013, 02:35

msilvya wrote:
sleeper_service wrote:check the table layout, there's a column for what category the feed's in. assign as needed. (I could go into more detail, but then I'd have to look up table and column names, and I'm not feeling that energetic at the moment, so I figure you can do it *grin*)


Thanks for replying sleeper. Can you please be energetic? I really need this done :D

your levels of urgency on your project isn't sufficiently enhancing my motivation levels, I'm generally happy to provide pointers so people can have a better idea where to look to figure things out for themselves.

key point there being "figure things out", not "have me do it for them".

if'n you wants me to do your thinkin for you, that's gonna need more motivatin factors.

7duck
Bear Rating Trainee
Bear Rating Trainee
Posts: 47
Joined: 08 Jun 2013, 08:11

Re: How do I let new users to automatically subscribe to the

Postby 7duck » 05 Jul 2013, 04:07

sleeper_service wrote:if'n you wants me to do your thinkin for you, that's gonna need more motivatin factors.


I say you offer him a carrot.

Or maybe a chocolate egg?

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: How do I let new users to automatically subscribe to the

Postby sleeper_service » 05 Jul 2013, 09:45

7duck wrote:
sleeper_service wrote:if'n you wants me to do your thinkin for you, that's gonna need more motivatin factors.


I say you offer him a carrot.

Or maybe a chocolate egg?

just paypal me enough money, I'll buy me own eggs ;)

msilvya
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 25 Jun 2013, 21:06

Re: How do I let new users to automatically subscribe to the

Postby msilvya » 05 Jul 2013, 10:57

sleeper_service wrote:just paypal me enough money, I'll buy me own eggs ;)

Sleeper, I sent you a PM.

msilvya
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 25 Jun 2013, 21:06

Re: How do I let new users to automatically subscribe to the

Postby msilvya » 05 Jul 2013, 14:01

AngryChris wrote:[*]Create new user
[*]Create categories you want to use
[*]Create feeds for new user
[*]Assign the newly created feeds to the categories you've created[/list]
So far you've been able to create some custom feeds and some categories. You're going to need to then assign your newly created custom feeds to the categories you've just created.

Honestly all of this sounds like a a job for plugin. Something that has the equivalent functionality of /etc/skel under Unix that's called when a new user is created. This plugin (which I can't write) would provide an interface to the administrator in the same way the af_feedmod plugin does and would allow the administrator to setup a set of default feeds that are added to each new user at the time of creation.

If anyone else has this itch to scratch and feels up to coding it, what do you think?

Man, that's complicated than what I had initially thought :lol:


Return to “Support”

Who is online

Users browsing this forum: No registered users and 8 guests