Implement a simple form to save custom markdown-enabled content in the
forge's admin area that is displayed instead of the default project list. Sanitize the URLs that we're using and make a redirect to the listProjects page when no custom forge page is enabled.
This commit is contained in:
@@ -70,4 +70,20 @@ class IDF_Forge
|
||||
}
|
||||
return $tags;
|
||||
}
|
||||
|
||||
public function setCustomForgePageEnabled($enabled) {
|
||||
$this->conf->setVal('custom_forge_page_enabled', $enabled);
|
||||
}
|
||||
|
||||
public function isCustomForgePageEnabled($default = false) {
|
||||
return $this->conf->getVal('custom_forge_page_enabled', $default);
|
||||
}
|
||||
|
||||
public function getCustomForgePageContent($default = '') {
|
||||
return $this->conf->getVal('custom_forge_page_content', $default);
|
||||
}
|
||||
|
||||
public function setCustomForgePageContent($content) {
|
||||
$this->conf->setVal('custom_forge_page_content', $content);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user