Author Topic: Member area  (Read 7483 times)

0 Members and 1 Guest are viewing this topic.

Offline hilflo

  • Full phpd Member
  • ***
  • Posts: 98
  • Karma: 2
  • Sorry for my bad english
    • View Profile
    • Les félés
Member area
« on: December 04, 2009, 11:13:27 PM »
I have create a member where member can :
- Register/login
- Upload an avatar
- Have a list of favorit videos.
- For those who used comment system, only member can post comment.

In future, I will try to add a PM system.

You can see it at http://www.play-online.bzh.be

You can download it here

Important, you will need to edit some files so try it in localhost before uploading to your webserver.

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Member area
« Reply #1 on: December 05, 2009, 12:00:19 AM »
I will see what I can do to incorporate this into the next release.

You did some nice work,
-FireDart

Offline hilflo

  • Full phpd Member
  • ***
  • Posts: 98
  • Karma: 2
  • Sorry for my bad english
    • View Profile
    • Les félés
Re: Member area
« Reply #2 on: December 05, 2009, 12:04:49 AM »
Thanks.

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Member area
« Reply #3 on: December 05, 2009, 12:50:37 AM »
How hard would it be to make a User CP[Control Panel]?

Something like:
yoursite.tld/user/index.php?user=1
yoursite.tld/user/index.php?user=2
yoursite.tld/user/index.php?user=3

So people can view your Profile and you can edit your CP at:
yoursite.tld/user/index.php?user=1&cp
yoursite.tld/user/index.php?user=2&cp
yoursite.tld/user/index.php?user=3&cp

You have already done a lot of work but something like this would be a good extension to your work.

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Member area
« Reply #4 on: December 05, 2009, 01:47:58 AM »
Hey, am trying to implement this into Version 3.0 and I get this error on the login.php:
Code: [Select]
Warning: Cannot modify header information - headers already sent by (output started at /home/content/**/*******/html/_sites/firedart/projects/phpdirector/config.php:2) in /home/content/**/*******/html/_sites/firedart/projects/phpdirector/login.php on line 64

Warning: Cannot modify header information - headers already sent by (output started at /home/content/**/*******/html/_sites/firedart/projects/phpdirector/config.php:2) in /home/content/**/*******/html/_sites/firedart/projects/phpdirector/login.php on line 65

Warning: Cannot modify header information - headers already sent by (output started at /home/content/**/*******/html/_sites/firedart/projects/phpdirector/config.php:2) in /home/content/**/*******/html/_sites/firedart/projects/phpdirector/login.php on line 69

Got any idea?

-FireDart

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
Re: Member area
« Reply #5 on: December 05, 2009, 02:35:27 AM »
I have create a member where member can :
- Register/login
- Upload an avatar
- Have a list of favorit videos.
- For those who used comment system, only member can post comment.

In future, I will try to add a PM system.

You can see it at http://www.play-online.bzh.be

You can download it here

Important, you will need to edit some files so try it in localhost before uploading to your webserver.


Great I am working on same thing
my test site her http://www.myfunnypets.com/123/

you must have a account before you can submit a video

it should also send you a e-mail with username and password.

I will look at yours looks like it might be better


winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
Re: Member area
« Reply #6 on: December 05, 2009, 02:52:28 AM »
I have create a member where member can :
- Register/login
- Upload an avatar
- Have a list of favorit videos.
- For those who used comment system, only member can post comment.

In future, I will try to add a PM system.

You can see it at http://www.play-online.bzh.be

You can download it here

Important, you will need to edit some files so try it in localhost before uploading to your webserver.


can you use something like
if($logged_in){


some code
}

on yours. what I mean is how would  place the login on other pages if loged in do this if not please login to view this page.

what I am using is something like this in the header.php

Code: [Select]

session_start ();
require_once("login.php");
if($logged_in){
         echo "Welcome <b>$_SESSION[username]</b>, you are logged in. <a href=\"logout.php\">Logout</a>";
 }
else


{

?>

<h1>Login</h1>
<form action="" method="post">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30"></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30"></td></tr>
<tr><td colspan="2" align="left"><input type="checkbox" name="remember">
<font size="2">Remember me next time</td></tr>
<tr><td colspan="2" align="right"><input type="submit" name="sublogin" value="Login"></td></tr>
<tr><font size="2"><td colspan="2" align="left"><a href="register.php">New Member Sign UP</a></td></tr>
<tr><font size="2"><td colspan="2" align="left"><a href=forgot-password.php>Forgot Password</a></td></tr>
</font>
</form>

<?

}



this
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
Re: Member area
« Reply #7 on: December 05, 2009, 03:45:25 AM »
I have create a member where member can :
- Register/login
- Upload an avatar
- Have a list of favorit videos.
- For those who used comment system, only member can post comment.

In future, I will try to add a PM system.

You can see it at http://www.play-online.bzh.be

You can download it here

Important, you will need to edit some files so try it in localhost before uploading to your webserver.

Iam getting

Warning: Cannot modify header information - headers already sent by (output started at /myfunnypets.com/123a/config.php:2) in /myfunnypets.com/123a/login.php on line 61

Warning: Cannot modify header information - headers already sent by (output started at /myfunnypets.com/123a/config.php:2) in /myfunnypets.com/123a/login.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /myfunnypets.com/123a/config.php:2) in /myfunnypets.com/123a/login.php on line 66
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
Re: Member area
« Reply #8 on: December 05, 2009, 03:50:44 AM »
found out edit the db.php and Get rid of the white space before and after <?php ?> tag, it works.

also the header.php and the login.php
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
Re: Member area
« Reply #9 on: December 05, 2009, 03:53:59 AM »
Warning: move_uploaded_file(avatar/admin.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in myfunnypets.com/123a/avatar.php on line 35

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpIGCodN' to 'avatar/admin.gif' in myfunnypets.com/123a/avatar.php on line 35


I get this when i try to upload a avatar


i found out the you need to create a dir call avatar in root
« Last Edit: December 05, 2009, 04:32:26 AM by winracer »
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline hilflo

  • Full phpd Member
  • ***
  • Posts: 98
  • Karma: 2
  • Sorry for my bad english
    • View Profile
    • Les félés
Re: Member area
« Reply #10 on: December 05, 2009, 08:07:24 AM »
You can also delete the white space before php in config.php which can creat a warning.

For a profile page, I will try it this afternoon. In france it's 9 AM
For the avatar folder, I have edited the readme.txt of the usermod folder.

Offline hilflo

  • Full phpd Member
  • ***
  • Posts: 98
  • Karma: 2
  • Sorry for my bad english
    • View Profile
    • Les félés
Re: Member area
« Reply #11 on: December 05, 2009, 08:13:17 AM »
I have create a member where member can :
- Register/login
- Upload an avatar
- Have a list of favorit videos.
- For those who used comment system, only member can post comment.

In future, I will try to add a PM system.

You can see it at http://www.play-online.bzh.be

You can download it here

Important, you will need to edit some files so try it in localhost before uploading to your webserver.


can you use something like
if($logged_in){


some code
}

on yours. what I mean is how would  place the login on other pages if loged in do this if not please login to view this page.

what I am using is something like this in the header.php

Code: [Select]

session_start ();
require_once("login.php");
if($logged_in){
         echo "Welcome <b>$_SESSION[username]</b>, you are logged in. <a href=\"logout.php\">Logout</a>";
 }
else


{

?>

<h1>Login</h1>
<form action="" method="post">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30"></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30"></td></tr>
<tr><td colspan="2" align="left"><input type="checkbox" name="remember">
<font size="2">Remember me next time</td></tr>
<tr><td colspan="2" align="right"><input type="submit" name="sublogin" value="Login"></td></tr>
<tr><font size="2"><td colspan="2" align="left"><a href="register.php">New Member Sign UP</a></td></tr>
<tr><font size="2"><td colspan="2" align="left"><a href=forgot-password.php>Forgot Password</a></td></tr>
</font>
</form>

<?

}



this

In menubar.tpl I use :
Code: [Select]
{if isset($smarty.cookies.id)}
<img src="avatar/{$avatar}" width="50" haigh="50" align="left">&nbsp;&nbsp;Hi <strong>{$user}</strong><br />
&nbsp;&nbsp;<a href="avatar.php">{$LAN_97}</a> - <a href="favorit.php">{$LAN_96}</a> - <a href="logout.php">{$LAN_92}</a>
{else}
<form action="login.php" method="post">
          {$LAN_89} : <input type="text" name="TB_Nom_Utilisateur" />
          {$LAN_90} : <input type="password" name="TB_Mot_de_Passe" />
          <input type="submit" name="BT_Envoyer" value="{$LAN_91}" />
<p><a href="register.php">{$LAN_93}</a></p>
</form>
{/if}

If you are connected, it show the member menu else, it show the login form whith a link to register

.

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
Re: Member area
« Reply #12 on: December 05, 2009, 05:56:06 PM »
but how do you have a page that can only br viewed if logedin
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Member area
« Reply #13 on: December 05, 2009, 07:26:25 PM »
hilflo thanks,

Here are some items that I see that could use improvement:
• Request E-Mail Verification
• Un-Favorite Video
• Ability to link avatar, from a photo site(TinyPic, Photobucket, Flickr, etc..)

Found a Bug:
The comment will only show your avatar even if it's another user posting.


Also, just finished integrating your script into V 3.0, this will be released with he new version.

-FierDart
P.S: I feel terrible keep telling what you could do to improve YOUR script, yet I probably could not even whip something like this together as fast as you just did, sorry.
« Last Edit: December 05, 2009, 08:26:22 PM by FireDart »

Offline hilflo

  • Full phpd Member
  • ***
  • Posts: 98
  • Karma: 2
  • Sorry for my bad english
    • View Profile
    • Les félés
Re: Member area
« Reply #14 on: December 05, 2009, 08:32:26 PM »
To delete form favorite :
Download delfavorite.php in the attachment.

In favorit.tpl add this line where you want to see the delete link :
Code: [Select]
<a href="delfavorite.php?g={$videos[mysec].id}&u={$user}">Delete form favorite</a>
I will try the two other suggestion

PS : Yours suggestion help me to add functionnality