Display photo, video, and emojis in tweets; support of Twitter extended tweet format.#5
Open
jlj wants to merge 4 commits intoryancramerdesign:masterfrom
Open
Display photo, video, and emojis in tweets; support of Twitter extended tweet format.#5jlj wants to merge 4 commits intoryancramerdesign:masterfrom
jlj wants to merge 4 commits intoryancramerdesign:masterfrom
Conversation
- line 125: removed unnecessary require `tmhOAuth/tmhUtilities.php`; - lines 165-175: if the communication with Twitter fails, fallback to the cache file, if it exists; - line 197: fix an exception in method `getIterator` if `getData` returns false; - line 250: make method `renderItem` public, so that it can be called from inside a `foreach ($t as $tweetItem)` loop - lines 323, 327: replaced the incorrect configuration input field name `cacheTime` by `cacheSeconds`, so that the cache duration configuration is taken into account.
… retweets; support of Twitter extended tweet format.
Added options:
- 'listItemDate': tweet date markup, containing a '{date}' placeholder; replaces 'listItemDateOpen' and 'listItemDateClose';
- 'listItemLink': tweet links markup, containing a '{href}' and a '{url}' (user visible url) placeholder; replaces 'listItemLinkOpen' and 'listItemLinkClose';
- 'listItemPhoto': tweet photo markup, containing a '{src}' and a '{title}' placeholder;
- 'listItemVideo': tweet video markup, containing a '{video_tag}' placeholder; this placeholder is be replaced by html5 video markup;
- 'listItemRetweetText': specific markup for retweets; can contain '{author_icon_url}', '{author}', and '{text}' placeholders ({text} is replaced by the content of the tweet, including eventual photo or video markup);
- 'videoAttributes': attributes of html5 video tags (e.g. "autoplay loop muted");
- 'preserveLineBreaks': if `true`, every line break in the tweet is replaced by a `<br>` tag; if `"coalesce"`, every group of consecutive line breaks is replaced by a single `<br>` tag; otherwise line breaks in the tweet are left unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Ryan,
This PR contains the fixes for a number of small problems I found when integrating MarkupTwitterFeed to my website.
Jean-Luc
tmhOAuth/tmhUtilities.php;getIteratorifgetDatareturns false;renderItempublic, so that it can be called from inside aforeach ($t as $tweetItem)loop.Example of use:
cacheTimebycacheSeconds, so that the cache duration configuration is taken into account.