How-to d8 database site

Throwing this up real quick will make it much better...ed

Try Drupal 8

last update: 11/29/2017
Author: Randy Poole

Domain and Hosting:Most hosting will have an domain search to see if it is available, then an way to purchase it. When buying hosting You want Linux maybe the mid package around $13.00 to start. After You start getting over 30k or so unique visitors a month You will need to start thinking to up Your net-pipe. You want cpu power not unlimited databases or emails, You only need 1 db and maybe 4 emails or You can use Your own email and not need any emails. i think the digital drives are a bit faster so look for them, plus it means the server has more current gear. You will also need to purchase an SSL or TSL(next gen of SSL.) certificate. You will have to decide whether to buy the higher monthly cost hosting that has an SSL or buy one separate.
Make sure You put the domain name in the correct owners name for legal stuff.
If You do not do the drupal setup under https:// over http:// You are sending All Your database info unprotected, ripe for a man-in-the-middle-attack. Building on sand if You continue, and yes i have deleted everything and started over many times for forgetting.

Hosting Company's client area's: will be different but for the most part they will have a place for the domain set up and a place for the hosting set up. If You buy the 2 at the same time they will connect Your hosting and domain so no real need to mess with the domain. In the hosting area most host will use cPanal You might go right into cPanal. Once in cPanal click on "file manager". This is where You will upload Your drupal 8 files

Once in cPanal's "File Manager": go into "Public HTML files". Then go to scroll down to the bottom click on "Core Files" click on drupal 8 then click on the zip file to download core files. Then go back to "File Manager" and in the "Public Html Files" click on "upload file" at the top. Then chose the drupal zip file from Your computer, once done hit the back button. Now select the drupal zip file and click on "extract" onces extracted go into the drupal folder and "select All" and then click "move" and send to /   .

Make Database: From cPanel chose "databases", then "make database" name it. i use something like "pennov2017build3" 16 digits only use lower case no symbols to be safe (long story.). Now make database user click "make user" for name i will use something like "zzduserpendl2017" . For the password i will use something like "zs33Re%%ryyoO0as" hit save. Then You need to connect the user to the database. Click "add user to database" , Match the 2 we just made. For user permissions check - select, insert, update, delete, create, drop, index, alter, create temp tables, lock tables then hit save. When we load drupal we will enter the database name, database user name and database user password. Some host will use a different server for the database, You will need that address also otherwise if the database is on Your server You will use "localhost" for the database address.




Change who can register: "Configuration/Account settings". Change registration to administrator only.

Make some basic pages: "Content/Add content/Basic page" Make a alpha page, cat page eve page, and databucks page, editor page, ad page, questions page.

How to make basic page: "Content/Add Content/Basic page" ad title "alpha", In Body i added "Directory in alphabetical order."...In Menu settings i made an alpha "main navigation" menu tab...In "URL Path Settings" "/alpha" hit "save"...Then repet for other pages.

Move menu tabs around: "Structure/Menus/Main navigation" and just move them around.

Hit counter on Your page: "Extend" scroll down and check "Statistics" click "save", then go to "Configuration/Statistics" turn on "Count content views", Then go to "People/Permissions" scroll down to "Statistics" check "Anonymous User" for "View content hits" click save.


Make ei button: Go to "Structure/Block layout/Custom block library/add custom block here is the JS it is just a simple JS alert box. JS is client side which means it does not have to talk to the server so it works on every thing and instantly plus pure JS the program is pre loaded in Your browser so it does not need to load. Save it as full html oops back up before You paste the JS select "Full HTML" because it resets it self and You have to paste it in the "Source" plus remove the <code></code> i used them to be able to post out side the "Source" . Then to go to "block lay out" after Your save, go down to "content" then click "place block" chose the block by the title You gave it "Configure block" comes up i do not want the title to show so uncheck that. Then click pages, i want to "Show for the listed pages" i want it on alpha and cat. Enter one path per line like   /alpha   then the next line    /cat  then hit save. If You want to move it up just left click hold and move it up or down on the "Block Layout" page.

<code><p style="color:red;"><button onclick="myFunction()">ei</button></p>
function myFunction() {
    alert("Pendleton Oregon\nEmergency Information\n\nEmergences: Dial 911\n\nFire#1: 541-276-1442\n\nFire#2: 541-276-1440\n\nPolice: 541-276-1411 \n\nState Police: 541-278-4090\n\nSheriff: 541-966-3600 \n\nAmbulance-Fire#1: 541-276-1442\n\nAmbulance-Fire#2: 541-276-1440 \n\nClinic Harrison: 541-215-1564 \n\nMedical St. Anthony: 541-276-5121\n\nTowing: will post more hold on\n\nTowing Schillings: 541-276-9705\n\nTowing Taylor: 541-276-6590 \n\nDepression Hotline: 541-523-5903\n\nPoison Emergencies: 1-800-222-1222\n\nPublic Works: 541-276-3078\n\nCity Admin: 541-966-0201\n\nOR Dept Fish and Wildlife: 503-947-6000\n\nFire Map:");