The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Ahhh, so the periods basically join your 3 "seperate strings" in the last example, one of which doesn't use double quotes since it's a var .... and those joining periods never get put into the actual saved string.
It's sinking in I think. So if I declare an array key with $var['keyname'], and I come across a place where I'd rather call it with a simple $var[keyname], will it fly in most situations or must I do something stupid like $var[keyname] = $var['keyname'] beforehand? .... in which case it would probably be best to just use a new keyname to distinguish the difference? I guess the reason I'm getting so technical is that I'm afraid of using non-arrayed variables as I don't want to conflict with anyone elses vars .... sooo one of my goals, as you might notice from my php file, was to try and handle all my vars from mainly one single array named "whodl" (3 really, but who's counting LOL). Part of me says I'm going too far since it's a self contained webpage being displayed one time, and since control isn't going back to the origin page, I should be able to declare just about any simple (non-array) var that I want .... but then the inexperience in me thinks that's sloppy code so I've taken the long route so far. |
#12
|
|||
|
|||
Quote:
I even in a seperate script prefix most of my var's (since you are also including standard vB scripts, there could still be a name conflict even in a standalone script). |
#13
|
|||
|
|||
Just a follow-up....
Thank you BIGTIME for the help here. I finished a beta copy of my script. I'll leave the old code here, but it shouldn't be used by anyone. Maybe someone else will learn from comparing this vs. that. https://vborg.vbsupport.ru/showthread.php?t=93167 I don't know if anyone is up for it, but I'd sure love to have someone double check my work. I feel pretty confident, but between a ton of rewrites and a wireless keyboard that sometimes skips a character LOL ... another set of eyes to check me would be awesome because I DO care about the people who install my products. And if anyone does check it out .... I'm up for any suggestions, ideas, and or little coding tips if you feel like sharing them with me. |
#14
|
|||
|
|||
Somewhat important follow-up.
The code examples above don't reflect UNSIGNED integer values. vBulletin uses unsigned for these 4 INT values, so I should too. PHP Code:
http://dev.mysql.com/doc/mysql/en/numeric-types.html Quote:
Quote:
Just trying to help the next guy.... |
#15
|
|||
|
|||
Yes that is the reason some fields are defined as unsigned.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|