Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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: 10,521
Website GitHub

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

#101 2017-04-20 21:55:14

singaz
Member
Registered: 2017-03-12
Posts: 150

Re: smd_lately: recently viewed site articles

Updated txp 4.5.7 to txp 4.6.2 and
… <txp:smd_lately by=”“ limit=“4” section=“cars” > -> Textpattern Notice: unregistered_tag …

p.s.
when
Admin > Site > Production status > Debugging


Sorry my horror English. I’m learning textpattern, I’m learning English

Offline

#102 2017-04-20 22:21:18

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,256

Re: smd_lately: recently viewed site articles

If you’re in a bold mood you can try to fix it by yourself (see the two links with “tag registering”. Not too complicated.) Or set your prefs to “Live”. Nothing bad will happen, except you can’t see other errors.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#103 2017-04-20 23:52:47

singaz
Member
Registered: 2017-03-12
Posts: 150

Re: smd_lately: recently viewed site articles

Need to add

 if (class_exists('\Textpattern\Tag\Registry')) {
	Txp::get('\Textpattern\Tag\Registry')
		->register('smd_lately')
	;
}

uli, thanks!


Sorry my horror English. I’m learning textpattern, I’m learning English

Offline

#104 2018-09-03 10:15:43

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

Re: smd_lately: recently viewed site articles

smd_lately stopped working after an upgrade to TXP 4.7.1 because IP logging was dropped to make the logs GDPR compliant, which is good. I tried to use include=“page” in stead of the default “IP” but that doesn’t seem to work. Is there a way make it work again or another way to generate a ‘most read’ list as smd_lately did?

Kees

Offline

#105 2018-09-03 10:32:31

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

Re: smd_lately: recently viewed site articles

It’s not quite the same in that it doesn’t count unique visitors, but maybe this hint by NicolasGraph based on a prior tip by etc. helps. Basically it updates a timestamp in a custom field when an article is read and you can output your most recently read article using article_custom sorted by the custom_field with the timestamp.


TXP Builders – finely-crafted code, design and txp

Offline

#106 2018-09-03 11:12:05

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

Re: smd_lately: recently viewed site articles

jakob wrote #313783:

It’s not quite the same in that it doesn’t count unique visitors, but maybe this hint by NicolasGraph based on a prior tip by etc. helps. Basically it updates a timestamp in a custom field when an article is read and you can output your most recently read article using article_custom sorted by the custom_field with the timestamp.

Thanks Jakob I’ll give that a try!

Offline

#107 2020-04-22 08:40:01

Gallex
Member
Registered: 2006-10-08
Posts: 1,223

Re: smd_lately: recently viewed site articles

PHP version: 7.1.33
after upgrade TXP to 4.8, i get fatal error:

Fatal error: Uncaught Error: Call to undefined function find_temp_dir() in /www/apache/domains/www.varaleidja.ee/htdocs/textpattern/plugins/smd_lately/smd_lately.php:60 Stack trace: #0 [internal function]: smd_lately(Array, '\r\n<div class="a...') #1 /www/apache/domains/www.varaleidja.ee/htdocs/textpattern/vendors/Textpattern/Tag/Registry.php(141): call_user_func('smd_lately', Array, '\r\n<div class="a...') #2 /www/apache/domains/www.varaleidja.ee/htdocs/textpattern/lib/txplib_publish.php(541): Textpattern\Tag\Registry->process('smd_lately', Array, '\r\n<div class="a...') #3 /www/apache/domains/www.varaleidja.ee/htdocs/textpattern/lib/txplib_publish.php(447): processTags('smd_lately', 'limit="4" by="S...', '\r\n<div class="a...') #4 /www/apache/domains/www.varaleidja.ee/htdocs/textpattern/publish/taghandlers.php(4258): parse('\r\n\r\n<txp:articl...', true) #5 [internal function]: if_section(Array, '\r\n\r\n<txp:articl...') #6 /www/apache/domains/www.varaleidja.ee/htdocs/textpattern/vendors/Textpattern/Tag/Registry.php(141 in /www/apache/domains/www.varaleidja.ee/htdocs/textpattern/plugins/smd_lately/smd_lately.php on line 60

Offline

#108 2020-04-22 10:15:47

Gallex
Member
Registered: 2006-10-08
Posts: 1,223

Re: smd_lately: recently viewed site articles

…or maybe it can be done with TXP native tags? i need most viewed articles functionality

Offline

Board footer

Powered by FluxBB