Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-07-08 12:35:22

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

View articles in other site without xml feed?

How i can do , to view new article without rss aggregation from my txp in some other site?


<txp:txp_me />

Offline

#2 2010-07-08 13:06:17

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,254
Website GitHub Mastodon Twitter

Re: View articles in other site without xml feed?

If the non txp page is php (or has a php extension) all you need is rah_external_output

with

<txp:article limit="1">
<h3><txp:permlink><txp:page_title /><txp:permlink></h3>
<txp:body />
</txp:article>

and

<?php include($DOCUMENT_ROOT . "http://my-txp-site.tld/?rah_external_output=latest"); ?> in your “non txp page”.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2010-07-08 15:48:28

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: View articles in other site without xml feed?

Oh, thank you so much!

what i need to put into Content-Type ?
i have a trouble with charset in output.


<txp:txp_me />

Offline

#4 2010-07-08 15:50:57

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,254
Website GitHub Mastodon Twitter

Re: View articles in other site without xml feed?

You don’t need anything there but the external document has to have <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2010-07-08 15:59:54

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: View articles in other site without xml feed?

ok, thanks!) very useful plugin


<txp:txp_me />

Offline

#6 2010-07-09 06:40:52

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: View articles in other site without xml feed?

i get some unknown error. when i put php code to page where want to view, it’s viewing normal, but also it’s view same article with bad encoding.

there is screen

in form i used article limit=“1”


<txp:txp_me />

Offline

#7 2010-07-09 09:08:51

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,254
Website GitHub Mastodon Twitter

Re: View articles in other site without xml feed?

do you have the source of the external document?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#8 2010-07-09 09:16:34

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: View articles in other site without xml feed?

you mean source of php page, where i want to view, or source of article which i want to output?


<txp:txp_me />

Offline

#9 2010-07-09 10:56:38

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: View articles in other site without xml feed?

when i include without $DOCUMENT_ROOT . i get two same articles, but one with bad encoding, another with right.
when i using with $DOCUMENT_ROOT . i get one article, but with bad charset.
and, when my article is in russian lang, encoding also are bad…
with php page where i’m include alright.


<txp:txp_me />

Offline

#10 2010-07-09 13:38:32

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,254
Website GitHub Mastodon Twitter

Re: View articles in other site without xml feed?

Katalonian wrote:

you mean source of php page, where i want to view, or source of article which i want to output?

Hi Ziya. The source of the ‘stand alone’ php page where you want to view txp content.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2010-07-09 14:06:34

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: View articles in other site without xml feed?

TXP delivers content UTF-8 encoded. To include the content in non-TXP pages, the pages do need to use the same encoding.

Offline

#12 2010-07-09 14:38:35

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: View articles in other site without xml feed?

Hi Yiannis! Thanks for all, i fixed all!) it’s trouble in my php file) thanks again!


<txp:txp_me />

Offline

Board footer

Powered by FluxBB