2010-05-11, 03:16 PM
Incompatibility with other plugins. Modifying the template cache on the fly like that can cause your plugin to stop displaying when some other plugins are enabled.
(2010-05-11, 03:16 PM)ralgith Wrote: [ -> ]Incompatibility with other plugins. Modifying the template cache on the fly like that can cause your plugin to stop displaying when some other plugins are enabled.
(2010-05-11, 11:50 AM)Nayar Wrote: [ -> ](2010-05-10, 05:54 PM)Pirata Nervo Wrote: [ -> ]I'd also recommend working on some better indentation, not trying to be rude but your code looks horrible. (Not because of the way it's written (didn't look at the code itself) but because of the way it's structured)
If you open brackets, do a new tab the next line:
if () { ssaadssadsad
This is my first time coding.My first encounter with php was 1 month ago when i opened a plugin using notepad++. I don't know any other programming language except foxpro which i learned at school(very basic). i googled every single php commands and looked at how other plugins were made and did this one by trial and error until i got what i wanted. I will try do clean up the code a bit.
(2010-05-10, 03:31 PM)ralgith Wrote: [ -> ]I also took a second look at this now that I'm more awake (morning now lol) and I see there isn't as much duplicated code as I first thought. So the only real issue is that template cache incompatibility. And this looks pretty good for a free Side Box plug.What do you mean by compatibility issues?
Different versions of mybb or different themes/templates?
Incompatibility of themes/templates would be more serious.
Thanks a lot for your suggestions
(2010-05-11, 04:46 PM)Pirata Nervo Wrote: [ -> ]Indentation has nothing to do with (just) PHP. It's used in every programming language to keep it easy to read.I don't know indentation rules. I corrected all ifs statement as you said
It also has nothing to do with the experience you have with a certain programming language.
(2010-05-11, 04:51 PM)Nayar Wrote: [ -> ](2010-05-11, 04:46 PM)Pirata Nervo Wrote: [ -> ]Indentation has nothing to do with (just) PHP. It's used in every programming language to keep it easy to read.I don't know indentation rules. I corrected all ifs statement as you said
It also has nothing to do with the experience you have with a certain programming language.
(2010-05-11, 05:39 PM)Nayar Wrote: [ -> ]About template cache method:
I will continue to use this method until this plugin becomes stable.
I will replace all str_replace codes by permanent ones before its release.
Developing is easier with str_replace as the effects appear immediately.
Thanks a lot for advices
(2010-05-11, 05:42 PM)Pirata Nervo Wrote: [ -> ](2010-05-11, 05:39 PM)Nayar Wrote: [ -> ]About template cache method:
I will continue to use this method until this plugin becomes stable.
I will replace all str_replace codes by permanent ones before its release.
Developing is easier with str_replace as the effects appear immediately.
Thanks a lot for advices
Might not work on all themes though