Giter VIP home page Giter VIP logo

revigniter-jsonfeed-module's Introduction

revIgniter JSONfeed module (v. 2.1.1)

This module enables your revIgniter app to publish JSON feeds.
In case you never heard of JSON feed, it is a format similar
to RSS or Atom. Here is the link to the official web-site:

https://jsonfeed.org

Contents

  • applicationModule: Includes the actual module data
  • assetsModule: Includes a stylesheet and images for testing
  • dbTableStructures: For your convenience there are
    ready-made table structures for Postgre, MySQL and SQLite.
  • testControllerAndViews: Includes a controller and 2 view
    files so you can test the module right away
  • testDatabase: A SQLite database including sample data
  • TextMateDragDropData: Here you find code snippets which
    you can drag and drop if you use TextMate and the LC server
    and revIgniter bundles, otherwise you may just copy and
    paste the code

Installation

Place the feedjson folder included in applicationModule
in your application/modules folder. Place the feedjson
folder included in assetsModule in your assets/modules folder.

Adapt the settings in application/modules/feedjson/config/config.lc
according to your desires. Note: For testing purposes you can
leave the file as is.

Implement a database group in your database.lc config file
named as chosen in the module configuration file. If you
use TextMate and the LC server and revIgniter TextMate
bundles you can just drag the databaseGroup.txt file included
in TextMateDragDropData into your database config file,
otherwise copy and paste the sample database configuration.
This database group is meant to be used as a starting point
in conjunction with the sample database feedjson.sqlite
included in folder testDatabase. Place this database in your
application/db folder.

Finally transfer the routes from
TextMateDragDropData/feedjsonRoutes.txt to your
application/config/routes.lc file.

Testing

Prior to testing make sure you followed the installation
guide above. Now place the controller feedJsonModuleTest.lc
in your application/controllers folder and place the view files
feedJsonModuleTestView.lc and mynewsItemView.lc in your
application/views folder. All 3 files can be found in folder
testControllerAndViews.

Assumed you didn't change the routes settings as provided
in feedjsonRoutes.txt you can view the test feed using the
following URL:

your.domain/mynews

To check what is sent to news feed clients use this URL:

your.domain/feedjson

The data reveals the links to single articles. So, you can
check how it looks like when someone clicks a headline in
a news reader. See for example:

your.domain/mynewsitem/This_is_article_number_15

Customizing

To integrate the module in your app you need to adjust the
settings in application/modules/feedjson/config/config.lc.
If you change the value of "routedFeedItemURI" or the
value of "routedFeedURI" don't forget to adapt the routes
accordingly.

Choose one of the ready-made table structures to set up
your database. Add an appropriate database group to your
database.lc file.

To load the module in your own controller please see the
comments in feedJsonModuleTest.lc. Then add the appropriate
code snippets you find in folder TextMateDragDropData to
your view files. For example to add pagination to your view
drag the file ajaxPaginationCode.txt into your view file
(provided you use TextMate and and the LC server and
revIgniter bundles, otherwise just copy and paste the
code snippets).

JSON feed Versions Compatibility

This version of the JSONfeed-Module reflects the changes in
version 1.1 of JSON feed, though it is backward compatible
with JSON feed version 1.0.

License

For the license terms see the LICENSE.txt file.

Meta

revigniter-jsonfeed-module's People

Contributors

revig avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.