Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - haider512

Pages: 1 2 3 4 [5] 6 7 8 9 ... 11
61
Discussion & Troubleshooting / Re: custom .php and .html file?
« on: January 01, 2011, 07:23:43 AM »
http://www.4homepages.de/forum/index.php?topic=4996.0

yes i found that before..

but still i needed to wrote index.php?template=legends

but i dont want index.php..

i want like..

mydomain.com/legends.php

??

and it is linked with the legends.html..

i created two files legends.html and legends.php..

now placed them on their right positions..now what else to do???

62
Discussion & Troubleshooting / custom .php and .html file?
« on: January 01, 2011, 03:33:04 AM »
Hi..
i want to make a custom file of name legends.html and legends.php.

i want to copy the legends.php file in main root folder and legends.html in templates folder.

so when i do changes in .html file...it also show in site like this..

mysite.com/legends.php


but changes occur when i do chages in .html file..

like all other html files..members.html home.html etc etc..

how to do it..??

63
in which file i need to change class="reflect rheight33"

also how to make it possible that i dont want in percentage the reflection.. i want the defined reflection???

64
ICQ accounts uses digits only, intval() converts string into numeric value

Simply remove intval from that line (including parenthesis)


hi..

is this right i mean correct statement??

Code: [Select]
$user_msn = (isset($HTTP_POST_VARS['user_msn']))  : "";

65
Discussion & Troubleshooting / Re: PDF Problem
« on: December 31, 2010, 06:32:44 PM »
... ok ...
... just tested the new pdf.html in various brousers ... and it works fine ...
... but you must have installed the acrobat reader on your pc ...


oh thats why it was not showing me the pdf..
i dont have acrobat installed..
i am using foxit reader.. its nice too. and very light weight.

but i want to make it possible that user view it online..even he/she even dont have acrobat reader etc..

cuz not everyone keeps acrobat reader..and when that someone clicks it and it shows white space instead of any picture or icon..
dont look good.?


66
Firefox: Tools -> Error console
Chrome: CTRL+SHIFT+I

$user_msn = (isset($HTTP_POST_VARS['user_msn'])) ? ((intval(trim($HTTP_POST_VARS['user_msn']))) ? intval(trim($HTTP_POST_VARS['user_msn'])) : "") : ""

THanks again V@no..

Yes checked the console..
i was having 1 problem on every page..that was of <!-- and -->

actually i used it for disabling the right click function.. i didnt knew it will create problem..

next problem i got was in registration page when clicked the captcha..

Captcha didnt reload..actually i got that problem when i installed the username checking mod..

i think there is some error in that mod..or its javascripting of that mod..which made that problem..

this is the mod i installed..
http://www.4homepages.de/forum/index.php?topic=23848.15

but thought that its ok..or normal that captha stopped or working..may b function of mod..
but didnt knew will show error in console..


console thing is very good..


Now how to disable the right click function the right way??
and how to fix the captcha problem??




Alse Many Many Many thanks for pointing out mistakes.. cuz it is really helping me...

intval function is also used in icq so thought using it there wouldnt make a problem..
and it did worked..???

what function i should have used instead??
sorry im not good coder...im just looking and searching in codes and copy pasting and editing according to my needs..
It is really great having help here. also learning something here in coding that how do they work etc..

=================================


Gosh doing so many mistakes...
captcha was also my fault..
and now disabling the right click for members..got this method from here.

http://www.4homepages.de/forum/index.php?topic=3088.msg12864#msg12864

but still couldnt figure out the intval thing??
waiting for reply..

67
Discussion & Troubleshooting / Re: PDF Problem
« on: December 31, 2010, 05:56:33 PM »
Many THanks for reply..

@mawenzi
Actually i want online reader for user..and most users i have seen use FF or chrome here..??
only some users use IE ??


@ V@no

yes im just trying to give my site a professional look.. as it is educational site..so thought keeping readers online for ppt and pdf will b good..

like http://www.docstoc.com/

also found some scripts online ...but not sure how to use them..

http://www.ajaxdocumentviewer.com/
http://www.vuzit.com
http://viewer.zoho.com/home.do

also they are expensive. so not affordable..also not like what i want..

hmmm..so isnt it possible to get the reader for pdf/ppt online..

i mean when user click it (thumbnail.) and in details.php instead of image the document(pdf/ppt) should b viewable..and also when clicked download button, it should download.


???

68
Discussion & Troubleshooting / Re: PDF Problem
« on: December 31, 2010, 01:28:29 PM »
<table cellpadding="1" cellspacing="0" border="0" width="802">
<
tr><td class="bordercolor">
<
table cellpadding="0" cellspacing="0" border="0" width="100%">
<
tr><td><iframe src={media_srcwidth="800" height="800" frameborder="0" scrolling="1" marginwidth="0" marginheight="0" type="pdf"></iframe>
</
td></tr></table>
</
td></tr></table>
<
br


i copied the above code to pdf.html in media folder..

but it is not working..
instead..my idm detects the download..

what to do???

69
Mods & Plugins (Requests & Discussions) / Re: pdf online view
« on: December 31, 2010, 01:18:45 PM »
... and please try to search and you will find this ...

http://www.4homepages.de/forum/index.php?topic=7116.msg38233#msg38233


Many thanks sir.. going to test it out..

Actually unfortunately i only know some english..thats why i cant search with other language then english..so i tried searching but couldnt find..

Many thanks to you sir.. i am going to try it out.. can i also do this with .ppt files.. i mean powerpoint files??

that user can view powerpoint files online without downloading it??

70
Mods & Plugins (Requests & Discussions) / pdf online view
« on: December 31, 2010, 12:08:58 PM »
Hello..

what to do that if i want to make restriction only on pdf files.. that users cant download the pdf files ..They only can view the pdf files..

if there is any mod out here..i will like to know..

also if there is any mod here in this mod which makes users enable to view pdf files online..i will like to know about that too..

Please reply..im looking forward to it..

Kind Regards
Haider

71
Chit Chat / Re: Looking Web design and hosting company
« on: December 31, 2010, 09:05:31 AM »
i can give you free cpanel offshore hosting for simple offer..
if you are still looking for hosting let me know..


Kind Regards
Haider

72
@ v@no

Many thanks for reply..i found the problem..

it is working fine so far..you can check it my registration page.

actually i was not calling it in the tables like other..

so the problem was in javascript..

it is new javascript..edited it..

<script language="javascript">
$(
document).ready(function()
{
	
var 
userOk 0;
        var 
idOk 0;
	
var 
passOk 0;
	
var 
emailOk 0;
	
$(
"#submitButton").attr("value""Disabled");
	
$(
"#submitButton").attr("disabled""true");
        $(
"#cusit").blur(function()
	
{
	
	
//remove all the class add the messagebox classes and start fading
	
	
$(
"#msgboxid").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
	
	
//check the CUSIT ID exists or not from ajax
	
	
$.
post("{url_user_cusit}",{ user_cusit:$(this).val() } ,function(data)
        {
	
      if(
data=='idblank'//if cusit id is  not entered
	
	
  {
	
	
  
	
$(
"#msgboxid").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_cusit_empty}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
idOk 0;
	
	

          }
	
	
  else if(
data=='idlength'//if id is less than 4 or more than 4 characters
	
	
  {
	
	
  
	
$(
"#msgboxid").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_cusit_length}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
idOk 0;
	
	

          }
	
	
  else if(
data=='idno'//if CUSIT ID not avaiable
	
	
  {
	
	
  
	
$(
"#msgboxid").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_cusit_taken}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
idOk 0;
	
	

          }
	
	
  else
	
	
  {
	
	
  
	
$(
"#msgboxid").fadeTo(200,0.1,function()  //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_cusit_good}').addClass('messageboxok').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
idOk 1;
	
	
	
  if (
idOk==&& passOk==&& emailOk==1) {
	
	
	
	
  $(
"#submitButton").attr("value""Register");
	
	
	
	
  $(
'#submitButton').removeAttr('disabled');
	
	
	
  } else {
	
	
	
	
	
$(
"#submitButton").attr("disabled""true");
	
	
	
	
	
$(
"#submitButton").attr("value""Disabled");
	
	
	
	
}
	
	
  }
	
	
	
	

        });
	
});




	
$(
"#username").blur(function()
	
{
	
	
//remove all the class add the messagebox classes and start fading
	
	
$(
"#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
	
	
//check the username exists or not from ajax
	
	
$.
post("{url_user_availability}",{ user_name:$(this).val() } ,function(data)
        {
	
      if(
data=='userblank'//if username not entered
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_username_empty}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
userOk 0;
	
	

          }
	
	
  else if(
data=='userlength'//if username is less than 6 or more than 20 characters
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_username_length}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
userOk 0;
	
	

          }
	
	
  else if(
data=='userno'//if username not avaiable
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_username_taken}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
userOk 0;
	
	

          }
	
	
  else
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function()  //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_username_good}').addClass('messageboxok').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
userOk 1;
	
	
	
  if (
userOk==&& passOk==&& emailOk==1) {
	
	
	
	
  $(
"#submitButton").attr("value""Register");
	
	
	
	
  $(
'#submitButton').removeAttr('disabled');
	
	
	
  } else {
	
	
	
	
	
$(
"#submitButton").attr("disabled""true");
	
	
	
	
	
$(
"#submitButton").attr("value""Disabled");
	
	
	
	
}
	
	
  }
	
	
	
	

        });
	
});
	
$(
"#userpassword").blur(function()
	
{
	
	
//remove all the class add the messagebox classes and start fading
	
	
$(
"#msgboxpass").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
	
	
//check the username exists or not from ajax
	
	
$.
post("{url_user_password}",{ user_password:$(this).val() } ,function(data)
        {
	
      if(
data=='passblank'//if username not entered
	
	
  {
	
	
  
	
$(
"#msgboxpass").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_password_empty}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
passOk 0;
	
	

          }
	
	
  else if(
data=='passlength'//if username is less than 6 or more than 20 characters
	
	
  {
	
	
  
	
$(
"#msgboxpass").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_password_length}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
passOk 0;
	
	

          }
	
	
  else
	
	
  {
	
	
  
	
$(
"#msgboxpass").fadeTo(200,0.1,function()  //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_password_good}').addClass('messageboxok').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
passOk 1;
	
	
	
  if (
userOk==&& passOk==&& emailOk==1) {
	
	
	
	
  $(
"#submitButton").attr("value""Register");
	
	
	
	
  $(
'#submitButton').removeAttr('disabled');
	
	
	
  } else {
	
	
	
	
	
$(
"#submitButton").attr("disabled""true");
	
	
	
	
	
$(
"#submitButton").attr("value""Disabled");
	
	
	
	
}
	
	
  }
	
	
	
	

        });
	
});
	
$(
"#useremail").blur(function()
	
{
	
	
//remove all the class add the messagebox classes and start fading
	
	
$(
"#msgboxemail").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
	
	
//check the username exists or not from ajax
	
	
$.
post("{url_user_email}",{ user_email:$(this).val() } ,function(data)
        {
	
      if(
data=='emailblank'//if username not entered
	
	
  {
	
	
  
	
$(
"#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_email_empty}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
emailOk 0;
	
	

          }
	
	
  else if(
data=='emailinvalid'//if username is less than 6 or more than 20 characters
	
	
  {
	
	
  
	
$(
"#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_email_invalid}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
emailOk 0;
	
	

          }
	
	
  else if(
data=='emailno'//if username not avaiable
	
	
  {
	
	
  
	
$(
"#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_email_taken}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
emailOk 0;
	
	

          }
	
	
  else
	
	
  {
	
	
  
	
$(
"#msgboxemail").fadeTo(200,0.1,function()  //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_email_good}').addClass('messageboxok').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
emailOk 1;
	
	
	
  if (
userOk==&& passOk==&& emailOk==1) {
	
	
	
	
  $(
"#submitButton").attr("value""Register");
	
	
	
	
  $(
'#submitButton').removeAttr('disabled');
	
	
	
  } else {
	
	
	
	
	
$(
"#submitButton").attr("disabled""true");
	
	
	
	
	
$(
"#submitButton").attr("value""Disabled");
	
	
	
	
}
	
	
  }
	
	
	
	

        });
 
	
});
});
</
script>


so its working great now..

but i dont know how to check with error console..so next time i do check..

i use FF and chrome..but mostly FF...how to check error console in it??

i removed the <!-- and --> in the javascript..

and also yes user_MSN is for MSN messenger feild... but where is  intval() function used??

yes i only need numeric for user_cusit. but not for user_MSN..

please if there is any error can you tell me what error is there that i forgot to fix?? or i made in it??

73
hi im inserting a new feild..
Actually i saw two different mods and tried them combining to work it out.. but not sure why it is not fully working..

I need help regarding this..

1st mod that i used in it ..

http://www.4homepages.de/forum/index.php?topic=26436.msg154676

what i did in it is

1. Added two tables in db in users prefix

user_msn
user_cusit


both are varchar(55)

2. In includes/db_field_definitions.php

i added this

$additional_user_fields['user_msn'] = array($lang['user_msn'], "text"1);
$additional_user_fields['user_cusit'] = array($lang['user_cusit'], "text"1);


before
?>

3. in Lang lang/your_lang/main.php

i added this


$lang
['msn'] = "MSN:";
$lang['cusit'] = "Cusit Adm No:";


4. In lang/your_lang/admin.php

[php]$lang['field_msn'] = "MSN";
$lang['field_cusit'] = "Cusit Adm No";
[/php]

5. In register.php

I Added
$user_msn = (isset($HTTP_POST_VARS['user_msn'])) ? ((intval(trim($HTTP_POST_VARS['user_msn']))) ? intval(trim($HTTP_POST_VARS['user_msn'])) : "") : ""

Above
     $user_icq = (isset($HTTP_POST_VARS['user_icq'])) ? ((intval(trim($HTTP_POST_VARS['user_icq']))) ? intval(trim($HTTP_POST_VARS['user_icq'])) : "") : "";

and

Added
  $user_cusit = (isset($HTTP_POST_VARS['user_cusit'])) ? ((intval(trim($HTTP_POST_VARS['user_cusit']))) ? intval(trim($HTTP_POST_VARS['user_cusit'])) : "") : "";

above
  $user_password = (isset($HTTP_POST_VARS['user_password'])) ? trim($HTTP_POST_VARS['user_password']) : "";

5.1

Added
      "user_msn" => $user_msn,

Above
      "user_icq" => $user_icq,

and

Added
      "user_cusit" => $user_cusit,

Above
      "user_email" => format_text(stripslashes($user_email), 2),

5.2

Added
      "lang_msn" => $lang['msn'],

Above
      "lang_icq" => $lang['icq'],

and

Added
      "lang_cusit" => $lang['cusit'],

Above
      "lang_password" => $lang['password'],

6 In details.php

Added


        $comment_user_cusit 
= (isset($comment_row[$i][$user_table_fields['user_cusit']])) ? format_url($comment_row[$i][$user_table_fields['user_cusit']]) : "";
        if (!empty(
$comment_user_cusit)) {
          
$comment_user_cusit_button "<a href=\"".$comment_user_cusit."\" target=\"_blank\"><img src=\"".get_gallery_image("cusit.gif")."\" border=\"0\" alt=\"".$comment_user_cusit."\" /></a>";
        }


        
$comment_user_msn = (isset($comment_row[$i][$user_table_fields['user_msn']])) ? format_url($comment_row[$i][$user_table_fields['user_msn']]) : "";
        if (!empty(
$comment_user_msn)) {
          
$comment_user_msn_button "<a href=\"".$comment_user_msn."\" target=\"_blank\"><img src=\"".get_gallery_image("msn.gif")."\" border=\"0\" alt=\"".$comment_user_msn."\" /></a>";
        }



Above
        $comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? format_text($comment_row[$i][$user_table_fields['user_icq']]) : "";
        if (!empty(
$comment_user_icq)) {
          
$comment_user_icq_button "<a href=\"http://www.icq.com/people/about_me.php?uin=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://status.icq.com/online.gif?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
        }



7. Added



    $user_cusit 
= (isset($user_row['user_cusit'])) ? format_text(format_url($user_row['user_cusit']), 2) : REPLACE_EMPTY;
    if (!empty(
$user_cusit) && $user_cusit != REPLACE_EMPTY) {
      
$user_cusit_button "<a href=\"".$user_cusit."\" target=\"_blank\"><img src=\"".get_gallery_image("cusit.gif")."\" border=\"0\" alt=\"".$user_cusit."\" /></a>";
    }
    else {
      
$user_cusit_button REPLACE_EMPTY;
    }

    
$user_msn = (isset($user_row['user_msn'])) ? format_text(format_url($user_row['user_msn']), 2) : REPLACE_EMPTY;
    if (!empty(
$user_msn) && $user_msn != REPLACE_EMPTY) {
      
$user_msn_button "<a href=\"".$user_msn."\" target=\"_blank\"><img src=\"".get_gallery_image("msn.gif")."\" border=\"0\" alt=\"".$user_msn."\" /></a>";
    }
    else {
      
$user_msn_button REPLACE_EMPTY;
    }




Above

    $user_icq = (isset($user_row['user_icq'])) ? $user_row['user_icq'] : REPLACE_EMPTY;
    if (!empty(
$user_icq) && $user_icq != REPLACE_EMPTY) {
      
$user_icq_button "<a href=\"http://www.icq.com/people/about_me.php?uin=".$user_icq."\" target=\"_blank\"><img src=\"http://status.icq.com/online.gif?icq=".$user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$user_icq."\" /></a>";
    }
    else {
      
$user_icq_button REPLACE_EMPTY;
    }


8. Now did done steps of with html things from the mod.. you can see..

member_profile.html
member_editprofile.html
plus added in
register_form.html the text field for user..

so..after this mod was working fine so..

i mean when some one register his/her id is saved in database also showed on details.php

but that was not enough..

cuz id of our university is in numeric form and are of four digits ...

so i applied maxlength to 5 and also did added javascript file and linked in header and called with in textfiled of id..
what id did that when some one try to type alphabet it dont type alphabets..
only numeric values are accepted..

is working great up to here..
i wanted another thing..with this and also asked here..
i wanted to have javascript add..so when some one try to leave the id place empty it should give message that place is empty. same
check if id already exist. max characters etc..

so the mod i already added for username and pass i did some changes in it..

this is the other mod..which i added..

Code: [Select]
http://www.4homepages.de/forum/index.php?topic=23848.0
Also many thanks to zhono who did many more changes to give it a much more better look..

so now see files here which i did editing..after zhono editings

1. In page_header.php

Replaced
  "url_user_availability" => $site_sess->url(ROOT_PATH."user_availability.php""&"),

with
  "url_user_cusit" => $site_sess->url(ROOT_PATH."user_availability.php?check=cusit""&"),
  
"url_user_availability" => $site_sess->url(ROOT_PATH."user_availability.php?check=username""&"),
  
"url_user_email" => $site_sess->url(ROOT_PATH."user_availability.php?check=email""&"),
  
"url_user_password" => $site_sess->url(ROOT_PATH."user_availability.php?check=password""&"),


2. In register_form.html (in my templates folder)

Replaced the javascript original on top with this.
<script language="javascript">
//<!---------------------------------+
//  Developed by Roshan Bhattarai 
//  Visit http://roshanbh.com.np for this script and more.
//  This notice MUST stay intact for legal use
//  Extensive additions by Zhono
// --------------------------------->

$(document).ready(function()
{
	
var 
userOk 0;
        var 
idOk 0;
	
var 
passOk 0;
	
var 
emailOk 0;
	
$(
"#submitButton").attr("value""Disabled");
	
$(
"#submitButton").attr("disabled""true");
        $(
"#cusit").blur(function()
	
{
	
	
//remove all the class add the messagebox classes and start fading
	
	
$(
"#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
	
	
//check the CUSIT ID exists or not from ajax
	
	
$.
post("{url_user_cusit}",{ user_cusit:$(this).val() } ,function(data)
        {
	
      if(
data=='idblank'//if cusit id is  not entered
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_cusit_empty}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
idOk 0;
	
	

          }
	
	
  else if(
data=='idlength'//if id is less than 4 or more than 4 characters
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_cusit_length}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
idOk 0;
	
	

          }
	
	
  else if(
data=='idno'//if CUSIT ID not avaiable
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_cusit_taken}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
idOk 0;
	
	

          }
	
	
  else
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function()  //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_cusit_good}').addClass('messageboxok').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
idOk 1;
	
	
	
  if (
idOk==&& passOk==&& emailOk==1) {
	
	
	
	
  $(
"#submitButton").attr("value""Register");
	
	
	
	
  $(
'#submitButton').removeAttr('disabled');
	
	
	
  } else {
	
	
	
	
	
$(
"#submitButton").attr("disabled""true");
	
	
	
	
	
$(
"#submitButton").attr("value""Disabled");
	
	
	
	
}
	
	
  }
	
	
	
	

        });
	
});




	
$(
"#username").blur(function()
	
{
	
	
//remove all the class add the messagebox classes and start fading
	
	
$(
"#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
	
	
//check the username exists or not from ajax
	
	
$.
post("{url_user_availability}",{ user_name:$(this).val() } ,function(data)
        {
	
      if(
data=='userblank'//if username not entered
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_username_empty}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
userOk 0;
	
	

          }
	
	
  else if(
data=='userlength'//if username is less than 6 or more than 20 characters
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_username_length}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
userOk 0;
	
	

          }
	
	
  else if(
data=='userno'//if username not avaiable
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_username_taken}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
userOk 0;
	
	

          }
	
	
  else
	
	
  {
	
	
  
	
$(
"#msgbox").fadeTo(200,0.1,function()  //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_username_good}').addClass('messageboxok').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
userOk 1;
	
	
	
  if (
userOk==&& passOk==&& emailOk==1) {
	
	
	
	
  $(
"#submitButton").attr("value""Register");
	
	
	
	
  $(
'#submitButton').removeAttr('disabled');
	
	
	
  } else {
	
	
	
	
	
$(
"#submitButton").attr("disabled""true");
	
	
	
	
	
$(
"#submitButton").attr("value""Disabled");
	
	
	
	
}
	
	
  }
	
	
	
	

        });
	
});
	
$(
"#userpassword").blur(function()
	
{
	
	
//remove all the class add the messagebox classes and start fading
	
	
$(
"#msgboxpass").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
	
	
//check the username exists or not from ajax
	
	
$.
post("{url_user_password}",{ user_password:$(this).val() } ,function(data)
        {
	
      if(
data=='passblank'//if username not entered
	
	
  {
	
	
  
	
$(
"#msgboxpass").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_password_empty}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
passOk 0;
	
	

          }
	
	
  else if(
data=='passlength'//if username is less than 6 or more than 20 characters
	
	
  {
	
	
  
	
$(
"#msgboxpass").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_password_length}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
passOk 0;
	
	

          }
	
	
  else
	
	
  {
	
	
  
	
$(
"#msgboxpass").fadeTo(200,0.1,function()  //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_password_good}').addClass('messageboxok').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
passOk 1;
	
	
	
  if (
userOk==&& passOk==&& emailOk==1) {
	
	
	
	
  $(
"#submitButton").attr("value""Register");
	
	
	
	
  $(
'#submitButton').removeAttr('disabled');
	
	
	
  } else {
	
	
	
	
	
$(
"#submitButton").attr("disabled""true");
	
	
	
	
	
$(
"#submitButton").attr("value""Disabled");
	
	
	
	
}
	
	
  }
	
	
	
	

        });
	
});
	
$(
"#useremail").blur(function()
	
{
	
	
//remove all the class add the messagebox classes and start fading
	
	
$(
"#msgboxemail").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
	
	
//check the username exists or not from ajax
	
	
$.
post("{url_user_email}",{ user_email:$(this).val() } ,function(data)
        {
	
      if(
data=='emailblank'//if username not entered
	
	
  {
	
	
  
	
$(
"#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_email_empty}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
emailOk 0;
	
	

          }
	
	
  else if(
data=='emailinvalid'//if username is less than 6 or more than 20 characters
	
	
  {
	
	
  
	
$(
"#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_email_invalid}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
emailOk 0;
	
	

          }
	
	
  else if(
data=='emailno'//if username not avaiable
	
	
  {
	
	
  
	
$(
"#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_email_taken}').addClass('messageboxerror').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
emailOk 0;
	
	

          }
	
	
  else
	
	
  {
	
	
  
	
$(
"#msgboxemail").fadeTo(200,0.1,function()  //start fading the messagebox
	
	
	

	
	
	
  
//add message and change the class of the box and start fading
	
	
	
  $(
this).html('{lang_ajax_email_good}').addClass('messageboxok').fadeTo(900,1);
	
	
	
  
	
	
	
});
	
	
	
emailOk 1;
	
	
	
  if (
userOk==&& passOk==&& emailOk==1) {
	
	
	
	
  $(
"#submitButton").attr("value""Register");
	
	
	
	
  $(
'#submitButton').removeAttr('disabled');
	
	
	
  } else {
	
	
	
	
	
$(
"#submitButton").attr("disabled""true");
	
	
	
	
	
$(
"#submitButton").attr("value""Disabled");
	
	
	
	
}
	
	
  }
	
	
	
	

        });
 
	
});
});
</
script>


and added feild above username


            
<td><b>CUSIT ID:</b></td>

            <
td height="50px">

              <
input type="text" name="user_cusit" size="5" Maxlength="5" value="{user_cusit}" id="user_cusit" class="text" onKeyPress="return numbersonly(this, event)" /> <br/><span id="msgboxid" style="display:none"></span>
            </
td>
          </
tr>


3. in main.php

i added
$lang['ajax_cusit_empty'] = "Enter your University ID no of 4 digits";
$lang['ajax_cusit_length'] = "University ID must be of 4 digits";
$lang['ajax_cusit_taken'] = "This ID has already Been Registered";
$lang['ajax_cusit_good'] = "University ID is available and good to register";


above
$lang['ajax_username_empty'] = "Please enter a username";
$lang['ajax_username_length'] = "Username must be between 6 and 20 characters long";
$lang['ajax_username_taken'] = "This User name already exists";
$lang['ajax_username_good'] = "Username available to register";
$lang['ajax_password_empty'] = "Please enter a password";
$lang['ajax_password_length'] = "Password must be between 6 and 20 characters long";
$lang['ajax_password_good'] = "Password is good";
$lang['ajax_email_empty'] = "Please enter an email address";
$lang['ajax_email_invalid'] = "This email address is invalid!";
$lang['ajax_email_taken'] = "This email address is already registered";
$lang['ajax_email_good'] = "Email address is good to go";


4 in register.php

i added
      "lang_ajax_cusit_empty" => $lang['ajax_cusit_empty'],
      
"lang_ajax_cusit_length" => $lang['ajax_cusit_length'],
      
"lang_ajax_cusit_taken" => $lang['ajax_cusit_taken'],
      
"lang_ajax_cusit_good" => $lang['ajax_cusit_good'],


above
      "lang_ajax_username_empty" => $lang['ajax_username_empty'],
      
"lang_ajax_username_length" => $lang['ajax_username_length'],
      
"lang_ajax_username_taken" => $lang['ajax_username_taken'],
      
"lang_ajax_username_good" => $lang['ajax_username_good'],
      
"lang_ajax_password_empty" => $lang['ajax_password_empty'],
      
"lang_ajax_password_length" => $lang['ajax_password_length'],
      
"lang_ajax_password_good" => $lang['ajax_password_good'],
      
"lang_ajax_email_empty" => $lang['ajax_email_empty'],
      
"lang_ajax_email_invalid" => $lang['ajax_email_invalid'],
      
"lang_ajax_email_taken" => $lang['ajax_email_taken'],
      
"lang_ajax_email_good" => $lang['ajax_email_good']


5. replace user_availability.php
with this code
<?php
//  Developed by Roshan Bhattarai 
//  Visit http://roshanbh.com.np for this script and more.
//  This notice MUST stay intact for legal use
//  Extensive additions by Zhono

define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');


if (
$_GET['check'] == "cusit") {
if (isset(
$HTTP_POST_VARS['user_cusit']) && !empty($HTTP_POST_VARS['user_cusit'])) {
$user_cusit preg_replace("/[ ]{2,}/"" "un_htmlspecialchars(trim($HTTP_POST_VARS['user_cusit'])));
//CUSIT ID length
	
$MIN_LENGTH 4;
	
$MAX_LENGTH 4;
	
	
if ((
strlen($user_cusit) < $MIN_LENGTH) || (strlen($user_cusit) > $MAX_LENGTH)) {
    
	
	
echo 
"idlength";
  
	
	
} else {

	
if (
$user_cusit != "") {
	
  
$sql "SELECT ".get_user_table_field("""user_cusit")."
	
	
	
  FROM "
.USERS_TABLE."
	
	
	
  WHERE "
.get_user_table_field("""user_cusit")." = '".strtolower($user_cusit)."'";
	
  if (
$site_db->not_empty($sql)) {
	
	
//ID is not availble
	
	
echo 
"idno";
	
	
	
  } else {
	
	
//ID is available
	
	
echo 
"idyes";   
	
	
}
	
}
  }
} else {
	
echo 
"idblank";
}
}

if (
$_GET['check'] == "username") {
if (isset(
$HTTP_POST_VARS['user_name']) && !empty($HTTP_POST_VARS['user_name'])) {
$user_name preg_replace("/[ ]{2,}/"" "un_htmlspecialchars(trim($HTTP_POST_VARS['user_name'])));
//username length
	
$MIN_LENGTH 6;
	
$MAX_LENGTH 20;
	
	
if ((
strlen($user_name) < $MIN_LENGTH) || (strlen($user_name) > $MAX_LENGTH)) {
    
	
	
echo 
"userlength";
  
	
	
} else {

	
if (
$user_name != "") {
	
  
$sql "SELECT ".get_user_table_field("""user_name")."
	
	
	
  FROM "
.USERS_TABLE."
	
	
	
  WHERE "
.get_user_table_field("""user_name")." = '".strtolower($user_name)."'";
	
  if (
$site_db->not_empty($sql)) {
	
	
//user name is not availble
	
	
echo 
"userno";
	
	
	
  } else {
	
	
//user name is available
	
	
echo 
"useryes";   
	
	
}
	
}
  }
} else {
	
echo 
"userblank";
}
}


if (
$_GET['check'] == "password") {
if (isset(
$HTTP_POST_VARS['user_password']) && !empty($HTTP_POST_VARS['user_password'])) {
$user_password preg_replace("/[ ]{2,}/"" "un_htmlspecialchars(trim($HTTP_POST_VARS['user_password'])));
//password length
	
$MIN_LENGTH 6;
	
$MAX_LENGTH 20;
	
	
if ((
strlen($user_password) < $MIN_LENGTH) || (strlen($user_password) > $MAX_LENGTH)) {
    
	
	
echo 
"passlength";
  
	
	
} else {
	
  
	
	
echo 
"passyes";
  }
} else {
	
echo 
"passblank";
}
}

if (
$_GET['check'] == "email") {
if (isset(
$HTTP_POST_VARS['user_email']) && !empty($HTTP_POST_VARS['user_email'])) {

	
$user_email $HTTP_POST_VARS['user_email'];
	

	
if (!
eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$"$user_email)){
	
	
echo 
"emailinvalid";
	
} else {

	
if (
$user_email != "") {
	
  
$sql "SELECT ".get_user_table_field("""user_email")."
	
	
	
  FROM "
.USERS_TABLE."
	
	
	
  WHERE "
.get_user_table_field("""user_email")." = '".strtolower($user_email)."'";
	
  if (
$site_db->not_empty($sql)) {
	
	
//user name is not availble
	
	
echo 
"emailno";
	
	
	
  } else {
	
	
//user name is available
	
	
echo 
"emailyes";   
	
	
}
	
}
  }
} else {
	
echo 
"emailblank";
}
}
?>



but still no luck getting that ajax message on putting details etc..
like check if id exists or not..

i hope i didnt messed up the code with ajax??

please any coder see and help regarding this issue, will be great favour..

here is my link of website
cusitlibrary.com/register.php

looking forward to your generous help..please loook in to this..

74
Discussion & Troubleshooting / Re: Little Guideness needed with password..
« on: December 31, 2010, 01:04:13 AM »
yes you are right it should b in control panel.. but in this one it is not in chontrol panel??? cant find it..see the attached screen shot please..

what changes to do to make it appear there?

75
Discussion & Troubleshooting / Little Guideness needed with password..
« on: December 30, 2010, 01:02:27 PM »
Hi i know..its a noob question..

but where can user change their password.. i cant find any feild in control panel where user is allowed to change his/her password.

i cant find feild of old password new password etc??

why is that??


Pages: 1 2 3 4 [5] 6 7 8 9 ... 11