Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-05 07:05:59

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

[request] Email Like Experience

My users in their ign_users table would love it if they could:

  • See new articles since their last visit.
  • Mark seen articles as not seen (in case they want to come back to it.)
  • Tag articles with ‘tags’
  • Flag articles as important

This would all essentially provide an email like experience.

I’ve considered making a new table to provide the status of each article on a per user basis.

ArticleID AuthorID Read Flagged Tags
Some Number Some Number 0 1 red, blue, green, etc

And then my small brain explodes.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#2 2009-08-05 08:00:02

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: [request] Email Like Experience

Why not introduce them to the concept of feed readers?

Offline

#3 2009-08-05 08:14:17

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [request] Email Like Experience

wet wrote:

Why not introduce them to the concept of feed readers?

This won’t work for my users. It’s additionally available to them of course but I am essentially needing to provide a feed-reader experience.

Does it seem too complex for a simple plugin?

Is a new table feasible given that per every user and every article there is a new row?

Number of Users X Articles = Number of Rows

I’ve thought that these rows would be created simultaneous to when the textpattern table is updated. The flagged and read states would obviously be both set to zero.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#4 2009-08-05 21:57:14

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [request] Email Like Experience

I’m taking a crash course in PHP at the moment in order to hopefully produce a plugin that will get me what I’m after.

I could really use some feedback on this “Email Like Experience” as it relates to the TXP way of things.

I had a thought of using javascript to update the various states of an article but I would still need a table of some kind to store each user’s data. I read about someone using a .txt file containing an html table that the javascript could update. The question of where to put user folders holding those files is the question then. I’m leaning toward a MySql table for all users with each row being any one users data on the article they’ve touched.

If doing the latter:

  1. I must learn how to send the article ID, logged-in user, read state, flagged state, tags, etc… to my new table.
  2. I must then develop some tags for my article forms that will not only provide the article states I desire, but also provide them on a logged-in user bases. I’ll hook into ign_password_protect or rvm_priv for keeping it user speceific.

Hope you don’t mind me going on about this. I’ll post here again if I make any progress or discoveries and I’d appreciate any ideas or clues. I think my biggest hurdle at the moment is in using PHP. If I can figure out how to update my table using PHP then I believe I’d be well on my way to producing a plugin within the next 50 years. It’s been 5 I’ve used TXP and have shied away from PHP… I’m not scared anymore.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#5 2009-08-06 01:06:25

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [request] Email Like Experience

whaleen wrote:

If I can figure out how to update my table using PHP then I believe I’d be well on my way to producing a plugin within the next 50 years. It’s been 5 I’ve used TXP and have shied away from PHP… I’m not scared anymore.

It takes around couple days (~100 hours) to learn all about basic PHP. It’s low-level language, so the learning curve is really low. It’s no hard task :)

Remember that if I can do it, you can do it too. I’m closer to ape than human, and I still use rocks to open bananas.

Offline

#6 2009-08-06 07:21:39

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: [request] Email Like Experience

Remember that txp has a whole series of built-in functions (not txp-tags) for interacting with the database, scrubbing data and presenting tables so here you won’t need to reinvent the wheel. You might want to look at this to find your away around the functions (note that it’s tied to the most recent svn-version so it’s sometimes a step ahead of the current official version). It may be helpful to look at existing functions in txp or in plugins that list users and do multi-selects and then to replicate/adapt these.

FWIW: you can do some of what you suggest – e.g. listing of new articles since login – with one of the dashboard plugins out there that allow you to define your own dashboard form using txp tags. Maybe one of the rating plugins out there (which essentially add a count to articles) can be repurposed for doing the read/unread or flags, though you will probably need to add user attribution to that. There are tag plugins too like tru_tags or smd_tags, so here too you may not need to reinvent the wheel.


TXP Builders – finely-crafted code, design and txp

Offline

#7 2009-08-15 23:50:01

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [request] Email Like Experience

Gocom wrote:

It takes around couple days (~100 hours) to learn all about basic PHP. It’s low-level language, so the learning curve is really low. It’s no hard task :)

Well I think I learnt it. Now to learn about what TXP does with it and what MySql thinks about it. Thanks for the encouragement!

jakob wrote:

Remember that txp has a whole series of built-in functions (not txp-tags) for interacting with the database, scrubbing data and presenting tables so here you won’t need to reinvent the wheel. You might want to look at this to find your away around the functions (note that it’s tied to the most recent svn-version so it’s sometimes a step ahead of the current official version). It may be helpful to look at existing functions in txp or in plugins that list users and do multi-selects and then to replicate/adapt these.

FWIW: you can do some of what you suggest – e.g. listing of new articles since login – with one of the dashboard plugins out there that allow you to define your own dashboard form using txp tags. Maybe one of the rating plugins out there (which essentially add a count to articles) can be repurposed for doing the read/unread or flags, though you will probably need to add user attribution to that. There are tag plugins too like tru_tags or smd_tags, so here too you may not need to reinvent the wheel.

You have put me on a good path. I’m discovering a lot of possibilities when looking at these and other existing plugins, especially those that create additional tables.

The user attribution aspect is something I am trying locate a good example of in TXP.

Does someone know of a plugin that assigns author/user ownership to something that by default is not owned?


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

Board footer

Powered by FluxBB