Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Template Roll Printer with options (for 2.2.6, 2.3, 2.3.4, 2.4.0, 2.4.4)

    Scheduled Pinned Locked Moved Captive Portal
    91 Posts 35 Posters 44.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kenmark
      last edited by

      I am too noob. i googled for 2 hours on a guide on how to access this.
      /usr/local/www/ in pfSense GUI. using 2.3.1

      1 Reply Last reply Reply Quote 0
      • M
        misterpat
        last edited by

        If using Windows try win SCP

        @kenmark:

        I am too noob. i googled for 2 hours on a guide on how to access this.
        /usr/local/www/ in pfSense GUI. using 2.3.1

        1 Reply Last reply Reply Quote 0
        • K
          kenmark
          last edited by

          @misterpat:

          If using Windows try win SCP

          I used FTP but thank you for giving the idea. Now made it work on 2.3.1! Kappaaaaa!

          1 Reply Last reply Reply Quote 0
          • D
            deajan
            last edited by

            Hello DanieleIT,

            I wonder if I could make my captive portal solution user interface (see my howto post) compatible with your voucher system.
            Did you write any documentation for it ?
            Do you have a github account with the code ?

            Regards,
            Ozy.

            NetPOWER.fr - some opensource stuff for IT people

            1 Reply Last reply Reply Quote 0
            • D
              DanieleIT
              last edited by

              Hi Deajan, sorry for my late reply but apparently I'm not receiving mail notifications anymore  :-\

              You can make whatever you'd like to with the code, it's here for everyone to use.
              I did not write any documentation and I've not created a gib with the code. It's pretty much all there in the zip file.
              I'll be glad to help if you need (But please remember, as stated in my OP, that I'm not a PHP developer  :) )

              Ciao

              1 Reply Last reply Reply Quote 0
              • D
                deajan
                last edited by

                Missing notifications too :(

                Would you mind if I fork your work into my github ?

                NetPOWER.fr - some opensource stuff for IT people

                1 Reply Last reply Reply Quote 0
                • D
                  DanieleIT
                  last edited by

                  I would not!
                  Also, let me know the link of the git so I can update the OP with it

                  1 Reply Last reply Reply Quote 0
                  • D
                    DanieleIT
                    last edited by

                    @ikkuranus:

                    I have added some permissions so people with more limited accounts can print out vouchers without having full access to the webui

                    compatible with 2.3.x not sure about older versions
                    unzip the following file into /etc/inc/priv/

                    @DanieleIT feel free to add this as part of the package.

                    Thank you, I'll add the file in the zip (2.3.x version) as soon as possible.
                    Ciao

                    1 Reply Last reply Reply Quote 0
                    • D
                      dpa
                      last edited by

                      Great job guys!

                      Excited to see how far this will go.

                      Kind regards,
                      Reward

                      1 Reply Last reply Reply Quote 0
                      • A
                        arnoldg
                        last edited by

                        I rebuild the script a little bit.

                        the modification is, that when you select 'Active only' it only spit out voucher that aren't used.
                        so if a user is given away and it is activated then it won't be printed again.

                        for my situation this is what i need. so if you like use it.
                        the template files are in the zip file in the starting post.
                        it is made for pfsense 2.3.x

                        voucher_print.zip

                        1 Reply Last reply Reply Quote 0
                        • empbillyE
                          empbilly
                          last edited by

                          Hello,

                          Great job DanieleIT!

                          Any chance to create a package for pfsense?  ;D ;D

                          https://eliasmoraispereira.wordpress.com/

                          1 Reply Last reply Reply Quote 0
                          • B
                            Blackhat
                            last edited by

                            How to install?

                            1 Reply Last reply Reply Quote 0
                            • D
                              DanieleIT
                              last edited by

                              @Blackhat:

                              How to install?

                              Follow the readme inside the zip file

                              1 Reply Last reply Reply Quote 0
                              • N
                                newbie_sense
                                last edited by

                                I used the permissions /etc/inc/priv/ and set those to a user, only after a reboot I can't seem to see what changed.

                                1 Reply Last reply Reply Quote 0
                                • A
                                  astatine
                                  last edited by

                                  Hello DanieleIT,

                                  thank you very much for your great work.

                                  I have a question, if i would like to print  vouchers 4 X 10 (by yours is 3 X 7), how can i modify the php file?

                                  There is a print template attached. I had many this kleber Paper and would print the voucher on it. The only problem is: it is 4 X 10…...

                                  Thank you in advance!

                                  [4 X 10.zip](/public/imported_attachments/1/4 X 10.zip)

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    DanieleIT
                                    last edited by

                                    @astatine:

                                    I have a question, if i would like to print  vouchers 4 X 10 (by yours is 3 X 7), how can i modify the php file?

                                    You don't have to modify the PHP file. You just have to edit the dimension of the voucher divs, trought the voucherprint.css file.

                                    At line 12 you have:

                                    .voucher {
                                    	border-left: 1px solid #F4F4F4;
                                    	border-right: 1px solid #F4F4F4;
                                    	border-bottom: 1px solid #F4F4F4;
                                    	page-break-inside: avoid;
                                    	float: left;
                                    	height: 134px;
                                    	width: 206px;
                                    	position: relative;
                                    }
                                    

                                    Just edit the height and the width according to your needs. (you may also need to edit a little more css based on the new dimension).

                                    Give it a try and let me know!

                                    Ciao

                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      k0ster
                                      last edited by

                                      Hello, DanieleIT

                                      Great job!
                                      Thanks.

                                      One question:

                                      in services_captiveportal_voucher.php in error check section you wrote following:

                                      // Check for form errors
                                      if ($_POST['charset'] && (strlen($_POST['charset'] < 2))) {
                                      $input_errors[] = gettext("Need at least 2 characters to create vouchers.");

                                      but original code is:
                                      // Check for form errors
                                      if ($_POST['charset'] && (strlen($_POST['charset']) < 2)) {
                                      $input_errors[] = gettext("Need at least 2 characters to create vouchers.");

                                      Why?

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        DanieleIT
                                        last edited by

                                        Hello K0ster,
                                        The mod is probably based on an old version of the code. I did not change that part, but that is clearly a bugfix.
                                        I'll have to merge the code when I can.

                                        Thank you

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          StofLE
                                          last edited by

                                          Hi DanieleIT,

                                          nice project!  :)

                                          Would it be a big thing for you to implement a field for choosing how many Vouchers to print (and mark them in the DB as printed)?

                                          Stefan

                                          1 Reply Last reply Reply Quote 0
                                          • C
                                            Castrenze
                                            last edited by

                                            Ciao Daniele.
                                            Ottima idea.
                                            Installo, provo e commento

                                            –---------------------------

                                            Hello Daniele.
                                            Good idea.
                                            I install, I try and comment

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.