News:

Wondering if this will always be free?  See why free is better.

Main Menu

[APPROVED] SMF Theme Changer 1.0.6

Started by OnzeDanny, February 22, 2012, 04:12:03 PM

Previous topic - Next topic

OnzeDanny

REMOVED

NanoSector

That's a nice mod :)

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

NanoSector

Quote from: ClickSafe on February 22, 2012, 04:21:17 PM
It change the index.template.php from your templates and adds next code into it:

//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 / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Matthew K.

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?

kent[ka]

Can be this option moved to bottom of the site? :p

Matthew K.


Matthew K.

Quote from: ClickSafe on February 23, 2012, 02:28:51 AM
Quote from: kent[ka] on February 22, 2012, 09:04:18 PM
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?

Matthew K.

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.

kent[ka]

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.

NanoSector

Quote from: ClickSafe on February 27, 2012, 08:19:38 AM
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 / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

NanoSector

Quote from: ClickSafe on March 17, 2012, 02:16:21 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 / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Suki

@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.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Matthew K.

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.

NanoSector

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 / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Matthew K.

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.

NanoSector

Quote from: ClickSafe on March 18, 2012, 12:53: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 ;)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Matthew K.


NanoSector

Quote from: ClickSafe on March 18, 2012, 01:28:35 PM
Quote from: Yoshi2889 on March 18, 2012, 01:21:02 PM
Quote from: ClickSafe on March 18, 2012, 12:53: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 / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Advertisement: