Twitter Customize Your Profile Widget & e107

e107 CMS » Forums » Miscellaneous » Code << Previous thread | Next thread >>
DaSped
Jul 15 2010, 05:49AM
Registered Member #43785
Joined: Mar 09 2008, 07:16AM
Posts: 132
Hi all,

Please forgive me if this subject has already been addressed, if it has not then perhaps there is no one so foolish as myself when it comes to scripts.

I have been trying to implement Twitter's own Customize Your Profile Widget into a menu on one of my e107 sites for a while now and after doing some trouble shooting via google etc Im still at a loss in the fact I have no idea why it simply refuses to work in any e107 menu I try to create. for the record (wysiwyg = Off)

[-link-]

On some forums people have had similar issues and some have found fix's by tweaking the odd bit of code, is this something that could/can be done for e107 as I have tried every fix I've come across to no avail.

Thanks to anyone who can shed some light on the matter for me.
[ Edited Jul 15 2010, 05:53AM ]
Go to top
septor
Jul 15 2010, 02:36PM
  • e107 Site administrator
  • e107 Security Team
  • e107 Support Team
  • e107 Documentation Team
Registered Member #37
Joined: Aug 11 2002, 03:20AM
Location: United States
Posts: 2659
What exactly does the Widget do?

Without that information I would suggest making a menu item outside of the custom page/menu screen.

Edit: Nevermind I think I see what it does. Let me mess around and see if I can get it working.


Edit 462 (or 2):

Edit your username and save this as twitter_menu.php inside e107_plugins/twitter_menu/:

<?php

if (!defined('e107_INIT')) { exit; }

$text = "<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('yourtwitterusername').start();
</script>";

$ns->tablerender("Twitter", $text, 'twitter');

?>


Then you just need to activate the menu with Admin -> Menus
[ Edited Jul 15 2010, 02:46PM ]
Go to top
Website
DaSped
Jul 15 2010, 06:28PM
Registered Member #43785
Joined: Mar 09 2008, 07:16AM
Posts: 132
Now there is a classic example of how and why the e107 community kicks ass.

In this day and age (stop yawning - I know, I know) but true community spirit is really hard to come by.

septor not only has your answer bailed me out of a whirlpool of why wont it & why can't I's, it has showed me a brand new method of how to attack things from a completley new angle.

Very much appreciate the time you gave this.

Thank-you.
Go to top
septor
Jul 15 2010, 07:05PM
  • e107 Site administrator
  • e107 Security Team
  • e107 Support Team
  • e107 Documentation Team
Registered Member #37
Joined: Aug 11 2002, 03:20AM
Location: United States
Posts: 2659
When it comes to stuff like this it's best to write the menu item yourself and not rely on the custom page/menu function in the admin area as it's sort of limited in what it can do.

Once the wiki is back online there's a lot of useful information on plugin (menu) writing that will allow you to further expand your website.
Go to top
Website
BullDog_17
Feb 19 2011, 05:19AM
Registered Member #48311
Joined: Nov 14 2008, 08:15AM
Posts: 1
Nice one Sped, many thanks to septor this has just solved my problem too! long live the e107 community.
Go to top
Matt Conlon
Jun 22 2012, 10:09AM
Registered Member #27426
Joined: May 11 2006, 11:43AM
Location: USA
Posts: 197
I agree, you people rule. This is pissah, as they say here in New England.
Go to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System