Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2014-01-15 19:39:18

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 259
Website

Re: aks_article : Extended article_custom tag

ok, in principle <txp:aks_article where='ID <> "<txp:article_id />"' keywords='<txp:keywords />' wraptag="" break="" limit="9" form="artikel-liste-text" section="artikel" /> does also the job. But the upper variant with the first three keywords, allows me to weight the keywords. That means the first one is more important, than the second etc. So this way I can get older but maybe more relevant articles to the front.
With use of keywords I get the last articles with any of the used keywords in my list. chh_related_articles worked like this, thus aks_article is a replacement for chh_related_articles.

Offline

#22 2014-03-13 15:25:30

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: aks_article : Extended article_custom tag

whocarez, etc: Thanks for the discussion and an interesting idea.

Small remark: where='ID <> "<txp:article_id />"' equivalently hideself="1"

.

New version aks_article v0.2.9:
  • Added search feature (based on MySQL FULLTEXT search) – useful for get related articles or simle search.

.

Find related articles by search in Title, Body fields. Sort by MySQL search scope.

<txp:aks_article hideself="1" search='<txp:keywords />' wraptag="ul" break="li" limit="20">
	<txp:variable name="aks_article_scope"/>	<txp:title />
</txp:aks_article>

Remark: <txp:variable name="aks_article_scope"/> used only for debug.

.

Find related articles by search in Keywords field.
Importantly: create FULLTEXT index for `textpattern` table. SQL command:

ALTER TABLE `textpattern` ADD FULLTEXT (`Keywords`);

Then you can use the code:

<txp:aks_article hideself="1" search='<txp:keywords />' searchfield="Keywords" wraptag="ul" break="li" limit="20">
	<txp:variable name="aks_article_scope"/>	<txp:title />
</txp:aks_article>

Last edited by makss (2016-01-16 19:01:31)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#23 2014-04-28 17:14:53

photonomad
Member
Registered: 2005-09-10
Posts: 287
Website

Re: aks_article : Extended article_custom tag

Is there a way to edit aks_article so that it will also sort according to “position” as set with the stm_article_order plugin? stm_article_order works with the native txp:article_custom tag using sort=“position asc” I can’t figure out how it works with the native txp;article tags. Would love to be able to sort by position with aks_article too.

Offline

#24 2014-04-29 14:04:49

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: aks_article : Extended article_custom tag

Try <txp:aks_article sort=“position asc” />
Sorting aks_article works the same as in article_custom


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#25 2014-04-30 00:58:33

photonomad
Member
Registered: 2005-09-10
Posts: 287
Website

Re: aks_article : Extended article_custom tag

Thank you for your reply, makss. I went back in and tried it again and it is working as it should. Now I see that my browser’s memory cache isn’t refreshing my custom article list in the write tab. (I’m using aks_custom in a page form that is displayed within the write page txptip ) After clearing the cache, articles are correctly sorted by position. I’m sorry to have bothered you with this question!

Offline

#26 2017-04-13 16:36:04

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 259
Website

Re: aks_article : Extended article_custom tag

Hello, has someone get this plugin working together with textpattern 4.6.2?
<txp:aks_article sort="custom_7 desc" wraptag="article" break="" limit="1" offset="0" section="article" form="some_form" where="DATEDIFF(NOW(),Posted) <= 7" />

Has no output and in debug mode I don’t see any notice or warning. The same code works fine in 4.5.7.

Last edited by whocarez (2017-04-13 16:44:04)

Offline

#27 2017-04-13 20:27:22

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 259
Website

Re: aks_article : Extended article_custom tag

This problem is also related to the Textpattern Error Unknown column 'NULLDATETIME'

if (!$expired) {	$time .= " and (now() <= Expires or Expires IS NULL)"; }

instead of

if (!$expired) {	$time .= " and (now() <= Expires or Expires = ".NULLDATETIME.")"; }

solves the problem.

Offline

#28 2017-04-13 21:08:00

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 259
Website

Re: aks_article : Extended article_custom tag

@makss
A nice feature would be to exclude articles by article id and also an export of the listed article ids into a variable to use it in a second run for excluding articles.

Offline

#29 2017-04-15 07:35:14

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: aks_article : Extended article_custom tag

@whocarez
Thanks for the bug report, in the near future I will fix it and add new features.


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#30 2017-04-15 17:22:31

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 259
Website

Re: aks_article : Extended article_custom tag

ok, thank you, waiting for a new version :-)

Offline

Board footer

Powered by FluxBB