Twitter Widget

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
7/20/2011 2:28:32 PM
Gravatar
Total Posts 2253

Twitter Widget

Hi Joe,

I found a way to tell mojoPortal to not generate style for the Twitter Widget.

We wanted to style this from CSS and us a background image on the twtr-profile-img-anchor link but mojo was adding two style blocks in the header that were using the elements' clientID to apply background and text colors with !important. It's rather difficult to write a selector to override selectors that are in the renedered HTML document, using the element client ID and have the !important parameter.

If I removed the color hex values from the widget settings, some default colors were used by mojoPortal. I placed a period in each of the color settings in the widget settings and it the style blocks were still generated, but they were empty. This allowed my style settings to work.

My question is, will you support this method or do you consider this a bug? If you consider this to be a bug, can you implement some type of option that will turn off mojoPortal creating the style block?

Thanks,
Joe D.

 

7/20/2011 3:11:16 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Twitter Widget

It looks like Joe implemented the Tweet button as JavaScript, but Twitter says that support for changing the look of the button requires use of the "Build Your Own" button as outlined on the Tweet button API page on Twitter. There's an example of styling a BYO type button at the bottom of the page.

Looks like you found a method to do it the hard way, Joe! laugh

7/21/2011 8:24:05 AM
Gravatar
Total Posts 18439

Re: Twitter Widget

I could be wrong but I think Joe is asking about the twitter profile or search widgets not the tweet this button.

Our feature is just generating script like the above linked page will generate based on the feature settings, so the colors are passed into the javascript.

Note that these features in mojoPortal are just a convenience, one could just as easily use the linked page above to generate the widget script and put it in an html feature instance and have full control over it and modify it as you wish. Seems like that would be easier than trying to override the functionality in mojoPortal.

Best,

Joe

7/21/2011 8:33:59 AM
Gravatar
Total Posts 18439

Re: Twitter Widget

Also, I think the mojoPortal features are adding a link to a twitter CSS file, it looks like the newer widget code doesn't need this, but I suspect it is the twitter javascript itself not mojoPortal that is adding a style block. I don't see anything in our code adding a style block.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.