Module - Twitter - About
This is a module page, used for CSI modules. view source
This code:
<script src="http://widgets.twimg.com/j/2/widget.js"></script> <script> new TWTR.Widget({ version: 2, type: 'profile', rpp: LIMIT, interval: INTERVAL000, width: WIDTH, height: HEIGHT, theme: { shell: { background: '#SHELL-BACKGROUND', color: '#SHELL-COLOR' }, tweets: { background: '#TWEET-BACKGROUND', color: '#TWEET-COLOR', links: '#TWEET-LINKS' } }, features: { scrollbar: SCROLLBAR, loop: LOOP, live: POLL, hashtags: HASHTAGS, timestamp: TIMESTAMP, avatars: AVATARS, behavior: 'BEHAVIOUR' } }).render().setUser('USER').start(); </script>
Became this:
:leiger:module:twitter-backend
[[embed]]
@iframe class="" style="" frameborder="0" width="100%" height="{$height}px" align="" scrolling="no" src="http://snippets.wdfiles.com/local--code/code:iframe-embed#%3Cscript%20src%3D%22http%3A//widgets.twimg.com/j/2/widget.js%22%3E%3C/script%3E%20%3Cscript%3E%20new%20TWTR.Widget%28%7B%20%20%20version%3A%202%2C%20%20%20type%3A%20%27profile%27%2C%20%20%20rpp%3A%20{$limit}%2C%20%20%20interval%3A%20{$interval}000%2C%20%20%20width%3A%20{$width}%2C%20%20%20height%3A%20{$height}%2C%20%20%20theme%3A%20%7B%20%20%20%20%20shell%3A%20%7B%20%20%20%20%20%20%20background%3A%20%27%23{$shell-background}%27%2C%20%20%20%20%20%20%20color%3A%20%27%23{$shell-color}%27%20%20%20%20%20%7D%2C%20%20%20%20%20tweets%3A%20%7B%20%20%20%20%20%20%20background%3A%20%27%23{$tweet-background}%27%2C%20%20%20%20%20%20%20color%3A%20%27%23{$tweet-color}%27%2C%20%20%20%20%20%20%20links%3A%20%27%23{$tweet-links}%27%20%20%20%20%20%7D%20%20%20%7D%2C%20%20%20features%3A%20%7B%20%20%20%20%20scrollbar%3A%20{$scrollbar}%2C%20%20%20%20%20loop%3A%20{$loop}%2C%20%20%20%20%20live%3A%20{$poll}%2C%20%20%20%20%20hashtags%3A%20{$hashtags}%2C%20%20%20%20%20timestamp%3A%20{$timestamp}%2C%20%20%20%20%20avatars%3A%20{$avatars}%2C%20%20%20%20%20behavior%3A%20%27{$behavior}%27%20%20%20%7D%20%7D%29.render%28%29.setUser%28%27{$user}%27%29.start%28%29%3B%20%3C/script%3E"></[email protected]
[[/embed]]
:leiger:module:twitter
[[include :leiger:module:twitter-backend
|user={$user} |user=wikidot
|limit={$limit} |limit=4
|poll={$live} |poll=false
|width={$width} |width=250
|height={$height} |height=300
|shell-background={$shell-background} |shell-background=333333
|shell-color={$shell-color} |shell-color=ffffff
|tweet-background={$tweet-background} |tweet-background=000000
|tweet-color={$tweet-color} |tweet-color=ffffff
|tweet-links={$tweet-links} |tweet-links=4aed05
|scrollbar={$scrollbar} |scrollbar=false
|hashtags={$hashtags} |hashtags=true
|timestamp={$timestamp} |timestamp=true
|avatars={$avatars} |avatars=false
|behavior={$behavior} |behavior=all
|loop={$loop} |loop=true <— undocumented, applies only when behavior=default
|interval={$interval} |interval=6 <— undocumented, applies only when behavior=default
]]
Documentation
Twitter module
This is the documentation for the Twitter module, created by Shane Smith (leiger), and adapted from the official Twitter module found at http://twitter.com/goodies/widget_profile
The module is added to your page as shown below:
[[include :leiger:module:twitter ]]
If you would like to replace any of the default values, you can specify that line. Here is an example where all values are re-specified exactly as what their default values are:
Attributes
Attribute | Options | Default | Description |
---|---|---|---|
user | Any valid twitter username | wikidot | Twitter username |
limit | Any positive integer | 4 | The number of tweets that should be shown at any one time |
poll | true, false | false | Sets whether the widget should poll for new results |
width | Any positive integer | 250 | The width in pixels of the widget |
height | Any positive integer | 300 | The height in pixels of the widget |
shell-background | Any valid hex colour representation | grey(333333) | The background colour of the widget |
shell-color | Any valid hex colour representation | white(ffffff) | The text colour of the widget |
tweet-background | Any valid hex colour representation | black(000000) | The background colour of the tweets |
tweet-color | Any valid hex colour representation | white(ffffff) | The text colour of the tweets |
tweet-links | Any valid hex colour representation | green(4aed05) | The text colour of links in the tweets |
scrollbar | true, false | false | Include a scrollbar when the number of tweets doesn't fit in the height you've specified? |
hashtags | true, false | true | Show hashtags? Selecting 'false' hides all words beginning with the # character |
timestamp | true, false | true | Show timestamps? Selecting 'false' hides the "2 days ago" text |
avatars | true, false | false | Show avatars? Selecting 'true' shows a small avatar next to every tweet. An avatar is always shown at the top of the widget regardless of this setting. |
behavior | default, all | all | Default (timed) interval: The widget will loop through every 6 seconds All: The widget will load all tweets immediately |