ℹ️
Welcome to the archive of the old FlatPress support forum. Browse more than a decade of FlatPress wisdom! Login is disabled.

The current FlatPress support forum is available here: forum.flatpress.org
PHP4 compatibility
  • Thinking about this post: http://flatpress.org/vanilla2/discussion/1503/email-validation-code#Item_4 And the use of filters, i keep thinking if it is necesary to keep the PHP4 compatibility. The official PHP4 support ceased a long time ago (2008). Even the PHP 5.2.17 is no longer supported. I know i am a new user of flatpress and maybe i do not know the target of the project. I even know that i am not a developer, but i want to make one suggestion. It should be better to start use a few features of the PHP 5 code that could generate a better flatpress with less code. I am not talking about a huge rewrite or something like that. I just think about the use for example of the filters (sadly that is for PHP 5 >= 5.2.0) or some small features. Even smarty on the future surely will deprecate the php4 compatibility It is true that i have learning with php5 and i havent used php4. Maybe there are some perfomance advantages of php4, but i can not find host that use php4. Almost all of the host on the net (free host for example) are using php 5.2 and later. Another thing is that in the next versions of php (5.4 i think) there will be severals function deleted and if one keep using deprecated function it will be harder to mantain the code. Sorry if someone is bothered by my suggestion Best regards
  • I'm not a developer, but I'll try to explain the situation as a Flatpress user since 2009 (and I had tested before, too) and an user of the FP forum for a year. Flatpress was born some years ago, when PHP 5 was not as widespread as now. When the B+Tree class was included (some years ago) in FP and NoWhereMan asked if some users still used PHP4, he had positive answers (I don't remember when, exactly). However FP is made to not require a lot of PHP features, like database and the PHP4 compatibility still remained in the aim of FP, as I know. Smarty supports only PHP 5.2+ (as the version 3.0). The older stable version (2.6.x) is outdated: the last update was made on June 2009. However, I agree with you: I think that PHP 4 is outdated and hosters that have still PHP4 have it for compatibility, too. Otherwise, they are scamming the users :) I think the best practice should ignore "it's not supported by PHP4" and not "port all FP code to PHP5".
  • "it's not supported by PHP4" and not "port all FP code to PHP5". I said the same. I am not talking to port all flatpress code to php5 or rewrite all the code. I am talking about use a few small functions of php5 and avoid use deprecated or soon to be deprecated function. If the php4 compatibilty is needed, then we could check the php version and use diferents functions for each php (example, you want to check if there is a mail or a url, you use a filter on php5. On php4 you could use a custom function. In that way you are using what is best to each php version) I am not talking to do all in one time. Just small changes each time. I could help with a few things, but i have little time, and for now that time i am using to understand the code of flatpress.
  • For the constants on defaults.php and for the filesystem function, you can see there: http://pastebin.com/brqvRfY7
  • pierovdfn said: For the constants on defaults.php and for the filesystem function, you can see there: http://pastebin.com/brqvRfY7

    I'd suggest to post it on the wiki :) sorry guys if I'm not very active, but I'm working on my master thesis and the research project for the PhD; as you have seen I've been very busy in the last few months... I didn't even had time to update the blog...
  • No problem. Flatpress is a great software (i could use on a free host and get nice perfomance) and i know that keep the personal and profesional life do not let free time to work on others projects. (i was part of the team of a spanish version of xnova, a ogame clon and i have to walk away because of personal reasons) Take the time you need for your PhD because that is what let you eat in the future. Best regards
  • angelus_ira said: Take the time you need for your PhD because that is what let you eat in the future.

    I really hope so :P
  • angelus_ira is right, take the time for the PhD. For the future: I've wrote the docs in the phpDoc format, so maybe, it could be added to the FP code and use PHPDoc to make the documentation. However it's just an idea.
  • PHPDoc or PHPDocumentor? I do not know if these projects are the same. I could learn any of these (or an external document maker like doxygen) Using a software for documentation is a great idea.
  • PHPDoc (I think). I think it's better using PHPDoc for PHP Projects' documentation: it's automatic and it's handy for the developers.
  • I have been reading a little of PhpDoc (and PHPDocumentor) and it seem that there are no longer mantained (even if it works). And Doxygen have problems with the namespaces (well, that is for php 5.3+) I have been looking at Docblox (http://www.docblox-project.org) , it seems a new alternative who uses dock blocks (the same of PHPDocs) so it should be compatible with the comments for PHPDocs. Here is an example (http://demo.docblox-project.org/default/) The important thing here is to start making comments on a PHPDoc way. I write really bad on english, so i can not help on this to much, but i can start making the blocks on the diferent parts of the code. Here i have uploaded an example of how the docs is showed with doxygen. If i have time i will do the same with docblox and PHPDocs. http://www.4shared.com/file/tipnyd0Q/html.html?
  • It's better moving on the discussion about the docs that I've created some time ago: http://www.flatpress.org/vanilla2/discussion/1430/flatpress-code-documentation However there are already some files documented (like the wordpress ones). I don't know very well English too (I'm Italian), but some bad English is better than nothing, don't you think so? I stopped at the filesystem functions because I thought nobody cared about the documentation of the code and I had other projects but if somebody is interested I'll be happy to join the documentation project ;)
  • Add a Comment
    Start a New Discussion

    Howdy, Stranger!

    It looks like you're new here. If you want to get involved, click one of these buttons!

    Categories

    In this Discussion