All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.

Author Topic: regarding the structure of your plugins  (Read 6983 times)

0 Members and 1 Guest are viewing this topic.

Offline ovizii

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
regarding the structure of your plugins
« on: 09 December 2008, 09:54 »
hi there.

I jsut wanted to ask a question: I am trying to use this plugin: http://wordpress.org/extend/plugins/footer-javascript/ but your plugin doesn’t comply. would you be interested in checking this article and maybe change your plugin slightly? http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin ?

Or am I understanding this wrong?
I am jsut fine tuning my blog, and thought that that plugin would be pretty good, by moving .js out of the header...

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: regarding the structure of your plugins
« Reply #1 on: 09 December 2008, 12:06 »
M plugin hooks JS to the header of WP and not footer, it is very difficult for me to change as I built it based on that. A lot of sites like Facebook are using Javascript in the header. It really doesn't matter.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline ovizii

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: regarding the structure of your plugins
« Reply #2 on: 09 December 2008, 12:17 »
thx for the explanation...

2 more questions though:

- would it make sense to use the method described here http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin to insert JS? Because if you would use that method the other plugin could relocate the script to the footer
- are you sure the position of the JS doesn't matter? There are a lot of "optimization tips" out there, asking people to move their JS to the footer... even the Y-Slow add on for firefox by yahoo suggests that :-(

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,692
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: regarding the structure of your plugins
« Reply #3 on: 09 December 2008, 13:58 »
If you relocate the thing at the bottom, any calls before the script is being called, will not work. You need to check based on document.load for EVERY function that is going to be called. It is a hassle to do it, I don't see how the benefit of the JS at the top will outweigh that by having that at the bottom.

The reason why people put the JS at the footer is because when the page loads, it will load the JS, during the loading process the page will "hang" at that part for a while, before the whole page loads. If you put it at the bottom, the "hang" appear at the bottom and not many people will notice it as the whole page has been loaded finished except for the JS. It is more of a cosmetic issue than a performance issue.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline ovizii

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: regarding the structure of your plugins
« Reply #4 on: 09 December 2008, 14:03 »
thx for explaining.

:-) thats enough for me...

cheers