diff options
Diffstat (limited to 'views/default/widgets/identica/content.php')
-rw-r--r-- | views/default/widgets/identica/content.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/views/default/widgets/identica/content.php b/views/default/widgets/identica/content.php new file mode 100644 index 000000000..9209e01a6 --- /dev/null +++ b/views/default/widgets/identica/content.php @@ -0,0 +1,33 @@ +<?php + +/** + * Elgg identi.ca view page + * + * @package ElggIdentica + */ + +//some required params + +$username = $vars['entity']->identica_username; +$num = $vars['entity']->identica_num; +$id = md5($vars['entity']->identica_username.rand(0, 99999)); + +// if the identi.ca username is empty, then do not show +if ($username) { + +?> + +<div id="identica_widget"> + <ul id="identica_update_list"></ul> + <p class="visit_identica"><a href="http://identi.ca/<?php echo $username; ?>"><?php echo elgg_echo("identica:visit"); ?></a></p> + <script type="text/javascript" src="<?php echo $vars['url']; ?>mod/identica/views/default/identica/identi.ca.js.php?id=<?php echo $id ?>"></script> + + <script type="text/javascript" src="https://identi.ca/api/statuses/user_timeline/<?php echo $username; ?>.json?callback=identicaCallback&count=<?php echo $num; ?>"></script> +</div> + +<?php +} else { + + echo "<p>" . elgg_echo("identica:notset") . ".</p>"; + +} |