HabboCMS [PHP, MySQL] [All Emus]

Page 7 of 8 FirstFirst 12345678 LastLast
Results 91 to 105 of 114
  1. #91
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    New plugin class
    PHP Code:
    <?php
      
    class HabboPlugins {
        public 
    $plugins = array();
        private 
    $keys = array(
          
    'current_page' => URL,
          
    's' => S,
          
    'e' => E,
          
    'p' => P,
          
    'b' => B,
        );

        function 
    __construct() {
          global 
    $_HabboCMS$users$debug$core;
          if(!
    $_HabboCMS['website']['plugins']) return false;
          
    $debug->StartClock('plugins');
          
    $xml json_decode(json_encode((array) simplexml_load_string(file_get_contents('plugins.xml'))), 1);
          
    $this->plugins $xml;
          foreach(
    $xml as $name => $array) {
            if(isset(
    $xml[$name]['@attributes']['active']) && $xml[$name]['@attributes']['active'] == 1) {
              require 
    $this->filter($xml[$name]['path']) . $xml[$name]['onload'];
            }
          }
          echo 
    '<!-- Took to ' $debug->StopClock('plugins') . ' secounds to load plugins -->';
        }
       
        private function 
    filter($str) {
          foreach (
    $this->keys as $key => $value) {
            
    $str str_ireplace('{' $key '}'$value$str);
          }
          return 
    $str;
        }
      }
    ?>
    What do you guys think?
    Its much faster now =)
    Last edited by seanrom; 29-11-12 at 05:21 PM.

  2. #92
    Ask me about Daoism FullmetalPride is offline
    MemberRank
    Nov 2010 Join Date
    2,172Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Will this use the same password hashing as UberCMS, or is it all the same? I would love to use this CMS. :)

    Also, someone should code a Paypal IPN for this ;)

    luuuuuul I really need one badly.

  3. #93
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by FullmetalPride View Post
    Will this use the same password hashing as UberCMS, or is it all the same? I would love to use this CMS. :)

    Also, someone should code a Paypal IPN for this ;)

    luuuuuul I really need one badly.
    People set their own hash in the config file.

    Heres also the PayPal API that i use.
    Removed the give vip and credits etc part, you can do that yourself not that hard!
    PHP Code:
    <?php
    ini_set
    ('display_errors'1);
    $contents ''
    // STEP 1: Read POST data
     
    // reading posted data from directly from $_POST causes serialization 
    // issues with array data in POST
    // reading raw POST data from input stream instead. 
    $raw_post_data file_get_contents('php://input');
    $raw_post_array explode('&'$raw_post_data);
    $myPost = array();
    foreach (
    $raw_post_array as $keyval) {
      
    $keyval explode ('='$keyval);
      if (
    count($keyval) == 2)
         
    $myPost[$keyval[0]] = urldecode($keyval[1]);
    }
    // read the post from PayPal system and add 'cmd'
    $req 'cmd=_notify-validate';
    if(
    function_exists('get_magic_quotes_gpc')) {
       
    $get_magic_quotes_exists true;

    foreach (
    $myPost as $key => $value) {        
       if(
    $get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { 
            
    $value urlencode(stripslashes($value)); 
       } else {
            
    $value urlencode($value);
       }
       
    $req .= "&$key=$value";
    }
     
     
    // STEP 2: Post IPN data back to paypal to validate
     
    $ch curl_init('https://www.paypal.com/cgi-bin/webscr');
    curl_setopt($chCURLOPT_HTTP_VERSIONCURL_HTTP_VERSION_1_1);
    curl_setopt($chCURLOPT_POST1);
    curl_setopt($chCURLOPT_RETURNTRANSFER,1);
    curl_setopt($chCURLOPT_POSTFIELDS$req);
    curl_setopt($chCURLOPT_SSL_VERIFYPEER1);
    curl_setopt($chCURLOPT_SSL_VERIFYHOST2);
    curl_setopt($chCURLOPT_FORBID_REUSE1);
    curl_setopt($chCURLOPT_HTTPHEADER, array('Connection: Close'));
     
    // In wamp like environments that do not come bundled with root authority certificates,
    // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path 
    // of the certificate as shown below.
    // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
    if( !($res curl_exec($ch)) ) {
        
    // error_log("Got " . curl_error($ch) . " when processing IPN data");
        
    curl_close($ch);
        exit;
    }
    curl_close($ch);
     
     
    // STEP 3: Inspect IPN validation result and act accordingly
     
    if (strcmp ($res"VERIFIED") == 0) {
        
    // check whether the payment_status is Completed
        // check that txn_id has not been previously processed
        // check that receiver_email is your Primary PayPal email
        // check that payment_amount/payment_currency are correct
        // process payment
     
        // assign posted variables to local variables
        
    $username $_POST['custom'];
        
    $item_name $_POST['item_name'];
        
    $item_number $_POST['item_number'];
        
    $payment_status $_POST['payment_status'];
        
    $payment_amount $_POST['mc_gross'] + $_POST['mc_fee'];
        
    $payment_currency $_POST['mc_currency'];
        
    $txn_id $_POST['txn_id'];
        
    $receiver_email $_POST['receiver_email'];
        
    $type $_POST['payment_type'];


    } else if (
    strcmp ($res"INVALID") == 0) {
        
    // log for manual investigation
        
    die("Invalid.");
    }
    ?>
    Source: x.com

  4. #94
    Proficient Member harbihotel is offline
    MemberRank
    Jul 2008 Join Date
    PortugalLocation
    194Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    This is looking awesome. Can't wait for a release to use with my Phoenix Emu.

  5. #95
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Geese View Post
    Your structure is brutal from the snippets you provided. You have a bunch of good ideas and features but your strategy to implement them is wrong. You will find your project harder and harder to develop as you add more modules and wrappers to your project because of the poor structure it has. This will turn away customers, which will make all of this pointless.

    I highly suggest you start over rather than build from what you have or do a simpler project.
    yeah, maybe. I need to work alot with the structureand how things are combined

    This will turn away customers, which will make all of this pointless.
    I'm mainly coding for my own hotel so there is a point.

    Changes:
    Plugin system now using JSON for config reading instead of XML

  6. #96
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Geese View Post
    No because you are posting this in the development section which means it's supposed to be released. What's the point in making something and releasing it if only you plan to use it? The community cannot use this, it's horrid. Nobody can extend your code, so why would they switch when they can easily extend on Uber CMS and other CMSs that poses a strong structure.

    I stick with my opinion that you should start over or do a smaller project.
    Yes, it will be released, and if people don't wanna use it? Idc.
    If people don't wanna 'extend' it? Idc.
    Also I want to know where the code is so 'horrid' and in what snippet. Most of the snippets I have posted is now completly changed now anyways.. How can you drag out of nowhere that the structure is bad without even seeing the whole script? How it all works together?

    Thanks for the feedback. I'll work on the structure as I've said. I also challenge you to make something better that the community can "use" or people can "extend" and the structure is perfect.

  7. #97
    Account Upgraded | Title Enabled! Raz0rDot is offline
    MemberRank
    Jun 2010 Join Date
    NorwayLocation
    489Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Geese View Post
    This will turn away customers, which will make all of this pointless.
    Customers? He's not going to sell this or make profit from the CMS. I suggest you get your facts straight. HabboCMS doesn't have a bad structure as long as the main dev. understands it, and it's functional. Other developers could use the plugin hook, or templating system for further developing after this.

    Retros themselves are pointless if you mean a bad structure makes them lose "customers". As long as no-one pays anything for it, there's no customers involved. Only users and maybe a few whom decide to develop from this CMS. Even that shouldn't matter. Users won't go into the codes unless they develop it, and still that wouldn't really be necessary considering the fact that there's a plugin hook function as well.

    I'll agree with you that it's not easy to extend from it, but not many people really care for that these days. Just look at phoenix. Too many use the non-cracked version as they don't care that they cannot extend it themselves, or are just too lazy to do so.

    This CMS will definitely be a great asset to the community even though it's not easy to extend from.

    You sir made my day.
    Last edited by Raz0rDot; 30-11-12 at 01:59 PM.

  8. #98
    Apprentice AppleLion is offline
    MemberRank
    Nov 2012 Join Date
    The NetherlandsLocation
    11Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Oleaa View Post
    People set their own hash in the config file.

    Heres also the PayPal API that i use.
    Removed the give vip and credits etc part, you can do that yourself not that hard!
    PHP Code:
    <?php
    ini_set
    ('display_errors'1);
    $contents ''
    // STEP 1: Read POST data
     
    // reading posted data from directly from $_POST causes serialization 
    // issues with array data in POST
    // reading raw POST data from input stream instead. 
    $raw_post_data file_get_contents('php://input');
    $raw_post_array explode('&'$raw_post_data);
    $myPost = array();
    foreach (
    $raw_post_array as $keyval) {
      
    $keyval explode ('='$keyval);
      if (
    count($keyval) == 2)
         
    $myPost[$keyval[0]] = urldecode($keyval[1]);
    }
    // read the post from PayPal system and add 'cmd'
    $req 'cmd=_notify-validate';
    if(
    function_exists('get_magic_quotes_gpc')) {
       
    $get_magic_quotes_exists true;

    foreach (
    $myPost as $key => $value) {        
       if(
    $get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { 
            
    $value urlencode(stripslashes($value)); 
       } else {
            
    $value urlencode($value);
       }
       
    $req .= "&$key=$value";
    }
     
     
    // STEP 2: Post IPN data back to paypal to validate
     
    $ch curl_init('https://www.paypal.com/cgi-bin/webscr');
    curl_setopt($chCURLOPT_HTTP_VERSIONCURL_HTTP_VERSION_1_1);
    curl_setopt($chCURLOPT_POST1);
    curl_setopt($chCURLOPT_RETURNTRANSFER,1);
    curl_setopt($chCURLOPT_POSTFIELDS$req);
    curl_setopt($chCURLOPT_SSL_VERIFYPEER1);
    curl_setopt($chCURLOPT_SSL_VERIFYHOST2);
    curl_setopt($chCURLOPT_FORBID_REUSE1);
    curl_setopt($chCURLOPT_HTTPHEADER, array('Connection: Close'));
     
    // In wamp like environments that do not come bundled with root authority certificates,
    // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path 
    // of the certificate as shown below.
    // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
    if( !($res curl_exec($ch)) ) {
        
    // error_log("Got " . curl_error($ch) . " when processing IPN data");
        
    curl_close($ch);
        exit;
    }
    curl_close($ch);
     
     
    // STEP 3: Inspect IPN validation result and act accordingly
     
    if (strcmp ($res"VERIFIED") == 0) {
        
    // check whether the payment_status is Completed
        // check that txn_id has not been previously processed
        // check that receiver_email is your Primary PayPal email
        // check that payment_amount/payment_currency are correct
        // process payment
     
        // assign posted variables to local variables
        
    $username $_POST['custom'];
        
    $item_name $_POST['item_name'];
        
    $item_number $_POST['item_number'];
        
    $payment_status $_POST['payment_status'];
        
    $payment_amount $_POST['mc_gross'] + $_POST['mc_fee'];
        
    $payment_currency $_POST['mc_currency'];
        
    $txn_id $_POST['txn_id'];
        
    $receiver_email $_POST['receiver_email'];
        
    $type $_POST['payment_type'];


    } else if (
    strcmp ($res"INVALID") == 0) {
        
    // log for manual investigation
        
    die("Invalid.");
    }
    ?>
    Source: x.com

    Where can i find the Hash Code in PHPRETRO?

  9. #99
    Apprentice AppleLion is offline
    MemberRank
    Nov 2012 Join Date
    The NetherlandsLocation
    11Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Oleaa View Post
    People set their own hash in the config file.

    Heres also the PayPal API that i use.
    Removed the give vip and credits etc part, you can do that yourself not that hard!
    PHP Code:
    <?php
    ini_set
    ('display_errors'1);
    $contents ''
    // STEP 1: Read POST data
     
    // reading posted data from directly from $_POST causes serialization 
    // issues with array data in POST
    // reading raw POST data from input stream instead. 
    $raw_post_data file_get_contents('php://input');
    $raw_post_array explode('&'$raw_post_data);
    $myPost = array();
    foreach (
    $raw_post_array as $keyval) {
      
    $keyval explode ('='$keyval);
      if (
    count($keyval) == 2)
         
    $myPost[$keyval[0]] = urldecode($keyval[1]);
    }
    // read the post from PayPal system and add 'cmd'
    $req 'cmd=_notify-validate';
    if(
    function_exists('get_magic_quotes_gpc')) {
       
    $get_magic_quotes_exists true;

    foreach (
    $myPost as $key => $value) {        
       if(
    $get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { 
            
    $value urlencode(stripslashes($value)); 
       } else {
            
    $value urlencode($value);
       }
       
    $req .= "&$key=$value";
    }
     
     
    // STEP 2: Post IPN data back to paypal to validate
     
    $ch curl_init('https://www.paypal.com/cgi-bin/webscr');
    curl_setopt($chCURLOPT_HTTP_VERSIONCURL_HTTP_VERSION_1_1);
    curl_setopt($chCURLOPT_POST1);
    curl_setopt($chCURLOPT_RETURNTRANSFER,1);
    curl_setopt($chCURLOPT_POSTFIELDS$req);
    curl_setopt($chCURLOPT_SSL_VERIFYPEER1);
    curl_setopt($chCURLOPT_SSL_VERIFYHOST2);
    curl_setopt($chCURLOPT_FORBID_REUSE1);
    curl_setopt($chCURLOPT_HTTPHEADER, array('Connection: Close'));
     
    // In wamp like environments that do not come bundled with root authority certificates,
    // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path 
    // of the certificate as shown below.
    // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
    if( !($res curl_exec($ch)) ) {
        
    // error_log("Got " . curl_error($ch) . " when processing IPN data");
        
    curl_close($ch);
        exit;
    }
    curl_close($ch);
     
     
    // STEP 3: Inspect IPN validation result and act accordingly
     
    if (strcmp ($res"VERIFIED") == 0) {
        
    // check whether the payment_status is Completed
        // check that txn_id has not been previously processed
        // check that receiver_email is your Primary PayPal email
        // check that payment_amount/payment_currency are correct
        // process payment
     
        // assign posted variables to local variables
        
    $username $_POST['custom'];
        
    $item_name $_POST['item_name'];
        
    $item_number $_POST['item_number'];
        
    $payment_status $_POST['payment_status'];
        
    $payment_amount $_POST['mc_gross'] + $_POST['mc_fee'];
        
    $payment_currency $_POST['mc_currency'];
        
    $txn_id $_POST['txn_id'];
        
    $receiver_email $_POST['receiver_email'];
        
    $type $_POST['payment_type'];


    } else if (
    strcmp ($res"INVALID") == 0) {
        
    // log for manual investigation
        
    die("Invalid.");
    }
    ?>
    Source: x.com
    Where can i find the HASH Code of PHPRETRO?

  10. #100
    Ask me about Daoism FullmetalPride is offline
    MemberRank
    Nov 2010 Join Date
    2,172Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Oleaa View Post
    People set their own hash in the config file.

    Heres also the PayPal API that i use.
    Removed the give vip and credits etc part, you can do that yourself not that hard!
    PHP Code:
    <?php
    ini_set
    ('display_errors'1);
    $contents ''
    // STEP 1: Read POST data
     
    // reading posted data from directly from $_POST causes serialization 
    // issues with array data in POST
    // reading raw POST data from input stream instead. 
    $raw_post_data file_get_contents('php://input');
    $raw_post_array explode('&'$raw_post_data);
    $myPost = array();
    foreach (
    $raw_post_array as $keyval) {
      
    $keyval explode ('='$keyval);
      if (
    count($keyval) == 2)
         
    $myPost[$keyval[0]] = urldecode($keyval[1]);
    }
    // read the post from PayPal system and add 'cmd'
    $req 'cmd=_notify-validate';
    if(
    function_exists('get_magic_quotes_gpc')) {
       
    $get_magic_quotes_exists true;

    foreach (
    $myPost as $key => $value) {        
       if(
    $get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { 
            
    $value urlencode(stripslashes($value)); 
       } else {
            
    $value urlencode($value);
       }
       
    $req .= "&$key=$value";
    }
     
     
    // STEP 2: Post IPN data back to paypal to validate
     
    $ch curl_init('https://www.paypal.com/cgi-bin/webscr');
    curl_setopt($chCURLOPT_HTTP_VERSIONCURL_HTTP_VERSION_1_1);
    curl_setopt($chCURLOPT_POST1);
    curl_setopt($chCURLOPT_RETURNTRANSFER,1);
    curl_setopt($chCURLOPT_POSTFIELDS$req);
    curl_setopt($chCURLOPT_SSL_VERIFYPEER1);
    curl_setopt($chCURLOPT_SSL_VERIFYHOST2);
    curl_setopt($chCURLOPT_FORBID_REUSE1);
    curl_setopt($chCURLOPT_HTTPHEADER, array('Connection: Close'));
     
    // In wamp like environments that do not come bundled with root authority certificates,
    // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set the directory path 
    // of the certificate as shown below.
    // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
    if( !($res curl_exec($ch)) ) {
        
    // error_log("Got " . curl_error($ch) . " when processing IPN data");
        
    curl_close($ch);
        exit;
    }
    curl_close($ch);
     
     
    // STEP 3: Inspect IPN validation result and act accordingly
     
    if (strcmp ($res"VERIFIED") == 0) {
        
    // check whether the payment_status is Completed
        // check that txn_id has not been previously processed
        // check that receiver_email is your Primary PayPal email
        // check that payment_amount/payment_currency are correct
        // process payment
     
        // assign posted variables to local variables
        
    $username $_POST['custom'];
        
    $item_name $_POST['item_name'];
        
    $item_number $_POST['item_number'];
        
    $payment_status $_POST['payment_status'];
        
    $payment_amount $_POST['mc_gross'] + $_POST['mc_fee'];
        
    $payment_currency $_POST['mc_currency'];
        
    $txn_id $_POST['txn_id'];
        
    $receiver_email $_POST['receiver_email'];
        
    $type $_POST['payment_type'];


    } else if (
    strcmp ($res"INVALID") == 0) {
        
    // log for manual investigation
        
    die("Invalid.");
    }
    ?>
    Source: x.com
    Raw code of yours, or X's? Will it work stand-alone or will there be more required :)

  11. #101
    Full-Stack Web Developer Emetophobic is offline
    MemberRank
    Jan 2012 Join Date
    Nice, FranceLocation
    238Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Get better and better, can't wait for a release.

    Are you about including documentation about the template system? (I'm not a god at PHP)

  12. #102
    Ask me about Daoism FullmetalPride is offline
    MemberRank
    Nov 2010 Join Date
    2,172Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Emetophobic View Post
    Get better and better, can't wait for a release.

    Are you about including documentation about the template system? (I'm not a god at PHP)
    Documentation? What for? I would think it's just your basic template system. .tpl file, open it up, edit the inner HTML.

    Do you mean if you want to create your own template/page?

  13. #103
    Full-Stack Web Developer Emetophobic is offline
    MemberRank
    Jan 2012 Join Date
    Nice, FranceLocation
    238Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by FullmetalPride View Post
    Documentation? What for? I would think it's just your basic template system. .tpl file, open it up, edit the inner HTML.

    Do you mean if you want to create your own template/page?
    Yea, I mean all the defined variables to actually create a own from scratch design ^^ Or I misunderstanding the meaning of "Template System" if he mean that all the HTML is stored in .tpl files like Uber, then it's ok.
    But if it's like RevCMS with a whole system to apply complete theme then I ask again for it: There will be documentation about it? ^^

  14. #104
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    The CMS is commented and explains what the code does.
    And ofc I will create a Documentation with all functions and template shortkeys!

    @FullMetalPride: the API is from x.com, just added the variable $username

  15. #105
    Full-Stack Web Developer Emetophobic is offline
    MemberRank
    Jan 2012 Join Date
    Nice, FranceLocation
    238Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Oleaa View Post
    The CMS is commented and explains what the code does.
    And ofc I will create a Documentation with all functions and template shortkeys!

    @FullMetalPride: the API is from x.com, just added the variable $username
    Appreciated ! Thanks :)



Page 7 of 8 FirstFirst 12345678 LastLast

Advertisement