All hail Fabrice.

Thank you so much for the instructions. These worked perfectly.


________________________________
> To: [email protected] 
> From: [email protected] 
> Date: Fri, 4 Dec 2015 18:17:41 -0500 
> Subject: Re: [PacketFence-users] Adding a new link in captive portal 
> 
> Hello Andy, 
> 
> sorry for the delay. 
> 
> So let's have a look first to lib/pf/web/constants.pm and let's add: 
> 
> Readonly::Scalar our $URL_AUP2 => '/aup2'; 
> 
> it will allow you to bypass the redirection on the captive portal. 
> 
> Next copy 
> html/captive-portal/lib/captiveportal/PacketFence/Controller/Aup.pm to 
> html/captive-portal/lib/captiveportal/PacketFence/Controller/Aup2.pm 
> and change the code to have that: 
> 
> 
> 
> package captiveportal::PacketFence::Controller::Aup2; 
> use Moose; 
> use namespace::autoclean; 
> 
> BEGIN { extends 'Catalyst::Controller'; } 
> 
> =head1 NAME 
> 
> captiveportal::PacketFence::Controller::Aup2 - Catalyst Controller 
> 
> =head1 DESCRIPTION 
> 
> Catalyst Controller. 
> 
> =head1 METHODS 
> 
> =cut 
> 
> =head2 index 
> 
> =cut 
> 
> sub index : Path : Args(0) { 
> my ( $self, $c ) = @_; 
> $c->stash->{template} = 'policy.html'; 
> } 
> 
> =head1 AUTHOR 
> 
> Inverse inc. <[email protected]><mailto:[email protected]> 
> 
> =head1 COPYRIGHT 
> 
> Copyright (C) 2005-2015 Inverse inc. 
> 
> =head1 LICENSE 
> 
> This program is free software; you can redistribute it and/or 
> modify it under the terms of the GNU General Public License 
> as published by the Free Software Foundation; either version 2 
> of the License, or (at your option) any later version. 
> 
> This program is distributed in the hope that it will be useful, 
> but WITHOUT ANY WARRANTY; without even the implied warranty of 
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
> GNU General Public License for more details. 
> 
> You should have received a copy of the GNU General Public License 
> along with this program; if not, write to the Free Software 
> Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
> USA. 
> 
> =cut 
> 
> __PACKAGE__->meta->make_immutable; 
> 
> 1; 
> 
> Then in 
> html/captive-portal/lib/captiveportal/PacketFence/Controller/Authenticate.pm 
> let's do that: 
> 
> __PACKAGE__->config( 
> { action_args => { 
> index => { 
> valid_modes => { 
> aup => 'aup', 
> aup2 => 'aup2', 
> status => 'status', 
> release => 'release', 
> next_page => 'next_page', 
> deregister => 'deregister', 
> } 
> } 
> } 
> } 
> ); 
> 
> .... 
> 
> sub aup2 : Local : Args(0) { 
> my ( $self, $c ) = @_; 
> $c->detach( 'Aup2', 'index' ); 
> } 
> 
> 
> So if you hit /aup2 then you will see the content of policy.html. 
> 
> 
> Regards 
> Fabrice 
> 
> Le 2015-12-03 13:00, Andy A a écrit : 
> 
> would that be the way to do it or am I missing something? 
> 
> ---------------------------------------- 
> 
> 
> From: [email protected]<mailto:[email protected]> 
> To: 
> [email protected]<mailto:[email protected]>
>  
> Date: Thu, 3 Dec 2015 13:54:25 +0000 
> Subject: Re: [PacketFence-users] Adding a new link in captive portal 
> 
> I did. I want to add a new separate policy page like AUP (but is different 
> from AUP as it's more about do's and dont's). I added the link policy.html + 
> policy_text.html (just like AUP). 
> I also tried linking directly to policy_text.html - which didn't work as I 
> get redirected back to the captive portal. 
> 
> So then i have added a link /policy in the footer (like /aup) but this 
> doesn't resolve as the controller / dispatcher doesn't know what page to 
> serve. I have looked at the code but not sure. 
> 
> I think I might need a sub in guest.pm (like sub aup) 
> add the url in constants.pm (like $URL_AUP) 
> and a controller like Aup.pm ? 
> 
> Thanks for your help. 
> 
> ---------------------------------------- 
> To: 
> [email protected]<mailto:[email protected]>
>  
> From: [email protected]<mailto:[email protected]> 
> Date: Thu, 3 Dec 2015 08:26:29 -0500 
> Subject: Re: [PacketFence-users] Adding a new link in captive portal 
> 
> 
> Hello Andy, 
> 
> why don't you just edit the footer.html ? 
> 
> Regards 
> Fabrice 
> 
> Le 2015-12-03 08:17, Andy A a écrit : 
> 
> 
> Hi 
> 
> Any ideas or help? 
> 
> 
> 
> ---------------------------------------- 
> 
> 
> From: [email protected]<mailto:[email protected]> 
> To: 
> [email protected]<mailto:[email protected]>
>  
> Date: Fri, 27 Nov 2015 20:06:27 +0000 
> Subject: [PacketFence-users] Adding a new link in captive portal 
> 
> Hi 
> 
> Using PF 5.2 on Centos 6.x in inlne mode. I would like to add a new privacy 
> policy link in captive portal footer. 
> 
> What perl module do I need to change for it to work? as currently adding the 
> link doesn't work resolve to the privacy policy page. 
> 
> Add a variable in web/constants.pm and add a controller under 
> lib/captiveportal/Packetfence/Controller? 
> 
> Thanks 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
>  
> _______________________________________________ 
> PacketFence-users mailing list 
> [email protected]<mailto:[email protected]>
>  
> https://lists.sourceforge.net/lists/listinfo/packetfence-users 
> 
> 
> 
> ------------------------------------------------------------------------------
>  
> Go from Idea to Many App Stores Faster with Intel(R) XDK 
> Give your users amazing mobile app experiences with Intel(R) XDK. 
> Use one codebase in this all-in-one HTML5 development environment. 
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. 
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 
> _______________________________________________ 
> PacketFence-users mailing list 
> [email protected]<mailto:[email protected]>
>  
> https://lists.sourceforge.net/lists/listinfo/packetfence-users 
> 
> 
> 
> 
> -- 
> Fabrice Durand 
> [email protected]<mailto:[email protected]> :: +1.514.447.4918 (x135) :: 
> www.inverse.ca<http://www.inverse.ca> 
> Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence 
> (http://packetfence.org) 
> 
> 
> ------------------------------------------------------------------------------
>  
> Go from Idea to Many App Stores Faster with Intel(R) XDK 
> Give your users amazing mobile app experiences with Intel(R) XDK. 
> Use one codebase in this all-in-one HTML5 development environment. 
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. 
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 
> _______________________________________________ 
> PacketFence-users mailing list 
> [email protected]<mailto:[email protected]>
>  
> https://lists.sourceforge.net/lists/listinfo/packetfence-users 
> 
> ------------------------------------------------------------------------------
>  
> Go from Idea to Many App Stores Faster with Intel(R) XDK 
> Give your users amazing mobile app experiences with Intel(R) XDK. 
> Use one codebase in this all-in-one HTML5 development environment. 
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. 
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 
> _______________________________________________ 
> PacketFence-users mailing list 
> [email protected]<mailto:[email protected]>
>  
> https://lists.sourceforge.net/lists/listinfo/packetfence-users 
> 
> 
> 
> ------------------------------------------------------------------------------
>  
> Go from Idea to Many App Stores Faster with Intel(R) XDK 
> Give your users amazing mobile app experiences with Intel(R) XDK. 
> Use one codebase in this all-in-one HTML5 development environment. 
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. 
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 
> _______________________________________________ 
> PacketFence-users mailing list 
> [email protected]<mailto:[email protected]>
>  
> https://lists.sourceforge.net/lists/listinfo/packetfence-users 
> 
> 
> 
> ------------------------------------------------------------------------------
>  
> Go from Idea to Many App Stores Faster with Intel(R) XDK Give your 
> users amazing mobile app experiences with Intel(R) XDK. Use one 
> codebase in this all-in-one HTML5 development environment. Design, 
> debug & build mobile apps & 2D/3D high-impact games for multiple OSs. 
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 
> _______________________________________________ PacketFence-users 
> mailing list [email protected] 
> https://lists.sourceforge.net/lists/listinfo/packetfence-users 
                                          
------------------------------------------------------------------------------
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to