using a custom javascript code in joomla - joomla

I've been asked to write a custom javascript to create a tooltip. I've done this and the code works on my localhost and on my own online webhost but it refuses to work in joomla 2.5. I've heard this could be caused by the moo tools pluggin that comes with joomla itself? what plug in should I install to make my javascript work? I checked the code and it works all around. I apologize if this is an inappropriate question.
edit: The problem is it just won't run the code at all. it doesn't apply the CSS. which is loaded from another file, though it does apply the style for the rest of the site. When there's suppose to be a custom css for the title attribute in a img tag I just get a regular text window

Related

Migrating "bootstrap-touch-slider.js" to joomla

Hi I am migrating my html bootstrap site to joomla 3. So far things are looking good. I am using the bootstrap touch slider in my html version which works fine and I am stuck how to move it to Joomla. Is there any way to do this or do I need to use/buy a slider module extension?THANK YOU!
The best thing is to create your own module and embed slider js in, otherwise you can try to modify the present one. In both cases if you have never done one before you is suit buy the extension you found.

Opening a bar on top of the page with firefox sdk

I am making a firefox pluggin and I want to open a "topbar" on a few websites. Realy, it would be a few informations about the curent page a link back to my own website. What would be te best way to do that ?
My first idea was to use content script, but that seems to be a very bad practice. I also read about panels, here are my questions :
How can I add my pannel just under the adressbar ?
How can I only open in it on the website I need ?
thx.
Using content script is completely fine.
It is modern, simple, less-code, more compatible way
to add top-panel to some web pages.
Also, code of content script is not injected to the web page, it just uses the dom and context; page script has no access (if you do not provide it explicit) to content script.
The only possible disadvantage is that panel would not look like native part of the browser.
If I convienced you to use content script:
The module you really need in your plugin page-mod
Using Add-on Builder you make have your plugin in a day

Twitter Bootstrap navbar only toggles once when logged in

I am building a site in Joomla (unfortunately) for a client. I have installed a template that uses Bootstrap as its basis, with some integration with Joomla, called H5BPTB. The problem I'm having is that when I visit the homepage on a small screen, and toggle the responsive navbar, it works fine, however after logging in, the navbar will open once, then close, but then no longer responds unless I refresh the page.
I read a few references elsewhere on stackoverflow to this being a problem with missing CSS transitions in the .collapse class in Bootstrap CSS. I checked and they are not missing. I also read another answer that suggested that it was a problem with some other Javascript overriding support.transition in the Bootstrap JS. I also can't find a reference to that in any other JS file. Is there anything else this could be?
Also I should add that the navbar works perfectly well in IE, but not in Firefox or Chrome.
Here is the site: http://avantgardeinternational.eu
I'd recommend just trying to update your Bootstrap files in the theme. They're both on version 2.1.1 and as far as I've seen looking around some people have had similar problems with earlier Bootstrap version.
The files you're looking to change are:
http://avantgardeinternational.eu/templates/h5bptb/css/bootstrap.min.css
http://avantgardeinternational.eu/templates/h5bptb/css/bootstrap-responsive.min.css
http://avantgardeinternational.eu/templates/h5bptb/js/libs/bootstrap/bootstrap.min.js
If that doesn't work, I'd try just looking around and making sure that some scripts aren't conflicting, that could just mean disabling all but the Bootstrap JS. Then seeing if it works fine.
http://twitter.github.com/bootstrap/
Edit: Just attempted this, changing the CSS messed with the styles a bit, and it still didn't work. I don't think it loaded the JS into the page properly though, I'll try that now...
Edit 2: So after giving this a shot, I've concluded there is only one explanation now... I've observed the difference between the page when you're logged in and logged out. When you log in there are various other bits of JS that load into the page.
One of these must be overriding Bootstraps collapse methods, thus stopping it from working. There are a few extra scripts that load when you're logged in and some more styles. It might be working trying to remove these and then trying it again.

Widget kit not working for joomla 1. 7

I have a joomla 1. 7 website and I have installed a widget kit for displaying a slider with buttons on it. It works fine in the backend, however it does not display on the site.
Is there a reason why widget kit is not compatible with Joomla 1. 7?
Without any details at all, I'd suggest a possible conflict with you chosen joomla template and javascript library(s) like jquery or mootools.
Try one of the simple templates that came with your joomla installation and see if the problem on the front end persists.
Widget Kit is compatible with Joomla 1.7, however as Grag P said, it might possibly be a conflict with another extension using Jquery.
Use Firebug and look at the scripts being loaded in the <head> tags and see if there are 2 Jquery libraries being loaded.
If so then the 2nd one is most likely coming from your template in which case go to your template manager and see if there is an option to turn off Jquery, else if its coming from another extension, try disabling it and seeing if this solves the problem.
Also make sure you have the most up-to-date version of widget kit as Yootheme have brought out a lot of updates in the last 2 months.

SharePoint 2007 RichHtmlField has inline style that is causing issues in ie8

I am working on an intranet project that is having the majority of its users move up to ie8 soon. A bug was detected where when attempting to create/edit a page, the rich html editor boxes would be squeezed compared to what they look like in any other browser.
I found the offending style, its inline and its:
style="display:inline-block"
Now if it was just "inline" then it would be fine. However, it is not.
I have attempted to override the PrefixStyleSheet attribute in the master page and have a custom style in the main css file, but it is not working at all.
I have heard that a control adapter might be helpful to post process the html but i am unsure on how to use one.
Is there any advice you guys can give me?
From my experience, using JQuery "hacks" in the master page header is the most convenient approach, without messing up the system css or the backend.
Find the element you want to override the style to a custom style, and assign your custom style. Be careful if the override is page layout specific, then might add to the page layout header placeholder instead.
http://api.jquery.com/css/
Hope it helps.

Resources