Advertisement:

Author Topic: [APPROVED] SMF Theme Changer 1.0.6  (Read 7836 times)

OnzeDanny

  • Guest
[APPROVED] SMF Theme Changer 1.0.6
« on: February 22, 2012, 04:12:03 PM »
REMOVED
« Last Edit: December 23, 2012, 04:51:38 AM by AccountDisabled »

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,291
  • Gender: Male
    • Yoshi2889 on GitHub
Re: [WIP] ClickSafe:: SMF Theme Changer
« Reply #1 on: February 22, 2012, 04:15:50 PM »
That's a nice mod :)

Does it only modify the Source files, though?
My Mods / Mod Builder - A tool to easily create mods / Former support team member
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,291
  • Gender: Male
    • Yoshi2889 on GitHub
Re: [WIP] ClickSafe:: SMF Theme Changer
« Reply #2 on: February 22, 2012, 04:23:35 PM »
It change the index.template.php from your templates and adds next code into it:
Code: [Select]
//ClickSafe Theme Selector START
  if (file_exists($settings['default_theme_dir'].'/changetheme.php')) {require_once($settings['default_theme_dir'].'/changetheme.php');}
 //ClickSafe Theme Selector END
So it usable for 99% from all existing the themes!  ;)
That's great! :)

Good luck with waiting until it's approved, I guess :P
My Mods / Mod Builder - A tool to easily create mods / Former support team member
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,440
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: [WIP] ClickSafe:: SMF Theme Changer
« Reply #3 on: February 22, 2012, 04:37:47 PM »
As a personal comment, not on behalf of being a Customizer, you can't utilize require_once(); in a template, as it breaks the Model-View-Controller which SMF is built upon (MVC).

It'd be a piece of cake to accomplish this using a source edit only, maybe even hooks, although that may be more tricky than just one source edit to accomplish this.

Furthermore, do you have this hooked in with who can change their theme, the permission?

Offline kent[ka]

  • Semi-Newbie
  • *
  • Posts: 27
Re: [WIP] ClickSafe:: SMF Theme Changer
« Reply #4 on: February 22, 2012, 09:04:18 PM »
Can be this option moved to bottom of the site? :p

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,440
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: [WIP] ClickSafe:: SMF Theme Changer
« Reply #5 on: February 22, 2012, 09:25:17 PM »
Very easily...

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,440
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: [WIP] ClickSafe:: SMF Theme Changer
« Reply #6 on: February 23, 2012, 02:48:33 AM »
Can be this option moved to bottom of the site? :p
I will make an option for showing up on top or on bottom off the forum.
Thanks for your opinion  :)
Any reason you're not using $context['insert_after_template'] .= ''; to get rid of template edits completely?

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,440
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: [WIP] ClickSafe:: SMF Theme Changer
« Reply #7 on: February 23, 2012, 12:58:17 PM »
That's no different. When you submit the mod, I'll send you an official review with a suggestion on how to accomplish it without breaking the MVC.

Offline kent[ka]

  • Semi-Newbie
  • *
  • Posts: 27
Re: [WIP] ClickSafe:: SMF Theme Changer
« Reply #8 on: February 25, 2012, 03:40:33 AM »
Yeah, well i don't find it really cool to show same option at top and bottom of the page. But it's cool people don't have to move into profile for this switch.

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,291
  • Gender: Male
    • Yoshi2889 on GitHub
Re: [WIP] ClickSafe:: SMF Theme Changer
« Reply #9 on: March 17, 2012, 02:10:41 PM »
The last day's i have learned a lot  ::)
A special Thanks for Labradoodle-360, who have pointed me to the documentation of using hooks into SMF Mods.
Seems you know more then I do then :)
(I don't understand the *** out of that system)

Lets hope it gets approved.
My Mods / Mod Builder - A tool to easily create mods / Former support team member
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,291
  • Gender: Male
    • Yoshi2889 on GitHub
Re: [WIP] CLS:: SMF Theme Changer
« Reply #10 on: March 17, 2012, 05:10:09 PM »
Thanks Yoshi2889  ;)
I learned a lot because he also told me to download a few RECENT mods from him.
By reading them, step by step we learned to understand how these Hooks are working.
Give it a try  ::)

The list approvals is quite long, we're going to have some patience
That's great :)
I don't think I like the hook system anyway, though, it being so complicated at first.

My mods also have been in for quite a lot of time. There's two to be approved, and I'm starting to get the feeling that if ONE of your mods doesn't qualify with what SMF wants all of your mods get pushed to the end, which is something I highly disagree with.
My Mods / Mod Builder - A tool to easily create mods / Former support team member
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Offline Suki

  • SMF Super Hero
  • *******
  • Posts: 14,961
  • Kaizoku Jotei
    • SMF mods
Re: [WIP] CLS:: SMF Theme Changer
« Reply #11 on: March 17, 2012, 05:13:19 PM »
@Yoshi2889  No, every mod is independent and it doesn't matter who  submitted it.

Hooks are very simple to use, the vast majority are just a way to manipulate an array.
But now you make me feel so ashamed
Because I've only got two hands
Well, I'm still fond of you, oh-ho-oh

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,440
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: [WIP] CLS:: SMF Theme Changer
« Reply #12 on: March 18, 2012, 12:29:55 PM »
I don't think a lot of people realize what hooks are actually doing, and how. As Suki already said, it's mainly a means to manipulate big arrays without a modification be adding a database row that corresponds to that array.

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,291
  • Gender: Male
    • Yoshi2889 on GitHub
Re: [WIP] CLS:: SMF Theme Changer
« Reply #13 on: March 18, 2012, 12:34:14 PM »
Guess I'll have to try it out once more, then, and implement it into my mod.

Thanks for explaining.
My Mods / Mod Builder - A tool to easily create mods / Former support team member
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,440
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: [WIP] CLS:: SMF Theme Changer
« Reply #14 on: March 18, 2012, 12:46:24 PM »
I was a fairly firm believer of not using hooks - personally, in my own mods. But eventually, I decided that I might as well try as it eliminates an edit, and I learned how they work in the core, and will never go back to using edits when it's possible to manipulate with a hook.

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,291
  • Gender: Male
    • Yoshi2889 on GitHub
Re: [WIP] SMF Theme Changer
« Reply #15 on: March 18, 2012, 01:21:02 PM »
With the use of hooks you save a lot of programming time ...
But I do understand that for beginners certainly is a whole study.
Something new ... something strange ... you should ever make time for it ...
I wouldn't call myself a beginner to mods, to be honest. Yet like labradoodle said, it needs time to get used to it.
I'm going to try using them and implementing them in my mods, god let labradoodle be right ;)
My Mods / Mod Builder - A tool to easily create mods / Former support team member
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,440
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: [WIP] SMF Theme Changer
« Reply #16 on: March 18, 2012, 01:27:03 PM »
I'm always right O:) :P

Offline NanoSector

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,291
  • Gender: Male
    • Yoshi2889 on GitHub
Re: [WIP] SMF Theme Changer
« Reply #17 on: March 18, 2012, 03:03:50 PM »
With the use of hooks you save a lot of programming time ...
But I do understand that for beginners certainly is a whole study.
Something new ... something strange ... you should ever make time for it ...
I wouldn't call myself a beginner to mods, to be honest. Yet like labradoodle said, it needs time to get used to it.
I'm going to try using them and implementing them in my mods, god let labradoodle be right ;)
The beginner was not meant for you  ;D just for those people who wants to start writing their first mod ...
I am more a beginner  ;D ;D , just started 2 months ago, with writing my first theme for SMF  ::)
Never really wrote a theme for SMF, it always refuses to install my themes :P
I also hate CSS, but that's another thing.

Looking at my mods at the mod site, some people might think I'm a beginner at making mods. Well, I've wrote FAR more complex mods back on my test site, just haven't got the time and resources to submit them already (they're full of bugs).

Anyway, this is getting pretty off-topic. Back on topic :)
My Mods / Mod Builder - A tool to easily create mods / Former support team member
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."