Server IP : 104.244.120.118  /  Your IP : 216.73.216.198
Web Server : Apache
System : Linux ded5817.inmotionhosting.com 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 14:34:46 UTC 2026 x86_64
User : persoanlinjuryla ( 1006)
PHP Version : 8.5.13
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0555) :  /../../opt/dedrads/python/../python/../python/../python/../python/../cms_tools/mods/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //../../opt/dedrads/python/../python/../python/../python/../python/../cms_tools/mods/phpbb.py
#! /usr/lib/rads/venv/bin/python3
"""Subclass for phpBB CMS"""
# Author: Daniel K

import os
import logging
from typing import TYPE_CHECKING
from ..cms import CMS
from ..cms import VariableData

if TYPE_CHECKING:
    from ..cms import CMSFind

LOGGER = logging.getLogger(__name__)


class PhpBB(CMS):
    '''
    Class for phpBB installations
    '''

    def setup(self):

        self.type = 'phpBB'

        self.config = os.path.join(self.directory_root, 'config.php')

        self.db_name_data = VariableData('php_variable', 'dbname', self.config)
        self.db_user_data = VariableData('php_variable', 'dbuser', self.config)
        self.db_pass_data = VariableData(
            'php_variable', 'dbpasswd', self.config
        )
        self.db_pref_data = VariableData(
            'php_variable', 'table_prefix', self.config
        )
        self.db_host_data = VariableData('php_variable', 'dbhost', self.config)

        self.cms_directories = [
            "language",
            "vendor",
            "phpbb",
            "bin",
            "includes",
            "download",
            "styles",
            "docs",
            "assets",
            "store",
            "files",
            "config",
            "ext",
            "adm",
            "cache",
            "images",
        ]

        return True


def register_cms(cms_find_instance: 'CMSFind'):
    '''
    Register self with current cms_find_instance
    '''

    cms_find_instance.add_quick("phpBB", PhpBB)