Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » how to embed into 2.3.7 the motigo-counter

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 982 Views
  • Jurgen12
    Avatar
    Community Member
    4 Posts

    how to embed into 2.3.7 the motigo-counter Link to this post

    Hello dear users,
    could any of you help me ?
    A PC-friend wrote:

    "Sorry that I cannot be of more help since I'm limited to the demo version. It might be worth asking on the Silver Stripe forums if there are any new work arounds for inserting javascript"

    How ca I get m´s counter work with http://www.familiehoffmann.com.ar/newSite/

    Regards
    Jurgen

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: how to embed into 2.3.7 the motigo-counter Link to this post

    Hi.

    Is the code something like that code shown in the example here: http://motigo.com/tutorials/webstats#3?

    You could copy your version of the tracking code and paste it before the </body> tag into your
    yourSite/themes/yourTheme/templates/Page.ss file.

    Cheers
    Christian

  • Jurgen12
    Avatar
    Community Member
    4 Posts

    Re: how to embed into 2.3.7 the motigo-counter Link to this post

    Hello Christian,
    thanks a lot for your help.
    The code is:
    ***********************************************
    <!-- Begin Motigo Webstats counter code -->
    <a id="mws4851345" href="http://webstats.motigo.com/">
    <img width="80" height="15" border="0" alt="Free counter and web stats" src="http://m1.webstats.motigo.com/n80x15.gif?id=AEoGkQo2sGydj69NZzD58zegAsdg" /></a>
    <script src="http://m1.webstats.motigo.com/c.js?id=4851345&amp;lang=EN&amp;i=27" type="text/javascript"></script>
    <!-- End Motigo Webstats counter code -->
    **********************************************
    I will try out your suggestion tomorrow (i.e. following the tutorial
    & using FrontPage ) Hopefully, the javascript part won´t be deleted
    when saving the admin page.
    Regards
    Jurgen

  • Jurgen12
    Avatar
    Community Member
    4 Posts

    Re: how to embed into 2.3.7 the motigo-counter Link to this post

    Hello Christian,
    it doesn´t work.
    I´m the Admin of the CMS -without access to the source code.
    (on clicking the html-button of the CMS I don´t seem to get to the source)
    So, I will have to contact my cousin who´s hosting our website.
    Regards
    Jurgen

    PS a friend mailed:
    *********************
    I've taken a look at the SilverStripe online demo and it looks like even though they
    do allow HTML input for pages,
    any javascript is automatically stripped out when you save the page.
    Apparently this is a new change and it used to be possible to get around it
    However there is some hope.
    If you are running the instance of Silver Stripe yourself you might be able
    to turn that filtering off, or can try to edit the footer file to include the javascript
    To get this to work you would need to download the full source code for your
    counter and chop up the file and paste into both the page and the footer.
    It's not going to be easy i'm afraid, but it is probably possible.

    *********************
    Is that true ?
    Regards
    Jurgen

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: how to embed into 2.3.7 the motigo-counter Link to this post

    Hi Jurgen.

    Yes, you'll need access to the source code to edit your Page.ss (or footer file),
    and insert your tracking code there.

    I've seen some threads here about inserting JavaScript into the backend's TinyMce editor (and the script being stripped).
    But I can't remember if there was a solution to that.
    Also, you could look directly on the TinyMce-forums...

    Personaly, I think it's a feature!

    Cheers and good luck,
    Christian

    982 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.