Jump to content

z1haze

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

z1haze's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i bought the lynda php movie.. its tough though.. im learning but its tough
  2. i dont know how to do that though.. the code that i posted, i pulled from the actual "login module" or block or whatever u call it.. I have a separate login at the top of the page by the banner to make it easier to login and out. the login works, it just doesnt change when users log in or log out.. its always the same.
  3. hi i have a login form at the top of my website, and im trying to get the form to change when users are logged in. I know this is a commonly asked question and i have searched the forums.. but it seems like the script im using is different than others? and whenever i try to change anything it just goes to a blank white screen. But anyway.. I want the login form and pass form, forgot password, and register, to appear when user is not logged in. And when users are logged in.. i dont want any of that to be visible.. just a simple welcome username. Currently the login thing at the top of the page works correctly.. but whenever the user logs in.. it still just says username: login box, and pass: login box. it doesnt change to anything.. how do i do this? this is maybe the code the script uses in a different login box maybe this can help <?php /** Users Box **/ /** Not logged in **/ if (!$_SESSION[$prefix.'logged_user']) { ?> <?php echo WELCOME; ?> <span class="blue">Guest</span><br /> <?php echo TODAY; ?> <?php echo date("D d m Y"); ?><br /> <br /> <div style="text-align:left;"> <form action="index.php?page=login" method="post" name="login"> <?php echo STND_USERNAME; ?><br /> <input type="text" name="username" class="standardforms"/><br /> <?php echo STND_PASSWORD; ?><br /> <input type="password" name="password" class="standardforms"/><br /> <br /> <?php /** Show captcha **/ if(ANTISPAM==1) { ?> <img src="CaptchaSecurityImages.php?width=125&height=40&characters=8" /><br/> <?php echo FORM_COPY; ?><br /> <input type="text" name="security_code" class="standardforms"/><br /> <?php } ?> <br /> <input type="submit" name="login" class="standardforms" value="<?php echo FORM_LOGIN; ?>"/> </form> </div> <ul> <li><a href="index.php?page=register"><?php echo STND_REGISTER; ?></a></li> <li><a href="index.php?page=login"><?php echo STND_LOGIN; ?></a></li> <li><a href="index.php?page=forgot"><?php echo STND_FORGOT; ?></a></li> </ul> <?php }else{ $result = mysql_query("SELECT * FROM members WHERE id = '".$_SESSION[$prefix.'user_id']."'") or die (mysql_error()); $row = @mysql_fetch_array($result); ?> <span style="float:left;"><?php echo WELCOME; ?> <?php echo flags($row['country'])." ".usernames($_SESSION[$prefix.'logged_user'], $_SESSION[$prefix.'logged_rank']); ?></span> <span style="float:right;"><?php echo TODAY; ?> <?php echo date("D d m Y"); ?></span> <br /><br /> <?php /** Private messages **/ $pm = mysql_query("SELECT * FROM pm WHERE pm_to = '".$_SESSION[$prefix.'user_id']."' AND pm_read = '0' AND outbox ='0'") or die (mysql_error()); $pm = mysql_num_rows($pm); $pm_total = mysql_query("SELECT * FROM pm WHERE pm_to = '".$_SESSION[$prefix.'user_id']."' AND outbox = '0'") or die (mysql_error()); $pm_total = mysql_num_rows($pm_total); ?> <?php echo avatars($row['id'], 80, 80); ?> <ul> <li><a href="user/index.php?p=pm"><?php echo ADMIN_PMS; ?></a> (<?php echo $pm_total; ?>) <?php if($pm>0) { echo "<span style='text-decoration:blink;'>".ADMIN_PMS_NEW."</span>"; } ?></li> <li><a href="index.php?page=members&id=<?php echo $_SESSION[$prefix.'user_id']; ?>"><?php echo MEMBER_PROFILE; ?></a></li> <li><a href="user/"><?php echo MEMBER_PANEL; ?></a></li> <li><a href="index.php?page=login&action=logout"><?php echo LOGOUT; ?></a></li> <?php /** Admin news rank **/ $rank = $_SESSION[$prefix.'logged_rank']; $usergroup = mysql_query("SELECT * FROM usergroups WHERE usergroup_id = '$rank'") or die (mysql_error()); $usergroup = @mysql_fetch_array($usergroup); if ($usergroup['permission_admin'] == 1) { ?> <li><a href="admin/"><?php echo ADMIN_PANEL; ?></a></li> <?php } } ?> </ul> keep in mind i only want to use a small portion of the feature.. i dont want any of the other links to be visible except maybe a logOUT link in place of the forgot password link or something.. thanks a lot
  4. well i've heard a lot.. but more information to you.. all of the customers who will be visiting the site, will either a. know the owner personally, or b. know a person personally who uses the website.. so the trust will be a little easier to gain. Another thing.. I think i may go with the ip addresses thing.. because a lot of it is webbased so it wouldnt help to count downloads, bc the only things actually being downloaded would be teaching videos.. all the other things, like worksheets and such will just be printed from the browser... but the videos go along with the worksheets.. also can someone tell me how i would achieve gettings the users ip logged each time the User Account logs into the system? please and thanks
  5. is it possible to create a sort of php secure login on a website that locks the users account a a hardware ID.. so that it is not possible to share a paid account among several users. Im building a site for a friend who is a teacher.. and is selling teaching packs online.. some webbased and some downloadable.. i need a way to keep people from sharing login names... so they wont all be able to just use one login and rip him off. thanks everyone.
  6. hey sorry.. i will mkae a new post will all necessary information once i get my swtuff together.. thanks a lot
  7. i do have a file that is suppoed to make it work.. but i still dont see how to do it.. this is my problems.. Add the following 6 lines right at the top of every page that you want to have access control on your website. ***It is ESSENTIAL that there is NO spaces or anything else before these lines.*** Note that they must be .php pages, not .html Note that you will have to modify the path in lines 4 and 5 to suit your site before you upload. <?php $curdir = getcwd (); chdir('/path/to/your/forums'); require_once('/path/to/your/forums/global.php'); chdir ($curdir); ?> I do not know how to edit line 5... what is that?? i mean i can count and like five is that chdir ($curdir); right? is that something i need to edit? Also it says to place it at the top of the page... welll i placed that at the top of my index page.. then uploaded.. and all i got when i refreshed was a blank page?? what did i do wrong? Where exactly at the top of the page does it go? After this you have your <HTML> and <BODY> tags and the rest of your web page. Where you want to have your login box place this block of code. <?php require_once('/path/to/your/login_inc2.php'); ?> Is it possible to use the existing layout of how I have my buttons already on my page?? my site is http://newsite.knightsofkarbala.com And lastly... You will need to edit the file login_inc.php You need to edit line 3 $forumpath = "http://www.yoursite.com/forums/"; Change this address to suit your site. Upload this file to your website, and ensure that the path you entered in part 1 points to it. Where do i upload this file too?? and what does he mean ensure what points to what? Im sorry that I do not understand this Im learning slowly, but I've done a lot of graphic work to this site and I need to get this straightened out before I can use the site..
  8. i dont understand what you are asking of me.. all i know is what i told you... all i know is that the login menu that i placed on my home page of my website, works to log into my vbulletin forums.. which is my goal.. but i want that login screen to act the same as the login screen in the forums, as it changes from the boxes, to a "welcome username" message upon login
  9. im trying to make a login bar for vbulletin on my main homepage.. i've got it to work.. you login, it logs into the fourms and redirects back to the home page.. that all works perfectly.. but but im trying to do is make my new login bar on my home page change when users get logged in.. change from the login and password boxes to welcome, username blah blah.. i've been doing some reading and i think im suppoed to be putting these codes somewhere <?php if (is_user_logged_in()){ ?> This will display that the user is logged in <?php } else { ?> This will display when the user isn't logged in <?php } ?> but im obviously not doing it right because every single time i even put that <?php in there when i save and upload.. and refresh.. its just a blank white page... amd i going in the right direction or not here? i will poste the login info bar that i have on my home page for my forums <form action="./FORUM/login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])"> <input type="hidden" name="do" value="login" /> <input type="hidden" name="url" value="./FORUM" /> <input type="hidden" name="vb_login_md5password" /> <input type="hidden" name="vb_login_md5password_utf" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <strong>User Login</strong> <input type="text" name="vb_login_username" id="login" tabindex="1" class="form" accesskey="u" value="username" onfocus="this.value=''"/> <input type="password" name="vb_login_password" id="password" tabindex="1" class="form" value="password" onfocus="this.value=''"/> <input type="submit" name="login" id="submit" tabindex="1" value="" accesskey="s" class="login_button" /> <input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser" tabindex="1" /> Remember me? <a href="index.php?page=register">Register</a> | <a href="index.php?page=forgot">Lost Password</a> </form> thanks for the help
  10. maybe this is a better way to explain it.. I have a website that uses a sql database to manage the users and password and such... i want to install a vbulletin on my server and someone use the same users and passwords to login to vbulletin.. without having them to register TWICE
  11. i kind of understand what they are saying up until the part where they say once FB_ and FC_ are installed then we go patching class_core.php from FORUM_B and FORUM_C setting up $main_prefix = "FA_"; so they use FORUM_A for shared tables. what does that mean?? source: http://www.vbulletin.org/forum/showthread.php?t=185021
  12. i went there.. i think it only shows you how to link forum databases together.. my website i want to link the forums to is just a website with logins and stuff.. its not a forums.. well it has integrated forums but i dont want to use them i want to use the vbulletin forums, and use the website logins..
  13. that didnt do anything what is it that you were trying to do
  14. Hi, I have a website that has a members login and everything and a sql database.. and i also have a vbulletin forums linked to the site.. is it possible to somehow link the usernames from my website database to be the same as the ones in the forum database.. so that the people do not have to register twice? i hope you understand I dont really know the lingo to explain it.
  15. i found out how to do it myself.. but cannot figure how how to adjust the settings to make it looks perfect... the adjustemnts for changeing the frames are in the cms_style.css if someone could figure out which ones to edit plz let me know
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.