FailPHP

Page 22 of 24 FirstFirst ... 121415161718192021222324 LastLast
Results 316 to 330 of 359
  1. #316
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: FailPHP

    PHP Code:

    <?php
    if(!defined('TINY')){die("Script loading is forbidden");}

    class 
    blogcore{
      
    /**
       *
       * @author Adil
       * Provides class for posting an article, deleting an article, and pulling an article
       * 
       */
      
         
    public function getArticle($id){
            global 
    $template;
            global 
    $db;
            
    $query=mysql_query("SELECT * FROM `posts` WHERE id=".$id);
            while(
    $content=mysql_fetch_assoc($query)){
                
    $template->setParam('blog-title-'.$id,$content['title']);
                
    $template->setParam('blog-content-'.$id,$content['post']);
                
    $template->setParam('blog-author-'.$id,$content['author']);
                
    $template->setParam('blog-id-'.$id,$content['id']);
            }
        }
       
    }
    ?>
    That's how I grab my articles for my blog system. The idea here is to use custom param tags, so templates don't use php
    Posted via Mobile Device

  2. #317
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    News article are done, dodo.



    Featured content is done, dodo.





    To-do: Support (still processing how I'm going to do this).

    Also unsure whether to do Housekeeping a separate Session or include it with the config file.

  3. #318
    hi i'm robbie Roper is offline
    MemberRank
    Oct 2008 Join Date
    /home/roperLocation
    2,283Posts

    Re: FailPHP

    Quote Originally Posted by Predict View Post
    News article are done, dodo.



    Featured content is done, dodo.





    To-do: Support (still processing how I'm going to do this).

    Also unsure whether to do Housekeeping a separate Session or include it with the config file.
    Seperate session would be more secure right?

    Good progress so far btw, well done =]

  4. #319
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    Pretty pleased with what I've done and what I didn't do on the previous version.



    If ID doesn't exist, the article will be defined with an errror.



    Example of the support topic.



    Support page itself doesn't work, only with ID's. ^^



    If the ID doesn't exist, the support topic will also be defined with an error.



    Database preview of the table/rows.

  5. #320
    Valued Member AmirZ is offline
    MemberRank
    Jan 2012 Join Date
    128Posts

    Re: FailPHP

    style of Design - Register looks so nice man!
    Too bad it's not OOP? (I know Delta isn't aswell, but I hope you can make Fail OOP?)

  6. #321
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    Quote Originally Posted by AmirZ View Post
    style of Design - Register looks so nice man!
    Too bad it's not OOP? (I know Delta isn't aswell, but I hope you can make Fail OOP?)
    It is OOP... Most of my coding is OOP, but it's good practice to not OOP everything (connecting to the database, etc).

    Demo: Habbo Hotel: Login

    Existing accounts do not work from Design - Login

  7. #322
    prjRev.com Kryptos is offline
    MemberRank
    Feb 2010 Join Date
    Planet EarthLocation
    579Posts

    Re: FailPHP

    Quote Originally Posted by Predict View Post
    It is OOP... Most of my coding is OOP, but it's good practice to not OOP everything (connecting to the database, etc).

    Demo: Habbo Hotel: Login

    Existing accounts do not work from Design - Login
    How is that good practice?

  8. #323
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    Basically the reason why I didn't OOP the database connection is because I offer multiple version types and its easier just to if() mysql_connect inside config.php and let the user change the variables ($port for an example to 3306). Because some websites don't offer full support with the latest version of mysql.

  9. #324
    prjRev.com Kryptos is offline
    MemberRank
    Feb 2010 Join Date
    Planet EarthLocation
    579Posts

    Re: FailPHP

    Quote Originally Posted by Predict View Post
    Basically the reason why I didn't OOP the database connection is because I offer multiple version types and its easier just to if() mysql_connect inside config.php and let the user change the variables ($port for an example to 3306). Because some websites don't offer full support with the latest version of mysql.
    That does not mean it's good practice.

  10. #325
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: FailPHP

    Quote Originally Posted by Predict View Post
    Basically the reason why I didn't OOP the database connection is because I offer multiple version types and its easier just to if() mysql_connect inside config.php and let the user change the variables ($port for an example to 3306). Because some websites don't offer full support with the latest version of mysql.
    It's the dll that you include in your php cli that supports the mysql version (libmysql.dll)

    Edit: wrong thread #Fail

  11. #326
    Grenafukindear Grenadier is offline
    MemberRank
    Feb 2010 Join Date
    127.0.0.1Location
    1,299Posts

    Re: FailPHP

    FailPHP? Thats gonna really make people wanas use it. LOL. Nice rease tho !! :D

  12. #327
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    It was probably more effort print screening the images than coding it. -_-



    Talan2 is a banned user, listing all banned users...



    I decided to remove Talan2's ban from the current ban list...



    I accidently stumbled across a error, I guess I spelt the username wrong...



    Talan2 is a noob, so I decided to re-ban him.



    Talan2 is back on the current ban list.



    Talan2's profile page has been removed from play, while being banned.

    Basically I'm just adding captions to what's been coded, trolol.

  13. #328
    Gamma Spamma Liam is offline
    MemberRank
    Dec 2011 Join Date
    Down UnderLocation
    2,946Posts

    Re: FailPHP

    Isn't this like a security risk?:

  14. #329
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    Quote Originally Posted by ѕуѕтєм View Post
    Isn't this like a security risk?:
    And this is going to effect anything because? Oh wait, it's not. Not sure why you posted this considering it ain't going to cause any problems with the database, etc.

    Cool story bro.

    Edit: Trolololololol

  15. #330
    ex visor Aaron is offline
    MemberRank
    May 2007 Join Date
    MichiganLocation
    4,028Posts

    Re: FailPHP

    You should still redirect all unknown URLS to either a 404 page, or to the homepage.
    He's just tipping you some advice.



Advertisement