The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
![]()
hi kh99
No not really any reason why they sould be in the footer - just that is where a previous programmer who worked on my site passed some stuff to the javascript so I blindly followed suit.. Since I had these above problems trying to do it, that is probably exactly why he ended up resorting to AJAX to get the stuff he needed! But I would like to think I could do a little better now.... I will have a play with what you suggested above, but Yeah I've been thinking about this myself too (over a beer or three which always seems to level the reasoning lol) The stuff that I can successfully pass to the javascript comes out in the generated html like this : <!-- END TEMPLATE: ad_footer_start --> <div id='JUID' style='display:none;'>71</div> <div id='JUSERNAME' style='display:none;'>Support</div> <div id='JUSERPC' style='display:none;'>ST1</div> And I can then use jquery (for ease of DOM navigation) to do whatever I like with the generated HTML to reformat what the end user sees without making more changes to vbulletin code/templates. Which is nice ![]() So anything in a $array or $variable that I can 'see' in the template is easy enough to pass on to client side javascript. So what I am thinking now is.... if I knew where these global arrays like $bbuserfield[] were declared in vbulletin, it would be pretty easy to declare my own custom array in the same way and in the same place - and it stands to reason I would then have my own custom array with the same scope as $bbuserfield to do with whatever I liked from whatever vbulletin php file I wanted to tinker with - and the output 'client side' could be modified with javascript/jquery by adding more fields to my custom global array as I need them and passing them in HTML 'hidden' text ![]() That seems a pretty useful goal to me! Do you know where those vbulletin global arrays come from originally? best regards rich |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|