Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: afam4eva on January 31, 2013, 10:34:30 AM

Title: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 10:34:30 AM
I want to make some changed in my smf template so i need to know where the sql select statement that points to the smf_themes table in the database is. Pls if you know where it is, i'd appreciate it. Thanks in advance.
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 10:38:11 AM
Um, why?

All the things that you should need to configure are configurable from the admin panel.

As for this, there are multiple places where smf_themes is queried to get information under different circumstances...
Title: Re: Where's the location of smf_themes?
Post by: shteca on January 31, 2013, 10:38:54 AM
huh? why you want to do that?

I think your thinking about the wrong thing...

To edit the theme you want to do this via FTP

there are a lot of different tables for each theme...
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 10:43:31 AM
If you check my last 3 threads, you'll know why. I'm supposed to create a mobile theme for my forum but it must have most of the features. Unfortunately, the WAP/WAP2/imode theme is too basic and there doesn't see to be a way out. So, my best bet is to create a new smf installation and point the database to the main installation and it's credential but point the smf_theme to a seperate duplicate of the smf_themes table. I hope i'm making sense.
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 10:49:37 AM
If only it worked like that. smf_themes contains far, far more than just theme information. User preferences and even custom fields are stored in them.

How exactly would creating another install of SMF help with this? Answer: it won't.

You can go and get Dragooon's SMF4Mobile from smf-media.com which is the best solution that is a *theme*, Tapatalk if you're prepared to use someone else's client to access it. As I already explained, there are some things that physically cannot be done in the web browser, e.g. most versions of iOS do not support file uploads in the browser, and that's not fixable by a theme.
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 10:55:24 AM
Quote from: Arantor on January 31, 2013, 10:49:37 AM
If only it worked like that. smf_themes contains far, far more than just theme information. User preferences and even custom fields are stored in them.
I actually need to point everything that has to do with templates to another database and table.

Quote from: Arantor on January 31, 2013, 10:49:37 AM
How exactly would creating another install of SMF help with this? Answer: it won't.
I have already created a new database and also copied the smf_themes table to the new database. My problem just rests on making some changes in the template as it pertains to pointing the sql select statement to the new database and table.

Quote from: Arantor on January 31, 2013, 10:49:37 AM
You can go and get Dragooon's SMF4Mobile from smf-media.com which is the best solution that is a *theme*, Tapatalk if you're prepared to use someone else's client to access it. As I already explained, there are some things that physically cannot be done in the web browser, e.g. most versions of iOS do not support file uploads in the browser, and that's not fixable by a theme.
I'm really not financially buoyant to pay for anything now and my client specifically told me to make the mobile theme customized like the main theme so that rules out tapatalk. I tried doing an sql syndication but it's too cumbersome, so this is my best bet at the moment.
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 10:57:45 AM
QuoteI actually need to point everything that has to do with templates to another database and table.

Which is about 1/3 of the smf_themes table, not all of it. What you're trying to do is just not supported by SMF without major changes that will almost certainly break other things.

QuoteI have already created a new database and also copied the smf_themes table to the new database.

I still don't understand why you're even creating a separate installation. You have an installation that needs an extra theme, just add a new theme and customise it.

QuoteI'm really not financially buoyant to pay for anything now

Yes, because $20 is too expensive ::)

Quotemy client specifically told me to make the mobile theme customized like the main theme so that rules out tapatalk

Good luck with that.
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 11:00:52 AM
Quote from: Arantor
I still don't understand why you're even creating a separate installation. You have an installation that needs an extra theme, just add a new theme and customise it.
I already have the core theme as my main theme. I don't get your suggestion. is there a way of adding an extra theme?
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 11:03:55 AM
Sure there is, in the Themes area of the admin panel, there is an option to create a copy of the default theme, which will do just that. It will create only the files necessary to become a new theme and create all the entries in the database for it.

It will only contain one template, and use all the default theme ones as a fallback, but you can copy them to your new theme and modify them as you go.
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 11:06:53 AM
Quote from: Arantor on January 31, 2013, 11:03:55 AM
Sure there is, in the Themes area of the admin panel, there is an option to create a copy of the default theme, which will do just that. It will create only the files necessary to become a new theme and create all the entries in the database for it.

It will only contain one template, and use all the default theme ones as a fallback, but you can copy them to your new theme and modify them as you go.
WOW!!! I never knew anything of such exists. Can i use another mobile theme(i have one) instead of creating a copy of the default theme?
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 11:09:03 AM
A mobile theme for SMF should be able to be installed from the same area. If it is not already an SMF theme you will need to create it as a copy of the default theme then modify it.
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 11:10:30 AM
Quote from: Arantor on January 31, 2013, 11:09:03 AM
A mobile theme for SMF should be able to be installed from the same area. If it is not already an SMF theme you will need to create it as a copy of the default theme then modify it.
I'm sorry for being a pain, but how does one make a theme as a copy of the default theme.
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 11:12:53 AM
Admin > Configuration > Themes and Layout > Manage and Install

Bottom area, 'Install a New Theme', type a folder name instead of theme1, then hit Install.
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 11:14:47 AM
^^^Thanks...let me get cracking and report back...
Title: Re: Where's the location of smf_themes?
Post by: kat on January 31, 2013, 11:23:51 AM
I like your style, Arantor. It has to be said. :)
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 11:27:11 AM
I have done it. So, how do i access it?
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 11:33:59 AM
Once you have created it, you can access it from your profile for testing purposes, or you can set it to be the default from the admin panel.

To do it based on the user being on a mobile device, you'll need to use Emanuele's mobile device detect mod.
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 11:39:49 AM
Quote from: Arantor on January 31, 2013, 11:33:59 AM
Once you have created it, you can access it from your profile for testing purposes, or you can set it to be the default from the admin panel.

To do it based on the user being on a mobile device, you'll need to use Emanuele's mobile device detect mod.
If i set it to be the default, it replaces the one i already have there right? Since i'm just using the theme for mobile users, what will you suggest.

I already have a mobile detections script that i put together. All i have to  do is to add a 301 redirection.
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 11:42:37 AM
I *already* suggested what to do: use the mobile device detect mod that will allow you to switch themes. Using 301 redirects is inefficient and slow (especially on mobile devices)
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 12:58:02 PM
I'm sorry but i went to my profile like you suggested but saw a place where i could preview all the templates but whenever i click on a link in the preview it takes me to the default theme.
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 01:01:03 PM
Well... if you make a copy of the default theme... it looks like the default theme...
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 01:02:39 PM
Quote from: Arantor on January 31, 2013, 01:01:03 PM
Well... if you make a copy of the default theme... it looks like the default theme...
???

Can you be a little lucid pls...
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 01:03:09 PM
I am completely lucid.

You created a new theme. It inherits completely from the default theme. So it looks like the default theme.
Title: Re: Where's the location of smf_themes?
Post by: afam4eva on January 31, 2013, 01:06:50 PM
Quote from: Arantor on January 31, 2013, 01:03:09 PM
I am completely lucid.

You created a new theme. It inherits completely from the default theme. So it looks like the default theme.
Most themes definitely borrow some properties from the default theme but i thought when i upload the theme i'm gonna use for the mobile site, it's look and feel will still be maintained. What's the use of having a mobile theme if it's gonna look exactly like the main theme. it defeats the purpose of wanting a more mobile friendly theme.
Title: Re: Where's the location of smf_themes?
Post by: Arantor on January 31, 2013, 01:10:13 PM
-sigh-

You have to *modify* it. You've created a theme that copied the default theme, so it is going to look like the default theme.

Why would it be magically different if you copied it?
Title: Re: Where's the location of smf_themes?
Post by: Sleezy on January 31, 2013, 01:12:05 PM
Configriation - Themes and layouts - Modify - Find the theme and click "Copy a template from the theme this is based on."
Title: Re: Where's the location of smf_themes?
Post by: alianos on May 22, 2015, 09:24:12 AM
Still, where is the smf_theme? Because from the looks of it, its not in the database!
Title: Re: Where's the location of smf_themes?
Post by: Illori on May 22, 2015, 09:30:59 AM
it has to exist in the database otherwise your forum would not work.
Title: Re: Where's the location of smf_themes?
Post by: alianos on May 27, 2015, 04:52:36 AM
Quote from: Illori on May 22, 2015, 09:30:59 AM
it has to exist in the database otherwise your forum would not work.

I have 2 screenshots from phpMyAdmin that say otherwise :/

Any ideas?

Title: Re: Where's the location of smf_themes?
Post by: alianos on May 27, 2015, 05:09:13 AM
Never mind, I found it!
Apparently the left column of phpMyAdmin has a limit to how many elements it displays. Thanks again and sorry for the stupid question!