Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Widgets /

Discuss SilverStripe Widgets.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

TwitterWidgetPack - no hashtag displayed


Reply


3 Posts   1837 Views

Avatar
borriej

Community Member, 267 Posts

5 August 2010 at 12:27am

Hello,

Installed the TwitterWidgetPack into the CMS. Selected Profile widget. Saved. And it works.

BUT:
- When I hit the checkbox: 'display hashtag?' it doens't show the # or the word behind the hashtag.
- When I disable the checkbox, the result is the same.

Example:
- When i twitter #test, it won't display anything in the widget :( on my twitterpage it looks correct.

Any ideas?

Avatar
borriej

Community Member, 267 Posts

5 August 2010 at 1:33am

Ok i got an idea of the problem:

the correct wat to display a twitter widget (according to the twitter website) is:

<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 4,
interval: 6000,
width: 250,
height: 300,
theme: {
shell: {
background: '#333333',
color: '#ffffff'
},
tweets: {
background: '#000000',
color: '#ffffff',
links: '#4aed05'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'}}).render().setUser('usernameHere').start();
</script>

The ouput of the SS TwitterWidgetPack is:

<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
"version":2,"type":"profile","rpp":"10","interval":"600","width":"auto","height":"600","theme":{"shell":{"background":"#EAEAEA","color":"#000000"},"tweets":{"background":"#ffffff","color":"#000000","links":"#0099FF"}},"features":{"scrollbar":false,"loop":false,"live":false,"hashtags":false,"timestamp":true,"avatars":false,"behavior":"default"}}).render().setUser('usernameHere').start();
</script>

The php file with the code says:
   
function WidgetSetupJSON() {
      $settings = $this->WidgetSetup();
      return Convert::raw2json($settings);
   }

Question:
- Is there a way to convert an array to version = 2, instead of "version"= 2

thx

Avatar
MartinPhone

Community Member, 57 Posts

14 April 2011 at 4:07am

No, any text after a hashtag isn't displayed... Anyone know what's causing this?