inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Dec 6, 2015 17:25:31 GMT -8
Todge , The ready events are pushed to an internal array (used to be readyList last I checked) and executed in the order they were pushed. Since your plugin contains inline code further down the page, it gets pushed after the other other plugin. You can test this by overriding the "ready" function to see the order of calls. Yup, but I've had this same issue with a couple of other plugins, Wormo's Colorsmear and Thread Title Images plugins to name 2.. Both only failed on the home page, and the only way I could get them to work was to hook into those plugins' functions from the within the Recent Threads plugin. Unfortunately I can't do that with with this plugin as the entire code is 'hidden' within a ready function, and so I can't hook into it. Also, the only way I could get those other codes to work with this one was to look for their functions with window.addEventListener("load", document.ready wouldn't cut it. That also allowed the plugins to co-operate no matter what order they are in. Like I said, it's because you have inline code. Moving the inline code to the JS component will solve the problem if plugins are in the correct order (i.e your plugin being above the image one). Hooking into other plugins or using onload to recall functions that have already run, isn't the best way to solve this.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Dec 7, 2015 15:41:40 GMT -8
Yup, but I've had this same issue with a couple of other plugins, Wormo's Colorsmear and Thread Title Images plugins to name 2.. Both only failed on the home page, and the only way I could get them to work was to hook into those plugins' functions from the within the Recent Threads plugin. Unfortunately I can't do that with with this plugin as the entire code is 'hidden' within a ready function, and so I can't hook into it. Also, the only way I could get those other codes to work with this one was to look for their functions with window.addEventListener("load", document.ready wouldn't cut it. That also allowed the plugins to co-operate no matter what order they are in. Like I said, it's because you have inline code. Moving the inline code to the JS component will solve the problem if plugins are in the correct order (i.e your plugin being above the image one). Hooking into other plugins or using onload to recall functions that have already run, isn't the best way to solve this. Okay... I have moved the code into the JS component, and it appears to have worked. But I don't understand that if the troublesome code was in the GLOBAL Footer, why would it only fail on the Main Page but work on every other page of the forum?
|
|
Former Member
inherit
guest@proboards.com
222576
0
May 17, 2024 22:51:08 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 13, 2015 15:46:06 GMT -8
im not to bothered about this one, but if you want to carry on then feel free, but i'm good without this thank you.
|
|