Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prend mes changes ! #1

Merged
12 commits merged into from
Jan 10, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions README.textile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
h1. Yopyop

h2. About

Yopyop is a CMS written in php+mysql. It focus on "semantic web" (tags, nice url) and includes a calendar.

h2. Installation

# create a database with help of sql/yopyop.sql
# copy include/init/config-sample.php to include/init/config.php and edit it
# give write access to include/tpl/templates_c/ (eg: chmod o+w include/tpl/templates_c/ )
# default login and password is "admin" and "soleil"
12 changes: 12 additions & 0 deletions htdocs/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
RewriteEngine On

# If file/directory exists, serve it
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

# Otherwise, try to rewrite including id, or without id
RewriteRule ^([a-zA-Z]+)/(.*/)?([0-9]+)-.*\.([a-z]+)$ index.php?page=$1&keywords=$2&id=$3&output=$4 [L]
RewriteRule ^([a-zA-Z]+)/(.*/)?(.*\.([a-z]+))?$ index.php?page=$1&keywords=$2&output=$4 [L]

10 changes: 5 additions & 5 deletions index.php → htdocs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
*
*/

require('include/init/init.php');
require('../include/init/init.php');
new Init(); //initialise l'application en créant les objets utiles
include('include/init/identity.php'); // détecte l'identité de l'utilisteur
include('../include/init/identity.php'); // détecte l'identité de l'utilisteur

// les infos utiles sur la ressource son accessible de partout
global $ressourceType, $ressourceTags, $ressourceId, $ressourceOutput, $theme;
Expand Down Expand Up @@ -79,7 +79,7 @@

header('Content-Type: application/pdf');
header('Content-Disposition: inline; filename="'.$ressourceName.'.pdf"');
include("include/lib/prince.php");
include("../include/lib/prince.php");

// va cherche le même contenu mais en html
$urlSource = "http://".$serveur.$requete;
Expand Down Expand Up @@ -130,9 +130,9 @@ function curl_get_file_contents($URL){

if (empty($ressourceType)) {$ressourceType = 'accueil';} // page par défaut

if (file_exists('include/controller/'.$ressourceType.'.php')) {
if (file_exists('../include/controller/'.$ressourceType.'.php')) {
// inclut une page PHP dynamique si elle existe (elle se charge de l'affichage via Smarty)
include('include/controller/'.$ressourceType.'.php');
include('../include/controller/'.$ressourceType.'.php');
} else {
// affiche un message d'erreur "page introuvable"
$smarty->assign('contenu',"pageinconnue.tpl");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
*/

require_once('../../include/init/init.php');
require_once('../../../include/init/init.php');
new Init(); //initialise l'application en créant les objets utiles

// obtient la date sur laquelle on va travailler
Expand Down
2 changes: 1 addition & 1 deletion utile/ajax/carto.php → htdocs/utile/ajax/carto.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
*/

require_once('../../include/init/init.php');
require_once('../../../include/init/init.php');
new Init(); //initialise l'application en créant les objets utiles

// récupère les coordonnées lat lng
Expand Down
2 changes: 1 addition & 1 deletion utile/ajax/login.php → htdocs/utile/ajax/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
*/

require_once('../../include/init/init.php');
require_once('../../../include/init/init.php');
new Init(); //initialise l'application en créant les objets utiles

if (isset($_POST['pseudo']) && isset($_POST['password'])) {
Expand Down
6 changes: 5 additions & 1 deletion utile/ajax/ticket.php → htdocs/utile/ajax/ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
*/

require_once('../../include/init/init.php');
require_once('../../../include/init/init.php');
new Init(); //initialise l'application en créant les objets utiles

// nom du cookie d'authentification
Expand All @@ -26,6 +26,10 @@
}
$domain = '.'.$domain; // notation ".mondomaine.ch" pour couvrir tous les sous-domaines

// Domain cannot be ".localhost" because it must contains at least two dots, see http://www.faqs.org/rfcs/rfc2109.html
if (substr_count($domain, '.') < 2)
$domain = null;

// validité en secondes du cookie d'authentification
$authCookieLifetime = 3600;

Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading