Where's the location of smf_themes?

Started by afam4eva, January 31, 2013, 10:34:30 AM

Previous topic - Next topic

afam4eva

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.

Arantor

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...

shteca

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...

afam4eva

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.

Arantor

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.

afam4eva

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.

Arantor

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.

afam4eva

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?

Arantor

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.

afam4eva

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?

Arantor

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.

afam4eva

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.

Arantor

Admin > Configuration > Themes and Layout > Manage and Install

Bottom area, 'Install a New Theme', type a folder name instead of theme1, then hit Install.

afam4eva

^^^Thanks...let me get cracking and report back...

kat

I like your style, Arantor. It has to be said. :)

afam4eva

I have done it. So, how do i access it?

Arantor

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.

afam4eva

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.

Arantor

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)

afam4eva

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.

Arantor

Well... if you make a copy of the default theme... it looks like the default theme...

afam4eva

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...

Arantor

I am completely lucid.

You created a new theme. It inherits completely from the default theme. So it looks like the default theme.

afam4eva

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.

Arantor

-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?

Sleezy

Configriation - Themes and layouts - Modify - Find the theme and click "Copy a template from the theme this is based on."
SMFNew Advocate for SMFNew (Dagger)

alianos

Still, where is the smf_theme? Because from the looks of it, its not in the database!

Illori

it has to exist in the database otherwise your forum would not work.

alianos

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?


alianos

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!

Advertisement: