Support Forum

  • Page:
  • 1

Remove time of Tweet?

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Is it possible to remove the time that the last Tweet was posted?
  • David's Avatar
  • David
  • JB Pro
  • 2 posts
  • Karma: 0
The administrator has disabled public write access.
Hi David,

It is possible to remove the time.

You'll need to edit some javascript code to do it.

In the folder
/modules/mod_jTweet/js/

Edit the file
jquery.tweet.js

on line 134, replace
list.append('<li>' + avatar + date + join + text + '</li>');

with
list.append('<li>' + avatar + join + text + '</li>');

Remember that the time is the link text to the actual twitter page. If you'd like aome other text to link back to twitter, let me know.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Thanks Jason. It worked perfectly and looks great.

If you don't mind, I would like them to be able to link back to the article/twitter. Can the text itself be the link?

DG
  • David's Avatar
  • David
  • JB Pro
  • 2 posts
  • Karma: 0
The administrator has disabled public write access.
Hi David,

The problem with the text being the link is that it often contains links within it to url's and search terms.

I'd suggest you choose some custom text like 'latest tweet' to be placed instead of the date that will link back.

Edit the same file.

Undo the last change you made to return it to the original.

Edit line 130:

var date = '<a href="twitter.com/'+item.from_user+'/statuses/'+item.id+'" title="view tweet on twitter">'+relative_time(item.created_at)+'</a>';

Replace the highlighted text with your custom text.
If you're displaying only one tweet then 'latest tweet' would be fine but if you're showing more than one tweet, you could just put your username there.
Ultimately it's your call :)

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers