SitePoint Sponsor

User Tag List

Page 1 of 10 12345 ... LastLast
Results 1 to 25 of 230
  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 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.

  9. #9
    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.

  10. #10
    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.

  11. #11
    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.

  12. #12
    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.

  13. #13
    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

  14. #14
    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.

  15. #15
    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.

  16. #16
    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.

  17. #17
    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.

  18. #18
    SitePoint Addict
    Join Date
    May 2003
    Location
    The Netherlands
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stereofrog
    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.
    While I agree too that we should not have to take OOP into account too much with this kind of projects (and although at the same time I consider 2-3 years a considerable length of time), they could have built their apps using a nicely structured and reusable library, very much the same way lots of apps have been written in Perl, way before PHP would become even a serious option. At the end of the day there is no excuse to get so messy while pretending you're leading a serious OSS project.
    There’s more than one way to skin a cat.

  19. #19
    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.

  20. #20
    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)
    wow. it's stuff like this that justifies safe_mode.

  21. #21
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Serberus: When I saw that code, I just thaught "Oh my god!" and then I fell of my chair... I mean, that really ís horrible code

  22. #22
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Lithuania, Europe
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Damn nice code.

    PHP Code:
        // ...

        // check for image stored on remote server

        
    $image_where="here";
        if (
    $data=mysql_fetch_row($res)) {}

        if (
    $image_where == "here"){}
        elseif (
    $image_where == "there")

        
    // ... 
    Image where?
    Image here!
    Where is here?
    Over there!
    So it's where?
    Umm... remote server??


  23. #23
    SitePoint Addict
    Join Date
    May 2003
    Location
    The Netherlands
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken
    wow. it's stuff like this that justifies safe_mode.
    Very scary indeed.
    There’s more than one way to skin a cat.

  24. #24
    SitePoint Zealot Serberus's Avatar
    Join Date
    Oct 2005
    Location
    Herts, UK
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know, I was pretty disgusted at this code, and to think they were actually selling it just made me laugh. There were other gems in there; this is spaghetti code and then some.

    I think the line I used with the customer who bought this was that someone who'd picked up SAMS teach yourself PHP in 24hrs could have made a better effort.

    These kind of applications, in my mind, are the reason many people bad mouth PHP as a technology (when infact it's the users who are at fault); you're given so much rope to hang yourself when it comes to big apps.

    The shallow learning curve and flexibility only increases the attraction for rookie programmers to do this. I guess we all have to start somewhere and that somewhere for a lot of people is PHP (maybe ruby in the future but they've got the guide of rails to help?).

  25. #25
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


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
  •