> For the complete documentation index, see [llms.txt](https://playground.e107sk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://playground.e107sk.com/e107-efiction-integration/outdated/site-settings.md).

# Site Settings

eFiction way:

global variable $settings

```
  $settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
  $settings = dbassoc($settingsresults); 
  
  unset($settings['sitekey']);
   
  unset($settings['tableprefix']);
  define("STORIESPATH", $settings['storiespath']);
  unset($settings['storiespath']);
  foreach($settings as $var => $val) {
  	$$var = stripslashes($val);
  	$settings[$var] = htmlspecialchars($val);
  }
```

it creates variables from column names, those variables should be replaced...

new way:

**e\_module:**

`e107::getSingleton('efiction_settings', e_PLUGIN.'efiction/classes/settings.class.php');`

```
$settings = efiction_settings::get_settings();
```

**header** (temp solution)

```
$settings = efiction_settings::get_settings();
foreach($settings as $var => $val) {
  	$$var = stripslashes($val);
}
```
