Jump to content

App themesettings.json file doesnt work?


Go to solution Solved by Daniel F,

Recommended Posts

Posted

In my app data\themesettings.json file, I have added one theme setting which supposed to be installed and show for all themes

[
  {
      "sc_key": "tadarkmode_colorscheme",
      "sc_type": "TextArea",
      "sc_multiple": 0,
      "sc_content": "[]",
      "sc_app": "darkmode",
      "sc_default": "",
      "sc_tab_key": "darkmode",
      "sc_show_in_vse": 0,
      "sc_title": "tadarkmode_colorscheme",
      "sc_order": 11,
      "sc_condition": null
  }
]

can someone tell me why this doesn't work? the theme setting does not show anywhere in my themes. is there anything that needs to be configured in order for themesettings.json to work?

clearing caches and enabling/disabling the app has no effect and the setting is not added in the "core_theme_settings_fields" table in the database!

Thanks in advance 

  • Solution
Posted

This file should never be edited manually( like any of the files inside the data directory!) , it’s managed by the system and contains the stuff which you add via the ACP! So to add your theme setting you’ll literally need to add it on the ACP-customizations- themes page. 

Posted (edited)
9 hours ago, Daniel F said:

This file should never be edited manually( like any of the files inside the data directory!) , it’s managed by the system and contains the stuff which you add via the ACP! So to add your theme setting you’ll literally need to add it on the ACP-customizations- themes page. 

wow and I thought i can define theme settings for my application with that file!

 

anyway please answer this question before i submit my app in the marketplace 😅

Quote

2.2.8.                 Your resource must not add columns to any existing Invision Community database table. You must add your own tables to contain data for your resource.

are we allowed to add data (new rows) to the existing database tables like "core_theme_settings_fields"? (I know I must clear them out after app uninstallation)

say in my app I'm using this, \IPS\Db::i()->insert( 'core_theme_settings_fields', $newThemeSettings ) are you going to reject this apps? I'm not adding new columns or modifying the existing ones, and i don't want to create a new database table just for a few theme settings!

 

 

 

Edited by TAMAN
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...