dragonexpert / recentthreads

Adds a section to your index page for recent threads.
Other
8 stars 2 forks source link

We should not reset template changes to default on deactivate and activate process #78

Open Eldenroot opened 3 years ago

dragonexpert commented 3 years ago

Templates are suppose to be changed in the _activate and _deactivate functions. Database changes are suppose to be done in _install and _uninstall. That is a development standard for MyBB Plugins. If they don't get changed, there is no guarantee they actually got removed or actually got added.

Eldenroot commented 3 years ago

We should add template diff for tracking changes... We do that for example in TYL system (it was added by @lairdshaw - thx to him! Excellent additoon). All templates have their version number (same as MyBB default templates) so the updating of plugin is really fast without any modification lost.

@lairdshaw - am I right?

lairdshaw commented 3 years ago

@lairdshaw - am I right?

Yep - only master templates are updated, and theme templates which the board admin has changed since they were last changed by plugin devs show up in Find Updated Templates.

dragonexpert commented 3 years ago

The _install routine uses the templates.json file for determining the HTML of all the templates so an admin can edit that if they want the default template changed. It isn't like I am doing major template updates either though. I'll probably do a minor one to recentthread_headerinclude for a setting on how often it should do an ajax refresh, but otherwise that should be it for template changes.

dragonexpert commented 3 years ago

The update script I could rewrite such that it only does changes to the Master Theme which is sid=-2. This should make it so template updates that are available will be shown.