Skip to content
General Revolution Evolution Add-ons International
Login | Register | MODX.com
MODX Open Source Content Management System, Framework, Platform and More.
Find a Partner | Hosts + SaaS | Jobs | Donate
  • RegisterSign Up with the MODX Community
  • LoginUse Your MODX.com Account
  • MODX Community Forums
  • International
  • Japanese
  • マニュアル・テュートリアル・翻訳
  • 事例集、テュートリアル
  •  
  • スニペット - NewsParserX(外部サイトのRSSフィードをページ上にニュース表示)#

  • 33014
    1,086

    yama Reply #1, 5 years, 10 months ago

    Reply
    • Link to this post#1
    http://modxcms.com/NewsParserX-601.html

    外部サイトのRSSフィードをページ上に出力するスニペット。
    基本的な使い方は簡単で、
    [[NewsParserX? &url=`http://********.com/rssfeed.xml`]]
    
    と書くだけです。

    しかしURL中に「?」「=」「&」を含む場合は書き方が少し変わります。
    これはどこにも説明が書いてないのですが、以下のようになります。

    「?」→ |xq| に。
    「=」→ |xe|に。
    「&」→ |xa|に。

    たとえば
    [[NewsParserX? &url=`http://*****.com/index.php?feed=rss&limit=10`]]
    
    上記のようなURLのRSSフィードであれば、
    [[NewsParserX? &url=`http://*****.com/index.php
    |xq|feed|xe|rss|xa|limit|xe|10`]]

    このように書き換えます。


  • 27690
    98
    Dancing Moderator(踊るモデレーター)

    Running Moderator(走るモデレーター)

    smallworld Reply #2, 5 years, 10 months ago

    Reply
    • Link to this post#2
    yamaさん、こんにちは、smallworldです。NewsParserXについて教えてください。

    NewsParserX、試してみようと思ったのですが
    http://www.modxcms.com/NewsParserX-601.html
    からダウンロードすると

    newsparserx.inc.php
    NewsParserX.snippet.txt

    の2枚のファイルが解凍されます。

    解説文を見て、phpファイルのほうを/assets/snippets/newsparserx/ に設置したのですが、これではスニペットタグで上手く呼び出せず。(といういつもの書式)

    「copy and paste the newslisting.snippet.txt contents into a new snippet that you can call from your pages.」と書かれてあったので
    「ああ、NewsListingを【NewsParserX】とか何とか書いてコピーするのかな?」
    とも思ったのですが、やはり動かず。

    動作の方法についてご教授いただけないでしょうか。
    よろしくお願いします。


  • 33014
    1,086

    yama Reply #3, 5 years, 10 months ago

    Reply
    • Link to this post#3
    phpファイルを /assets/snippets/newsparserx/ にコピーするところまでは合ってます。
    その次、ドキュメントには「copy and paste the newslisting.snippet.txt contents …」と
    書いてありますが、NewsParserX.snippet.txtの誤りですね。
    NewsParserX.snippet.txtは、同梱されているもうひとつのファイルがそれです。
    これの中身を新規スニペットとして貼り付けます。

    ※追記
    配布ルールを統一すれば、今回みたいにドキュメントに多少の誤りがあっても
    自分で気付いてインストールできそうな気がします。提案しなきゃですね。汗
    つまり配布ファイルのファイル構成(ファイル名・拡張子・フォルダ構成とか)です。


  • 27690
    98
    Dancing Moderator(踊るモデレーター)

    Running Moderator(走るモデレーター)

    smallworld Reply #4, 5 years, 10 months ago

    Reply
    • Link to this post#4
    yamaさん

    超速のお答えありがとうございました。
    なるほど、もう少しいじくり回していれば、気が付いていたかもしれません。
    お手数かけました。

    (NewsListingのバージョンに依存するのかな?などとあらぬ方向で考えていたりしたので余計な道草していました)





Actions

Login to Post

Other Support Options

To file a bug or make a feature request visit our issue tracker, or you can also purchase commercial support.

Love MODX?

If you build sites for a living with MODX or just love using it, why not give back?

Information

Posted in this thread:
smallworld, yama

 
Back to Top

MODX Global HQ

1333 N Stemmons Fwy, Ste 110
Dallas, TX 75207
United States

+1 (469) 777-MODX (6639)

The MODX Company

  • Contact
  • Media Center
  • Careers at MODX
  • Wall of Fame
  • The MODX Blog

Sponsors

SoftLayer Firehost: Secure Cloud Hosting

Stay Connected

Read our previous email newsletters.

Twitter Facebook Google+ LinkedIn github Feeds

Privacy Policy | Terms of Service | Pixels by AKTA Web Studio© 2005-2012 MODX. All rights reserved. Trademark Policy