-
Notifications
You must be signed in to change notification settings - Fork 6
Configuration
In order to adapt the web site to your needs, you will have to make some customization. First of all, the configuration files, their rely on two things, the config.py file via the index.xml file and the head of index.php file. You will find below a description on the several parts. In a second time, you have to translate your categories, licenses and anti-features files. ###config.py###
One part comes from the config.py via the index.xml file
- The repo's name (B)
- The repo's description (D)
- The repo's address (in order to make the repo's qr-code) (C)
- The repo's icon name (A)
- The repo's public key (in order to make the repo's qr-code) (C)
- The repo's timestamp (for the atom feed generation) (F)
In order to make the QR-Code (C) work with the f-droid app, your repository address must contain at least:
- the path /fdroid/repos like in: https://yourserveraddress/fdroid/repo/
- the scheme must be: fdroidrepo(s) like in: fdroidrepos://yourserveraddress/ (with ssl) or fdroidrepo://yourserveraddress/
The icon of your website must be in the Media/images/ directory and mathc the name of your icon declared in the config.py file.
###index.php### The second part take place inside de index.php script between lines 16 and 50
####The directories####
Constant | Type | Description | Default value |
---|---|---|---|
ROOT | string | The server's root | dirname(__FILE__) |
SOCIAL_DIR | string | Contains the social media icons | 'Media/images/social_icons/' |
ICONS_DIR* | string | Contains the app's big icons | 'icons-320' |
ICONS_DIR_ABSTRACT* | string | Contains the app's little icons | 'icons-120' |
TEMPLATE_DIR | string | Contains themes directory | ROOT.'/templates' |
DEFAULT_THEME | string | Default theme selected | 'default' |
THEME | string | Theme selected | 'default' |
QRCODES_DIR | string | Contains the apps qr_codes | 'qrcodes' |
LANG | string | Contains the languages pack | 'lang' |
CACHE | string | Contains cached files (mostly data structures) | ROOT.'/cache' |
APP_CACHE | string | Contains the app data structured | CACHE.'/app_files' |
* Change this if your webserver's root is not ./repo | |||
####The files#### |
Constant | Type | Description | Default value |
---|---|---|---|
CATEGORIES* | string | The file which list all the categories (from f-droid server) | ROOT.'/categories.txt' |
DATA* | string | The file which conatins all the data (from f-droid server) | ROOT.'/index.xml' |
REPOS_FILE | string | The file which contains the data structure of the repository | CACHE.'/repository' |
CAT_FILE | string | List of categories | CACHE.'/categories' |
REL_FILE | string | Structure storing relations between apps and categories | CACHE.'/relations' |
LIC_FILE | string | List of licenses | CACHE.'/licenses' |
LAST_FILE | string | List of last apps | CACHE.'/last_apps' |
WORD_FILE | string | Structure which contains an array with words for keys and apps' id for records | CACHE.'/words' |
MANIFEST | string | The file which contains the hash of index.xml (use to update the website cache) | CACHE.'/Manifest' |
FEED_NAME | string | The Atom feed | 'last_app.atom' |
REPOS_QRCODE | string | Name of the repository QR-code | QRCODES_DIR . "/repos_qrcode.png" |
* Change this if your webserver's root is not ./repo | |||
####The parameters#### |
Constant | Type | Description | Default value |
---|---|---|---|
FLATTR_SCHEME | string | The flattr scheme | 'https://flattr.com/thing/' |
HASH_ALGO | string | The hash algo used to compute the manifest | 'whirlpool' |
HASH_REPOS_PUBKEY | string | the hash algo used for fingerprinting the repo's public key | 'sha256' |
USE_QRCODE | boolean | Do you want to use QR-Codes | true |
USE_FEEDS | boolean | Do you want to display an Atom feed | true |
USE_SOCIAL | boolean | Do you want to use social links | true |
FEED_AUTHOR* | string | Author of the Atom feed | "Feed's author" |
NUMBER_LAST_APP | integer | Number of last updated/add apps | 10 |
RECORDS_PER_PAGE | integer | Number of record per pages | 12 |
NUMBER_PAGES | integer | length of the pager sequence | 9 |
DEFAULT_LANG* | string | UI default language | 'fr' |
LOCALIZATION* | string | Localization of the serach engine | 'fr' |
MSG_FOOTER* | string | The footer's message | "Your footer's message here" |
* Values that you surely want to change |