Forums : Technical Issue Help

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.blackduck.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at info@openhub.net

Including badges as images instead of javascript ?

Hi,
Is it possible / allowed to include the badges on project websites as simple links instead of javascript ? (like: http://www.ohloh.net/projects/4693/badge.gif) ?
afaik javascript can slow down the speed in which a page is loaded (because browsers need to load and execute the javascript before the page is finally rendered) .. while images with the proper width/height would not slow down the load times at all...

any opinions on this topic ? maybe i'm totally wrong/paranoid with my assumptions tough ;)

thanks,
herbert

Herbert Poul almost 18 years ago
 

any opinions on this ? - or if javascript is really necessary - how about creating a function which would change the contents of a given DOM object - this way the < script ..> tag could be inserted at the end of the page but still display the badges/widgets anywhere on the page (my fear is that load times will get slower - because once the browser encounters a < script> tag it will load the script and continue parsing of the site afterwards.. ie. if the connection to ohloh.net is slow or down because of any reason, any website which includes the badge would need much longer to load)

-- edit - err .. whoops it seems html is allowed in posts.. destroyed the page a little ;)

Herbert Poul almost 18 years ago
 

Hi Herbert,

Sorry for the delay in responding to your initial question and thanks for asking a good question.

We wrap our badges in javascript primarily to ensure that they're wrapped in a link back to ohloh. We also get the benefit of being able to modify how we create the image; we're currently investigating using HTML rather than images for some type of project badges and it's nice to have the flexibility to switch from png to gif to html, etc., to optimize size and quality when needed.

As answer to your original question: We're okay with it if you create a simple link to our project badges and account widget. But we ask that you include a link back to ohloh, i.e. an tag that wraps the tag where the tag points to ohloh. And we might break the image, if we change the implementation of our badges.

Does that make sense? Let me know if you have any questions or concerns.

-Andy

Andy Verprauskus almost 18 years ago
 

thanks for your reply,
yes it makes perfect sense. and i think i will go with including the link + image (like the output of the JS) into my website for now ..

maybe you could create a version of your javascript badges which are included at the end of a page and then write their contents into a <div id=ohlohbadge></div> using document.getElementById(olohbadge).innerHTML = xxx; or similar. - this way the page loads as a whole even if ohloh.net requires some time to load

thx,
herbert

Herbert Poul almost 18 years ago
 

Hi Herbert,

Sounds like you had already solved this but just in case, I wanted to let you know that we've changed the widgets to be included by default as HTML. Check out your widget list for an example.

Thanks again for the feedback,
Andy

Andy Verprauskus almost 18 years ago