Commit c2665dce authored by Ralf Bitter's avatar Ralf Bitter

Merge branch 'release/1.0.1'

parents 0b6880dc 62975599
# revIgniter JSONfeed module (v. 1.0.0)
# revIgniter JSONfeed module (v. 1.0.1)
This module enables your revIgniter app to publish JSON feeds.
In case you never heard of JSON feed, it is a format similar
......@@ -100,6 +100,6 @@ For the license terms see the `LICENSE.txt` file.
### Meta
- Version: 1.0.0
- Version: 1.0.1
- Web Site: https://revigniter.com/
- Author: [Ralf Bitter](mailto:rabit@revigniter.com)
\ No newline at end of file
......@@ -212,9 +212,9 @@ end fetchRecentPosts
--| FUNCTION getItemsJSONdata
--|
--| Author: rabit
--| Version: 1.0
--| Version: 1.1
--| Created: 2018-04-21
--| Last Mod: 2018-04-21
--| Last Mod: 2018-08-25
--| Requires: rigDbRow(), rigSiteURL(), rigStripHTML()
--|
--| Summary: Get JSON feed data. Make sure all feed dates are UTC.
......@@ -252,8 +252,18 @@ function getItemsJSONdata pQuery
put rigStripHTML(tBody) into tSummary
# GET FIRST SENTENCE, BUT AT LEAST A MINIMUM NUMBER OF CHARACTERS AS DEFINED IN THE CONFIG FILE
put offset(".", tSummary, tMinNumChars) into tDotOffset
put byte 1 to (tMinNumChars + tDotOffset) of tSummary into tSummary
put offset(". ", tSummary, tMinNumChars) into tDotOffset
# MAY BE THERE IS NO SENTENCE TERMINATED WITH ". "
# SO, CHECK IF THERE IS A DOT MISSING A SPACE
if tDotOffset is 0 then
put offset(".", tSummary, tMinNumChars) into tDotOffset
end if
# IF tDotOffset IS STILL 0 ADD "..." AFTER THE SUMMARY
if tDotOffset is 0 then
put (byte 1 to tMinNumChars of tSummary) && "..." into tSummary
else
put byte 1 to (tMinNumChars + tDotOffset) of tSummary into tSummary
end if
put formatForFeed("summary", tSummary) after tItemsJSONdata
put rigHumanToTimestamp(tRowData["postdate"]) into tPostTimestamp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment