Giter Site home page Giter Site logo

f3com-data's Introduction

F3com-data

Content for the F3 CMS on fatfreeframework.com

Local Installation

Participate

  • Fork the repository
  • Edit your file
  • Send a pull request on GitHub
  • After approval, your changes will be visible on the website

Hint: you can also modify files directly on GitHub which does the rest for you automatically.

Compatibility

With commit e56ac9b5f0623dc18b33d207b6d831ca546a1878, this repo became incompatible with the old F3com Wiki due to the new folder structure. If you want to use the old way, you have to checkout the latest working commit via

git checkout e82879cec1084b01ec6e4b3758673c2637328628

f3com-data's People

Contributors

agnosis-be avatar anystar avatar bcosca avatar bondz avatar emanwebdev avatar ethanpil avatar ikkez avatar kbariotis avatar kontinyu avatar krovak avatar leancode avatar mackenza avatar marcus-at-localhost avatar microgamer avatar mikesir87 avatar minorityman avatar myaaghubi avatar n0nag0n avatar onionstand avatar pixeline avatar pkeidel avatar promasu avatar rayne avatar sgpinkus avatar sn0opy avatar stevewasiura avatar stickypages avatar timbotron avatar uonick avatar xfra35 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

f3com-data's Issues

DEBUG Range

The Documentation:

https://github.com/F3Community/F3com-data/blob/3b0c48fe7c58bcf8f2f5ba843f541cb54408647c/framework-variables/main.md

says:

While developing your application, it's best to set the debug level to maximum so you can trace all errors to their root cause:
$f3->set('DEBUG',3);

and later

DEBUG can have values ranging from 0 (stack trace suppressed) to 2 (most verbose with classes & functions calls logs).

This is unclear shouldn´t either first be two or second quote say 3?

– anatol

the missing v3.4.x docs

Extend unit testing documentation

A user had questions about unit testing but the documentation has no complete overview. I gathered some ideas and snippets:

Docs versioning

Hi guys,

3.6 has been released and there are quite some changes to bring to the docs.

Maybe it's time to decide how the website content should follow the framework history:

  1. should it match the latest release only? (that's how it's been working so far)
  2. or should it keep a history of changes? (that could be helpful for migrations and/or supporting older releases)

If we stick to the first strategy, we'd better create a dev branch that we could feed until the next release.

If we go for the second strategy, we need to decide how to display the docs history. It could be a small changelog for each modified API method, like on php.net, or a general version selector, like on dev.mysql.com.

Incorrect number of args in Session anti-csrf example

Apologies if I'm not reporting this correctly.

In 3.6 Session documentation.
Section Methods

NB: as an alternative, you can instantiate the Session class with the 4th parameter set to a hive key name, which will hold the CSRF token. E.g:
new DB\SQL\Session($db,'sessions',NULL,'CSRF');// now $f3->CSRF holds the token

For an SQL backed session, it should be the 5th argument, since there is an extra $force argument.
I.e:

function __construct(\DB\SQL $db,$table='sessions',$force=TRUE,$onsuspect=NULL,$key=NULL) {

Tag the GitHub repository

I propose to add the following tags to the repository:

  • fat-free-framework
  • documentation

and perhaps

  • php because it's the documentation for a PHP framework

I would have added the tags if I had the permission to do so.

The tags could also be added to fatfree and fatfree-core. I'm not sure if it's necessary to tag F3com.

Routing: Catch-all

I feel a sub-section within routing should be devoted to displaying the correct way to provide a catch-all... Fat-Free doesn't provide a direct method for catch-all, so it may confuse new users. It's also one of the first things I do within a project to provide custom logic instead of a default 405.

Now personally I have two ways of achieving this, but I figured I'd ask everyone else to see if you guys have your own ways.

Method 1:

// known routes should be added before catch-all...

$f3->route('GET|HEAD|POST /*/*', function($f3) {
    //
    // add custom logic here....
    //

    // call F3 error handler for cases not matching custom logic
    $f3->error(405);
});

In my tests, "//" proved to work but I didn't use a full test suite with edge cases, so I'm unsure if it provides true catch-all support.
Using "//" also infers that a method has already caught all single parameter routes. E.g. /@action. With this said the wildcard may need to be at a proportional depth compared with existing routes.

Method 2:

I'm going to be lazy here, but it involves adding a custom error handler to catch 405 errors... I'll just provide an example from my error handler:

\Error::instance()->addHandler(405, function() use($f3) {
    // custom logic
    if (!$f3->get('AJAX') && in_array($f3->get('VERB'), array('GET', 'HEAD', 'POST'))) {
        $f3->reroute('/');
    }

    // call default F3 error handler (will pass on 405 error)
    call_user_func_array(array($f3, 'error'), $f3->get('ERROR'));
});

That's about it. Let me know your thoughts, or if you have an alternative method (we can pick which one is best suited) :)

Change tutorial to use `fatfree-core` instead of `fatfree`

When changing in the tutorial from fatfree to fatfree-core we are loosing the lib folder. The tutorial explains that we can use it to add additional libraries there. Since most projects are using Composer anyway, this is no loss IMHO. It would be nice to mention that it it's easy to configure the built-in autoloader or to inform the reader about the autoloading section.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.