Comment mettre du texte en visible que pour les visiteurs
ReidLos Membre non connecté
-
Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
-
Equipe Développement
Reprise du message précédent
Voilà un l'index.php :Code PHP :
<?php /*################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ define('PATH_TO_ROOT', '.'); define('TITLE', 'Mon index'); include_once('../kernel/begin.php'); include_once('../kernel/header.php'); if ($User->check_level(MEMBER_LEVEL)) { //Ici tu affiche le texte quand ton membre est connecté. echo 'Le code à afficher pour les membres ici'; } else { //Ici c'est pour les visiteurs echo 'Le code à afficher pour les visiteurs ici'; } include_once('../kernel/footer.php'); ?>
Il faudra l'éditer en conséquence.
triphaze Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre triphaze
- Inscrit le : 13/01/2011
- Site internet
ReidLos Membre non connecté
-
Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
-
Equipe Développement
triphaze Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre triphaze
- Inscrit le : 13/01/2011
- Site internet
triphaze Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre triphaze
- Inscrit le : 13/01/2011
- Site internet
Citation :
Warning: include_once() [function.include-once]: open_basedir restriction in effect. File(../kernel/begin.php) is not within the allowed path(s): (/var/www/handicapdetente.com/htdocs/:/var/www/handicapdetente.com/phptmp/) in /var/www/handicapdetente.com/htdocs/index.php on line 24
Warning: include_once(../kernel/begin.php) [function.include-once]: failed to open stream: Operation not permitted in /var/www/handicapdetente.com/htdocs/index.php on line 24
Warning: include_once() [function.include]: Failed opening '../kernel/begin.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/handicapdetente.com/htdocs/index.php on line 24
Warning: include_once() [function.include-once]: open_basedir restriction in effect. File(../kernel/header.php) is not within the allowed path(s): (/var/www/handicapdetente.com/htdocs/:/var/www/handicapdetente.com/phptmp/) in /var/www/handicapdetente.com/htdocs/index.php on line 25
Warning: include_once(../kernel/header.php) [function.include-once]: failed to open stream: Operation not permitted in /var/www/handicapdetente.com/htdocs/index.php on line 25
Warning: include_once() [function.include]: Failed opening '../kernel/header.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/handicapdetente.com/htdocs/index.php on line 25
Fatal error: Call to a member function check_level() on a non-object in /var/www/handicapdetente.com/htdocs/index.php on line 27
Warning: include_once() [function.include-once]: open_basedir restriction in effect. File(../kernel/begin.php) is not within the allowed path(s): (/var/www/handicapdetente.com/htdocs/:/var/www/handicapdetente.com/phptmp/) in /var/www/handicapdetente.com/htdocs/index.php on line 24
Warning: include_once(../kernel/begin.php) [function.include-once]: failed to open stream: Operation not permitted in /var/www/handicapdetente.com/htdocs/index.php on line 24
Warning: include_once() [function.include]: Failed opening '../kernel/begin.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/handicapdetente.com/htdocs/index.php on line 24
Warning: include_once() [function.include-once]: open_basedir restriction in effect. File(../kernel/header.php) is not within the allowed path(s): (/var/www/handicapdetente.com/htdocs/:/var/www/handicapdetente.com/phptmp/) in /var/www/handicapdetente.com/htdocs/index.php on line 25
Warning: include_once(../kernel/header.php) [function.include-once]: failed to open stream: Operation not permitted in /var/www/handicapdetente.com/htdocs/index.php on line 25
Warning: include_once() [function.include]: Failed opening '../kernel/header.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/handicapdetente.com/htdocs/index.php on line 25
Fatal error: Call to a member function check_level() on a non-object in /var/www/handicapdetente.com/htdocs/index.php on line 27
ReidLos Membre non connecté
-
Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
-
Equipe Développement
Code PHP :
<?php /*################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ define('PATH_TO_ROOT', '.'); define('TITLE', 'Mon index'); include_once('/kernel/begin.php'); include_once('/kernel/header.php'); if ($User->check_level(MEMBER_LEVEL)) { //Ici tu affiche le texte quand ton membre est connecté. echo 'Le code à afficher pour les membres ici'; } else { //Ici c'est pour les visiteurs echo 'Le code à afficher pour les visiteurs ici'; } include_once('/kernel/footer.php'); ?>
triphaze Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre triphaze
- Inscrit le : 13/01/2011
- Site internet
Hardstyle Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre Hardstyle
- Inscrit le : 11/11/2010
Il faut que tu le mettre dans la page Index de ton site PBT a la racine .
voici le code donner par Reidlos :
Code PHP :
<?php /*################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ define('PATH_TO_ROOT', '.'); define('TITLE', 'Mon index'); include_once('/kernel/begin.php'); include_once('/kernel/header.php'); if ($User->check_level(MEMBER_LEVEL)) { //Ici tu affiche le texte quand ton membre est connecté. echo 'Le code à afficher pour les membres ici'; } else { //Ici c'est pour les visiteurs echo 'Le code à afficher pour les visiteurs ici'; } include_once('/kernel/footer.php'); ?>
Ensuite tu va dans Administration>Configuration.
Autre adresse relative ou absolue
Tu mais l'addre http://Tonsite.domaine/index.php
Et le tour et jouer.
Cordialement Hardstyle.
Édité par Hardstyle Le 21/09/2011 à 13h37
triphaze Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre triphaze
- Inscrit le : 13/01/2011
- Site internet
Voila mon erreur
Citation :
Warning: include_once() [function.include-once]: Unable to access /kernel/begin.php in /var/www/visiotop.fr/htdocs/shop/index.php on line 24
Warning: include_once(/kernel/begin.php) [function.include-once]: failed to open stream: Permission denied in /var/www/visiotop.fr/htdocs/shop/index.php on line 24
Warning: include_once() [function.include]: Failed opening '/kernel/begin.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/visiotop.fr/htdocs/shop/index.php on line 24
Warning: include_once() [function.include-once]: Unable to access /kernel/header.php in /var/www/visiotop.fr/htdocs/shop/index.php on line 25
Warning: include_once(/kernel/header.php) [function.include-once]: failed to open stream: Permission denied in /var/www/visiotop.fr/htdocs/shop/index.php on line 25
Warning: include_once() [function.include]: Failed opening '/kernel/header.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/visiotop.fr/htdocs/shop/index.php on line 25
Fatal error: Call to a member function check_level() on a non-object in /var/www/visiotop.fr/htdocs/shop/index.php on line 27
triphaze Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre triphaze
- Inscrit le : 13/01/2011
- Site internet
Code PHP :
<?php //Licence /*################################################## * index.php * ------------------- * begin : Date de création du fichier * copyright : (C) 2007 Nom du/des développeur(s) * email : email du/des développeur(s) * * ################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ define('PATH_TO_ROOT', '.'); //Début du chargement de l'environnement include_once('./kernel/begin.php'); //Chargement d'un fichier css, ici le fichier css du module news define('ALTERNATIVE_CSS', 'news'); //Titre de la page, ici Accueil define('TITLE', 'Accueil'); //Chargement de l'environnement ( header ) require_once('./kernel/header.php'); //Chargement des fichiers de langue global $LANG; if ($User->check_level(MEMBER_LEVEL)) { //Ici tu affiche le texte quand ton membre est connecté. echo 'Le code à afficher pour les membres ici'; } else { //Ici c'est pour les visiteurs echo 'Le code à afficher pour les visiteurs ici'; } //Chargement d'un fichier tpl ( non actif ici, pour le rendre actif supprimer "//" //$tpl_accueil = new Template('accueil/accueil.tpl'); ## Début du contenu de la page, scripts de votre module ## ?> <!-- Cette page est à titre indicatif des possibilités de ce que vous pouvez faire/ajouter sur une page index --> <br /> <?php //Footer include_once('./kernel/footer.php'); ?>
Que j'ai récupe en parti chez swan (merci)
Édité par triphaze Le 23/09/2011 à 15h44
triphaze Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre triphaze
- Inscrit le : 13/01/2011
- Site internet
Voila mon code y a t'il moyen de les mettre s'il vous plait?
Code PHP :
<?php //Licence /*################################################## * index.php * ------------------- * begin : Date de création du fichier * copyright : (C) 2007 Nom du/des développeur(s) * email : email du/des développeur(s) * * ################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ define('PATH_TO_ROOT', '.'); //Début du chargement de l'environnement include_once('./kernel/begin.php'); //Chargement d'un fichier css, ici le fichier css du module news define('ALTERNATIVE_CSS', 'news'); //Titre de la page, ici Accueil define('TITLE', 'Accueil'); //Chargement de l'environnement ( header ) require_once('./kernel/header.php'); //Chargement des fichiers de langue global $LANG; if ($User->check_level(MEMBER_LEVEL)) { //Ici tu affiche le texte quand ton membre est connecté. echo '<p style="text-align: left;"> </p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>Au bout de neuf mois de gestation et pas mal de nuits blanches,nous sommes heureux de vous présenter notre bébé que nous avons baptisé Handicap Détente.</strong></span></p> <p style="text-align: left;"> </p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>Pourquoi avoir créé notre propre espace alors que le net foisonne de sites similaires?</strong></span></p> <p style="text-align: left;"> </p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>Comme son nom l indique, c est tout d abord pour "se détendre"!</strong></span></p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>Mais c est aussi pour permettre aux adhérents de s exprimer en toute liberté sur des sujets qui leur tiennent à coeur via les médias proposés,à condition bien sûr,que toute expression reste conforme aux CGU du site.</strong></span></p> <p style="text-align: left;"> </p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>Deuxièmement, ayant nous mêmes appartenu à quelques sites de ce genre,nous en sommes malheureusement arrivés à la conclusion que la plupart surfent sur le créneau des handicapé juste pour gagner de l argent sur leur dos. Si certains de ces sites sont gratuits pour les adhérents,il n en demeure pas moins que ceux qui les ont crées et les gèrent s en mettent plein les poches grâce à la publicité qui leur est octroyée au prorata du nombre d’inscrits. On voit donc des sites qui permettant à leurs adhérents de s inscrire avec dix, vingt, voir cinquante pseudos différents juste pour gonfler les chiffres.</strong></span></p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>N étant pas "modérées", les discussions dans les Tchats son la plupart du temps vulgaires, irrespectueuses,voir racistes et homophobes. De plus,certaines organisations malfaisantes profitent de ces espaces pour extorquer de l argent aux adhérents ou pour leur proposer des mariages "bidons" juste pour avoir les documents de résidence en France.</strong></span></p> <p style="text-align: left;"> </p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>Pour éviter ce genre de situation et pour que nos adhérents soient en sécurité,notre site est strictement surveillé par quatre administrateurs et une modératrice. Au moins une de ces quatre personnes est toujours présente dans le tchat et n hésitera pas à rappeler à l ordre voir à éjecter toute personne indésirable.</strong></span></p> <p style="text-align: left;"> </p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>Toute nouvelle inscription,tout article,toute photo,tout clip vidéo et tout commentaire sont contrôlés avant d être mis en ligne. Une fois en ligne,nous pouvons encore les modifier ou les effacer si nous pensons qu ils ne sont pas dans "l esprit" du site. N ayant aucune vocation commerciale,il n y a pas de pub dans notre site.</strong></span></p> <p style="text-align: left;"> </p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>Si malgré nos efforts, certains adhérents ont des comportements douteux en privé, n hésitez pas à nous le signaler. Merci à tous pour votre confiance!</strong></span></p> <p style="text-align: left;"> </p> <p style="text-align: left;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066"><strong>Les Administrateurs.</strong></span></p>'; } else { //Ici c'est pour les visiteurs echo '<p style="text-align: left;"> </p> <p style="text-align: center;"><span style="font-family: 'comic sans ms',sans-serif; font-size: x-large; color: #000066;"><strong>BIENVENUS SUR HANDICAP DETENTE</strong></span></p> <p style="text-align: center;"> </p> <p style="text-align: center;"><span style="font-family: 'comic sans ms', sans-serif; font-size: x-large; color: #000066;"><strong>ESPACE MULTIMEDIA ENTIEREMENT GRATUIT</strong></span></p> <p style="text-align: center;"> </p> <p style="text-align: center;"><span style="color: #000066;"><strong><span style="font-size: large;">Le but de ce site est d apporter des informations d ordre général sur le handicap mais aussi de permettre des échanges entre personnes en situation de handicap et personnes valides par le moyen d outils adaptés et évolutifs. Se voulant contributif, nous comptons sur vous pour rendre cet espace attractif et agréable pour tous, en nous apportant vos connaissances et votre expérience personnelle par le moyen du forum.</span></strong></span></p> <p style="text-align: center;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066;"><strong>Merci à tous.</strong></span></p> <p style="text-align: center;"> </p> <p style="text-align: center;"><span style="font-family: 'comic sans ms', sans-serif; font-size: large; color: #000066;"><strong>POUR PROFITER DE TOUTES LES FONCTIONNALITES DU SITE:</strong></span></p> <p style="text-align: center;"><a onclick="window.open(this);return false;" href="/member/register.php"><img style="border: 0px none; display: block; margin-left: auto; margin-right: auto;" onmouseover="this.src='/cooltext555274320.png'" onmouseout="this.src='/cooltext555274320MouseOver.png';" src="/cooltext555274320.png" /></a></p>'; } //Chargement d'un fichier tpl ( non actif ici, pour le rendre actif supprimer "//" //$tpl_accueil = new Template('accueil/accueil.tpl'); ## Début du contenu de la page, scripts de votre module ## ?> <!-- Cette page est à titre indicatif des possibilités de ce que vous pouvez faire/ajouter sur une page index --> <br /> <center><a href="http://television.telerama.fr/tele/grille.php" target=_blank><img src="http://img267.imageshack.us/img267/3922/42306369.jpg" alt="Image Hosted by ImageShack.us"/></a> <a href="http://www.allocine.fr/film/cettesemaine.html" target=_blank><img src="http://img836.imageshack.us/img836/6954/allocine.jpg" alt="Image Hosted by ImageShack.us"/></a></center> <br> <br /> <?php //Footer include_once('./kernel/footer.php'); ?>
triphaze Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre triphaze
- Inscrit le : 13/01/2011
- Site internet
Édité par triphaze Le 27/09/2011 à 21h12
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie