How do I embed javascript into article? - JoomlArt
Stable version is available for download More info
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • theprofessor Friend
    #139885

    Hello,

    I am trying to create an article, where I would like to embed a javascript code to display some player stats for a player profile page.

    For example, here is the code I want to embed:

    <script src=”http://www.hockeydb.com/em/?text_col=%23000000&linktext_col=%230000ee&linktext_hover_col=%23770000&bg_col=%23f0ecdd&border_col=%23000000&title_bg_col=%23d6cda5&row_bg_col=%23ffffff&row_alt_bg_col=%23f5f2e9&header=1&pid=108670″ type=”text/javascript”></script>

    Does anyone know how I can do this?

    Thanks for any help in advance! 🙂

    Phill Moderator
    #299803

    Download Jumi from here.

    http://jumi.vedeme.cz/

    theprofessor Friend
    #299924

    Hi Phill, thank-you. I checked the jumi extension out, read a lot of user reviews, read the support ducimentation, and installed the Jumi mod/plugin onto my Joomla site.

    I have fiddled around with it for a few hours now, but am having a trouble grasping the basics of what I need to do to accomplish what I want to accomplish.

    For example, the scrip I have (below) would show the player stats and is from a site called hockeydb.com. The stats would show on the page and automatically update daily.

    This is the script:
    <script src=”http://www.hockeydb.com/em/?text_col=%23000000&linktext_col=%230000ee&linktext_hover_col=%23770000&bg_col=%23f0ecdd&border_col=%23000000&title_bg_col=%23d6cda5&row_bg_col=%23ffffff&row_alt_bg_col=%23f5f2e9&header=1&pid=108670″ type=”text/javascript”></script>

    This is the page I want to embed it on (at the end of the article):
    http://www.sypfantasyhockey.com/index.php?option=com_content&view=article&id=95:nikitafilatov&catid=44&Itemid=83

    I understand you are not necessarily a Jumi expert, but if you are able to help me with the basics to start out.

    I read that all the scripts must be stored on my server somewhere, so I am assuming that the src code inside the above script is not enough to tell the plugin to show that source?

    Sorry for the dumb questions….any help is so very much appreciated. 🙂

    ShannonN Friend
    #299938

    theprofessor;122569Hi Phill, thank-you. I checked the jumi extension out, read a lot of user reviews, read the support ducimentation, and installed the Jumi mod/plugin onto my Joomla site.

    I have fiddled around with it for a few hours now, but am having a trouble grasping the basics of what I need to do to accomplish what I want to accomplish.

    For example, the scrip I have (below) would show the player stats and is from a site called hockeydb.com. The stats would show on the page and automatically update daily.

    This is the script:
    <script src=”http://www.hockeydb.com/em/?text_col=%23000000&linktext_col=%230000ee&linktext_hover_col=%23770000&bg_col=%23f0ecdd&border_col=%23000000&title_bg_col=%23d6cda5&row_bg_col=%23ffffff&row_alt_bg_col=%23f5f2e9&header=1&pid=108670″ type=”text/javascript”></script>

    This is the page I want to embed it on (at the end of the article):
    http://www.sypfantasyhockey.com/index.php?option=com_content&view=article&id=95:nikitafilatov&catid=44&Itemid=83

    I understand you are not necessarily a Jumi expert, but if you are able to help me with the basics to start out.

    I read that all the scripts must be stored on my server somewhere, so I am assuming that the src code inside the above script is not enough to tell the plugin to show that source?

    Sorry for the dumb questions….any help is so very much appreciated. 🙂

    just create a table inside the article body and insert the script into the table?

    ShannonN

    scotty Friend
    #299939

    Your default Joomla editor (tinyMCE) will strip <script> tags when you save the article unless you configure it not to.

    Go to Extensions>Plugins>editors>TinyMCE and on the right hand side set…
    Code Cleanup on Startup: Off
    Code cleanup on save: Never
    Do not clean HTML entities: Yes
    ….Save.

    Now go back to your article and click the ‘HTML’ button and paste in your script where you want it to appear. Save. And it should work fine.

    scotty Friend
    #299940

    Your script above does not work though 🙁

    theprofessor Friend
    #299942

    <em>@scotty 122586 wrote:</em><blockquote>Your default Joomla editor (tinyMCE) will strip <script> tags when you save the article unless you configure it not to.

    Go to Extensions>Plugins>editors>TinyMCE and on the right hand side set…
    Code Cleanup on Startup: Off
    Code cleanup on save: Never
    Do not clean HTML entities: Yes
    ….Save.

    Now go back to your article and click the ‘HTML’ button and paste in your script where you want it to appear. Save. And it should work fine.</blockquote>

    Scotty…this works beautifully! Thank you so much…I knew it was something simple…just that my mind is more simple, :p

    scotty Friend
    #299943

    Your welcome.

    Fits in nice with the page actually.

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 8 replies, has 4 voices, and was last updated by  scotty 7 years, 6 months ago.

You must be logged in to reply to this topic.