6
9
pieX Ver0.7をリリースしました。
変更点は以下の通りです。
- 旧テンプレートの3つのパート分けから1つのテンプレートに変更
- no itemのテンプレート名称をerrorに変更
- 不要となったオブジェクトを破棄するように修正(流儀に従って)
記事テンプレートが変更になりましたので、旧版をお使いの方は注意が必要です。
記事テンプレートの変更について
旧版までは、ヘッダ部(header)、記事部(item)、フッタ部(footer)の3つに分かれていましたが、これを1つのテンプレートで記述できるようにしました。
書き方は、以下のようにHTMLコメントの記述をテンプレートの内部に記述することにより上記の3つのパートを内部で判別します。
分離するHTMLコメントには、記事の表示部分の開始と終了の箇所にとを記述することになります。
例)
<h2><a href="[+permalink+]" target=_blank title="[+description(text,128)+]">[+title+]</a></h2> <ul> <!-- start --> <li><a href="[+permalink+]" target=_blank>[+title+]</a>([+date+]/[+category+]/[+author+])<br /> [+description(text,256)+] [+enclosure+] </li> <!-- end --> </ul>
記事のループ部分の開始、終了位置をHTMLのコメントとして囲んでください。
書式は上記の通りにstart及びendをコメント形式で書きます(コピペしてもらう方が安全です)
なお、内部のプレイスホルダの変数等は今まで通りになります。
呼び出し時のテンプレートの変数名がtplの1つになり、またnoitemの変数がerrorに変更されます。
スニペット呼び出しの例
[!pieX?url=`Feed Url`&tpl=`piex_template`&error=`piex_error`&max=3!]
ダウンロード
こちらからダウンロードしてください。
なお、今回からSimplepieのアーカイブ(ZIP)も同梱しておりますので、simplepieのアーカイブからsimplepie.incを取り出して、スニペットのディレクトリにコピーしてください。


CMS

2008/10/05 21時51分24秒
トラックバック先の情報もチェックしてね・・・修正版は後日アップします、説明書もちょっと改版ですね(^^;
shintata.com様ありがとうございました。
2009/10/16 21時53分07秒
最近、 MODx の勉強をしており pieX 使わせていただいております。
使っていて思ったのですが、 feed_url という変数、エラー処理時でなく通常時も使えるようになりませんか?
記事一覧を表示して、フィード URL を表示するところまでをテンプレートにしようと思ったんですがうまくいかず…コードを自分で書き直そうかと思ったんですが、まずは作者様にお願いが筋かと思いまして。
ご検討ください m(_ _)m
2009/10/17 22時42分25秒
どうもコメントありがとうございます。

早速ですが、お試し版ってことでここのダウンロードに入れてみました。
各アイテムおよびヘッダ・フッタにも使えるようにしたつもりです・・・
が、現在MODx環境がないので実はテストできていません
人柱状態になっちゃいますが、よろしければお試し頂ければと・・・。
ではでは
2009/10/18 00時46分19秒
うまくいきました (^^)b
早速の対応ありがとうございました m(_ _)m
2009/10/26 23時12分09秒
遅くなりましたぁ。
そのまま正式版にしてお知らせログを書こうかと思いつつ、ずるずると今日に至ったり。
とりあえず、無事動いて何よりです。
そのまま正式版としてこのままダウンロードページにおいておくことにします。
もしかすると、ちゃんとSimplepieを最新のものにしてアップしなおすかも知れませんが・・・ただ、確認してる暇と環境がないのでこのままにするかもです。
まずはご報告ありがとうございました。
2009/11/06 00時40分01秒
こんにちは。 v0.7へのダウンロードリンク、私は私のために正しい働かないか。
2009/11/06 06時03分01秒
MODxのフォーラムで見つけた!コードをありがとう!
2009/11/23 09時51分56秒
Hi,
first of all, thank you very much for porting simplepie to modx! I love to work with both very much =)!
I'm working with the 0.8 version from your server here, it does fine and I like the idea with the comments to separate header/footer from body very much, nice work!
I wanted to add some features but I get stuck so I thought I ask you, the author =)...
My first problem was, that I need the date (without time) and the time (without date) on different sections of my output, I tried to make a placeholder [+time+] but I couldn't find a solution...could you tell me how to achieve this best?
The second problem is with one of the very nice features of simplepie: multiple feeds. I used it before to aggregate 3 feed together like this:
I saw you did it in the snippet like this:
so $feedURL would have to be this array of feeds, but I couldn't figure out how to implement this...I think it would be nice if I could give comma separated feed-urls in the &url=`url1, url2, url3` parameter, do you think this would be possible?
sorry for those questions, I'm pretty new to modx, so I have never written a complex snippet myself (shame on me...but I will hopefully soon =D)
thx in advance for your help!
2009/11/23 14時26分51秒
Hello, Luk san.
Thank you for using piex.
Two issues, the 0.8 version is not an easy fix.
I think to be resolved in the next version.
The date and time for the separation, [+date (H: i)+] as the format as possible.
It's about multiple URL, the URL parameter "|xx|" or "," to allow for a separator.
Please wait, thank you.
2009/11/24 01時35分09秒
Thank you for the fast answer Zero!
Your idea for the date/time separation is very nice, would like it even more than a placeholder [+time+]...[+date(H:i)+] is far more elegant!
The multiple URL thing I don't understand really (my japanese isn't very good and the google translator is not a big help =D), is it already possible to separate multiple URLs with "| xx |" or "," or will this come in the next version? As far as I understood it, it's not possible yet?
I'm really looking forward to the next version!
PS: Did you "install" the wiki here: http://wiki.modxcms.com/index.php/PieX
It could use an update and if you want to, I can do this (new links and also the explanation for the changes in 0.8 and so on...)
Regards from Switzerland
2009/11/24 22時33分11秒
Lukさん、お返事ありがとうございます。
英語は全然だめなので、日本語で書いてみます。
1.複数URLについて
下記のような書式を考えています。
[[piex?url=`http://example123.com/rss.xml,http://example456.com/rss.xml`]]
上の例ですとURLの区切りとして、,を使っています。 同様に区分文字列として、|xx|などURLの変換文字と同様の形式にするか、現時点ではいずれかを考えているということです
2.バージョンアップについて
クリスマスまでにバージョンアップをしたいと考えています。
しかし、MODxの環境が手元にありませんのでテストがされない状態でファイルをサイトに掲示するかも知れません。
一応、Lukさんがテストもしてくれるようでしたらなるべく早くソースをアップします。
スイスには、一度は行ってみたいです(^^;
これから冬になる日本より
2009/12/13 13時00分11秒
Hi ZeRo,
would write in Japanese if I could, but my keyboard is a swiss one =)...this would probably be a great mess...
I wrapped my head again around this multiple feed problem...but couldn't solve it =/...
thought about something like that (just a thought...not working):
$param["feedURL"] = $urls;
$urls = explode(',', $urls);
$feeds = array();
foreach ($urls as $url){
$feeds[] = trim(FeedJob::create_feed_url($url));
}
what do you think...could that work somehow?
Would you maybe do the update as a job when I pay you some money (in the currency you want =D...paypal would be good...)?
thanks for your answer,
regards,
LuK
2009/12/13 19時46分28秒
issued a test version.
This version is intended to allow you to specify the time and date for multiple feeds.
Do you tried the latest test version?
If you, please come try this test version If you have not already done so.
Specify multiple URL corresponds to a comma-delimited.
Test version, please see below.
http://www.petit-power.com/permalink/piex-ver0.9-testVersion.html
Thank you.