Talk:Twitter Widget

From Hexten

Jump to: navigation, search

I can't figure out what a "UID" is. My Twitter login is "idschray" and when I use that I get an error that says the UID needs to be numeric. How do I find my numeric UID?

Ian Schray 22:47, 13 July 2007 (BST)

[edit] Also can't find UID

Same situation - I've looked through all of my settings in Twitter and can't find a numeric UID. Any help is much appreciated. Thanks.
Jlevine 20:07, 27 September 2007 (BST)

Where is my twitter id number?
Thank you to the person who made this widget! --Chriswaterguy 05:31, 10 April 2008 (BST)


[edit] URLs aren't clickable

Can this be fixed? Thanks! --Chriswaterguy 03:17, 7 May 2008 (UTC)

You can change twitter.js
function wxTwitterUpdate(obj, context) {
    var status = document.getElementById(context.name);
    var inner  = '';
    
    for (upd in obj) {
	var TwitText = obj[upd].text
	
	//check if a link is embedded in the text
	if (TwitText.indexOf("http://") > -1) {
		TwitText = wxTwitterLink(TwitText);
	} 
        inner += TwitText 
              +  ' <span style="color: gray">(' 
              + wxRelativeTime(Date.parse(obj[upd].created_at)) 
              + ')</span>';
    }

    status.innerHTML = inner;
}

function wxTwitterLink(myTwitter) {
	var strReturn = '';
	var str=myTwitter;

	//get location of the URL
	var sliceStart = str.indexOf("http://");

	//get URL part of the string
	var twitLink = (str.slice(sliceStart));

	//get first part of the string
	strReturn = str.substring(0,sliceStart);

	//add generated URL to return string 
	//target="blank" opens hyperlink in new windows, remove this if you don't want this
	strReturn += '<a href="' + twitLink + '" target="_blank">Link</a>';	

	//return generated string
	return strReturn;
}

[edit] Deprecated

See http://www.mediawiki.org/wiki/Extension:Widgets instead. --LRG 10:51, 20 November 2009 (GMT)

Personal tools
Mongers