1
jbouv55151
One page per user
  • 2004/11/18 8:16

  • jbouv55151

  • Just popping in

  • Posts: 6

  • Since: 2004/11/18


Hello everybody,
I am using XOOPS 2.0.7 and I am trying to do a personnal page per user.
I tried to do one page :
- a personnal page per user with private information
- nobody else can see the page
- only the admin can modified this page.

With the help of XOOPS France, I have already do this :
<? php
include("mainfile.php");
include(
"include/functions.php");
include(
XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
$lien=$xoopsUser->getVar('uid');
include(
"pageshtml/$lien.html");
include(
XOOPS_ROOT_PATH."/footer.php");
?>

I put this file in the XOOPS root path and my html page in the pageshtml folder. Html pages are named like this user id.html (for the webmaster 1.html).

My problem is I have white page when I can my php page.
I have mistake somewhere but I don't know what.

Can you help me ?

2
winsion
Re: One page per user
  • 2004/11/18 10:49

  • winsion

  • Just popping in

  • Posts: 55

  • Since: 2003/11/23


ben oui c'est encore moi

tu ne peux pas inclure un fichier .html mais seulement un fichier php... sinon il faut faire un lien.

tu peux faire un fichier php avec tu html dedans sans problème :

<? php
include("mainfile.php");
?>

code page html


après tu peux faire un include ("pagehtml/$lien.php");

3
jbouv55151
Re: One page per user
  • 2004/11/18 11:32

  • jbouv55151

  • Just popping in

  • Posts: 6

  • Since: 2004/11/18


This is exactly what I have done :
- a page named mapage.php located in XOOPS root path.
<?php
include("mainfile.php");
include(
"include/functions.php");
include(
XOOPS_ROOT_PATH."/header.php");

$xoopsOption['show_rblock'] = 1;
$lien$xoopsUser->getVar('uid');
include(
"pages/$lien.php");
include(
XOOPS_ROOT_PATH."/footer.php");
?>


- a page named 1.php located in "pages" folder
<?php
include("../mainfile.php");
?>
<html>
<body>
*** ICI VOTRE CODE HTML ***
</body>
</html>


When I am login withe the webmaster account with the id 1 and I go to the mapage.php, I see a fully whithe page, nothing of my website.
I would like to see *** ICI VOTRE CODE HTML ***.
I don't understand anything.
Help-me...

4
rowdie
Re: One page per user
  • 2004/11/18 12:33

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


I think the problem is with
include("pages/$lien.php");
The file name can't be a variable when it's in quotes like that, at a guess.

Try something like
$lien"pages/".$xoopsUser->getVar('uid').".php";

include(
$lien);


This is just a guess, haven't tested it at all.

Rowd

5
jbouv55151
Re: One page per user
  • 2004/11/18 13:21

  • jbouv55151

  • Just popping in

  • Posts: 6

  • Since: 2004/11/18


Thanks, good idea, It's an another way to do it.
But my problem is still there.

6
rowdie
Re: One page per user
  • 2004/11/18 14:13

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


have you got php debug on, and if so do you get any error messages from php debug?

7
winsion
Re: One page per user
  • 2004/11/18 14:30

  • winsion

  • Just popping in

  • Posts: 55

  • Since: 2003/11/23


page url :
<?
include(
"mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");

$xoopsOption['show_rblock'] = 1// 1 = Avec blocs de droite - 0 = Sans blocs de droite$lien= $xoopsUser->getVar('uid');


echo "<a href=".$xoopsUser->getVar('uid').".php>Cliquez-ici </a> ";

include(
XOOPS_ROOT_PATH."/footer.php");
?>


page reception 1.php for uid=1

<?
include(
"mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");

$xoopsOption['show_rblock'] = 1// 1 = Avec blocs de droite - 0 = Sans blocs de droite$lien= $xoopsUser->getVar('uid');

if ($xoopsUser->getVar('uid')<>1)
{
redirect_header('index.php',3,_US_NOEDITRIGHT);}

else 
?>
<p>Hello my html</p>

<?
include(XOOPS_ROOT_PATH."/footer.php"); ?>

8
Mikhail
Re: One page per user
  • 2005/4/8 23:16

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


Hi! I have coded a win32 apps to automatize this task...

download:


mozilla based version:
http://prdownloads.sourceforge.net/xoopsbrasil/xisp-02-br.zip?download

internet exploder sux version:
http://prdownloads.sourceforge.net/xoopsbrasil/xisp-01-br.zip?download

screenshots:





Resized Image


Resized Image


Resized Image


Resized Image


Resized Image

Login

Who's Online

223 user(s) are online (137 user(s) are browsing Support Forums)


Members: 0


Guests: 223


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits