The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Javascript code management problem !!

View previous topic View next topic Go down

Javascript code management problem !!

Post by thundermat on July 6th 2011, 8:43 am

new update of javascript code management is not working !
i m using phpbb2 version & i hv got java script code !
it works if i put in home page message ! but it wont show on homepage if i put it in javascript code management !

need help !!! Sad


Last edited by thundermat on July 6th 2011, 5:12 pm; edited 1 time in total

thundermat
New Member

Male Posts : 18
Reputation : 0
Language : English

http://nlei.forumne.net/

Back to top Go down

Re: Javascript code management problem !!

Post by Vlajki on July 6th 2011, 1:10 pm

For members with a forum on PhpBB2 or PunBB version and with modified templates overall_header

You will need to update your own custom overall_header template by searching the code


<!-- BEGIN google_analytics_code -->


then adding this code before it:


{HOSTING_JS}

Vlajki
Forumember

Male Posts : 724
Reputation : 359
Language : Serbian & English
Location : Serbia

Back to top Go down

Re: Javascript code management problem !!

Post by thundermat on July 6th 2011, 2:42 pm

i hv done it already !
take a look !

Code:
.jcarousel-skin-tango .jcarousel-item-horizontal {
      margin-right: {switch_ticker.SPACING}px;
   }

   .jcarousel-skin-tango .jcarousel-item-vertical {
      margin-bottom: {switch_ticker.SPACING}px;
   }
   </style>
   <!-- END switch_ticker_new -->
   {HOSTING_JS}
   <!-- BEGIN google_analytics_code -->
   <script type="text/javascript">
   //<![CDATA[
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', '{G_ANALYTICS_ID}']);
    _gaq.push(['_trackPageview']);

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

but still i couldn't able to do it !

help me for this !

thundermat
New Member

Male Posts : 18
Reputation : 0
Language : English

http://nlei.forumne.net/

Back to top Go down

Re: Javascript code management problem !!

Post by SC__Programmer on July 6th 2011, 2:49 pm

im also having problems with it,i uploaded the same script from my forumotion site and my website,only the website one worked.

you'll have to wait till forumotion fixes it,or upload your scripts somewhere else.

SC__Programmer
Forumember

Male Posts : 58
Reputation : 40
Language : English

http://digitaldesigns.forumotion.co/

Back to top Go down

Re: Javascript code management problem !!

Post by hoodedwarbler12 on July 6th 2011, 3:21 pm

I'm having problems too, the script doesn't run unless I put it in script tags on an html page and make an iFrame to that page.

hoodedwarbler12
Forumember

Male Posts : 521
Reputation : 117
Language : English, Latin, HTML, JavaScript
Location : Tennessee, USA

http://www.webkinznation.com

Back to top Go down

Re: Javascript code management problem !!

Post by kirk on July 6th 2011, 3:40 pm

@thundermat wrote:new update of javascript code management is not working !
i m using phpbb2 version & i hv got java script code !
it works if i put in home page message ! but it wont show on homepage if i put it in javascript code management !

need help !!! Sad

thundermat.
Please changeyour topic title to something in relation to your inquiry or i will have to lock the topic.
helppppppppppppppppppppp plz !!!! in not an appropriate title and rather annoying


This is a new update so you may have to give it a lil time before it's 100% functional?
I am sure whatever the problems they are only small bugs and being worked out now.

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

Re: Javascript code management problem !!

Post by thundermat on July 6th 2011, 5:14 pm

hey , krik , dont mind it !!
i just did it cuz no one was replyin it !!
i hv changed it again !!

thundermat
New Member

Male Posts : 18
Reputation : 0
Language : English

http://nlei.forumne.net/

Back to top Go down

Re: Javascript code management problem !!

Post by Guest on July 6th 2011, 7:47 pm

The new javascript feature minifies scripts. That means the scripts must be well-formed (semicolons to end each line, etc). Very few scripts written before JSMin was introduced in late 2003 were written in this fashion. Unfortunately, much of what's available at places like DynamicDrive are in this category. Based on the scripts I've seen used around forumotion, I'd guess about half of them will not work with the new feature because they're old and/or poorly-formed.

The other problem is that this new feature is designed to have the scripts loaded inside the HEAD tag. Any script that requires being loaded inside the BODY tag will not work well (or at all!) with this feature. And again, I've seen quite a few that require being loaded inside the BODY tag (usually just before the /BODY closing tag). Most scripts like these can be re-written to work with this feature, but I suspect I can count on one hand the number of people on forumotion who could rewrite such a script.

So staff...get ready to field a lot of posts like these.

Guest
Guest


Back to top Go down

Re: Javascript code management problem !!

Post by thundermat on July 6th 2011, 7:50 pm

got it ! loul

However there are so many ways for that !

thundermat
New Member

Male Posts : 18
Reputation : 0
Language : English

http://nlei.forumne.net/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum