How do I password protect a page in blocs?

I’v built a site in blocs and need to password protect one page how is this done? In other programs you can flag a page as needing a password to open but can’t find it in blocs. Please help. Thanks

The easiest option is to add a membership script to your site. This enables you to have a member login option (username and password) that then allows access to specific areas or pages of your website. The same script can be used to provide protected downloads. An example of such a script can be seen HERE. Check out the demo.

Have a look at sitelok

This is what I’ve used and when I got stuck, on something simple I may add the team at sitelok stepped in and helped me out, got me up and running.

Programme great, support awesome

+1 for Sitelok

This is what I have been using too. Adrian from @vibralogix has indeed been very helpful.

Sitelok link

MDS

Hi hendon – Is the link you provided something a non-coder non-developer non-designer could implement in blocs? I was thinking about maybe adding this to my one and only website, but with no coding/developer skills I wonder what I would be getting into if I tried to add it, and how much would be needed to be able to use/manage it effectively.

Thanks!

@DanielF. You don’t need any coding knowledge to implement scripts of this type. Essentially, the admin area of the application provides you with all the code to make things work in Blocs. You just copy and paste the code. (screenshot attached). There are various bits of code for adding login forms, Adding protected pages or adding protected files. The only thing you have to do is change the blocs page extensions to .php on protected pages of the site. The image below is taken from the demo page of the website. You can actually use the code from the demo to try it out in blocs.

Installation of the script is fairly straightforward. You use your hosting cPanel to create a mySQL database. This is simply providing a database name, a username and password and asking for the user to be given all privileges. Your cPanel will then go and create the database for you. Once created, upload the script to your hosting (usually in a sub folder with any name you like). Next, you open your web browser and enter the URL of your installation folder. This will automatically start the installation process. Answer a few questions and the script will be installed and ready to go. Whenever you enter the installation URL thereafter, you will see the login screen for your admin area from where you manage the application. It really is quite simple, but if you don’t feel comfortable about creating the database, the company will install it for you free of charge.

The interesting thing about these scripts is that they don’t have to be installed within the domain that uses it. You can host the script on a completely different server and a completely different domain name. This is why you can use the demo page of PHP jabbers to grab the embed code for any of their scripts and try it out in blocs to make sure you understand how it all works. When you do this and preview your blocs page, you will see the demo content provided by the developer. It’s a great way of trying before you buy - just be sure to follow the instructions on the Install page regarding where to paste code and renaming page extensions(example below).

3 Likes

Thank you hendon, I really appreciate the time and effort you made to share these details! :pray::pray::pray:

@DanielF You’re welcome!!! If you need any other info about script integration, just let me know.

1 Like

Hi Hendon52! Do you mind me joining you guys on this conversation?

I recently bought the [https://milos.support-hub.io/knowledgebase/1](http://Vanguard - Advanced PHP Login and User Management) and I’m planning to use it as my Login System in order to allow access to paying costumers to watch a cinema course I recorded.

I’d like to know if a complex PHP Script like that could work together with Blocs? And HOW would that work together on the overall website architecture?? As an independent page?

The architecture structure I’m guessing would be Landing Page >> Registration >> Successful Payment >> Access Granted >> Watch videos :white_check_mark:

Do you think I am going in the right direction?

Best, P

The script is an independent application in itself and is designed to allow access to certain pages of your website based on user credentials - i.e. a login. The protected pages will, most likely, have to have a PHP extension in order that they can be protected. This usually involves the pasting of a small piece of code at the very top of each protected page page. When the page is accessed, the script will decide if the user can see the page based on their login credentials.

Blocs has the ability to allow PHP code to be added and for your pages to have a PHP extension. You would typically create your site as usual with the addition of a login link (the script developer usually provides the code for the login link.) As long as the script components that are included in your pages don’t conflict with bootstrap, you’ll be just fine. Conflicts may sometimes occur when the script provided for some display elements that get included in a page. For example, a shopping cart script will usually have a display element within a blocs page that shows the products and pricing of your products within a web page. However, in this case, the login/membership script doesn’t appear to utilise any display elements that could conflict with your page content.

I haven’t actually used the script you intend using so I’m not sure of the complexities involved in setting up the system, But if it’s anything like the script I use, it should be fairly straight forward. Your blocs web pages will be just normal pages with the addition of the protect code in the head section. (usually pasted before the doctype). You may have a sign-up form that is displayed in one of your pages, or it maybe a sign up form that works via a link. If the script uses an embedded sign-up form and it does cause a conflict, its easily fixed.

Hope this helps.

If you look at the roadmap for Volt it looks like this is coming as a built in option with 1.5. https://blocsaddons.com/volt-cms/

I don’t know if @InStacks has an idea of when that will be.

2 Likes

I am currently working on this functionality. Will be included in the next update :+1:

2 Likes