Topic: So is there an official variable-naming schema for extensions?

topic

Re: So is there an official variable-naming schema for extensions?

$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.

Re: So is there an official variable-naming schema for extensions?

That's hell to type out every time tho >=(

Re: So is there an official variable-naming schema for extensions?

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)

Re: So is there an official variable-naming schema for extensions?

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 tongue

Re: So is there an official variable-naming schema for extensions?

elbekko wrote:

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 tongue

Would you rather use $pun_extension[<ext_id>][stuff]? That was the original plan tongue

Re: So is there an official variable-naming schema for extensions?

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.

Re: So is there an official variable-naming schema for extensions?

Smartys wrote:
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. smile