---------- Forwarded message ---------- From: vasim ahmad <vasim.ah...@sunarctechnologies.com> Date: Sat, Feb 9, 2013 at 12:39 PM Subject: Re: [fw-general] Re: Zend framework 2 application structure for admin and front end modules To: Pierre Rambaud <pierre.rambau...@gmail.com>
Hi Pierre, Thank you very much. You are very helpful. I am impressed. If you don't mind please reply for below .As I dont have any seniour guy who can guide me on this. I am using attatched structure for backend and front end. To summrize I have used ZfcAdmin for admin side. and for each module have created two controllers/views for say Album module will have 1. AlbumController 2. AlbumAdminController then in module config of Album module I have added a route for ZfcAdmin and it's child route as album. It's opening mysite/admin/album ... for View I have created album/album (for Front end) and album/album-admin (for backend) in album module itself. Similar for other modules like user,login,stickynotes etc. Please Let me know if I am doing right way. OR is there another easy way to do this? Thanks is advance. On Fri, Feb 8, 2013 at 11:09 PM, Pierre Rambaud <pierre.rambau...@gmail.com>wrote: > HI, > > In relation to your answer: > > *Hi, > Thanks for your time and consideration. I appreciate it. > Can you pleae explain more about below* > *If you want use twice Zend\Authentication\**AuthenticationService, look > in Zend\Authentication\Storage\**Session, you'll see in __construct, > there's an namespace parameter, change it for "Zend_Auth_Frontend" (in > front) and "Zend_Auth_Backend" obiviously for the back. > * > *I am trying to do this but not getting exactly what to do?* > > > > You should test something like this. > > use Zend\Authentication\AuthenticationService, > Zend\Authentication\Adapter, > Zend\Authentication\Storage; > > //backend > $backend_auth_adapter = new Adapter\DbTable($this->getAdapter()); > $backend_auth_adapter->setTableName('admin_user'); > $backend_auth_adapter->setIdentityColumn('login'); > $backend_auth_adapter->setCredentialColumn('password'); > $backend_auth_adapter->setIdentity($login); > $backend_auth_adapter->setCredential($password); > > $backend_auth = new AuthenticationService(new > Storage\Session('Zend_Auth_Backend')); > $result = $backend_auth->authenticate($backend_auth_adapter); > var_dump($result); > > //Frontend > $frontend_auth_adapter = new Adapter\DbTable($this->getAdapter()); > $frontend_auth_adapter->setTableName('user'); > $frontend_auth_adapter->setIdentityColumn('login'); > $frontend_auth_adapter->setCredentialColumn('password'); > $frontend_auth_adapter->setIdentity($login); > $frontend_auth_adapter->setCredential($password); > > $frontend_auth = new AuthenticationService(new > Storage\Session('Zend_Auth_Frontend')); > $result = $frontend_auth->authenticate($frontend_auth_adapter); > var_dump($result); > > Cf; > > https://github.com/zendframework/zf2/blob/master/library/Zend/Authentication/AuthenticationService.php// > Constructor and setStorage > > https://github.com/zendframework/zf2/blob/master/library/Zend/Authentication/Storage/Session.php//Constructor > > Have fun > > > 2013/2/7 Pierre Rambaud <pierre.ramb...@instantluxe.com> > >> I only tried GotCms with Debian Wheezy and I know this is not a powerfull >> installation but if you can find something wrong I'll be happy to fix it >> ;) >> If you want use twice Zend\Authentication\AuthenticationService, look in >> Zend\Authentication\Storage\Session, you'll see in __construct, there's an >> namespace parameter, change it for "Zend_Auth_Frontend" (in front) and >> "Zend_Auth_Backend" obiviously for the back. >> >> Regards, >> >> 2013/2/7 vasimahmad <vasim.ah...@sunarctechnologies.com> >> >> > Thanks, It seems to be good stuff with gotCMS >> > >> > I Tried with GotCMS but found some issues in installations say it have >> > completed installation steps successfully but database is not updated. >> > >> > However I tried at myend and now I am able to make admin >> controller/views >> > in >> > module directory itself and also understood routing concepts. >> > >> > Used ZfcAdmin module and routed admin controlloer/views to ZfcAdmin >> module. >> > This seems to me simpler at this time. (but I want to check why GotCMS >> not >> > worked properly for me) >> > >> > Still looking for how to create separaete admin and front user login and >> > session. Any inputs for this please. >> > >> > >> > >> > -- >> > View this message in context: >> > >> http://zend-framework-community.634137.n4.nabble.com/Zend-framework-2-application-structure-for-admin-and-front-end-modules-tp4659033p4659064.html >> > Sent from the Zend Framework mailing list archive at Nabble.com. >> > >> > -- >> > List: fw-general@lists.zend.com >> > Info: http://framework.zend.com/archives >> > Unsubscribe: fw-general-unsubscr...@lists.zend.com >> > >> > >> > >> >> >> -- >> Pierre RAMBAUD - I N S T A N T | L U X E - 40 rue d'Aboukir - 75002 >> Paris >> - France >> Web : www.instantluxe.com >> > > > > -- > Pierre Rambaud > Website: http://rambaudpierre.fr > G+: https://plus.google.com/u/0/107809758756474139920/posts > Github: https://github.com/PierreRambaud > -- Thanks, Vasim Ahmad SunArc Technologies Pvt Ltd [ Visit us at http://www.sunarctechnologies.com ] Warning: Privileged/Confidential information may be contained in this communication (which includes any attachment). If you are not an intended recipient, you must not use, copy, disclose, distribute or retain this communication or any part of it. Please delete all copies of this communication from your computer system and notify the sender immediately by reply mail. The sender does not accept any responsibility for any loss, disruption or damage to your data or computer system which may occur whilst using data contained in, or transmitted with, this email. Any views or opinions represented in this email are solely those of the author and may not necessarily represent those of SunArc Technologies Pvt Ltd. -- Thanks, Vasim Ahmad SunArc Technologies Pvt Ltd [ Visit us at http://www.sunarctechnologies.com ] Warning: Privileged/Confidential information may be contained in this communication (which includes any attachment). If you are not an intended recipient, you must not use, copy, disclose, distribute or retain this communication or any part of it. Please delete all copies of this communication from your computer system and notify the sender immediately by reply mail. The sender does not accept any responsibility for any loss, disruption or damage to your data or computer system which may occur whilst using data contained in, or transmitted with, this email. Any views or opinions represented in this email are solely those of the author and may not necessarily represent those of SunArc Technologies Pvt Ltd.