Commit a14e0ee2 authored by Ralf Bitter's avatar Ralf Bitter

Add module files

parent 4f47ebf8
[[gData["ajaxPaginationCode"] ]]
\ No newline at end of file
put gAPPPATH & "db/feedjson.sqlite" into sDB["feedjson"]["hostname"]
put "" into sDB["feedjson"]["username"]
put "" into sDB["feedjson"]["password"]
put "" into sDB["feedjson"]["database"]
put "sqlite" into sDB["feedjson"]["dbdriver"]
put "" into sDB["feedjson"]["dbprefix"]
put FALSE into sDB["feedjson"]["pconnect"]
put TRUE into sDB["feedjson"]["dbdebug"]
put "" into sDB["feedjson"]["dbRedirectOnError"]
put FALSE into sDB["feedjson"]["cacheon"]
put gBASEPATH & "database/cache/" into sDB["feedjson"]["cachedir"]
put "utf8" into sDB["feedjson"]["charset"]
put "utf8_general_ci" into sDB["feedjson"]["dbcollat"]
put TRUE into sDB["feedjson"]["cacheautodel"]
# SQLite DRIVER ONLY
put "" into sDB["feedjson"]["options"]
# MYSQL AND THE POSTGRES DRIVER
# DEFAULT MYSQL: 3306, DEFAULT POSTGRES: 5432
-- put 3306 into sDB["default"]["port"]
# MYSQL DRIVER ONLY
put FALSE into sDB["feedjson"]["useSSL"]
# THE FOLLOWING THREE VARIABLES ARE PART OF ENGINE CHANGES 4.6.4
# BE AWARE THAT THESE ARE NOT TESTED
# MYSQL DRIVER ONLY
put "" into sDB["feedjson"]["dbSocket"]
# MYSQL DRIVER ONLY
put 20 into sDB["feedjson"]["dbTimeout"]
# MYSQL DRIVER ONLY
put FALSE into sDB["feedjson"]["dbAutoReconnect"]
#
\ No newline at end of file
<? get rigRunModule("feedjson/feedjsoncontainer") ?>
\ No newline at end of file
<? get rigRunModule("feedjson/feedjsonitem") ?>
\ No newline at end of file
# NOTE: ADD THIS TO THE APP ROUTES, NOT THE MODULE ROUTES
put "feedJsonModuleTest/index" into gRoute[3]["mynews"]
put "feedJsonModuleTest/index/$1" into gRoute[3]["mynews/(:any)"] -------------- needed for ajax requests
put "feedJsonModuleTest/newsItem/index/$1" into gRoute[3]["mynewsitem/(:any)"]
\ No newline at end of file
<? return rigCssAsset("feedjson.css", , "feedjson") ?>
\ No newline at end of file
<? return getHTMLjsonfeedLink() ?>
\ No newline at end of file
<?lc
put gBASEPATH into gBASEPATH
if gBASEPATH is "gBASEPATH" then
put "No direct script access allowed."
exit to top
end if
##
# -------------------------------------------------------------------
# AUTO-LOADER FOR MODULES
# -------------------------------------------------------------------
# This file specifies which systems should be loaded by default.
#
# In order to keep the framework as light-weight as possible only the
# absolute minimal resources are loaded by default. For example,
# the database is not connected to automatically since no assumption
# is made regarding whether you intend to use it. This file lets
# you globally define which systems you would like loaded with every
# request for your module.
#
# -------------------------------------------------------------------
# Instructions
# -------------------------------------------------------------------
#
# These are the things you can load automatically:
#
# 1. Libraries
# 2. Stacks
# 3. Helper files
# 4. Plugins
# 5. Custom config files
# 6. Language files
# 7. Models
#
##
##
# -------------------------------------------------------------------
# Auto-load Libraries
# -------------------------------------------------------------------
# These are the libraries located in the system/libraries folder,
# in the system/application/libraries folder or in your
# system/application/modules/yourModule/libraries folder.
#
# Prototype:
#
# put "database" into sAutoLibraries[1]
# put "session" into sAutoLibraries[2]
# put "calendar" into sAutoLibraries[3]
# put "myLib" into sAutoLibraries[4]
#
# or
# put "database,session,calendar,myLib" into sAutoLibraries
# split sAutoLibraries using comma
#
# put sAutoLibraries into gModuleAutoload["libraries"]
##
put "" into sAutoLibraries[1]
put sAutoLibraries into gModuleAutoload["libraries"]
##
# -------------------------------------------------------------------
# Auto-load Stacks
# -------------------------------------------------------------------
# These are the stacks located in the system/stacks folder,
# in your system/application/stacks folder or in your
# system/application/modules/yourModule/stacks folder.
#
# Prototype:
#
# put "chocolate" into sAutoStacks[1]
# put "strawberry" into sAutoStacks[2]
#
# or
# put "chocolate,strawberry" into sAutoStacks
# split sAutoStacks using comma
#
# put sAutoStacks into gModuleAutoload["stacks"]
##
put "" into sAutoStacks[1]
put sAutoStacks into gModuleAutoload["stacks"]
##
# -------------------------------------------------------------------
# Auto-load Helper Files
# -------------------------------------------------------------------
# Prototype:
#
# put "url,file,myHelper" into sAutoHelper
# split sAutoHelper using comma
#
# put sAutoHelper into gModuleAutoload["helper"]
##
put "url" into sAutoHelper[1]
put sAutoHelper into gModuleAutoload["helper"]
##
# -------------------------------------------------------------------
# Auto-load Plugins
# -------------------------------------------------------------------
# Prototype:
#
# put "footerlinks,jsCalendar,myPlugin" into sAutoPlugins
# split sAutoPlugins using comma
#
# put sAutoPlugins into gModuleAutoload["plugin"]
##
put "" into sAutoPlugins[1]
put sAutoPlugins into gModuleAutoload["plugin"]
##
# -------------------------------------------------------------------
# Auto-load Config files
# -------------------------------------------------------------------
# Prototype:
#
# put "config1,config2" into sAutoCustConfigs
# split sAutoCustConfigs using comma
#
# put sAutoCustConfigs into gModuleAutoload["config"]
#
# NOTE: This item is intended for use ONLY if you have created custom
# config files for your module. Otherwise, leave it blank.
##
put "" into sAutoCustConfigs[1]
put sAutoCustConfigs into gModuleAutoload["config"]
##
# -------------------------------------------------------------------
# Auto-load Language Files
# -------------------------------------------------------------------
# Prototype:
#
# put "lang1,lang2" into sAutoLangFiles
# split sAutoLangFiles using comma
#
# put sAutoLangFiles into gModuleAutoload["language"]
#
# NOTE: Do not include the "Lang" part of your file. For example
# "revigniterLang.lc" would be referenced as sAutoLangFiles["revigniter"];
##
put "" into sAutoLangFiles[1]
put sAutoLangFiles into gModuleAutoload["language"]
##
# -------------------------------------------------------------------
# Auto-load Models
# -------------------------------------------------------------------
# Prototype:
#
# put "model1,model2" into sAutoModels
# split sAutoModels using comma
#
# put sAutoModels into gModuleAutoload["model"]
#
# NOTE: This item is intended to be used for your module's models ONLY.
##
put "" into sAutoModels[1]
put sAutoModels into gModuleAutoload["model"]
--| END OF autoload.lc
--| Location: ./system/application/modules/feedjson/config/autoload.lc
----------------------------------------------------------------------
\ No newline at end of file
<?lc
put gBASEPATH into gBASEPATH
if gBASEPATH is "gBASEPATH" then
put "No direct script access allowed."
exit to top
end if
##
# -------------------------------------------------------------------
# SETTING A MODULE'S CONFIGURATION VALUE
# -------------------------------------------------------------------
#
# To add configuration data related to your module use
# the module name as array key.
##
# THIS IS THE NAME OF THE MODULE CONTROLLER WHICH GENERATES
# THE JSON FEED REQUESTED BY JSON FEED READERS
put "feedjson" into gConfig["feedjson"]["feedHTMLlinkTag"]
put "My JSON Feed" into gConfig["feedjson"]["feedTitle"]
put "My JSON Feed Description" into gConfig["feedjson"]["feedDescription"]
put "John Doe" into gConfig["feedjson"]["authorName"]
# MINIMUM NUMBER OF CHARACTERS TO BE SHOWN IN THE SUMMARY
# DON'T WORRY, SENTENCES WON'T BE CUT
put 100 into gConfig["feedjson"]["minNumChars"]
# MAX NUMBER OF POSTS PER FEED READER REQUEST
put 10 into gConfig["feedjson"]["maxNumPosts"]
# MAX NUMBER OF POSTS PER PAGE IN YOUR APP
put 3 into gConfig["feedjson"]["newsLimit"]
# MAKE SURE YOU IMPLEMENTED A DATABASE GROUP IN YOUR database.lc CONFIG FILE NAMED AS YOU CAN CHOOSE BELOW!
put "feedjson" into gConfig["feedjson"]["databaseGroupName"]
put "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, add the following URL to your reader:" into gConfig["feedjson"]["userComment"]
# SEE application/config/routes.lc, SET ROUTING THERE FOR "mynewsitem/(:any)" to "feedJsonModuleTest/newsItem/$1"
# LIKE: put "feedJsonModuleTest/newsItem/$1" into gRoute[2]["mynewsitem/(:any)"]
put "mynewsitem" into gConfig["feedjson"]["routedFeedItemURI"]
# SEE application/config/routes.lc, SET ROUTING THERE FOR "mynews" to "feedJsonModuleTest/index"
# LIKE: put "feedJsonModuleTest/index" into gRoute[2]["mynews"]
# SET ROUTING FOR "mynews/(:any)" to "feedJsonModuleTest/index/$1"
# LIKE: put "feedJsonModuleTest/index/$1" into gRoute[5]["mynews/(:any)"] -- needed for ajax requests
put "mynews" into gConfig["feedjson"]["routedFeedURI"]
##
# -------------------------------------------------------------------
# OVERRIDING A GLOBAL CONFIGURATION VALUE
# -------------------------------------------------------------------
#
# To override global configuration data just omit the
# module's name as array key.
##
--| END OF config.lc
--| Location: ./system/application/modules/feedjson/config/config.lc
----------------------------------------------------------------------
\ No newline at end of file
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
\ No newline at end of file
<?lc
put gBASEPATH into gBASEPATH
if gBASEPATH is "gBASEPATH" then
put "No direct script access allowed."
exit to top
end if
##
#-------------------------------------------------------------------------
# URI ROUTING
#-------------------------------------------------------------------------
# Note: The following applies to modules only if used as application controllers.
# Routing has no effect on view partials or if modules are used as libraries.
#
# This file lets you re-map URI requests to specific controller functions.
#
# Typically there is a one-to-one relationship between a module URL string
# and its corresponding controller page library/handler. The segments in a
# module URL normally follow this pattern:
#
# example.com/myModule/handler/ID/
#
# or in case the name of the page library is not equal to the module name
#
# example.com/myModule/pagelibrary/handler/ID/
#
# or using a sub-directory in myModule/controllers
#
# example.com/myModule/sub-directory/pagelibrary/handler/ID/
#
# In some instances, however, you may want to remap this relationship
# so that a different page library/handler is called than the one
# corresponding to the URL.
#
# Please see the user guide for complete details:
#
# http://revigniter.com/user_guide/general/routing.html
# and
# http://revigniter.com/user_guide/libraries/modules.html
#
#-------------------------------------------------------------------------
# RESERVED ROUTES
# -------------------------------------------------------------------------
#
# There are only two reserved routes for modules:
#
# put "myModule/pagelibrary" into gRoute["myModule"][1]["defaultController"]
#
# This route indicates which controller page library should be loaded if the
# URI contains no data. In the above example, the "pagelibrary" page library
# would be loaded.
# If the "defaultController" route is empty and there is only one URI segment specifying
# the name of the module revIgniter expects that there is a controller named after
# the module and tries to load myModule/myModule.
# If no handler is specified the module's index handler is called which must be composed
# of the controller name followed by the word "Index" so that the route would look like:
# myModule/myModule/myModuleIndex.
#
# put "" into gRoute["myModule"][1]["404Override"]
#
# This route will tell the Router what URI segments to use if those
# provided in the URL cannot be matched to a valid route, in other words if the controller
# specified is missing. If this route is empty the default 404 error page is provided.
#
# Note: Module routes are relative to application/modules/.
#
# Note: The gRoute["myModule"] array must be numbered and the key number
# for reserved routes must be 1. So custom route key numbers start
# with number 2.
#
##
put "" into gRoute["feedjson"][1]["defaultController"]
put "" into gRoute["feedjson"][1]["404Override"]
--| END OF routes.lc
--| Location: ./system/application/modules/feedjson/config/routes.lc
----------------------------------------------------------------------
\ No newline at end of file
<?lc
put "feedjson,feedjsonIndex" into gModuleHandlers
local sFJclientHeadersA, sFJdateAndEtagA
# THIS MODULE CONTROLLER GENERATES THE JSON FEED REQUESTED BY JSON FEED READERS
command feedjson
rigLoadHelper "date"
rigLoadModel "feedjsonmodel", , "feedjson"
# MAKE SURE YOU IMPLEMENTED A DATABASE GROUP "feedjson" IN YOUR database.lc CONFIG FILE! SEE modules/feedjson/config/config.lc
get rigLoadDatabase(rigFetchConfigItem("databaseGroupName", "feedjson"))
end feedjson
command feedjsonIndex
put empty into sFJclientHeadersA
put empty into sFJdateAndEtagA
checkClientHeaders
# LOAD THE JSON VIEW FILE FOR FEED READERS THAT SUPPORT THE JSON FEED FORMAT
get rigLoadView("feedjsonView")
end feedjsonIndex
command checkClientHeaders
getClientHeaders
getFeedModDateAndEtag
if sFJdateAndEtagA["LAST-MODIFIED"] <> FALSE then
# DO NOT SEND THE FEED IF CLIENT HEADERS MATCH WITH LAST MODIFIED DATE AND ETAG
if (sFJclientHeadersA["IF_MODIFIED_SINCE"] <> empty) and (sFJclientHeadersA["IF_NONE_MATCH"] <> empty) then
if (sFJdateAndEtagA["LAST-MODIFIED"] is sFJclientHeadersA["IF_MODIFIED_SINCE"]) and (sFJdateAndEtagA["ETag"] is sFJclientHeadersA["IF_NONE_MATCH"]) then
rigSetStatusHeader 304, "Not Modified" & return & return
else
generateJSONfeed
end if
else
generateJSONfeed
end if -- if (sFJclientHeadersA["IF_MODIFIED_SINCE"] <> empty) and (sFJclientHeadersA["IF_NONE_MATCH"] <> empty) then
else
generateJSONfeed
end if
end checkClientHeaders
command generateJSONfeed
put char 1 to -2 of rigBaseURL() into tBaseURL
# VERSION
put quote & "https://jsonfeed.org/version/1" & quote into gData["feedVersion"]
# TITLE
put quote & rigFetchConfigItem("feedTitle", "feedjson") & quote into gData["feedTitle"]
# HOME
put quote & tBaseURL & quote into gData["homePageURL"]
# FEED URL, THIS IS A ROUTED URI, MAKE SURE "mynews" IS ROUTED TO YOUR FEED CONTROLLER IN YOUR MAIN CONTROLLER DIRECTORY
put quote & tBaseURL & "/mynews" & quote into gData["feedURL"]
# DESCRIPTION
put quote & rigFetchConfigItem("feedDescription", "feedjson") & quote into gData["feedDescription"]
# USER COMMENT
put quote & rigFetchConfigItem("userComment", "feedjson") && tBaseURL & "/" & rigFetchConfigItem("feedHTMLlinkTag", "feedjson") & quote into gData["userComment"]
# ICONS
put rigFetchConfigItem("assetsLocation") into tAssetsLoc
if tAssetsLoc is empty then
put "assets" into tAssetsLoc
end if
put tBaseURL & "/" & tAssetsLoc & "/modules/feedjson/" into gData["assetsLoc"]
put quote & gData["assetsLoc"] & "img/feedIcon.png" & quote into gData["feedIcon"]
put quote & gData["assetsLoc"] & "img/feedFavicon.png" & quote into gData["feedFavicon"]
#
# AUTHOR
put quote & rigFetchConfigItem("authorName", "feedjson") & quote into gData["authorName"]
-- set the itemdel to space
-- put item 4 of the internet date into tYear
-- set the itemDel to "/"
-- put tBaseURL & "/" into tBaseURL
-- put "copyright" && tYear & "," && item -1 of tBaseURL into gData["feedCRight"]
# GET DATA FROM MODEL
put fetchRecentPosts(rigFetchConfigItem("maxNumPosts", "feedjson")) into gData["itemsData"]
rigSetHeader "Last-Modified:" && sFJdateAndEtagA["LAST-MODIFIED"]
rigSetHeader "ETag:" && quote & sFJdateAndEtagA["ETag"] & quote
rigSetHeader "Content-Type: application/json"
end generateJSONfeed
command getClientHeaders
put rigGetHTTPheader("IF_MODIFIED_SINCE") into sFJclientHeadersA["IF_MODIFIED_SINCE"]
put rigGetHTTPheader("IF_NONE_MATCH") into sFJclientHeadersA["IF_NONE_MATCH"]
end getClientHeaders
command getFeedModDateAndEtag
put mostRecentModDate() into sFJdateAndEtagA["LAST-MODIFIED"]
put rigHexDigest(sFJdateAndEtagA["LAST-MODIFIED"]) into sFJdateAndEtagA["ETag"]
end getFeedModDateAndEtag
--| END OF feedjson.lc
--| Location: ./modules/feedjson/controllers/feedjson.lc
----------------------------------------------------------------------
\ No newline at end of file
<?lc
put "feedjsonHeaderLink" into gModuleHandlers
command feedjsonHeaderLink
# NEEDED TO GENERATE A FEED LINK
rigLoadPlugin "feedjsonlinkPi", "feedjson"
end feedjsonHeaderLink
--| END OF feedjsonHeaderLink.lc
--| Location: ./application/modules/feedjson/controllers/feedjsonHeaderLink.lc
----------------------------------------------------------------------
\ No newline at end of file
<?lc
put "feedjsoncontainer,feedjsoncontainerIndex" into gModuleHandlers
local sFeedJsonRerouted
# RUN THIS MODULE AS WIDGET TO DISPLAY THE JSON FEED USING <? get rigRunModule("feedjson/feedjsoncontainer") ?> IN YOUR VIEW FILE
# LIKE IN feedJsonModuleTestView.lc
# FOR PAGINATION ADD [[gData["ajaxPaginationCode"] ]] TO YOUR VIEW FILE PREFERABLY AT THE BOTTOM JUST BEFORE THE CLOSING BODY TAG
command feedjsoncontainer
rigLoaderLoadLibrary "Pagination"
rigLoadModel "feedjsonmodel", , "feedjson"
put "asset,html" into tHelpers
rigLoadHelper tHelpers
# NEEDED TO GENERATE A FEED LINK
rigLoadPlugin "feedjsonlinkPi", "feedjson"
# MAKE SURE YOU IMPLEMENTED A DATABASE GROUP "feedjson" IN YOUR database.lc CONFIG FILE! SEE modules/feedjson/config/config.lc
get rigLoadDatabase(rigFetchConfigItem("databaseGroupName", "feedjson"))
# CHECK ROUTING, NEEDED FOR PAGINATION
# SEE application/config/routes.lc, SET ROUTING THERE FOR "mynews" to "feedJsonModuleTest/index"
# LIKE: put "feedJsonModuleTest/index" into gRoute[2]["mynews"]
# SET ROUTING FOR "mynewsitem/(:any)" to "feedJsonModuleTest/newsItem/$1"
# LIKE: put "feedJsonModuleTest/newsItem/$1" into gRoute[2]["mynewsitem/(:any)"]
# SET ROUTING FOR "mynews/(:any)" to "feedJsonModuleTest/index/$1"
# LIKE: put "feedJsonModuleTest/index/$1" into gRoute[5]["mynews/(:any)"] -- needed for ajax requests
if rigFetchSegment(1) is rigFetchConfigItem("routedFeedURI", "feedjson") then -- "mynews"
put TRUE into sFeedJsonRerouted
else
put FALSE into sFeedJsonRerouted
end if
end feedjsoncontainer
command feedjsoncontainerIndex
# GET ASSETS URI FOR FULL PATH TO SVG FILES USED FOR DECORATION PURPOSES
put rigBaseURL() into gData["baseURL"]
put rigFetchConfigItem("assetsLocation") into tAssetsLoc
if tAssetsLoc is empty then
put "assets" into tAssetsLoc
end if
put gData["baseURL"] & tAssetsLoc & "/modules/feedjson/" into gData["assetsLoc"]
#
# GET FEED URI USED BY FEED READERS
put gData["baseURL"] & rigFetchConfigItem("feedHTMLlinkTag", "feedjson") into gData["feedjsonURL"]
# GET FEED DATA AND PAGINATION CODE
news
# LOAD THE VIEW FILE
get rigLoadView("feedjsoncontainerView")
end feedjsoncontainerIndex
command news
put rigFetchConfigItem("routedFeedURI", "feedjson") into tRoutedFeedURI -- "mynews"
# GET NEWS ID FROM URI
if sFeedJsonRerouted then
put rigFetchSegment(1) into tSegID
else
put rigFetchRsegment(3) into tSegID
end if
put rigXssClean(tSegID) into tSegID
# GET TOTAL NUMBER OF ROWS, NEEDED FOR PAGINATION SETTINGS
put rigDbCountAllResults("news") into tTotalNumRecords
# GET LIMIT OF NEWS PER PAGE, NEEDED FOR PAGINATION SETTINGS
put rigFetchConfigItem("newsLimit", "feedjson") into tLimit
if (tSegID is FALSE) or (tSegID is tRoutedFeedURI) then
## PAGINATION CONFIGURATION
put rigBaseURL() & tRoutedFeedURI into tConfig["baseUrl"]
put 2 into tConfig["uriSegment"]
put 200 into tConfig["totalRows"]
put 1 into tConfig["numLinks"]
put "<ul class=" & quote & "pagination" & quote && "id=" & quote & "newsPaginationList" & quote & ">" into tConfig["fullTagOpen"]
put "</ul>" into tConfig["fullTagClose"]
put "<span aria-hidden=" & quote & "true" & quote & ">&laquo;</span>" into tConfig["firstLink"]
put "<li>" into tConfig["firstTagOpen"]
put "</li>" into tConfig["firstTagClose"]
put "<span aria-hidden=" & quote & "true" & quote & ">&raquo;</span>" into tConfig["lastLink"]
put "<li>" into tConfig["lastTagOpen"]
put "</li>" into tConfig["lastTagClose"]
put "<span aria-hidden=" & quote & "true" & quote & ">&gt;</span>" into tConfig["nextLink"]
put "<li>" into tConfig["nextTagOpen"]
put "</li>" into tConfig["nextTagClose"]
put "<span aria-hidden=" & quote & "true" & quote & ">&lt;</span>" into tConfig["prevLink"]
put "<li>" into tConfig["prevTagOpen"]
put "</li>" into tConfig["prevTagClose"]
put "<li class=" & quote & "active" & quote & "><span class=" & quote & "disabled" & quote & ">" into tConfig["curTagOpen"]
put "</span></li>" into tConfig["curTagClose"]
put "<li>" into tConfig["numTagOpen"]
put "</li>" into tConfig["numTagClose"]
put tLimit into tConfig["perPage"]
# SET TOTAL ROWS CONFIGURATION
put tTotalNumRecords into tConfig["totalRows"]
# AJAX SETTINGS
put "newsPagination" into tConfig["linksElementID"]
put "newsItems" into tConfig["dataElementID"]
put TRUE into tConfig["ajax"]
##
rigInitializePagination tConfig
end if -- if (tSegID is FALSE) or (tSegID is "news") then
# GET QUERY OFFSET FROM URI
put rigFetchSegment(2) into tTemp
if (tTemp is an integer) and (tTemp > 0) and (tTemp < tTotalNumRecords) then
put tTemp into tOffset
else
put "" into tOffset
end if
# GET DATABASE QUERY RESULT DATA FROM MODEL - ALL DATA
-- put newsFetchAllData("news") into tQuery
# GET DATABASE QUERY RESULT DATA FROM MODEL
put newsFetchLimitData("news", tLimit, tOffset) into tQuery
# NEWS BODY
if tQuery <> FALSE then
put titleBodyData(tQuery) into gData["newsData"]
else
put "Currently no data available." into gData["newsData"]
end if
# GET PAGINATION
if (tSegID is FALSE) or (tSegID is tRoutedFeedURI) or (tSegID is "index") then
put rigCreatePaginationLinks() into gData["pagination"]
end if
# SEND JSON DATA TO BE PROCESSED BY AJAX PAGINATION SCRIPT TO BROWSER
rigAjaxPagination gData["newsData"], gData["pagination"]
# GET AJAX PAGINATION SCRIPT
# INCLUDE [[gData["ajaxPaginationCode"] ]] IN YOUR VIEW FILE WHICH RUNS THIS MODULE AS WIDGET
put rigAjaxPaginationCode() into gData["ajaxPaginationCode"]
end news