FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Stationwagon
  • Stationwagon is a Fuel-based blog application. The basic idea behind this application is to show you how things work by using different classes in Fuel. Features
    - Auth (signup and login)
    - Articles (list, add, edit, delete)
    - Categories (list, add, edit, delete) Upcoming
    - User Groups (User/Admin)
    - Comments
    - Drafts
    - Articles View
    - WYSIWYG editor The application uses packages like ActiveRecord and Auth, and classes like Pagination. You can go ahead and get the source from GitHub, and if you'd like to contribute just fork the repo and do a pull request if you have anything to contribute.
  • Installed and works great but had to make a few adjustments, to make it work as right out of the box so to say it had errors below is the errors I found and fixed...
    in app\config\config.php line 123 I simply commented out but I suppose you could just delete.
    <<<<<<< HEAD
    
    Line 126 Again i simply commented out
    =======
    

    Line 128 Again commented out
    >>>>>>> f488a6dcdcb7a7da6527f0e54dee2d666de6790c
    
    and the database sql file you have sw_simpleusers as a table when you are calling sw_users in your coding so changing the table to sw_users fixes that issue.
  • I dont get why you have the same views for user in the modules and the main view folder.
  • Thanks for this release! One thing though: the sw_articles table is missing the published field, which should be an integer (an error is thrown if you try to save an unpublished article.) :)
  • peter vercauteren wrote on 02/09/11 3:21 pm:
    I dont get why you have the same views for user in the modules and the main view folder.
    You can remove the users folder from modules and it still works fine.
  • Looks great, will be really helpful in learning how to use Fuel. Is there a reason you decided to post the SQL itself rather than use Fuel's migrations?
  • https://github.com/abdelm/stationwagon/blob/master/fuel/app/classes/controller/users.php on line 44.
    $this->template->content = View::factory('users/signup')
    ->set('val', Validation::instance('signup_user'), false); just wondering whats the code in bold does?
  • In Fuel we have "Output filtering" instead of input filtering by default (you can switch this if you want in app/config/config.php), this means that anything passed to the view gets pushed through htmlentities to prevent XSS. Dan explained both on his blog. Objects will either have all their properties filtered or are converted to strings to be filtered when they have a __toString method. (the exception to this are objects of class View, ViewModel or Closures - and any you might whitelist yourself) Because they want to have the validation object in their view, but not filtered or cast to a string they pass it using the View::set() method with false as its last param. That switches off the filtering for the variable they're setting, thus allowing them to pass the Validation object.
  • Jelmer Schreuder wrote on Tuesday 5th of April 2011:
    In Fuel we have "Output filtering" instead of input filtering by default (you can switch this if you want in app/config/config.php), this means that anything passed to the view gets pushed through htmlentities to prevent XSS. Dan explained both on his blog. Objects will either have all their properties filtered or are converted to strings to be filtered when they have a __toString method. (the exception to this are objects of class View, ViewModel or Closures - and any you might whitelist yourself) Because they want to have the validation object in their view, but not filtered or cast to a string they pass it using the View::set() method with false as its last param. That switches off the filtering for the variable they're setting, thus allowing them to pass the Validation object.

    Thanks Jelmer :)
  • Import the database.sql to your database

    There is no database.sql.
  • @Nique - This should work...
    DROP TABLE IF EXISTS `sw_simpleusers`;
    
    CREATE TABLE `sw_simpleusers` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `username` varchar(50) DEFAULT NULL,
      `password` varchar(50) DEFAULT NULL,
      `email` varchar(70) DEFAULT NULL,
      `profile_fields` text,
      `group` int(11) DEFAULT NULL,
      `last_login` bigint(20) DEFAULT NULL,
      `login_hash` tinytext,
      PRIMARY KEY (`id`),
      UNIQUE KEY `username` (`username`),
      UNIQUE KEY `email` (`email`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    
    
    DROP TABLE IF EXISTS `sw_articles`;
    
    CREATE TABLE `sw_articles` (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `user_id` int(11) unsigned NOT NULL DEFAULT '0',
      `category_id` int(11) DEFAULT NULL,
      `title` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
      `body` text COLLATE utf8_unicode_ci,
      `published` tinyint(3) unsigned NOT NULL DEFAULT '0',
      `created_time` bigint(20) unsigned DEFAULT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    
    
    DROP TABLE IF EXISTS `sw_categories`;
    
    CREATE TABLE `sw_categories` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `user_id` int(11) unsigned NOT NULL DEFAULT '0',
      `name` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
      `description` tinytext COLLATE utf8_unicode_ci,
      `created_time` bigint(20) DEFAULT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    
  • Can't run the application Warning: require_once(E:\projects\websites\stationwagon\fuel\core\bootstrap.php) [function.require-once]: failed to open stream: No such file or directory in E:\projects\websites\stationwagon\fuel\app\bootstrap.php on line 4
  • Then you have a serious issue with your setup, as fuel/core contains the bootstrap as part of Fuel (it doesn't work without it).
  • A Huzz wrote on Saturday 9th of April 2011:
    Can't run the application Warning: require_once(E:\projects\websites\stationwagon\fuel\core\bootstrap.php) [function.require-once]: failed to open stream: No such file or directory in E:\projects\websites\stationwagon\fuel\app\bootstrap.php on line 4

    Same problem here... When I install a fresh copy of phpfuel the welcome message works though
  • It does work when you just copy the files from controller/model and view and change the index/config and db from your RC1 fuelphp version.
  • When using the latest version of both Stationwagon (1.0.3) and Fuel (1.0-RC2) I had to change the following in fuel/app/config/db.php: from
    Fuel::DEVELOPMENT => array(
    to
    'dev' => array( the same goes for every instance of "FUEL::" in that file.
  • I don't know if anyone else has reported this or not, but the logic within your edit controllers is flawed. If you submit the edit form, but one of the fields fails validation, you lose everything you just typed in, and instead are shown the data that's in the database.
  • It is showing redirect loop error in users/login when using 1.0rc3
  • We currently have a blog module under development. You can check it out in the develop branch at http://github.com/ninjarite/fuelmod-blog If you care to check it out it's developed as a reusable module under rc3
  • i would like to contribute in this blog . what should i do for it
  • Are you referring to Stationwagon or Ninjarite-blog? If it's Ninjarite, you can fork a repo, and make pull requests :)
  • I've downloaded and installed Stationwagon, however I couldn't find the database.sql file? I've used the SQL posted by PaulboCo but had to change the table names, now it's not recognising some of the fields... can anyone point me in the right direction of the database.sql file please? Thanks
  • I'm falling down on step zero.
    Where do I put the files?
    Seems like the download includes fuel.
    Or should I copy the stuff into fuel and trust whatever overwrites... I know nothing of fuel.
    I do know CI, and I'm interested in this ORM stuff.
    But unsure how this stuff is laid out.
    Want to see a working sample ....
    The intro page is a little light...
  • David MacLean wrote on Thursday 28th of July 2011:
    I'm falling down on step zero.
    Where do I put the files?
    Seems like the download includes fuel.
    Or should I copy the stuff into fuel and trust whatever overwrites... I know nothing of fuel.
    I do know CI, and I'm interested in this ORM stuff.
    But unsure how this stuff is laid out.
    Want to see a working sample ....
    The intro page is a little light...

    Start by reading all the docs : http://fuelphp.com/docs
  • Chris Arnold wrote on Tuesday 26th of July 2011:
    I've downloaded and installed Stationwagon, however I couldn't find the database.sql file? I've used the SQL posted by PaulboCo but had to change the table names, now it's not recognising some of the fields... can anyone point me in the right direction of the database.sql file please? Thanks
    Sorry about that, the database.sql should be available in the repo now.
  • Abdelrahman Mahmoud wrote on Saturday 30th of July 2011:
    Chris Arnold wrote on Tuesday 26th of July 2011:
    I've downloaded and installed Stationwagon, however I couldn't find the database.sql file? I've used the SQL posted by PaulboCo but had to change the table names, now it's not recognising some of the fields... can anyone point me in the right direction of the database.sql file please? Thanks
    Sorry about that, the database.sql should be available in the repo now.
    Thanks abdem, works a treat now! :)

Howdy, Stranger!

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

In this Discussion