Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
Mesum
Useless



Joined: Aug 23, 2002
Posts: 213
Location: Chicago

PostPosted: Thu Dec 30, 2004 7:09 pm Reply with quote

I have been trying to make thing work for the last 5 hours and about to hit my head to a brick wall.

I don't want users to change thier username, password or e-mail address from forum's edit profile section.

I tried to edit profile_add_body.tpl and removed the options from there but then I started to get "invalid e-mail and password" error. I have been searching all the files in phpBB and includes folder and so far no luck.

Anyone can help?

_________________
Only FREE Dating Site for Desis 
View user's profile Send private message Visit poster's website
PHrEEkie
Subject Matter Expert



Joined: Feb 23, 2004
Posts: 358

PostPosted: Thu Dec 30, 2004 7:16 pm Reply with quote

Username changes can be stopped in Forums Admin, General Config -> Allow username changes.

Dunno why you wouldn't want ppl to change their passwords...???

PHrEEk
 
View user's profile Send private message
Mesum







PostPosted: Thu Dec 30, 2004 7:26 pm Reply with quote

Because I am using aMember plugin to do that, if someone tries to change something from Nuke's profile, things will break in aMembers system.
 
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Thu Dec 30, 2004 7:48 pm Reply with quote

You could make them hidden fields and use the variables from getusrinfo() and pass them so the values couldn't be changed. It beats editing the sql inserts.

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
Mesum







PostPosted: Thu Dec 30, 2004 8:18 pm Reply with quote

sixonetonoffun, Anyways you can help me out? I am so clueless right now.
 
Mesum







PostPosted: Thu Dec 30, 2004 8:29 pm Reply with quote

This is what I have right now..

Code:


<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">

   <tr>

      <td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>

   </tr>

</table>



<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">

   <tr>

      <th class="thHead" colspan="2" height="25" valign="middle">{L_REGISTRATION_INFO}</th>

   </tr>

   <tr>

         <td class="row2" colspan="2"><span class="gensmall">Items marked with a *
             may be modified <a href="http://www.gymboreenews.com/home/amember/member.php">here</a>.</span></td>


   <tr>

      <td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
<td class="row2" width="200px"><span class="gen">{USERNAME}</span></td>
      
   </tr>

   <tr>

      <td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: *</span></td>
      <td class="row2" width="200px"><span class="gen">{EMAIL}</span></td>


   </tr>

   <!-- BEGIN switch_edit_profile -->

   <tr>

     <td class="row1"><span class="gen">{L_CURRENT_PASSWORD}: *</span><br />

   <td class="row2" width="200px"><span class="gen"></span></td>

     </td>

   </tr>

   <!-- END switch_edit_profile -->
 
Mesum







PostPosted: Thu Dec 30, 2004 8:38 pm Reply with quote

Nevermind, thanks so much sixonetonoffun!
 
sixonetonoffun







PostPosted: Thu Dec 30, 2004 9:01 pm Reply with quote

If your only using the one forum template you can still do it all in profile_add_body.tpl something like this basically strip out the html and change the form field type from text and password to hidden and remove entirely the change password lines.

Code:



<form action="{S_PROFILE_ACTION}" {S_FORM_ENCTYPE} method="post">

{ERROR_BOX}

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
   <tr>
      <td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
   </tr>
</table>

<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
   <input type="hidden" class="post" style="width:200px" name="username" size="25" maxlength="25" value="{USERNAME}" />
        <input type="hidden" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" />
   <input type="hidden" class="post" style="width: 200px" name="cur_password" size="25" maxlength="100" value="{CUR_PASSWORD}" />
 
sixonetonoffun







PostPosted: Thu Dec 30, 2004 10:59 pm Reply with quote

Yeh its a good idea I think I'll remove everything but the siggy and avatar controls no reason to leave it in there really.
 
Mesum







PostPosted: Fri Dec 31, 2004 3:46 am Reply with quote

I took your idea and made my file like this:

Code:


<form action="{S_PROFILE_ACTION}" {S_FORM_ENCTYPE} method="post">

{ERROR_BOX}

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
   <tr>
      <td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
   </tr>
</table>

<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
   <tr>
      <th class="thHead" colspan="2" height="25" valign="middle">{L_REGISTRATION_INFO}</th>
   </tr>
   <tr>
      <td class="row2" colspan="2"><span class="gensmall">Items marked with a *
             may be modified <a href="amember/member.php">here</a>.</span></td>
   </tr>
   <tr>
      <td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
      <td class="row2"><input type="hidden" class="post" style="width:200px" name="username" size="25" maxlength="25" value="{USERNAME}" />{USERNAME}</td>
   </tr>
   <tr>
      <td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: *</span></td>
      <td class="row2"><input type="hidden" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" />{EMAIL}</td>
   </tr>
   <!-- BEGIN switch_edit_profile -->
   <tr>
     <td class="row1">&nbsp;</td>
     <td class="row2">
      <input type="hidden" class="post" style="width: 200px" name="cur_password" size="25" maxlength="100" value="{CUR_PASSWORD}" />
     </td>
   </tr>
   <!-- END switch_edit_profile -->
   <tr>
     <td class="row1">&nbsp;</td>
     <td class="row2">
      &nbsp;</td>
   </tr>
   <tr>
     <td class="row1">&nbsp;</td>
     <td class="row2">
      &nbsp;</td>
   </tr>
   <tr>
     <td class="catSides" colspan="2" height="28">&nbsp;</td>
   </tr>
   <tr>
     <th class="thSides" colspan="2" height="25" valign="middle">{L_PROFILE_INFO}</th>
   </tr>
   <tr>
     <td class="row2" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_ICQ_NUMBER}:</span></td>
     <td class="row2">
      <input type="text" name="icq" class="post"style="width: 100px"  size="10" maxlength="15" value="{ICQ}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_AIM}:</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 150px"  name="aim" size="20" maxlength="255" value="{AIM}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_MESSENGER}:</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 150px"  name="msn" size="20" maxlength="255" value="{MSN}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_YAHOO}:</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 150px"  name="yim" size="20" maxlength="255" value="{YIM}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_WEBSITE}:</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 200px"  name="website" size="25" maxlength="255" value="{WEBSITE}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_LOCATION}:</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 200px"  name="location" size="25" maxlength="100" value="{LOCATION}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_OCCUPATION}:</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 200px"  name="occupation" size="25" maxlength="100" value="{OCCUPATION}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_INTERESTS}:</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 200px"  name="interests" size="35" maxlength="150" value="{INTERESTS}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_SIGNATURE}:</span><br /><span class="gensmall">{L_SIGNATURE_EXPLAIN}<br /><br />{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td>
     <td class="row2">
      <textarea name="signature"style="width: 300px"  rows="6" cols="30" class="post">{SIGNATURE}</textarea>
     </td>
   </tr>
   <tr>
     <td class="catSides" colspan="2" height="28">&nbsp;</td>
   </tr>
   <tr>
     <th class="thSides" colspan="2" height="25" valign="middle">{L_PREFERENCES}</th>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_PUBLIC_VIEW_EMAIL}:</span></td>
     <td class="row2">
      <input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_HIDE_USER}:</span></td>
     <td class="row2">
      <input type="radio" name="hideonline" value="1" {HIDE_USER_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="hideonline" value="0" {HIDE_USER_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_NOTIFY_ON_REPLY}:</span><br />
      <span class="gensmall">{L_NOTIFY_ON_REPLY_EXPLAIN}</span></td>
     <td class="row2">
      <input type="radio" name="notifyreply" value="1" {NOTIFY_REPLY_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="notifyreply" value="0" {NOTIFY_REPLY_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_NOTIFY_ON_PRIVMSG}:</span></td>
     <td class="row2">
      <input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}:</span><br /><span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td>
     <td class="row2">
      <input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td>
     <td class="row2">
      <input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}:</span></td>
     <td class="row2">
      <input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}:</span></td>
     <td class="row2">
      <input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}:</span></td>
     <td class="row2">
      <input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
     <td class="row2"><span class="gensmall">{LANGUAGE_SELECT}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_BOARD_STYLE}:</span></td>
     <td class="row2"><span class="gensmall">{STYLE_SELECT}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_TIMEZONE}:</span></td>
     <td class="row2"><span class="gensmall">{TIMEZONE_SELECT}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_DATE_FORMAT}:</span><br />
      <span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
     <td class="row2">
      <input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" size="20" />
     </td>
   </tr>
   <!-- BEGIN switch_avatar_block -->
   <tr>
     <td class="catSides" colspan="2" height="28">&nbsp;</td>
   </tr>
   <tr>
     <th class="thSides" colspan="2" height="12" valign="middle">{L_AVATAR_PANEL}</th>
   </tr>
   <tr>
      <td class="row1" colspan="2"><table width="70%" cellspacing="2" cellpadding="0" border="0" align="center">
         <tr>
            <td width="65%"><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td>
            <td align="center"><span class="gensmall">{L_CURRENT_IMAGE}</span><br />{AVATAR}<br />
                <input type="checkbox" name="avatardel" value="ON" />&nbsp;<span class="gensmall">{L_DELETE_AVATAR}</span></td>
         </tr>
      </table></td>
   </tr>
   <!-- BEGIN switch_avatar_local_upload -->
   <tr>
      <td class="row1"><span class="gen">{L_UPLOAD_AVATAR_FILE}:</span></td>
      <td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" />
        <input type="file" name="avatar" class="post" style="width:200px" size="20" /></td>
   </tr>
   <!-- END switch_avatar_local_upload -->
   <!-- BEGIN switch_avatar_remote_upload -->
   <tr>
      <td class="row1"><span class="gen">{L_UPLOAD_AVATAR_URL}:</span><br /><span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
      <td class="row2"><input type="text" name="avatarurl" size="40" class="post" style="width:200px" /></td>
   </tr>
   <!-- END switch_avatar_remote_upload -->
   <!-- BEGIN switch_avatar_remote_link -->
   <tr>
      <td class="row1"><span class="gen">{L_LINK_REMOTE_AVATAR}:</span><br /><span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
      <td class="row2"><input type="text" name="avatarremoteurl" size="40" class="post" style="width:200px" /></td>
   </tr>
   <!-- END switch_avatar_remote_link -->
   <!-- BEGIN switch_avatar_local_gallery -->
   <tr>
      <td class="row1"><span class="gen">{L_AVATAR_GALLERY}:</span></td>
      <td class="row2"><input type="submit" name="avatargallery" value="{L_SHOW_GALLERY}" class="liteoption" /></td>
   </tr>
   <!-- END switch_avatar_local_gallery -->
   <!-- END switch_avatar_block -->
   <tr>
      <td class="catBottom" colspan="2" align="center" height="28">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" name="reset" class="liteoption" /></td>
   </tr>
</table>

</form>

You might wanna disable everything BUT the avatar and Signature since Your Account is still not accepting BBcode correctly.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©