Red Developer GuideFile system layout:[addon] optional addons/plugins
[boot.php] Every process uses this to bootstrap the application structure
[doc] Help Files
[images] core required images
[include] The "model" in MVC - (back-end functions), also contains PHP "executables" for background processing
[index.php] The front-end controller for web access
[install] Installation and upgrade files and DB schema
[library] Third party modules (must be license compatible)
[mod] Controller modules based on URL pathname (e.g.
#^http://sitename/foo loads mod/foo.php)
[mod/site/] site-specific mod overrides, excluded from git
[util] translation tools, main English string database and other miscellaneous utilities
[version.inc] contains current version (auto-updated via cron for the master repository and distributed via git)
[view] theming and language files
[view/(css,js,img,php,tpl)] default theme files
[view/(en,it,es ...)] language strings and resources
[view/theme/] individual named themes containing (css,js,img,php,tpl) over-rides
The Database: abook - contact table, replaces Friendica 'contact' account - service provider account addon - registered plugins app - peronal app data attach - file attachments auth_codes - OAuth usage cache - OEmbed cache channel - replaces Friendica 'user' chat - chat room content chatpresence - channel presence information for chat chatroom - data for the actual chat room clients - OAuth usage config - main configuration storage conv - Diaspora private messages event - Events fcontact - friend suggestion stuff ffinder - friend suggestion stuff fserver - obsolete fsuggest - friend suggestion stuff groups - privacy groups group_member - privacy groups hook - plugin hook registry hubloc - Red location storage, ties a location to an xchan item - posts item_id - other identifiers on other services for posts likes - likes of 'things' mail - private messages manage - may be unused in Red, table of accounts that can "su" each other menu - channel menu data menu_item - items uses by channel menus notify - notifications notify-threads - need to factor this out and use item thread info on notifications obj - object data for things (x has y) outq - Red output queue pconfig - personal (per channel) configuration storage photo - photo storage poll - data for polls poll_elm - data for poll elements profdef - custom profile field definitions profext - custom profile field data profile - channel profiles profile_check - DFRN remote auth use, may be obsolete register - registrations requiring admin approval session - web session storage shares - shared item information [li[sign - Diaspora signatures. To be phased out.[/li]
site - site table to find directory peers source - channel sources data spam - unfinished sys_perms - extensible permissions for the sys channel term - item taxonomy (categories, tags, etc.) table tokens - OAuth usage updates - directory sync updates verify - general purpose verification structure vote - vote data for polls xchan - replaces 'gcontact', list of known channels in the universe xchat - bookmarked chat rooms xconfig - as pconfig but for channels with no local account xlink - "friends of friends" linkages derived from poco xprof - if this hub is a directory server, contains basic public profile info of everybody in the network xtag - if this hub is a directory server, contains tags or interests of everybody in the network How to theme Red - by Olivier MigeotThis is a short documentation on what I found while trying to modify Red's appearance.
First, you'll need to create a new theme. This is in /view/theme, and I chose to copy 'redbasic' since it's the only available for now. Let's assume I named it .
Oh, and don't forget to rename the _init function in /php/theme.php to be _init() instead of redbasic_init().
At that point, if you need to add javascript or css files, add them to /js or /css, and then "register" them in _init() through head_add_js('file.js') and head_add_css('file.css').
Now you'll probably want to alter a template. These can be found in in /view/tpl OR view//tpl. All you should have to do is copy whatever you want to tweak from the first place to your theme's own tpl directory.
Return to the
Main documentation page