MyBB Community Forums

Full Version: What is the use of sid while creating templates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, i am creating a template for my plugin , it is working well , but by studying some of the plugin , i have seen the use of sid , but dont understand what is it exactly used,

some plugin used -2
some plugin used -1

can you tell me what is the used of sid ?
does it have to different from other plugin?
I really don't know exactly what it does, but I have always set it to -1, so it doesn't matter if it is different from another plugin.

Edit:

I think it shows whether it has been edited or not, but I am not entirely sure.


Edit 2:

Just checked, it does do what I said.

-2 is the default, when it is edited manually it adds a new one with -1. This allows it to revert to the original -2 and it also highlights it to show it is edited from the default version.
Thanks for Replying , so should i always used -1 for my plugin sid ?
(2010-02-22, 03:32 PM)netjockey Wrote: [ -> ]Thanks for Replying , so should i always used -1 for my plugin sid ?

If it is a totally custom template you can use -2 to have it show as an original (in blue)
It will still show as original if there is no -2 (in my experiences) but if you think users will be editing it it is better to use -2, but there isn't much of a difference.
-2 is the master version of default templates, 1 is an edited version of a default template, -1 is what is used when you make a new template in the ACP. I always use -1 as that's what other completely custom templates use, and what the Akismet plugin uses, and that follows MyBB coding standards.
I always use -1 for global templates
(2010-02-22, 05:43 PM)MattRogowski Wrote: [ -> ]-2 is the master version of default templates, 1 is an edited version of a default template, -1 is what is used when you make a new template in the ACP. I always use -1 as that's what other completely custom templates use, and what the Akismet plugin uses, and that follows MyBB coding standards.

(2010-02-22, 05:59 PM)Pirata Nervo Wrote: [ -> ]I always use -1 for global templates


Thanks Guys I got it properly, Thanks for your Replies once Again , Shouldnt we implement a thank you like system here to thanks you all?