• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

The jQuery Initiative [Deleted]

Status
Not open for further replies.

cclaerhout

Well-known member
#1
cclaerhout submitted a new resource:

The jQuery Initiative (version 0.1) - Project to port the last version of jQuery to XenForo - ONLY FOR DEVELOPERS

The jQuery Initiative

ONLY FOR DEVELOPERS
I hope this should be enough big, bold & red

-Concept-
XenForo is using a very old version of jQuery (1.5.2). The last version is the 1.8.3. There are major changes between two versions. All XenForo and External Javascript files have been made for 1.5.2. So, it's not going to be easy...
Read more about this resource...
 

cclaerhout

Well-known member
#2
DATA() function problem with HTML5 data tags:

References:
http://www.webmonkey.com/2011/05/jquery-update-improves-html5-data-tools/
http://api.jquery.com/data/

Solutions
  1. Find all html5 data fields in templates and rename them adding a "-" before any upper case letters (those ones can be also converted into lower case letters)
  2. Find all jquery ".data()" commands in XenForo javascript files - but only those getting information from the html5 data fields (based on results found inside XenForo templates, a list of them is available in a below regex) - and then converting the upper case letters to lower case letters
  3. Use a php patch to emulate the first solution
Addon solution: 3

Information for developers:How to replace with solution 1 & 2?

Solution 1
Modify the templates.xml file with any editor with regex support

Search regex:
Code:
data-\w+?[A-Z].+?(?==)
Solution 2
Modify all files of the XenForo Javascript directory {forums}/js/xenforo/
Searches can be done with for example the software Aba search & replace (www.abareplace.com) - support regex (free for 30 days)
Replacements will have to be done manually with any editor with regex support

Search regex (based on html5 the 'data fields' containing one or several upper-case letters found in templates):
Code:
\.data\('(defaultBackground|fieldValidatorUrl|overlayClass|maxWidth|allowDefault|testUrl|testSrc|testImg|testErr|fieldValidatorUrl|userInputField|userInputField|fieldValidatorUrl|statusEditorCounter|fieldValidatorUrl|fieldValidatorUrl|fieldValidatorUrl|optInOut|previewUrl|attachmentId|overlayClass|cacheOverlay|publicKey|previewUrl|liveTitleTemplate|liveTitleTemplate|defaultBackground|overlayOptions|messageSelector|cacheOverlay|previewUrl|previewUrl|cookieName|imodOptions|overlayOptions|overlayOptions|loginPhrase|signupPhrase|overlayClass|overlayClass|loginPhrase|signupPhrase|overlayClass|autoSubmit|jsonUrl|userId|userId|optInOut|statusEditorCounter|cookieName|imodOptions|loadUrl|loadUrl|loadUrl|loadUrl|cacheOverlay|optInOut|statusEditorCounter|contentSrc|contentDest|contentSrc|contentDest|removeCounter|oldestItemId|previewUrl|previewUrl|previewUrl|previewUrl|previewUrl|overlayOptions|messageSelector|cacheOverlay|postUrl|messageSelector|previewUrl|cacheOverlay|commentArea|loadParams|loadParams|messageSelector|optInOut|fieldValidatorUrl|OptInOut|normalSubmit|fieldValidatorUrl|normalSubmit|optInOut|optInOut|optInOut|overlayClass|previewUrl|liveTitleTemplate|liveTitleTemplate|cookieName|imodOptions|previewUrl|submitUrl|liveTitleTemplate|previewUrl|messageSelector|cookieName|cacheOverlay|cookieName|imodOptions)
 
#6
Not to be like that but shouldn't you run this by the XenDevs first?

I mean since they said they have been working on updates maybe this "issue" already has been fixed and we just wasting precious time? I'm just not really into doing work that doesn't have to be done ^^
 

cclaerhout

Well-known member
#7
Not to be like that but shouldn't you run this by the XenDevs first?

I mean since they said they have been working on updates maybe this "issue" already has been fixed and we just wasting precious time? I'm just not really into doing work that doesn't have to be done ^^
  1. As I said, many XenForo Javascript functions are depending on jQuery commands that have been modified (especially with jQuery 1.6). Even if KAM will fix their script better than anyone else, debugging is debugging: it's long, it's boring, it requires a lot of time to get information (especially with such a gap between jQuery versions). So I do think it can help to targets problems and make XenForo developers solve them quicker. Some people would prefer to complain that things are not being done, others will try to help for these things to be done.
  2. Some addons here have been structured around jQuery 1.5 as well. So understanding which changes must be done to update the code can also be helpful for addons developers
  3. We know nothing about the XenForo development, so better to start somewhere than doing nothing
For the information, I started this addon to check if the problems with XenForo & Chrome was coming from outdated version of external scripts. It doesn't seem to come from here. This information might help to find where the problem comes from (if it's not from Chrome...).
 
#8
  1. As I said, many XenForo Javascript functions are depending on jQuery commands that have been modified (especially with jQuery 1.6). Even if KAM will fix their script better than anyone else, debugging is debugging: it's long, it's boring, it requires a lot of time to get information (especially with such a gap between jQuery versions). So I do think it can help to targets problems and make XenForo developers solve them quicker. Some people would prefer to complain that things are not being done, others will try to help for these things to be done.
  2. Some addons here have been structured around jQuery 1.5 as well. So understanding which changes must be done to update the code can also be helpful for addons developers
  3. We know nothing about the XenForo development, so better to start somewhere than doing nothing
For the information, I started this addon to check if the problems with XenForo & Chrome was coming from outdated version of external scripts. It doesn't seem to come from here. This information might help to find where the problem comes from (if it's not from Chrome...).
Alright, I might of heard wrong.

It's nice that someone finds the time to help, keep up the good work. I might tip in later on if I find the time :)
 

Rho Delta

Well-known member
#10
  1. As I said, many XenForo Javascript functions are depending on jQuery commands that have been modified (especially with jQuery 1.6). Even if KAM will fix their script better than anyone else, debugging is debugging: it's long, it's boring, it requires a lot of time to get information (especially with such a gap between jQuery versions). So I do think it can help to targets problems and make XenForo developers solve them quicker. Some people would prefer to complain that things are not being done, others will try to help for these things to be done.
  2. Some addons here have been structured around jQuery 1.5 as well. So understanding which changes must be done to update the code can also be helpful for addons developers
  3. We know nothing about the XenForo development, so better to start somewhere than doing nothing
For the information, I started this addon to check if the problems with XenForo & Chrome was coming from outdated version of external scripts. It doesn't seem to come from here. This information might help to find where the problem comes from (if it's not from Chrome...).
At worst, if they do the same thing, you learn more about the way XF works and can use those skills to integrate other 3rd party features!
 
Status
Not open for further replies.