SitePoint Sponsor

User Tag List

Page 1 of 8 12345 ... LastLast
Results 1 to 25 of 230

Hybrid View

  1. #1
    There is no general chat z0s0's Avatar
    Join Date
    Aug 1998
    Location
    Melbourne
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP forum software that isn't an utter disgrace?

    From a design perspective?

    I have yet to find a _single_ bit of PHP forum software that doesn't fail my "is-it-crapware" test. That being:

    Code:
    root@Thunder phpBB2# grep "global $db" *
    common.php:* Remove variables created by register_globals from the global scope
    common.php:// Grab global variables, re-cache if necessary
    download.php:   global $user, $db, $config, $phpbb_root_path;
    download.php:   global $config, $user, $db;
    mcp.php:        global $forum_id, $topic_id, $post_id;
    mcp.php:        global $auth, $db;
    mcp.php:        global $db, $auth;
    mcp.php:        global $auth, $db;
    ....
    I'm truly astonished.. fudforum, smf, punbb, phpbb, vbulletin, every one of them is pure spaghetti.

    Surely someone has written something decent?
    Wormly Server Performance Monitoring
    Don't wait for an SMS at 4am. Find out what's really
    going on and fix the problem. www.wormly.com/website-monitoring

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2004
    Location
    US
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IPB a bit better

  3. #3
    SitePoint Guru Galo's Avatar
    Join Date
    May 2005
    Location
    Holland!
    Posts
    852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont think you'll find it, it's like these programs are all banged up software pieces.

    that's what you get if you make things openSource, tons and tons of loose pieces of code stiched together by a PHP Hack fanatic.

    I dont think your gonna find a 100% good documented OOP Driven Enterprise piece of PHP application out there, simply cause PHP is not up for the Job, OOP whise....

    PHP wasn't officialy written to be a OOP based language, spagethi and meatballs is what we have now, thanks to PHP3.x still hanging half in there....
    Business as usual is off the menu folks, ...

  4. #4
    SitePoint Zealot agoossens's Avatar
    Join Date
    Mar 2004
    Location
    Adelaide, Australia
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never before have I seen a mass of spaghetti code that even comes close to matching PHP-Nuke ... actually, I lie - phpMyAdmin comes pretty damn close. I see your global variables and raise you a "let's mix HTML and business logic everywhere!".

    Useful applications? Very. Design wise? Both max out the Suck-o-Meter™.

    However, I do recall Invision Power Board being a very nice piece of software.
    This space for rent.

  5. #5
    SitePoint Addict
    Join Date
    May 2003
    Location
    The Netherlands
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agoossens
    Never before have I seen a mass of spaghetti code that even comes close to matching PHP-Nuke ... actually, I lie - phpMyAdmin comes pretty damn close. I see your global variables and raise you a "let's mix HTML and business logic everywhere!".
    You probably haven't had to work with OSCommerce then
    There’s more than one way to skin a cat.

  6. #6
    SitePoint Zealot agoossens's Avatar
    Join Date
    Mar 2004
    Location
    Adelaide, Australia
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nacho
    You probably haven't had to work with OSCommerce then
    Wow. Just....wow.

    I wonder why people write their applications like this? Beginners, I can understand. But surely after you've had the headache of picking through reams of HTML to correct a single function call, or you've had to rewrite half your business code because you made major user interface changes, you'd start thinking "you know, maybe there's a better way to do this...".

    The mind boggles.
    This space for rent.

  7. #7
    SitePoint Guru
    Join Date
    May 2003
    Location
    virginia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't looked at the code so... I've heard that Vanilla is OK?

    http://getvanilla.com/

  8. #8
    SitePoint Addict
    Join Date
    May 2003
    Location
    The Netherlands
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agoossens
    Wow. Just....wow.
    I just hope for you you never have to. It gets really frustating to see something like that and at the same time knowing that your task of the day consists of trying to build a new funcionality into such a mess. The day task evolves then to a whole week feeling sick.

    Quote Originally Posted by agoossens
    I wonder why people write their applications like this?
    Because they can't indeed do something any better ...
    There’s more than one way to skin a cat.

  9. #9
    SitePoint Guru dagfinn's Avatar
    Join Date
    Jan 2004
    Location
    Oslo, Norway
    Posts
    894
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A bit off topic, I guess, but when I looked for blog software, I found Lifetype (formerly plog) to be OK in terms of code quality.
    Dagfinn Reiersøl
    PHP in Action / Blog / Twitter
    "Making the impossible possible, the possible easy,
    and the easy elegant"
    -- Moshe Feldenkrais

  10. #10
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nacho
    Because they can't indeed do something any better ...
    Right now, I'm trying to setup TYPO3 for one of our customers and it makes me laugh and weep at the same time... But I'd agree with kabatak's point: we shouldn't forget that php became a professional tool only two or three years ago and most of aged applications are created by enthusiastic amateurs.

  11. #11
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nacho
    You probably haven't had to work with OSCommerce then
    I second that. Unbelievable. Not sure what the recent version is like but a few versions back it was disheartening.

    Interesting, I have been thinking over the last few days of making a simple OOP forum myself.

    Rather than just looking at the code has anyone looked at the database design of these forums?
    www.SQLrecipes.com A free cookbook for SQL recipes.

    I didn't believe someone could make over $19,000 a month...
    ...with Google Adsense, until I read this.

  12. #12
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Plano
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwms
    Rather than just looking at the code has anyone looked at the database design of these forums?
    a while ago i was trying to create an ecommerce site for someone, and i didn't want it to take forever, so i took a look at some free apps. unfortunately i found oscommerce...i was barely getting the hang of OOP, but i could still tell that app was complete garbage. For example, on the shopping cart, everytime you added a new item, it took 20 more database queries to load that page. With just 5 items in my shopping cart, i was up to 116 mysql queries just to display the page, not even perform an action. i'm not sure if this was bad design of the code or the database (probably a combination of both), but this alone convinced me OSCommerce was a horrible program. definitely not a place to look if you're tryin to learn.

  13. #13
    Non-Member lostseed's Avatar
    Join Date
    Sep 2005
    Location
    Zurconion Soon!
    Posts
    1,549
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agoossens
    Never before have I seen a mass of spaghetti code that even comes close to matching PHP-Nuke .
    Agreed. Thats probably the most horrific piece of trash I've ever tried.

  14. #14
    SitePoint Zealot Michel Merlin's Avatar
    Join Date
    Mar 2005
    Location
    Versailles (France)
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agoossens
    However, I do recall Invision Power Board being a very nice piece of software.
    We must have not seen the same Invision... The one I saw was on InfoWorld Electronic forums, where Invision was just a catastrophic aggravation of an earlier catastrophe, which eventually brought those renamed IWE forums to collapse. Even among the fanatic crowds then phagocyting InfoWorld (some still living in IWeThey), there was not one to support Invision.

    Now this was around 1998-2000 (i.e. Middle-Age Internet), so Invision may have improved...

    Paris, Thu 11 May 2006 12:47:45 +0200, edited 12:54:40

  15. #15
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    nyc
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I spent a long time hunting this same grail, and eventually decided to bag it and write my own.

    Vanilla had the best code I found - actually quite sophisticated and clean compared to the alternatives - but too much of the presentation/design was essentially hard-coded and excessively difficult to change. Had the author gone with a more traditional templating approach, it'd be a lot stronger of an option, IMO.

  16. #16
    SitePoint Member sry_not4sale's Avatar
    Join Date
    Sep 2004
    Location
    New Zealand
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hennagaijin
    Vanilla had the best code I found - actually quite sophisticated and clean compared to the alternatives - but too much of the presentation/design was essentially hard-coded and excessively difficult to change. Had the author gone with a more traditional templating approach, it'd be a lot stronger of an option, IMO.
    Vanilla is in the final stages of releasing V 1.0 which includes a new (and much-requested) templating system.

  17. #17
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    phpBB has driven me to the verge of suicide more than once. I heard good vibes about vanilla aswell, but I only skimmed the code. It's oop at least.

  18. #18
    SitePoint Addict
    Join Date
    Aug 2002
    Posts
    385
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't blame these guys. During that time, "clean" code or OOP for that matter isn't the hype in PHP yet. Their ultimate goal was mass availability of their software. So it was like: the older the PHP version that can be used - the better.

  19. #19
    The Omnipresent [ArcanE]'s Avatar
    Join Date
    Mar 2005
    Location
    Belgium
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been using Invisionboard ever since PHPBB started to suck security wise and it's code is pretty clean compared to other forum software. I haven't dug into the deeper design yet but since it is commercially developed i'm pretty sure it's solid.

    Too bad they don't offer a free version anymore
    Webdevelopment : Skyrocket ConceptsInventis Web Architects
    Ain't got time for the future or the past.
    Live for the moment, make it last.

  20. #20
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Norway - Oslo
    Posts
    198
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not only are most forum software an utter disgrace in terms of code and design quality.
    But they also dont scale well at all. Its so obvious that forums are written for small sites without much demands. Most big forums have had to optimize them a lot to get them running, or throw loads of servers at it, something which just works to a certain point aswell.

    Anyone that writes a solid forum application in php will get a star in my book at least.

  21. #21
    simple tester McGruff's Avatar
    Join Date
    Sep 2003
    Location
    Glasgow
    Posts
    1,690
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You've also got to remember that there's a strong anti-intellectual element in php who actively attack things which they don't understand. It's a sort of a "nobody tells me when to go to bed!" syndrome. There aren't many places to find good advice if you're trying to learn. I'm hoping the new Zend framework will help a bit to promote OOP & testing.

  22. #22
    SitePoint Addict phptek's Avatar
    Join Date
    Jun 2002
    Location
    Wellington, NZ
    Posts
    363
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by McGruff
    There aren't many places to find good advice if you're trying to learn.
    PHP? Are you serious?

    I would say that there are arguably more PHP resources out there than for any other scripting language. Sitepoint, Webmonkey, phpbuilder.com you name it, there's been a PHP tute on there.

    Try building a website out of Zope & Plone - the documentation is so scant it isn't funny!

    All this said, I'm not a contributer, I don't code for or document any of these products (I intend to) and until I do, I'm in no position to complain.

  23. #23
    SitePoint Guru
    Join Date
    May 2005
    Location
    Finland
    Posts
    608
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by phptek
    Quote Originally Posted by McGruff
    There aren't many places to find good advice if you're trying to learn.
    I would say that there are arguably more PHP resources out there than for any other scripting language.
    That's true. But the majority of those resources - well, suck. I myself have only relatively recently found these great sites that have good advice dealing with high-class concepts, and I have been doing PHP for quite a long time.

    Or, in other words, the majority of PHP resources are exactly the same quality as the majority of PHP forum software.

  24. #24
    SitePoint Zealot agoossens's Avatar
    Join Date
    Mar 2004
    Location
    Adelaide, Australia
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ezku
    Or, in other words, the majority of PHP resources are exactly the same quality as the majority of PHP forum software.
    A harsh statement, but very true. Experts aren't, and writing your own news casting script doesn't mean you really know what you're talking about.

    PHP is consistently seen as an "amateur" language because primarily amateurs use it and hence produce exceedingly amateur code. This in turn means that the majority of times when a person sees PHP code it's a pile of festering, malignant ooze spawning global variables and heredoc syntax.

    The good news is that those amateurs who really are interested will quickly become good programmers due to actively improving their skills.

    Quote Originally Posted by R. U. Serious
    So... do good (as defined in this context) PHP programmers just suck at creating Opensource projects? Or do they suck at making them popular? Do they lack all the other skills necessary to keep a project alive and grow it?
    That's not a failing of PHP programmers, per se, it's a downside of Free/Open Source in general. It's really, really hard to stay motivated on something you're not getting any tangible reward for (read: money), and that doesn't change if you're programming in PHP, .NET, Ruby, or $LANGUAGE. Even if you really believe in what you're creating eventually your enthusiasm will fade.
    This space for rent.

  25. #25
    SitePoint Zealot Serberus's Avatar
    Join Date
    Oct 2005
    Location
    Herts, UK
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    Ha! You ain't seen nothing yet, just check out this source from I-Rater, this is just a sample from index.php:

    PHP Code:
    if ( isset($_GET['cmd']) ) {
        
    $module_name $_GET['cmd'];
        
    $fname "modules/".$module_name."/".$module_name.".php";
        include(
    "$fname");
        exit;
    }
    else {
        if(
    $r == 1)    {
        
    $faqs="<br><br><center><font class='bold'>You have viewed or rated all the images, please check back again later</font></center><br><br>";
        
    session_unregister("previous_visit_id");
        }

        
    $s "select id from $tb_featureduser where gender ='f' LIMIT 0,$num_feature_image";

        
    $r mysql_query($s);
        
    //echo mysql_error();

        
    $faqs "<TR><td><TABLE align=center width=100%><TR><TD class=s10><strong><center>Featured Female</center></strong><BR>
            <table border=0 width=100% align=center>
                <tr width=19% class=s10>"
    ;
    //sathish

        
    for($i=0;$i<$num_feature_image;$i++) {
        
    $rd=0;
        
    $random_id[0]=$d[0];
        while(
    $d=mysql_fetch_row($r)) {
            
    $random_id[$rd]=$d[0];
            
    $rd+=1;
        }

        
    $sql "select * from $tb_users    where id = '$random_id[$i]'";
        
    $img_src '';

        
    $query mysql_query($sql) or die($sql);
        
    $array mysql_fetch_array($query);

        
    // check for image stored on remote server

        
    $sql "select image, image_url from $tb_users where id='$random_id' and user_type='2' ";
        
    $res mysql_query($sql);
        
    // echo mysql_error();
        
    $image_where="here";
        if (
    $data=mysql_fetch_row($res)) {
            
    $image_where=$data[0];
            
    $image_url=$data[1];
        }

        if (
    $image_where == "here"){   $img_src $base_url "/image.php?id=" $array["id"] . "&p=1";}
        elseif (
    $image_where == "there"){   $img_src $image_url;}

        
    $avg1 round($array[average_rating]);
        
    $count $i+1;
        
    $faqs .= "
                <td class=s10 align=center>
                    <a href='index.php?i=
    $array[id]'><img border=0 src='$img_src' width=100 height=100></a><br>

                    Name :<a href='index.php?i=
    $array[id]'>$array[username]</a><br>
                    Rating : 
    $avg1<br>
                    Age :
    $array[age]<br> </td> ";
        }

        
    $faqs .= "</table> <tr align=center> <td class=s10 width=100% align=center> <BR> <strong> <center> Featured Male</center> <br></strong>
        </td>"
    ;
            
    $faqs .= "<table border=0 width=100% align=center><tr align=center>";



    //sathish

        
    $s "select id from $tb_featureduser where gender ='m' LIMIT 0,$num_feature_image";
        
    $r mysql_query($s);
        
    // echo mysql_error();

        
    for($i=0;$i<$num_feature_image;$i++) {
        
    $rd=0;
        
    $random_id[0]=$d[0];
        while(
    $d=mysql_fetch_row($r)) {
            
    $random_id[$rd]=$d[0];
            
    $rd+=1;
        }

        
    $sql "
                select * from 
    $tb_users
                where
                id = '
    $random_id[$i]'
                "
    ;
        
    $img_src "";

        
    $query mysql_query($sql) or die($sql);
        
    $array mysql_fetch_array($query);

        
    // check for image stored on remote server

        
    $sql "select image, image_url from $tb_users where id='$random_id' and user_type='1' ";
        
    $res mysql_query($sql);
        
    // echo mysql_error();
        
    $image_where "here";
        if (
    $data=mysql_fetch_row($res)) {
            
    $image_where=$data[0];
            
    $image_url=$data[1];
        }

        if (
    $image_where == "here") {   $img_src $base_url "/image.php?id=" $array["id"] . "&p=1";}
        elseif (
    $image_where == "there"){   $img_src $image_url;}

        
    $avg1 round($array[average_rating]);
        
    $count $i+1;
        
    $faqs .= "
                <td  class=s10 align=center>
                <a href='index.php?i=
    $array[id]'><img border=0 src='$img_src' width=100 height=100></a></br>
                Name :<a href='index.php?i=
    $array[id]'>$array[username]</a><br>
                Rating : 
    $avg1<br>
                Age :
    $array[age]<br> </td>
                <td>"
    ;
        }

        
    $faqs .= "</table></TD></TR> ";

        
    $feature $faqs;

    #################################################################
    // extra code for recent user

        
    $recent_user "
                <tr><td><br></td></tr>

                        <tr><td width=100%>
                    <table border=0 width=100% cellspacing=0 cellpadding=0>
                        <tr><td class=s10 width=100% colspan=2><strong><br><center>Recent Users</center><br></strong></td></tr>
                        <tr><td width=50%><table border=0 width=100% cellspacing=0 cellpadding=0>
                 "
    ;

        
    $sql "SELECT * FROM $tb_users where image_status='approved' and user_type ='2'  ORDER BY signup DESC LIMIT 0,$num_recent_image";
        
    $sql1 "SELECT * FROM $tb_users where image_status='approved' and user_type ='1'  ORDER BY signup DESC LIMIT 0,$num_recent_image";

        
    $result mysql_query($sql) or die(mysql_error());
        
    $result1 mysql_query($sql1) or die(mysql_error());

        while(
    $row=mysql_fetch_assoc($result)) {
        
    $u_id[]=$row[id];
        
    $u_name[]=$row[username];
        }

        while(
    $row1=mysql_fetch_assoc($result1)) {
        
    $u1_id[]=$row1[id];
        
    $u1_name[]=$row1[username];
        }

        
    $totalimage=count($u_id);
        if(
    $totalimage 0) {
        
    $remain=$num_recent_image%4;
        for(
    $i=0$i $totalimage$i++) {
                if (
    $i%== 0) {
            
    $tpl->assign(array('I' => $u_id[$i],'J'=>$u_name[$i]));
            
    $tpl->parse('RECENTUSER_PHOTOS''.recentuser_photo');
          }
           else{
             
    $tpl->assign(array('I' => $u_id[$i],'J'=>$u_name[$i]));
             
    $tpl->parse('RECENTUSER_PHOTOS''.recentuser_photo');
            }
            if (
    $i%== 3) {
              
    $tpl->parse('RECENTUSER_ROWS''.recentuser_row_photos');
              
    $tpl->clear_parse('RECENTUSER_PHOTOS');
            }

        }
        } 
    When I was asked to modify this for a customer who installed it I was shocked they actually bought this product (and explained that I wasn't happy running this software on my server).

    Funny how they've decided to re-write it: http://www.i-rater.com/basic-and-pro...production.htm

    This sloppy code really gives PHP a bad name and fuels the constant bashing.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •