• Welcome to Simple Machines Community Forum. Please login or sign up.
September 21, 2021, 02:26:43 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Structure of SMF

Started by ni_hao, November 28, 2014, 05:51:50 PM

Previous topic - Next topic

ni_hao

I am a new user of SMF. Our board was operating before under vBulletin but since they changed their policy, the switch/change to SMF was made.

SMF is AFAIK good software, the board (features) are good, however I think (implementing) the mods need to be reprogrammed. There are some mods (downloaded from here) who give during installation an error and the whole SMF forum is not oprational anymore. The only thing what should be done then, is to restore a complete files backup. That is why our Technical Staff said that before installing a mod, please backup the complete mysql database and make a backup of the forum.

I think the way vBulletin deals with their mods is much bettter and maybe an idea to analyze their way of handling with mods and decide if it is possible and likely to implement it in SMF also. Because before installing a mod to do a complete backup of mysql database and the forum takes time etc etc.

Maybe there is an other solution (as written I am a SMF rookie) in whch case I apologize.

Arantor

2.1 has already received a substantial number of improvements specifically to aid with this.

But that doesn't mean mod authors will *use* such things.
No good deed goes unpunished
All helpful urges should be circumvented

Colin

Hi Ni_Hao,

Thank you for your feedback. If there is a specific mod that instantly is breaking your forum upon a clean install please forward this onto the Customization Team so we can review the modification and take necessary action.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Kindred

Also, do remember...   The system does a pretest, before any code changes are made.
If you continue to install, despite the pretest errors and the big red warning, then, quite honestly, you get what you deserve, when the system crashes.


We even have a wiki article on what to do, if the mod installation generates errors during the pretest.

Finally....   The smf system is actually a more flexible and powerful system, because of the capability to actually modify the source files.   As Arantor says, though.., with 2.1, we have added many more locations to "hook" into the system without modifying source... But leaving the capability keeps the strength of the mod system.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Black Tiger

Well there was a problem. It was this mod:
http://custom.simplemachines.org/mods/index.php?mod=1047

QuoteIf you continue to install, despite the pretest errors and the big red warning, then, quite honestly, you get what you deserve, when the system crashes.
Yeah well... that doesn't make a lot of a difference if you also get problems without warnings, or when you cancel at a warning. So if you are doing the things as you should do them. ;)

Ni_hao did try to install it, got an error and because of that, he cancelled the installation. So that's good.

When I went to have a look, already installed mods were working on the forum, but in the adminpanel under packages, they all had their green lights turned off and were displayed as not being installed yet. On the right side there were the options to install.

So this was an inconsistency between forum and... well.. database? Or at least the display in the package manager.

So to get this looking the correct way, I clicked install for every mod, in the same order I installed them for Ni_hao before, and with the 3rd or 4th mod, suddenly the screen went blank, I could do nothing anymore and had to restore the "empty" file backup and installed the mods again from scratch. This went good as before. So imho in spite of the fact that the mod was cancelled, somewhere it managed to do strange things.

So it's very good to read there are more hook locations in 2.1
But it would be even nicer if a system could be found (that's the feature suggestion) where it can't really get your forums down anymore with white screens. A way mods can't do forum file edits anymore. And it fixes what Arantor said, because mods which make file edits are not possible/allowed anymore, so mod authors are obligated to use the template hook system.

I like to think it's even more powerfull when you can reach the same effect without having the need to adjust source files and it makes upgrades and backups way easier.
Could  you give some examples of your statement? I can only think of Themes.

Don't get me wrong, I love SMF and it's a great system. But like ni_hao I don't understand the need to modify source files.
Greetings, Black Tiger

Arantor

If it's getting to the white screen process *during install*, the mod is buggy, pure and simple. And installing a mod from 5 years ago before the database code was all changed isn't going to work properly anyway...

Kindred's sort of right in that even with the hooks available it is possible that there will be times you need that flexibility, I can think of a few times I've had to get extremely creative because hooks didn't exist where I needed them and some of the stuff I've done over the years simply would never be covered by hooks.

Take SimpleDesk for example. The notion of hooks being available to claw their way into, say, the manage attachments screen whereby you have more kinds of attachments than what the system was designed for - and then also to splice into the repair code to prevent it thinking the attachments are invalid... this is something well outside of the scope of hooks.

True enough there's an alternative - don't use the attachments system in that fashion, but I had perfectly good reasons at the time for doing that which to this day are still preferable than doing what a hook-only approach would require.
No good deed goes unpunished
All helpful urges should be circumvented

Kindred

without the ability to modify source files, we could not release patch files as mods.

So, in short no... there is no plan to remove the package manager's ability to modify source files. Although we encourage mod authors to use the hooks, we are not going to cripple a system that has been more useful and powerful then not.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Lack of ability to modify source files does not appear to hinder XenForo doing updates.

The problem with this power is that it is also very fragile and actually more than a touch insecure.
No good deed goes unpunished
All helpful urges should be circumvented

Black Tiger

@Arantor: Xenfoto's developper Kier came from vBulletin. Updates are done there (on VB) too by overwriting source files and running an update.php which requires some authentication by the way. I don't see any security issue in there.

QuoteIf it's getting to the white screen process *during install*, the mod is buggy, pure and simple. And installing a mod from 5 years ago before the database code was all changed isn't going to work properly anyway...
I know that too since begin this year since I started with SMF, but as you see, to new users, especially those converting from other forums where those problems are not known it might still sound strange, because when you cancell things on error, it should not do anything wrong.

@Kindred:
Ah oke, your releasing patch files another way (via the mod system). It's a possibility but that's not my idea of flexible and powerfull.
The suggestion was not to cripple the system, but to make it more safe, so users don't have to make a backup of files and database before installing any little thing.

If that's not possible, or you think it will be good enough in 2.1 then I'm alright with your decision.. I will wait until 2.1 goes stable.
I'll hope with you that  more authors are going to use the hooks.
Thank you both for the explanations.
Greetings, Black Tiger

Black Tiger

Quotehe suggestion was not to cripple the system, but to make it more safe
Sorry... I ment to make it more easy for users... typo.. :)
Greetings, Black Tiger

Arantor

I am *well* aware of where Kier came from, and I have worked with the source of XenForo too so I'm hardly unfamiliar with how it works. The thing is, this debate is nothing new. I've been campaigning for an edit-free system for YEARS.

You're also misunderstanding my point; my point about security is how insecure the package manager is, not how insecure XF's system may or may not be (hint: it's vastly more secure than what SMF does)

The problem is to make it more safe in the way you mean, it necessarily must cripple it in the way Kindred means. Because I've been working with these things for years - I am also the guy who completely redesigned and rebuilt the entire thing from scratch for Wedge precisely for all these reasons!
No good deed goes unpunished
All helpful urges should be circumvented

Black Tiger

QuoteI've been campaigning for an edit-free system for YEARS.
Ooooh.... so you also have the same opinion which we have. Nice to know you worked with Xenforo too. I loved Kier's work and decided to stop with VB when all those good coders turned their back to VB.
I'm sorry, I indeed misunderstood your point about security.

The problem is that I'm no coder, so I don't have any oversight in how much work it would be to change the package manager to a templated-based hook system. But I believe you at once if you say it would cripple it in the way Kindred means.
And I don't want to cripple things. It's a feature suggestion and in any case I'm glad somebody like you agree's that's a good though we got.;)
Greetings, Black Tiger

Arantor

When I said "I rebuilt the entire thing from scratch" I do mean *literally* that. I have been down the edit-free road in person for an SMF based system and SMF does not have the other systems in place to support it (unlike XenForo)

So much more is needed and there is so much resistance to the idea because 'how will we make changes'... even though other environments had this worked out years ago.

The thing is, to make the package manager safe in the fashion you mean will require crippling it. You can't have the freedom to make any changes you like without the risk of it blowing up in your face. The power to do find/replace anywhere on the source is very powerful, but it's fragile.
No good deed goes unpunished
All helpful urges should be circumvented

Black Tiger

QuoteSo much more is needed and there is so much resistance to the idea because 'how will we make changes'... even though other environments had this worked out years ago.
Exactly. And since it must be build from scratch and the fact that there is so much resistance to it, I wonder if it will ever be done.... pity.
Greetings, Black Tiger

Arantor

I know there are plans for an SMF 3 which would go in that direction.
No good deed goes unpunished
All helpful urges should be circumvented

Black Tiger

That would be very nice but will take several years because 2.1 is not even released as stable release. But it's good news if those plans would come through.
Next to the great support SMF already has, this would lift SMF to lonely hights in the free forums quality list.
Greetings, Black Tiger

Arantor

And this is WHY it takes years. Everyone moans about it and it demotivates those who *do* it.
No good deed goes unpunished
All helpful urges should be circumvented

Black Tiger

Well.... It might be that people maon about it because it's not made clear that there are plans to do it, so that it will become a yes. ;)
First time I suggested it (in another thread) I also got the impression that it wouldn't be done, same impression ni_hao and I got now. Until you said there are plans for it in 3.0.
Greetings, Black Tiger

Kindred

Actually, there are no "plans to do it".

It is being considered for 3.0 (most definitely NOT for 2.1) but even that is debatable for the reasons I outline above.
I understand the argument... and we'll see where the dev team for 3.0 goes with it
- however, to be clear, I feel that your arguments are the weakest point, Black Tiger. Arantor has some points... (most especially, the security concerns) and he did do it for wedge... but there are some very strong arguments for keeping it as well.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Black Tiger

You're correct Kindred. Arantor has better arguments then I have, I'm just missing the very strong arguments to keep it, I don't understand what's so strong. But that's not really an issue.

If it's discussed for 3.0 it's oke by me. The suggestions are made, arguments are known now. We'll leave it at the decision of de dev team for 3.0 and personally hope they will decide in our favor. That's all that can be done for now.

Thank you for the reply!
Greetings, Black Tiger

vbgamer45

Well for one. There is always going to be a need for file edits with the current SMF Structure. Hooks can't solve everything. I have done development for MyBB and there are times that you want to change some of the logic but you can not due to the limited hook placements and the logic that is coded can't be overridden.

The thing that makes SMF so powerful was the package manager and was one of the reasons myself got into SMF instead of phpBB.

In the end a mixture of hooks and package manager will keep SMF on top.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: