Can't add script in module?

Discussion in 'Joomla' started by rwilson30, Apr 6, 2010.

  1. #1
    I'm trying to insert a news feed into my site from an external site. The code for the feed is a java script.

    I've tried to create a custom html module and add it that way but it won't work? The script doesn't appear at all when i do it that way.

    Any suggestions on how I can add script to my page? My site is at: www.checkraise.com.au

    Any suggestions would be appreciated.
     
    rwilson30, Apr 6, 2010 IP
  2. PalladiumHosting

    PalladiumHosting Peon

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi, in order to insert javascript into a module you can use a plugin/module called Jumi.

    http://extensions.joomla.org/extensions/edition/custom-code-in-content/1023

    Once you install this you can add javascript just about anywhere. There are a couple ways to use it, both are very simple. The way I use most is create an html file with your javascript code in it. Save the file in your includes directory (or wherever you want) then it gets called with a small string (this method uses the plugin and works great for adding javascript items to content like articles). The jumi module lets you add code directly into the module parameters, then publish it wherever you like just like any other joomla module. Instead of creating a new custom module you create a new jumi module to do this.

    Wayne.
     
    PalladiumHosting, Apr 6, 2010 IP
  3. Blue Star Ent.

    Blue Star Ent. Well-Known Member

    Messages:
    1,989
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    160
    #3
    If you want to insert javascript and not have to install an external plugin :
    1. Log in as super administrator
    2. Create a new user that has the level of super administrator
    3. On the same page that you create the new user, choose "editor - no editor" for the new user
    4. Log out
    5. Log in as the new user you just created
    6. Insert the javascript in an html module
    7. Log out
    8. Enjoy
    :)
     
    Blue Star Ent., Apr 6, 2010 IP
  4. rwilson30

    rwilson30 Peon

    Messages:
    339
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks Palladium and BlueStar. Good news, I went in and disabled my editor. Then pasted the sciprt in as per usual and it worked! Bad news, now it won't load the site. Gives an "Operation Aborted" message when you try to load the page.
     
    rwilson30, Apr 6, 2010 IP
  5. Blue Star Ent.

    Blue Star Ent. Well-Known Member

    Messages:
    1,989
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    160
    #5
    I am assuming when you say : "my editor" you are talking about the one you have been using and did not create a new editor. If I remember right, that is not good enough. It must be a new user and that new user must have super administrator privileges and have "editor - no editor" chosen under their user profile.

     
    Blue Star Ent., Apr 6, 2010 IP
  6. rwilson30

    rwilson30 Peon

    Messages:
    339
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I've got a new editor installed (JCE).

    I went in with super admin rights, changed my editor to "editor-no editor" and it allowed me to add the script in a custom html module.

    Now the script is just causing the page not to load properly. So it's another problem altogether I'm assuming and I'm not sure why it's doing it
     
    rwilson30, Apr 6, 2010 IP
  7. RebelBetting

    RebelBetting Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #7
    Try this module, it works great:
    http://extensions.joomla.org/extensions/edition/custom-code-in-modules/5435
     
    RebelBetting, Apr 7, 2010 IP
  8. hotourism

    hotourism Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    you can disable editor and insert code in module and save & begin back to editor for joomla
     
    hotourism, Apr 23, 2010 IP
  9. Blue Star Ent.

    Blue Star Ent. Well-Known Member

    Messages:
    1,989
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    160
    #9
    If taking the script out makes the site work fine again, you are fairly sure what the problem is.
    If the same problem happens when you re-install, then you are 100% sure that the script is
    having a problem or is interacting with other scripts in a way you do not want it to.

     
    Blue Star Ent., Apr 24, 2010 IP