PhoenixPHP Language System

Results 1 to 11 of 11
  1. #1
    Enthusiast JoshNRoses is offline
    MemberRank
    Jun 2011 Join Date
    Hollywood =DLocation
    42Posts

    config PhoenixPHP Language System

    Yesterdag I made a quick language system for PhoenixPHP.
    This is only PhoenixPHP, NOT CF!

    1) Go to register/index.php and search:
    PHP Code:
        <label for="cpassword"><?php echo $lang['register_re-type_password']; ?>:</label><br /> 
                    <input type="password" name="cpassword" id="formcpassword" />
                    <br /><br />
    After that, add:
    PHP Code:
                    <label for="password">Language:</label><br /> 
                    <
    input type="text" name="language" id="formlanguage" />
                    <
    br /><br /> 
    2) Go to step2.php and search:
    PHP Code:
    <input type="hidden" name="email" id="email" value="<?php echo($_POST['email']); ?>" />
    After that add:
    PHP Code:
    <input type="hidden" name="language" id="language" value="<?php echo($_POST['language']); ?>" />
    3) Go to complete.php and search:
    PHP Code:
    $email $_SESSION['account']; 
    After that add:
    PHP Code:
    $language $_POST['language']; 
    Search:
    PHP Code:
    $users->AddUser 
    Change the whole line into:
    PHP Code:
    $users->AddUser($username$password$email$core->EscapeString($_POST['figure']), 'Welcome!'$_POST['language']); 
    4) Go to inc/class.users.php and search:
    PHP Code:
    public function AddUser 
    Replace the WHOLE function with:
    PHP Code:
        public function AddUser($username ''$password ''$mail ''$figure ''$motto ''$language '')
        {
            
    mysql_query("INSERT INTO users (username, password, mail, look, motto, account_created, last_online, ip_last, ip_reg, language) VALUES ('".$username."', '".$password."', '".$mail."', '".$figure."', '".$motto."', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), '".$_SERVER['REMOTE_ADDR']."', '".$_SERVER['REMOTE_ADDR']."', '".$language."');");
            
    $user_id mysql_insert_id();
            
    mysql_query("INSERT INTO user_stats (id, RoomVisits, OnlineTime, Respect, RespectGiven, GiftsGiven, GiftsReceived, DailyRespectPoints, DailyPetRespectPoints) VALUES ('".$user_id."', 0, 0, 0, 0, 0, 0, 3, 3);");
            
    mysql_query("INSERT INTO user_info (user_id, bans, cautions, reg_timestamp, login_timestamp, cfhs, cfhs_abusive) VALUES ('".$user_id."', '0', '0', UNIX_TIMESTAMP(), '0', '0', '0');");
        } 

    ---------------------
    Extra addons:

    Home.php:
    Search:
    PHP Code:
        <div class="contentBox">
            <div class="boxHeader"><?php echo $lang['my_badges']; ?></div>
            <div class="boxContent">
            <div class="BadgeBox">
            <?php
            $userbadges 
    mysql_query("SELECT * FROM user_badges WHERE user_id = '".$users->UserInfo($username'id')."'");
            if(
    mysql_num_rows($userbadges) == 0)
            {
                echo 
    '<strong><center>'.$lang['no_badges'].'</center></strong>';
            }
            while(
    $userbadge mysql_fetch_array($userbadges))
            {
            
    ?>
                <img src="Public/Images/badges/<?php echo $userbadge['badge_id']; ?>.gif" />
            <?php
            
    }
            
    ?>
            </div>
            </div>
        </div>
    After that add:
    PHP Code:
         <div class="contentBox">
            <div class="boxHeader">My language</div>
            <div class="boxContent">
            <div class="BadgeBox">
        <img src="Public/Images/flags/<?php echo $users->UserInfo($username'language'); ?>.png"/>
        </div>
        </div>
        </div>
    (YOU HAVE TO SAVE THE IMAGES OF LANGUAGE FLAGS INTO THE FOLDER)

    Search:
    PHP Code:
    <div class="UsersName"><?php echo $users->UserInfo($username'username'); ?>
    Replace THE WHOLE LINE with:
    PHP Code:
    <div class="UsersName"><?php echo $users->UserInfo($username'username'); ?> (<?php echo $users->UserInfo($username'language'); ?>)</div>
    Second addon:
    Staff.php:
    Search:
    PHP Code:
        <img src="./Public/Images/badges/<?php echo $rank['badgeid']; ?>.gif" alt="Teen Staff" />
    After that add:
    PHP Code:
    <img src="Public/Images/flags/<?php echo $staff['language']; ?>.png"/>
    Now you're done. Works 100%(tested by me)
    Like me if you want please:)


  2. #2
    Thanks for the memories! Mithex is offline
    MemberRank
    May 2010 Join Date
    HeavenLocation
    2,014Posts

    Re: PhoenixPHP Language System

    It has a lot of code so it should work.

  3. #3

    Re: PhoenixPHP Language System

    Good work

  4. #4
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: PhoenixPHP Language System

    Good work, checking over the codes now ;D

    ---------- Post added at 07:55 PM ---------- Previous post was at 07:53 PM ----------

    Yep this code works, great release ;D Ill try to get it working with UberCMS!

  5. #5
    Member ChrisDaniel is offline
    MemberRank
    Jun 2011 Join Date
    In a forestLocation
    83Posts

    Re: PhoenixPHP Language System

    Very nice, It's good for users who wants to register, But can't speak English. <3

  6. #6
    Enthusiast JoshNRoses is offline
    MemberRank
    Jun 2011 Join Date
    Hollywood =DLocation
    42Posts

    Re: PhoenixPHP Language System

    Coming soon: different languages, then after you logged in and you choosed German hotel+site will be german ect.

  7. #7
    sexiess is a sin. Subway is offline
    MemberRank
    Jun 2010 Join Date
    2,491Posts

    Re: PhoenixPHP Language System

    Thanks for releasing on RZ, wanted this :)

  8. #8
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: PhoenixPHP Language System

    the staff page with the images was mine you just edit it so the Language -.- and the flags

  9. #9
    Enthusiast JoshNRoses is offline
    MemberRank
    Jun 2011 Join Date
    Hollywood =DLocation
    42Posts

    Re: PhoenixPHP Language System

    @cooldude159 Great story bro. I haven't used PhoenixPHP before, I made this on the same day as my setup, so don't blame me. You aren't the best one at RaGEZONE.

  10. #10
    Hi. Wouto is offline
    MemberRank
    Feb 2011 Join Date
    London, UKLocation
    236Posts

    Re: PhoenixPHP Language System

    Nice release.

  11. #11
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: PhoenixPHP Language System

    TheJack I'm completing it now.



Advertisement