Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

Community



Stats

  • *Total Members: 4442
  • *Latest: Argon2

  • *Total Posts: 16406
  • *Total Topics: 2506
  • *Online Today: 14
  • *Most Online: 292
(12.11.16, 09:37:31)
  • *Users: 0
  • *Guests: 0
  • *Spiders: 7
  • *Total: 7

  • *Yahoo!
  • *Google (3)
  • *Baidu (3)

Author Topic: Selecting custom themes  (Read 8969 times)

0 Members and 0 Guests are viewing this topic.

Offline aCOSwt

  • Newbie
  • *
  • Posts: 8
    • Sport cérébral - Jeux littéraires
Selecting custom themes
« on: 17.08.14, 10:06:02 »
Hello,

Running SMF 2.0.8, I installed the PMx-SubForums 1.41 mod.

Before the installlation of the mod, I had designed a custom theme based on a copy of the SMF default.

I modified the index.css as well as the index.template.php

PMx-Subforums mod installed, I realize that my custom theme is not listed in the subforums configuration theme dropbox.
Only [default] [SMF-core] and [SMF-curve] are listed.

The only way I can have my custom theme applying to the subforum is to make it the forum's default theme and then select [default] in the subforums configuration theme dropbox.

What have I done wrong ?  :-X

Offline portamx

  • Administrator
  • *
  • Posts: 156
Re: Selecting custom themes
« Reply #1 on: 17.08.14, 12:45:07 »
You have your customer theme installed? If not, then it can not listed in the dropdown...

Offline aCOSwt

  • Newbie
  • *
  • Posts: 8
    • Sport cérébral - Jeux littéraires
Re: Selecting custom themes
« Reply #2 on: 17.08.14, 14:13:40 »
Well... since it appears listed in all possible SMF dropboxes / checkboxes apart from the subforums configuration page, I believe that it is actually installed.

And I can confirm that it was actually installed prior to the installation of the PMx-SubForums 1.41 mod.

Offline portamx

  • Administrator
  • *
  • Posts: 156
Re: Selecting custom themes
« Reply #3 on: 18.08.14, 10:30:48 »
Look at your settings if this theme selectable for all users ... if not, you can't select in subforums....

Offline aCOSwt

  • Newbie
  • *
  • Posts: 8
    • Sport cérébral - Jeux littéraires
Re: Selecting custom themes
« Reply #4 on: 18.08.14, 11:55:38 »
Yes! This custom theme is actually selectable by all users.
I'd be grateful if you could direct me to the part of the code (file name + line numbers approx) where that dropbox is initialized. I might try to understand what happens.

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5786
  • Gender: Female
Re: Selecting custom themes
« Reply #5 on: 18.08.14, 17:37:15 »
In SubForumsAdmin.php you find this:
Code: [Select]
// get known themes
$context['subforums']['SMF_Themes'] = array();
$request = $smcFunc['db_query']('', '
SELECT id_theme, value
FROM {db_prefix}themes
WHERE variable = {string:varname} AND id_theme IN({array_int:knownThemes})
ORDER BY id_theme',
array(
'varname' => 'name',
'knownThemes' => explode(',', $modSettings['knownThemes']),
)
);
while($row = $smcFunc['db_fetch_assoc']($request))
{
if($row['id_theme'] != $modSettings['theme_guests'])
$context['subforums']['SMF_Themes'][$row['id_theme']] = $row['value'];
}
$smcFunc['db_free_result']($request);
Many are stubborn in relation to the path, a few in relation to the target.

Offline ahrasis

  • Full Member
  • ***
  • Posts: 134
  • Gender: Male
  • Peace2u
    • ahrasis
Re: Selecting custom themes
« Reply #6 on: 19.08.14, 15:58:50 »
It should detect your custom theme if you copy it via theme installer. However, if you didn't copy it that way, it won't appear. IMO, you will need to install for it to be in SMF system and therefore detected by Subforums mod.