Commit c718256b authored by Patrick Barroca's avatar Patrick Barroca 🤞

Contrib instrutions translated

parent 8fbecf1f
# Contribute to source code
## Content
* [Prerequisite](#Prerequisite)
* [Create your own copy of the project](#Create-your-own-copy-of-the-project)
* [How to contribute to the source code](#How-to-contribute-to-the source-code)
* [Create a new skin](#Create-a-new-skin)
## Prerequisite
AFI & BIBLIBRE developpment teams use the opensource [forge]( libre [GitLab]( and the[SCM]( [Git]( Ce document décrit l'utilisation minimale nécessaire de ces deux outils pour pouvoir contribuer au code des projets maintenus par AFI et Biblibre. Néanmoins nous vous invitons à lire le livre [Pro Git](
Source code are hosted on Public projects are accessible here
## Create your own copy of the project
### Create a gitlab account
From the [Sign Up]( page, you can create your account. You will receive a confirmation email.
### Clone the project
Once connected, from the [OPACCE project page](, clic on the **Fork repository** button. You can also clone the project [here](
This will create your own public copy of the project accessible through
The SSH access is given from your project home page. for example
### Installing SSH access
In order to upload modifications on the gitlab you need SSH access. On [Your account page](, in the [SSH Keys]( tab, use the link [Add SSH Key](
#### Create & register your key
If you already have a key on your workstation in **~/.ssh/**, copy it.
otherwise, [ generate a key ](, with the following command:
ssh-keygen -t rsa -C "addresse_email@domaine.ext"
to show the content:
cat ~/.ssh/
#### configure SSH access
SS access uses **2950** port. Create or modify the **~/.ssh/config** file to add the following lines:
Port 2950
User git
IdentityFile ~/.ssh/id_rsa
## How to contribute to the source code
### Install your own copy of the project
The install process is described [in](, unlike described in the [Downloading source code]( section, you should use your own depository:
cd /var/www
git clone
### Update files and push them to gitlab
Once your done with your udpates, the file upload is done in two steps.
1. Commit your modifications locally
git commit -a -m "Commentaires des modifications"
2. Push your master branch to gitlab (origin):
git push origin master
For more details please check [Pro Git](
### Propose patches to the release team
On your private GitLab page, **Merge Requests** tab, clic on the link **+ New Merge Request** and fill the form to describe your patch.
### retrieve the last official release
Declate the official version depository (upstream) in your local project:
git remote add upstream
Merge modifications:
# Download all modification from the master project
git fetch upstream master
# Merge the modifications in your local project
git merge upstream/master
# Push the result on the depository
git push origin master
## Create a new skin
### Create
Go to the skin directory in the root folder and duplicate it
cd skins
cp -a ../public/opac/skins/modele mon_skin
Go the the profil config page in the opac back office, you should see your skin in the combo.
### Save you skin on GitLab
Create a project on [GitLab]( to store the sourcecode. For exemple
Go to my_skin and initialise the depository:
cd mon_skin
git init
git remote add origin -t master
git add *
git commit -m "Premier commit"
git push origin master
Now, new files should be acessible from
### Folder description
* **css/** contains the global.css file where to work. Other files are deprecated.
* **images/** icons **images/support/** for doc types. Files must be named: **support_id_.png**, for exemple **support_1.png** for books.
* **templates/** Box template on the home page. Files must be named with **_**, the liste will appear in the combo **Box style**. Every template can include tags **{TITRE}**, **{RSS}**, **{CONTENU}**. Pour avoir un rendu conditionnel, le fichier peut inclure les conditions **{IF-TITRE}**, **{IF-RSS}**, **{IF-CONTENU}** suivi de la balise **{ENDIF}**
<div class="right-box">
<div class="right-box-inner">
<div class="header">
<div class="rss">{RSS}</div>
<div class="content">
All files can be renamed in **application/modules/opac/views/scripts** . main files are:
* **footer.phtml** pour le pied de page
* **banniere.phtml** pour l'en-tête
* **skin_head.phtml** pour rajouter des éléments dans la balise **head** du site
* **accueil.phtml** pour la page d'accueil
* **contenu.phtml** pour les autres pages
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment