Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2014-03-14 10:16:25

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 234
Website

Re: smd_lately: recently viewed site articles

A nice extra with this addition: by using exclude="method:GET" I get a nice list of spam victim articles, off course mixed with normal articles high in comments.

Last edited by kees-b (2014-03-14 11:20:44)

Offline

#92 2015-04-18 18:09:24

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 288
Website

Re: smd_lately: recently viewed site articles

I’ve got smd_lately installed and working perfectly… it’s a site with a plurality of mobile users. Their IPs change frequently, so the visitor logs become a less than ideal way of keeping track of a users visited pages.

Cookies seem the likely way to keep track of mobile users. Could smd_lately be done using cookies instead of IP addresses?

Offline

#93 2015-04-19 08:02:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,469
Website

Re: smd_lately: recently viewed site articles

towndock wrote #290122:

Could smd_lately be done using cookies instead of IP addresses?

Hmmm, that’s a good point about IPs. In the era of Tor and the like, it’s not ideal. Sadly, smd_lately only reads what’s in the visitor logs table and crunches that. It doesn’t do any tracking of its own. That’s not to say it couldn’t, but it would need one or two prefs adding and the associated admin UI, then some cookie code to replicate the sort of thing found in the visitor logs.

The plugin might be able to be retrofitted to allow the by attribute to read the cookie info, but the trouble is, to track historical information means the cookie data would grow and grow every visit. That’s probably untenable long term, I’m not sure what the size limits are and what, if anything, the performance would be like. Maybe a setting to limit the validity window (number of days, number of hits, etc) would work so it didn’t get too big.

Or some combination of using a cookie and a custom tracking table similar to the way analytics work.

tl;dr, I’m unsure if it’s doable in its current guise. Most options seem to indicate pretty much a new plugin needs to be written!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#94 2015-04-19 15:32:56

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 288
Website

Re: smd_lately: recently viewed site articles

Bloke wrote #290124:

then some cookie code to replicate the sort of thing found in the visitor logs.

Found some code called Recently visited Page Links with jQuery and Cookies that could be a good basis.

While I could just use that, it needs some TXP plugin magic so one can display by section, etc.

Bloke, I’m open to shamelessly bribing you for the sake of God, country and the TXP world. How many beers do I need to email?

Offline

#95 2015-06-23 11:03:43

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: smd_lately: recently viewed site articles

Hi,
I’m having the same problem as brunodario concerning the limit and section attributes. Tested on Mamp and online, the limit attribute doesn’t work correctly (limit="3" display only 2 articles and limit:="10" display 6 articles). And If I use the section attribute, nothing is displayed at all (of course there are some articles in the section).
I don’t understand what could be wong. I used the plugin with success for a previous project (with these attributes) but for now I can’t make it work. I’ve disable any other plugin but nothing better…
Maybe someone found how to solve this…?

My code (but the problem is elswhere I think):

<txp:smd_lately section='<txp:section />' show_current="0" limit="3" form="article_preview" sort="popularity" wraptag="ul" class="article-list" break="" by="" within="1 month" />

Last edited by NicolasGraph (2015-06-23 11:07:56)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#96 2015-06-23 11:34:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,469
Website

Re: smd_lately: recently viewed site articles

NicolasGraph wrote #291862:

limit="3" display only 2 articles and limit:="10" display 6 articles

Hmmm. Presumably you have more than limit articles that match your criteria in the visitor logs?

The section attribute will only work if your permlink structure has /section in it somewhere, but you’ve probably got that set. Without having access to the site it’s going to be difficult to diagnose. I kind of forgot to get to the bottom of brunodario’s issue, oops.

If you can’t figure it out, any chance I could have a login to your site please so I can poke around?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#97 2015-06-23 11:44:13

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: smd_lately: recently viewed site articles

Bloke wrote #291864:

If you can’t figure it out, any chance I could have a login to your site please so I can poke around?

No problem, I clean everything and give you an access if I don’t find what is wrong soon. Thanks.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#98 2015-06-23 14:03:05

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: smd_lately: recently viewed site articles

Ok, I can make the section attribute work online; don’t ask me how, it just happened…
…But, the problem is that the limit attribute doesn’t work correctly if the section attribute is not set. I tried on the previous project which is live and it is the same. I get one less article than the limit value if there is no section set.

Last edited by NicolasGraph (2015-06-23 14:04:32)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#99 2015-06-23 14:12:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,469
Website

Re: smd_lately: recently viewed site articles

NicolasGraph wrote #291878:

Ok, I can make the section attribute work online; don’t ask me how, it just happened…

Probably because your visitor logs filled up as you were using the site. The plugin only works off your visitor logs so if they’re relatively empty, you’ll get relatively few results, depending on your attribute settings.

I get one less article than the limit value if there is no section set.

limit="11"? :-D


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#100 2015-06-23 14:31:49

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: smd_lately: recently viewed site articles

Bloke wrote #291880:

Probably because your visitor logs filled up as you were using the site. The plugin only works off your visitor logs so if they’re relatively empty, you’ll get relatively few results, depending on your attribute settings.

Yes, I don’t know why it doesn’t work with Mamp but you are probably right about the online site; I didn’t visit it last weeks and I have within="1 month" set…


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

Board footer

Powered by FluxBB