Java Script

guz843's picture

guz843
October 27, 2010
6:55am

Im trying to ge this java script to display in my site

i referred to and did this:

http://www.drupalgardens.com/documentation/adding-custom-javascript

 

But my site is not displaying the code correctly:

<script type="text/javascript">var CollectaWidget = {"path":"http://widget.collecta.com/widget.html?query=easyrider%20language%3Aen&alias=Biker%20Culture&delay=2", "width":"250px", "height":"400px"};</script><script type="text/javascript" src="http://widget.collecta.com/collectawidget.js"></script>

 

it is in the a sidebar on front page???

Status: Resolved

Comments

Alex Jarvis October 27, 2010
8:24am

Hi guz843,

The reason the script wasn't working is because you pasted the widget in when the block was set to a Wysiwyg-enabled text format, which then got changed to your raw input format. That would have been fine except that when you pasted into the Wysiwyg-enabled text box it turned all of your script's special characters to their HTML entities equivalents (< becomes &lt; for example). It would be better to change the input format first and then paste the javascript.

I fixed the problem for you and the widget is now working as expected.

---
Alex Jarvis
Gardens Advisory Team

guz843 October 27, 2010
2:48pm

i got you

is there a way to change the text color on that age so the news shows up against the dark background?

Alex Jarvis October 27, 2010
5:03pm

Unfortunately the widget includes its own CSS, which gets loaded after Garden's own CSS theming. As such you'd have to work with them to see if you can somehow change the styling that comes with the widget.

---
Alex Jarvis
Gardens Advisory Team

guz843 October 27, 2010
6:25pm

here is the widget location

 

http://widget.collecta.com/

http://widget.collecta.com/example_basic_widget.css

if you select advanced it references and external stylesheet.  can this help?

Alex Jarvis October 28, 2010
10:40am

guz843,

I took a look at your widget and the CSS it needed. I created a new content type on your site (Widget Includes) that could hold a CSS file (since the widget needs a URL to an already existing CSS file), uploaded a CSS file that would work with your current theme (attached to node/187) and updated the widget to use that file. It looks OK.

Just a note, the CSS for the widget is styled to match your current theme. If you change the theme or want to make other changes to the CSS you'll have to do so yourself. 

---
Alex Jarvis
Gardens Advisory Team

This topic has been closed to further comments.

Feedback