MyBB Community Forums

Full Version: [Release]Sideboxes By Nayar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
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.

Oh, thanks. Thats quite serious.
I will look into it soon
(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 Smile

Indentation has nothing to do with (just) PHP. It's used in every programming language to keep it easy to read.
It also has nothing to do with the experience you have with a certain programming language.
(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.
It also has nothing to do with the experience you have with a certain programming language.
I don't know indentation rules. I corrected all ifs statement as you said Smile
(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.
It also has nothing to do with the experience you have with a certain programming language.
I don't know indentation rules. I corrected all ifs statement as you said Smile

Indentation is pretty much what I said, do a new tab after you open a bracket and go back a tab if you close it Smile
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: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
(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

And a well written regex [preg_replace()] is much more reliable and forgiving.
Updated to version 0.0.4
Whats New
Hey,its nice sidebar.thankx.
Can u plz tell me that how can I add latest post and thread in sidebar? Just like coding-talk.com
thankx.
My site is Php4m.net Big Grin
Currently i have deactivated sidebar.
Pages: 1 2 3