Topic: So is there an official variable-naming schema for extensions?
topic
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 troubleshooting → So is there an official variable-naming schema for extensions?
topic
$ext_<extension_id>_var is I think what we settled on
So, I would use $ext_foobar_result if I was trying to store a database result in the extension with ID foobar.
That's hell to type out every time tho >=(
That's hell to type out every time tho >=(
But you don't have to have foobar as ID even if the extension is named foobar, you can always use fb. (as long as you're the first one to use it)
Still. A for suddenly looks uglier:
for($ext_fb_i = 0; $ext_fb_i != 10; $ext_fb_i++)
And takes ages longer to type out too
Still. A for suddenly looks uglier:
for($ext_fb_i = 0; $ext_fb_i != 10; $ext_fb_i++)
And takes ages longer to type out too
Would you rather use $pun_extension[<ext_id>][stuff]? That was the original plan
elbekko wrote:That's hell to type out every time tho >=(
But you don't have to have foobar as ID even if the extension is named foobar, you can always use fb. (as long as you're the first one to use it)
Well, until I make a facebook extensions and want to use fb as well. Extension IDs are meant to be unique, which is why they should be used. Long variable names? Yes. I would much rather have people writing/copy-pasting long variable names than posting lots of "Why do these extensions not work together?" and "Why does doing this break PunBB" posts.
intedinmamma wrote:elbekko wrote:That's hell to type out every time tho >=(
But you don't have to have foobar as ID even if the extension is named foobar, you can always use fb. (as long as you're the first one to use it)
Well, until I make a facebook extensions and want to use fb as well. Extension IDs are meant to be unique, which is why they should be used. Long variable names? Yes. I would much rather have people writing/copy-pasting long variable names than posting lots of "Why do these extensions not work together?" and "Why does doing this break PunBB" posts.
I agree on this... I prefer the larger variables.
PunBB Forums → PunBB 1.3 troubleshooting → So is there an official variable-naming schema for extensions?
Powered by PunBB, supported by Informer Technologies, Inc.