Advertisement:

Author Topic: Possible mods and themes bug?  (Read 6266 times)

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Possible mods and themes bug?
« on: December 22, 2015, 04:20:02 AM »
On 2.0 when you install mods onto Curve, if later you make a theme based on Curve it doesn't know the mods are installed on them...so uninstalling those mods becomes manual.

It would be good if in 2.1 it would also add itself or know what date it was created and be able to know if the mods are on it.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,120
  • Gender: Male
    • Kindred-999 on GitHub
Re: Possible mods and themes bug?
« Reply #1 on: December 22, 2015, 07:34:04 AM »
that is not actually a bug -- nor is it really a feature that can be accomplished with the current SMF design.

The way around it?   more mods that use hooks instead of code edits...   then they get inserted into themes, regardless of the order of installation.
But that is dependent on the mod author...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Possible mods and themes bug?
« Reply #2 on: December 22, 2015, 07:39:57 AM »
Yes but if it's copying the info, why can't it copy some sort of information or even add some information to include the currently installed mods so that uninstalling can work properly?

Why can't the info be stored in the database and then the theme can just be added to the list?

There's so many ways to do it...and if SMF itself is creating the theme in admin I think it should do it, if for no other reason than preventing people from really screwing up their themes by accident lol.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,120
  • Gender: Male
    • Kindred-999 on GitHub
Re: Possible mods and themes bug?
« Reply #3 on: December 22, 2015, 07:46:29 AM »
when you create a copy of the default theme, it copies over the index.template.php and the css and image files - and then adds the theme to the list of installed themes

that's it....

telling the system to scan through all of the mods installed and mark "anything in the default theme as the new theme" could potentially be an issue one many sites that have dozens or hundreds of mods.

Yes, there are ways to do it. but it is not something that we are looking to do in the current design -- nor is it actually a bug, as I pointed out.

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Possible mods and themes bug?
« Reply #4 on: December 28, 2015, 01:20:14 AM »
How is this not possible? The database has a field for "themes installed"....why can't it just find anything with "1" in it and add ",2" to the list?

OR since timestamps are included save a timestamp on when the theme was created and on uninstalling check if the theme was created after the mod was installed.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Offline live627

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,265
  • Gender: Male
  • Cat: Destroy!
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Possible mods and themes bug?
« Reply #5 on: December 28, 2015, 02:27:16 AM »
* live627 pokes around...

This is what happens when the theme is not very modular. That's the REAL problem here. Bad design.

You're waning to solve a symptom here.
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Possible mods and themes bug?
« Reply #6 on: December 29, 2015, 09:27:42 PM »
Can you explain what a better solution would be? Even if it's not achievable currently so I understand? :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Offline live627

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,265
  • Gender: Male
  • Cat: Destroy!
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Possible mods and themes bug?
« Reply #7 on: December 29, 2015, 10:49:29 PM »
Base the theme off a fresh copy obtained from the install packages?
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Possible mods and themes bug?
« Reply #8 on: January 01, 2016, 02:10:21 AM »
Then I would have to manually install the mods on there. That's still a bandaid and a horrible one at that lol.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Offline Diego Andrés

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,059
  • Gender: Male
  • We know, we'll be coming
    • DiegoCortes on GitHub
    • @comeladrillos on Twitter
    • SMF Tricks - Free & Premium Themes
Re: Possible mods and themes bug?
« Reply #9 on: January 03, 2016, 02:22:23 AM »
Then you should keep track of those mods. There should be easy to identify, if they modified the index.template.php is because they can appear everywhere...
Also you can use a file compare tool.

And I don't find too much sense on it. Me as a themer or developer, if I want to make a brand new theme from scratch (for my forum only) but I don't want to lose anything installed on my forum, I would do this (making the copy from the default theme), so I can start working with everything on hand without worrying about missing some mode code. I mean, if I install a mod is because I really need it.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Possible mods and themes bug?
« Reply #10 on: January 07, 2016, 02:44:43 AM »
Then you should keep track of those mods. There should be easy to identify, if they modified the index.template.php is because they can appear everywhere...
Also you can use a file compare tool.

And I don't find too much sense on it. Me as a themer or developer, if I want to make a brand new theme from scratch (for my forum only) but I don't want to lose anything installed on my forum, I would do this (making the copy from the default theme), so I can start working with everything on hand without worrying about missing some mode code. I mean, if I install a mod is because I really need it.

I think you've missed the point here.

I want it so that if you "create a theme" through SMF (a copy of default through SMF admin) it knows what mods are installed on it already so that you can uninstall them from the theme through package manager instead of being forced to manually uninstall them.

This will prevent errors, make it more user friendly, and just generally be an all around awesome thing to happen.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Offline Diego Andrés

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,059
  • Gender: Male
  • We know, we'll be coming
    • DiegoCortes on GitHub
    • @comeladrillos on Twitter
    • SMF Tricks - Free & Premium Themes
Re: Possible mods and themes bug?
« Reply #11 on: January 07, 2016, 02:49:21 AM »
No I didn't, I think it would be very easy to identify a mods code once you are very familiar with the theme.
Most of the themes are based in the default theme, shouldn't be so hard to find mods code.

Back when I reviewed themes I found mods coding a few times by just scrolling slowly.

PS: I don't want to look offensive, I just want to point out that not everyone would require something like this.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Possible mods and themes bug?
« Reply #12 on: January 07, 2016, 07:01:59 PM »
I don't see how it wouldn't be handy.

I am managing a forum with 100s of mods on it, and they make new themes all the time. of course come time to uninstall mods I have to go through every theme to remove one mod because the mod doesn't know it's installed on those themes.

This means when I am uninstalling mods it takes 1000 times longer because I have to manually uninstall mods.

I'm not talking about people who are making themes for distribution, just your average Joe trying to make their own theme.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Offline live627

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,265
  • Gender: Male
  • Cat: Destroy!
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Possible mods and themes bug?
« Reply #13 on: January 08, 2016, 04:24:21 AM »
Use a diff tool to get all the code differences from the theme into one file. I'm thinking that could be a good point of reference to start with.
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: Possible mods and themes bug?
« Reply #14 on: January 08, 2016, 11:47:43 PM »
I don't think it is really a bug but more of limitation. Yes it could be done differently, maybe one day it would.

I would like to see a sandbox model, where as the original themes are not touched but each theme is compiled in a sandbox. So you would have a copy of every original and a copy of an compiled. Maybe can be done with the sources too.

Then when you want to do changes to mods every source and theme is compiled again against all modifications.

Only problem I foresee with this is space constraints. However if a original isn't touched by any mod then the original should be used.

I know hooks sound better, with object oriented programming it may be somewhat viable. Even then souce code modification will still have merits.