Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2017-04-18 13:42:39

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

Re: aks_article : Extended article_custom tag

Can remove additional calls aks_article:

<txp:aks_article sort="IF(DATEDIFF(NOW(),Posted)<=7, 0, IF(DATEDIFF(NOW(),Posted)<=30, 1, IF(DATEDIFF(NOW(),Posted)<=365, 2, 3))), custom_7 desc" section="article"  limit="3">
	<txp:variable name='top_result_<txp:aks_article_count />'>
        <txp:if_variable name="aks_article_count" value="1">
            <txp:output_form form="default_first_article" />
        <txp:else />
            <txp:output_form form="default_others_article" />
        </txp:if_variable>
	</txp:variable>
</txp:aks_article>
            <div class="general-art item-actual">
<!-- Nr.1 -->
                <txp:variable name="top_result_1" />
            </div>
            <div class="others-art item-actual">
<!-- Nr.2 -->
                <txp:variable name="top_result_2" />
<!-- Nr.3 -->
                <txp:variable name="top_result_3" />
            </div>

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

#38 2017-04-18 14:12:31

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 296
Website GitHub Twitter

Re: aks_article : Extended article_custom tag

thanks again …
somehow is <txp:if_variable name="aks_article_count" value="1"> not working, so I get instead every time default_others_article as form.

Offline

#39 2017-04-18 14:58:53

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 296
Website GitHub Twitter

Re: aks_article : Extended article_custom tag

ok, if I define aks_article_count by myself, than it’s working …

<txp:variable name="aks_article_count" value='<txp:aks_article_count />' />

Offline

#40 2017-04-18 17:59:38

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

Re: aks_article : Extended article_custom tag

whocarez wrote #305379:

ok, if I define aks_article_count by myself, than it’s working …

<txp:variable name="aks_article_count" value='<txp:aks_article_count />' />

You’re right. This value was only available through the tag.

Fixed in the new version aks_article v0.3.2:

  • Now variable aks_article_count is available inside the form.

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

#41 2017-04-19 16:54:46

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 296
Website GitHub Twitter

Re: aks_article : Extended article_custom tag

It works! :-)

Offline

#42 2022-09-19 04:07:29

peterj
Member
From: Melbourne, Australia
Registered: 2005-06-02
Posts: 91

Re: aks_article : Extended article_custom tag

I just upgraded a site that dates back to 2012, and this plugin isn’t very happy – v0.3.2 on TXP 4.8.8 on PHP 8.0. Returning first result only. Will look into.

 <txp:aks_article sort="Section asc, Posted desc" limit="99" offset="0" where='<txp:article_id /> in (custom_4) or <txp:article_id /> in (custom_5)'> 
[ removed ] 
</txp:aks_article> ->  Warning: Undefined array key "aks_article_scope" while parsing form **authors_single** on page **archive_2** textpattern/plugins/aks_article/aks_article.php:40 aks_article_doArticles()
aks_article()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:559 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:409 processTags()
textpattern/plugins/etc_cache/etc_cache.php:78 parse()
etc_cache()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:559 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:409 processTags()

Last edited by peterj (2022-09-19 04:23:42)

Offline

#43 2022-09-19 04:44:00

peterj
Member
From: Melbourne, Australia
Registered: 2005-06-02
Posts: 91

Re: aks_article : Extended article_custom tag

I needed a quick fix, which was to comment out the code supporting the search attribute (ln 204-211) and also the search attribute debug on line 262. Seems to be fine now.

Offline

Board footer

Powered by FluxBB