Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

how to embed into 2.3.7 the motigo-counter


Go to End


5 Posts   2418 Views

Avatar
Jurgen12

Community Member, 4 Posts

7 July 2011 at 12:24am

Edited: 07/07/2011 12:28am

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

Avatar
Invader_Zim

Community Member, 141 Posts

7 July 2011 at 8:49am

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

Avatar
Jurgen12

Community Member, 4 Posts

7 July 2011 at 10:07am

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

Avatar
Jurgen12

Community Member, 4 Posts

8 July 2011 at 1:40am

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

Avatar
Invader_Zim

Community Member, 141 Posts

8 July 2011 at 2:21am

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