×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Couple issues. Page Break Option on comments and Emoticons not showing

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 4 days ago #14558

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Hey, what's up Daniel. Not sure you remember this thread here but my site is almost ready to go live. I wasn't satisfied with my page speed scores, so I uploaded a plug in called JCH Optimize. I drastically improved my scores but in the process I knocked out the custom.js changes from above, the alternating yellow and brown comment boxes. In the parameters of the JCH plug in, there is actually an option for excluding css or js files from the JCH changes, I put this file in the exclude js file box: /public_html/components/com_comment/joscomment/templates/magazineJoomla/js/custom.js. I also just tried magazineJoomla.js. Not of them worked. The js changes to the comments still not turning up.

Any help that you can give me would be greatly appreciated.

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 4 days ago #14559

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Ok, so I have been working on this all day, to no avail. I actually had the same problem with a couple other components. So I know it's something in the java files because that is where we placed the code to have alternating colored comment boxes. On top of that, when I go into the parameters of JCH and click NO to combining Java files, the comment boxes return back to normal. So while it was normal, I clicked on view source in IE to see all the js running on that particular page. Then my plan was to include the necessary js files in the "exclude javascript files box". That is how I rectified the problem with the other 2 components I had the same js probs with. So in the exclude box, I entered the following js files:

custom_js, javascript.js, caption_js, client_js, mootools_js, script_js

But it did not work this time. Comment boxes did not change back to normal. Am I missing anything?

Here is a link to the prob page:

www.njteachertalk.com/component/content/...-words-of-pres-obama

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 3 days ago #14560

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Eric,
Is there an option in JCH to place the new js file in the head of the page and not in the body?

Cheers,
Daniel

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 3 days ago #14561

  • Eric Grohs
  • Eric Grohs's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
There is first found JavaScript tag, last found JavaScript tag, & the bottom of page. I didn't even play with that because page speed told me to move all java script to bottom of the page. Anyways, I switched it to last found JavaScript tag, and all returned back to normal, without effecting page speed score. Thank you do much! What's the logic behind moving the js to last found tag instead of bottom of the page? Now I'm thinking that maybe I don't have to exclude all these js files. Maybe it's just a matter of have it set to last found js tag, and the other 2 components will work fine too. I'll test later. Thanks again!!

Couple issues. Page Break Option on comments and Emoticons not showing 13 years 2 days ago #14562

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Since you've locked your page I can not look at the source code, but here are my guesses.

the JCH plugin merges and minifies the files that are in the head of the page. It doesn't take in account the files/javascript that comes in the body.

For this reason, it takes all the js from the head and moves it to end of the body. But it doesn't move the js that is already in the body to the bottom. So the first thing the browser discover is our js. And since your mootools library is not in the head the line window.addEvent cannot be properly resolved...

First js tag means most probably - the first tag in the head. Last js tag means - last tag in the head.

And since you keep them in the head they are executed first and later on our script can use the mootools framework.

Cheers,
Daniel
  • Page:
  • 1
  • 2
Time to create page: 0.151 seconds