inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Dec 14, 2015 8:04:32 GMT -8
So, on my current project, I've tried to use my own host to host JScode and for whatever reason, the external hosting won't initiate the JS and I have to hard code it on the page between script tags or upload it to a free host to do it. The forum is hogwartsexp.boards.netWhen I link externally its izimmbi.com/javascript/staff.js It's one example, i tried hosting the snow JS code there too and linking to it in the <head> but it wouldn't work so I used a free host to upload the file.
|
|
#eb7100
1480
0
1
May 17, 2024 3:03:32 GMT -8
Craig
208,892
September 2001
cmdynasty
|
Post by Craig on Dec 14, 2015 8:16:44 GMT -8
Clicking on that link comes up with a 404. Would be explained if you have since removed it, but otherwise, check that the script is uploaded correctly, have the right permissions [ like does the general public have access to he files in the 'javascript' directory ], and you have the correct link for it.
|
|
inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Dec 14, 2015 8:19:03 GMT -8
Clicking on that link comes up with a 404. Would be explained if you have since removed it, but otherwise, check that the script is uploaded correctly, have the right permissions [ like does the general public have access to he files in the 'javascript' directory ], and you have the correct link for it. this is the link directly from ftp: izimmbicom@ftp.izimmbi.com/javascript/staff.jsAnd sorry, I had since removed it since it didn't work... I put it back just now.
|
|
#eb7100
33409
0
1
May 16, 2024 19:58:36 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Dec 14, 2015 8:58:01 GMT -8
The file appears to be accessible now, so it should definitely run the script correctly on the forum as long as it's anywhere after the $[head] variable if it's in the Forum Wrapper template or if it's embedded anywhere outside of that template.
|
|
inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Dec 14, 2015 9:18:35 GMT -8
The file appears to be accessible now, so it should definitely run the script correctly on the forum as long as it's anywhere after the $[head] variable if it's in the Forum Wrapper template or if it's embedded anywhere outside of that template. That's the issue. It won't run in the <head> before or after $[head]I didn't realize it "had" to be after the $[head]. That seems to have been the issue. Thank you, again
|
|
#eb7100
33409
0
1
May 16, 2024 19:58:36 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Dec 14, 2015 9:21:15 GMT -8
No problem.
$[head] is where our jQuery library embed is located so the only way for your file to appropriately run the jQuery contained within it is to load it after the library.
|
|
inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Dec 14, 2015 9:27:52 GMT -8
No problem. $[head] is where our jQuery library embed is located so the only way for your file to appropriately run the jQuery contained within it is to load it after the library. Ah, that makes sense. Do I need to include <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> <script src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script> for my custom scripts to run, or is that included in the $[head] jQuery library you guys incorporate?
|
|
#eb7100
33409
0
1
May 16, 2024 19:58:36 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Dec 14, 2015 9:39:13 GMT -8
That's what I was referring to being included in the $[head] variable.
|
|
inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Dec 14, 2015 9:44:30 GMT -8
That's what I was referring to being included in the $[head] variable. So, essentially, if I remove the two external links, then my custom JS should still load? Also, is there a pb.data javascript call for referencing a particular user?
|
|
#eb7100
33409
0
1
May 16, 2024 19:58:36 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Dec 14, 2015 9:47:36 GMT -8
That's correct. The only situation in which something wouldn't load is if one of your jQuery files was to include a function that doesn't exist in the official jQuery library.
pb.data('user') is the only user-related hash available and will only reference the account you're logged in as. All other users' data is limited to what's currently visible on the page.
|
|
inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Dec 14, 2015 10:04:33 GMT -8
Alright, thanks again! lol
one more question...
Is there a way of displaying a particular users microprofile on a page on the site?
|
|
#eb7100
33409
0
1
May 16, 2024 19:58:36 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Dec 14, 2015 10:13:54 GMT -8
Only the current user's micro-profile can be automatically brought up by placing it in a hidden element in the Forum Wrapper template.
Basically you can only reference the account you're logged in as in just about every case relating to users' profile data. In the case of other users you're limited to what's visible on the page.
|
|
inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Dec 14, 2015 10:20:08 GMT -8
Only the current user's micro-profile can be automatically brought up by placing it in a hidden element in the Forum Wrapper template. Basically you can only reference the account you're logged in as in just about every case relating to users' profile data. In the case of other users you're limited to what's visible on the page. Bummer ... Azy and I are working on a custom template for the about page that would head staff of this site. The idea was we'd indicate whether the user is online/offline - available, busy, or away (based on custom profile field). I'm not sure I understand why that wouldn't be possible as you can see who's online and when in the info centers and the user's profile. So, can you explain to me a bit why it's not possible?
|
|
#eb7100
33409
0
1
May 16, 2024 19:58:36 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Dec 14, 2015 10:25:49 GMT -8
Users Online is limited to a single page and only loads a limited amount of user information, versus loading every single piece of profile information for every user on every page on the forum which would produce much more server load every time someone loaded a page.
|
|
inherit
114253
0
Apr 1, 2024 6:38:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Dec 14, 2015 10:28:34 GMT -8
Users Online is limited to a single page and only loads a limited amount of user information, versus loading every single piece of profile information for every user on every page on the forum which would produce much more server load every time someone loaded a page. Ah, okay. So then ... grabbing just the user's online status to display text Online or Offline, and the options from the custom field, aren't possible?
|
|