Heloo there,
I'd like to state here some common errors that you might encounter when making your own plugins, a little bit of my little experience in plugins for those who are new.
1- Correct & Common naming
When making a plugin you should ensure to have a common name for the plugin and for the activation , deactivation, info etc...functions.
what i mean in. if you make for example
your plugin file should be called icons.
or you will not find your plugin in the plugin manager, or the plugin will not work.
2- Escaping all joker characters like $, [, ], ?, ( and ).
When making a plugin and u miss escaping the jokers, you'll plugin will not do the job when activated. this is only apllied for the find string in the function find_replace_templatesets.
What i mean by escaping is
in case u have
you have to escape it using "\"
3-When having multilines
It's better that in the search part of the replace templateset, that you dont use multipule lines. however if u have multipule lines make sure to include the letter "s" after the #
for example
4-Watch up not to use "0" in activate
You dont incluse "0" at the end of the activation for a certain change of templates. As 0 means you don't want to create a new template. however if you change something, you must create a new template otherwise reverting to original won't be possible.
so only use it for deactivating
umm in case others would like to add things here you're free
bbye
I'd like to state here some common errors that you might encounter when making your own plugins, a little bit of my little experience in plugins for those who are new.
1- Correct & Common naming
When making a plugin you should ensure to have a common name for the plugin and for the activation , deactivation, info etc...functions.
what i mean in. if you make for example
function icons_activate()
your plugin file should be called icons.
or you will not find your plugin in the plugin manager, or the plugin will not work.
2- Escaping all joker characters like $, [, ], ?, ( and ).
When making a plugin and u miss escaping the jokers, you'll plugin will not do the job when activated. this is only apllied for the find string in the function find_replace_templatesets.
What i mean by escaping is
in case u have
Quote:$mybbuser[avatar]
you have to escape it using "\"
Quote:\$mybbuser\[avatar\]
3-When having multilines
It's better that in the search part of the replace templateset, that you dont use multipule lines. however if u have multipule lines make sure to include the letter "s" after the #
for example
"#<td valign="top" align="right">
<div class="bottommenu"><span class="smalltext">\$logoutlink</td>#s"
4-Watch up not to use "0" in activate
You dont incluse "0" at the end of the activation for a certain change of templates. As 0 means you don't want to create a new template. however if you change something, you must create a new template otherwise reverting to original won't be possible.
so only use it for deactivating
umm in case others would like to add things here you're free
bbye