View Full Version : Alright, I got the chat running, here is my new question


VeneficusMalfoy
07-11-2003, 02:23 AM
Alright, I got the chat installed and running...Here is my problem now.
There are a few things that I would like to do in order to customize it... First, I would like to add an option in the registration to choose which Harry potter house you are in (the chat is for a Harry Potter RPG board).... But in the user menu after you have gone to the chat, I would like a special Icon to appear to show the students house (you can come check out the chat room at VHchat.net (http://www.vhchat.net) to see what I mean about the users in the sidebar). Actually, I would like to incorporate the ^^^/house together so there would be an icon for Gryffindor girls and an icon for Gryffindor guys... currently the registration code goes something like this:


<?php
if (!defined("_COMMON_")) {echo "stop";exit;} include($file_path."designes/".$design."/common_title.php"); include($file_path."designes/".$design."/common_body_start.php");include($file_path."designes/".$design."/config.php");?>
<body bgcolor="<?=$bg_color?>">
<form method=post action="user_info_update.php" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="300000">
<input type="hidden" name="session" value="<?php echo $session;?>">
<?php echo $w_personal_data.", <b>".$current_user->nickname ."</b>:<br>";?>

<table border="0" cellpadding="0" cellspacing="0">
<tr><td><input type=checkbox name="showGroup1"<?php if ($current_user->show_group_1 == 1) echo " checked";?>><?php echo $w_show_data;?>
<table border="0">
<tr><td><?php echo $w_surname;?>: </td><td><input type="text" size="15" name="surname" value="<?php echo $current_user->surname;?>" class="input"></td></tr>
<tr><td><?php echo $w_name;?>: </td><td><input type="text" size="15" name="firstname" value="<?php echo $current_user->firstname;?>" class="input"></td></tr>
<tr><td><?php echo $w_birthday;?>: </td><td><select name="day" class="input"><option value="">--</option>
<?php
for ($i=1; $i<32; $i++)
{
echo "<option";
if ($i == $current_user->b_day) echo " selected";
echo ">$i\n";
}?></select> / <select name="month" class="input"><option value="">--</option>
<?php
for ($i=1; $i<13; $i++)
{
echo "<option";
if ($i == $current_user->b_month) echo " selected";
echo ">$i\n";
}?></select> / <select name="year" class="input"><option value="">--</option>
<?php
for ($i=1950; $i<2001; $i++)
{
echo "<option";
if ($i == $current_user->b_year) echo " selected";
echo ">$i\n";
}?></select></td></tr>
<tr><td><?php echo $w_city;?>: </td><td><input type="text" name="city" size="10" value="<?php echo $current_user->city;?>" class="input"></td></tr>
<?php
echo "<tr><td>$w_gender: </td><td><select name=\"^^^\" class=\"input\">";
$^^^ = $current_user->^^^;
echo "<option value=0";
if ($^^^ == 0) echo " selected";
echo ">$w_unknown</option>\n<option value=1";
if ($^^^ == 1) echo " selected";
echo ">$w_male</option>\n<option value=2";
if ($^^^ == 2) echo " selected";
echo ">$w_female</option>\n</select></td></tr>\n";

#small picture:
echo "<tr><td>$w_small_photo: </td><td>";
if ($small_picture != "")
echo "<img src=\"photos/$small_picture\"><br><input type=\"checkbox\" name=\"sm_del\">$w_check_for_delete<br>";
echo "$w_other_photo <input type=\"file\" name=\"small_photo\" class=\"input\"></td></tr>";


echo "<tr><td>$w_big_photo: </td><td>";
if ($big_picture != "")
{
echo "<img src=\"photos/$big_picture\"><br>";
echo "<input type=\"checkbox\" name=\"big_del\">$w_check_for_delete<br>";

}
echo "$w_other_photo <input type=\"file\" name=\"big_photo\" class=\"input\"></td></tr>";
?>
<tr><td><?php echo $w_addit_info?>: </td><td>
<textarea name="comments" rows="10" cols="30" class="input"><?php echo str_replace("<br>","\n",$current_user->about);?>
</textarea></td></tr>
</table></td></tr>
<tr><td background="<?php echo $current_design;?>images/hor_dot_line.gif" align="left"><img src="<?php echo $current_design;?>images/hor_dot_line.gif" width="10" height="1"></td></tr>
<tr><td>
<input type=checkbox name="showGroup2"<?php if ($current_user->show_group_2 == 1) echo " checked";?>><?php echo $w_show_data;?><br>
<table border="0">
<tr><td><?php echo $w_email;?>: </td><td><input type="text" size="15" name="email" value="<?php echo $current_user->email;?>" class="input"></td></tr>
<tr><td><?php echo $w_homepage;?>: </td><td><input type="text" size="15" name="url" value="<?php echo $current_user->url;?>" class="input"></td></tr>
<tr><td><?php echo $w_icq;?>: </td><td><input type="text" size="15" name="icquin" value="<?php echo $current_user->icquin;?>" class="input"></td></tr>
</table>
</td></tr>
<tr><td background="<?php echo $current_design;?>images/hor_dot_line.gif" align="left"><img src="<?php echo $current_design;?>images/hor_dot_line.gif" width="10" height="1"></td></tr>
<?php if($web_indicator){?>
<tr><td>
<table>
<tr><td>
<input type="checkbox" name="enable_web_indicator"<?php if ($current_user->enable_web_indicator) echo " checked";?>> <?php echo $w_web_indicator;?></td></tr>

<tr><td><?php echo str_replace("~","<img src=\"".$chat_url."user_status.php?".$is_regist."\" border=\"0\" alt=\"chat status\">",$w_web_indicator_code);?></td></tr>
<tr><td align="center"><textarea class="input" rows="5" cols="40"><?php echo "<a href=\"".$chat_url."\" target=\"_blank\"><img src=\"".$chat_url."user_status.php?".$is_regist."\" border=\"0\" alt=\"chat status\"></a>";?></textarea></td></tr>
</table>
</td></tr>
<tr><td background="<?php echo $current_design;?>images/hor_dot_line.gif" align="left"><img src="<?php echo $current_design;?>images/hor_dot_line.gif" width="10" height="1"></td></tr>
<?php }?>



<tr><td>
<table border="0">
<tr><td colspan="2"><?php echo $w_if_wanna_change_password;?></td></tr>
<tr><td><?php echo $w_new_password;?>: </td><td><input type="password" name="passwd1" class="input"></td></tr>
<tr><td><?php echo $w_confirm_password;?>: </td><td><input type="password" name="passwd2" class="input"></td></tr>
</table>
</td></tr>
<tr><td background="<?php echo $current_design;?>images/hor_dot_line.gif" align="left"><img src="<?php echo $current_design;?>images/hor_dot_line.gif" width="10" height="1"></td></tr>
</table><br>
<input type="submit" value="<?php echo $w_update;?>" class="input">
</form>
<?php include($file_path."designes/".$design."/common_body_end.php");?>

VeneficusMalfoy
07-11-2003, 02:32 AM
Sorry about the double post, but with the coding, the posts were too long. Heres the continuation of the top, and my second question. :)

I see where I would need to change the variables, but I haven't figured out what links each variable to the pictures.... And thats what I need to know.


Also, I would like to change the navigation bar at the top to show picture buttons instead of just a button css/html thing. the Nav code currently is this:

<?php
if (!defined("_COMMON_")) {echo "stop";exit;} include($file_path."designes/".$design."/common_title.php");
include($file_path."designes/".$design."/config.php"); ?>
<script language="JavaScript">
<!--
function bc(b,bg){ b.style.backgroundColor = bg;}
function open_win(win_file, win_title) {
window.open(win_file, win_title, 'resizable=yes,width=<?=$pop_width?>,height=<?=$pop_height?>,toolbar=no,scrollbars=yes,location=no,menubar=no, status=no');
}
//-->
</script>
<?php include($file_path."designes/".$design."/common_body_start.php");?>
<body bgcolor="<?=$top_frame_color?>">


<table width=100% height=100% align="center" valign="middle"><tr><td width=100% height=100% align="center" valign="middle">
<a href="javascript:;" onclick="javascript:open_win('<?php echo $current_design;?>rules.php', 'rules');" value="<?=$w_rules?>"><img src="www.vhchat.net/voc/chat/designes/silvernew/images/rules.jpg"></a>

<input type="button" class=button id=but2 onmouseover=bc(this,"<?=$bg_color?>") onmouseout=bc(this,"<?=$button?>") href="javascript:;" onclick="javascript:open_win('languages/help_<?php echo $language;?>.php', 'help');" value="<?php echo $w_help;?>">
<input type="button" class=button id=but3 onmouseover=bc(this,"<?=$bg_color?>") onmouseout=bc(this,"<?=$button?>") href="javascript:;" onclick="javascript:open_win('users.php?session=<?php echo $session;?>', 'usersinfo');" value="<?php echo $w_info_about;?>">
<input type="button" class=button id=but4 onmouseover=bc(this,"<?=$bg_color?>") onmouseout=bc(this,"<?=$button?>") href="javascript:;" onclick="javascript:open_win('pictures.php?session=<?php echo $session;?>', 'pictures');" value="<?php echo $w_pictures;?>">
<input type="button" class=button id=but5 onmouseover=bc(this,"<?=$bg_color?>") onmouseout=bc(this,"<?=$button?>") href="javascript:;" onclick="javascript:open_win('comments.php?session=<?php echo $session;?>', 'feedback');" value="<?php echo $w_feedback;?>">
<?php if (count($room_ids)){?><input type="button" class=button id=but5 onmouseover=bc(this,"<?=$bg_color?>") onmouseout=bc(this,"<?=$button?>") href="javascript:;" onclick="javascript:open_win('rooms.php?session=<?php echo $session;?>', 'voc_who_visible');" value="<?php echo $w_who_in_rooms; ?>">
<?php }?>
<?php if (!$is_regist) {?>
<script language="javascript">
function reg_add()
{
parent.voc_alerter.location.href='alerter.php?sess ion=<?php echo $session;?>';
document.location='navibar.php?session=<?php echo $session;?>';
}
</script>
<input type="button" class=button id=but6 onmouseover=bc(this,"<?=$bg_color?>") onmouseout=bc(this,"<?=$button?>") href="javascript:;" onclick="javascript:open_win('registration_form.php?session =<?php echo $session;?>', 'registration');" value="<?php echo $w_registration; ?>">
<?php }else{?>
<input type="button" class=button id=but7 onmouseover=bc(this,"<?=$bg_color?>") onmouseout=bc(this,"<?=$button?>") href="javascript:;" onclick="javascript:open_win('user_info.php?session=<?php echo $session;?>', 'perosnalinfo');" value="<?php echo $w_about_me;?>">
<?php if ($current_user->user_class=="admin") {?><input type="button" class=button id=but9 onmouseover=bc(this,"<?=$bg_color?>") onmouseout=bc(this,"<?=$button?>") href="javascript:;" onclick="javascript:open_win('admin.php?session=<?php echo $session;?>', 'gun');" value="<?php echo $w_gun;?>">
<?php }}?>
<input type="button" class=button id=but8 onmouseover=bc(this,"<?=$bg_color?>") onmouseout=bc(this,"<?=$button?>") href="javascript:;" onclick="javascript:open_win('<?php echo $chat_url;?>logout.php?session=<?php echo $session;?>', '_parent');" value="<?php echo $w_logout;?>">
</td></tr></table>
<?php include($file_path."designes/".$design."/common_body_end.php");?>


I had tried to change it with the first one, but obviously that doesn't work. lol. I'm really new to PHP but this is such an advanced problem, I figured it would be best to post here. Thanks in advance for your help.
-Erica-