- SEE ALSO
Foorum::Manual::Tutorial1 - Tutorial 1: Catalyst Plugins used in Foorum
Why we are using Config::YAML::XS instead ConfigLoader is under a simple Foorum::Manual::RULES, Fast is better.
I think I need let Static::Simple be configurable later. because it's better let Apache handles static contents.
Authentication is a important part in Foorum. viacheslav.t suggests
Another thing that i am concerned about is a way how to plug-in your forum to an existing Cat application. For example i have my own user infrastructure and registration, banning, blocking system (some things are borrowed from your code ;-)...
I'm strongly agree with him. so we will rewrite this part later.
but for now. in foorum.yml
authentication: default_realm: 'members' password_hash_type: "SHA-1" realms: members: credential: class: 'Password' password_field: 'password' password_type: "hashed" password_hash_type: "SHA-1" store: class: 'FromSub::Hash' model_class: "UserAuth"
here we are using Credential::Password and a Store::FromSub::Hash.
I must admit that FromSub::Hash is not good enough. but it doesn't hit database every request for $c->user. Store::DBIC is nice yet our Model/User.pm sub get is returning a cached user hash. so we use FromSub::Hash.
before we use Catalyst::Plugin::Cache::Memcached, but that's not so flexiable. so we turn to use Catalyst::Plugin::Cache. the configuration in foorum.yml is:
cache: backends: default: class: 'Cache::FileCache' namespace: 'Foorum' default_expires_in: 600
meanwhile, we can use Memcached:
cache: backends: default: class: Cache::Memcached compress_threshold: 10_000 debug: 0 servers: - 127.0.0.1:11211
for the "Remember Me?".
that's pretty normal here. we use DBIC and Cookie. no URI since that's bad.
check Foorum/I18N/cn.po and tw.po then u can write one for your own. that's easy!
we are going to HTML::FormFu.
captcha: session_name: captcha_string new: width: 80 height: 30 lines: 1 gd_font: giant create: - normal - rect particle: - 100 out: force: jpeg
it's configurable. u can disable by set
function_on: maintain: 0 register: 1 create_forum: 1 scraper: 0 page_cache: 0
when page_cache: 1, it will be enabled.