Textpattern Forum

You are not logged in. Register | Login | Help

#121 2011-05-29 11:56:02

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,009

Re: [plugin] [ORPHAN] stm_article_order

Teemu wrote:

Each language version of an article has a different id, these all are in ‘textpattern’ table.

Teemu, this sufficiently describes what I wanted to know.

Thanks for posting the multiple image code, I’ll integrate it into the next version.
Please be so kind to also post the MLP line you duplicated, so I can link to it from my post #59. Thus we’d have a description (install MLP after stm_article_order) and working code for people using MLP together with stm_ao. Thanks!


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

Offline

#122 2011-05-29 15:41:40

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

Re: [plugin] [ORPHAN] stm_article_order

uli wrote:

Please be so kind to also post the MLP line you duplicated, so I can link to it from my post #59. Thus we’d have a description (install MLP after stm_article_order) and working code for people using MLP together with stm_ao. Thanks!

As you suggested, I dublicated this line for each language table:

safe_update("textpattern", "position = $position, Section = '$section'", "ID = $ID");

So, for example, English:

safe_update("l10n_lang_gb_en", "position = $position, Section = '$section'", "ID = $ID");

This is a manual solution, a step further would be dynamic call that picks up all the installed language tables.

Last edited by Teemu (2011-05-29 15:42:24)

Offline

#123 2011-06-29 13:55:54

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: [plugin] [ORPHAN] stm_article_order

Teemu schrieb:

So, for example, English:

safe_update("l10n_lang_gb_en", "position = $position, Section = '$section'", "ID = $ID");

this is wrong. the table is not called l10n_lang_gb_en but l10n_txp_en_gb

so:

safe_update("l10n_txp_en_gb", "position = $position, Section = '$section'", "ID = $ID");

is the correct line.

[Edit]

PLUS
the plug-in stm_ao uses the standard textpattern table to sort the articles in the ao tab.
this means its helpful to keep the textpattern table updated as well.
so dont change the line in the plug-in code but simply add the other languages..!!
(you had that in your description teemu, but hidden somewhere in between the next issue..)

Last edited by jens31 (2013-09-02 16:53:58)

Offline

#124 2011-10-27 07:54:24

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: [plugin] [ORPHAN] stm_article_order

Uli’s updated version (& the original for that matter) do not work for article’s output on the homepage (they do on the section page itself).

I’ll give you my scenario; homepage uses this:

<txp:article wraptag="" break="" class="" sort="position asc" limit="999">
	<article class="<txp:category1 /> ">
		<txp:upm_article_image form="img_archive" limit="1" />
	</article>
</txp:article>

Is there anything that I might be doing wrong?

Last edited by rathersplendid (2011-10-27 07:54:59)


Admin Themes Prometheus | Stung | txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#125 2011-10-27 10:27:29

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,009

Re: [plugin] [ORPHAN] stm_article_order

rathersplendid wrote:

Uli’s updated version (& the original for that matter) do not work for article’s output on the homepage (they do on the section page itself).

Have it working here on the homepage, Zander. Did you make sure your homepage is served by a txp-page with an article tag with sort=position?


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

Offline

#126 2011-10-27 12:44:42

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: [plugin] [ORPHAN] stm_article_order

uli wrote:

Have it working here on the homepage, Zander. Did you make sure your homepage is served by a txp-page with an article tag with sort=position?

As you can see above, I am using sort=position. It is being served by a txp page (how else would I do it???)

Correct me if I’m wrong..


Admin Themes Prometheus | Stung | txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#127 2012-12-05 11:40:40

trenc
Plugin Author
From: Cologne
Registered: 2008-02-27
Posts: 504
Website

Re: [plugin] [ORPHAN] stm_article_order

Hi Uli,

I rewrote the <txp:link_to_next /> and <txp:link_to_prev /> for an usage with the stm_article_order sort="position (asc|desc)".

I thought about publishing it as an additional plugin, but I think this makes no sense. If you could test it and include in the plugin. Would be great.

The introduced <txp:stm_link_to_next /> and <txp:stm_link_to_prev /> working the same way as <txp:link_to_next /> and <txp:link_to_prev /> from the TXP 4.5.3, but support the position sort order and providing a class attribute:

<txp:stm_link_to_prev class="left" /> | <txp:stm_link_to_next class="right" />

Here are the code:

Code removed for inspecting ...

Last edited by trenc (2012-12-14 12:24:58)

Offline

#128 2012-12-05 14:38:21

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,009

Re: [plugin] [ORPHAN] stm_article_order

Thanks, Tommy! I always missed these ones.

I’ll merge them in and try in my sandbox as soon as I find enough time. If I’m not mistaken the minimum plugin requirement will then have to be TXP 4.5.3, right?

Last edited by uli (2012-12-05 14:39:57)


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

Offline

#129 2012-12-05 17:08:20

trenc
Plugin Author
From: Cologne
Registered: 2008-02-27
Posts: 504
Website

Re: [plugin] [ORPHAN] stm_article_order

If I’m not mistaken the minimum plugin requirement will then have to be TXP 4.5.3, right?

Can’t say that exactly. It’s shipped with a own getNextPrev() but not with an own getNeighbour(), which was rewritten for TXP 4.5.0.
I never testet it against a TXP version before 4.5.3.

Offline

#130 2012-12-14 12:22:38

trenc
Plugin Author
From: Cologne
Registered: 2008-02-27
Posts: 504
Website

Re: [plugin] [ORPHAN] stm_article_order

Uli, please wait with the merging.
It seems the code ist not working correctly. I have to inspect this issue first.

Offline

Board footer

Powered by FluxBB