How to Create a Website Template Using PHP
Вставка
- Опубліковано 19 вер 2024
- Full source code available at: www.johnmorriso...
In this lesson, you'll learn how to create a website template using PHP.
~-~~-~~~-~~-~
Please watch: "Ryan Carson: How to Get an IT Job WITHOUT a College Degree"
• Ryan Carson: How to Ge...
~-~~-~~~-~~-~
#php #webdev
Simple and crisp. Great tutorial for beginners.
+Manickam Krishnamoorthy thank you!
yes, i haven't found anything better on youtube. Thank you very much. U are the best:)
MaxXFalcon thanks!
the best php template tutorial I've come across.
I thought this was a really good idea, until I got to the content where there's php code in it. Then it of course just outputs the code in the content. I can't echo a string there... After a thoughtful minute I concluded this is still a good idea. I just split the template in two at the point where the content should be. Then in the content files I include the first template half before the content, and then the other half after the content. Works like a charm! 👍
Hey John, I like your teaching style in this video! It is very easy to follow. I'm a new fan of this particular template system. Thanks!
Good to hear. No problem!
Thanks, John! Your tutorials have been a great help.
Tim Hill No problem! :)
Awesome man! Keep up the good work. Plus I appreciate all the great emails you send out!
Thanks for the great guide on a basic template!
How to create #website template using #php #html and #css
Hey John, nice quick tute covering it all. Just wondering if there was a way to have the content HTML that is in a variable e.g. $main_content = 'homepage content';
to be displayed in a another file e.g home-content.php without the varible around it so you get html syntax highlighting and code completion? Also when using the html content within the variable I always need to use \ in front of ' e.g. "today's" > "today\'s" so php renders it. Is there a way around both of these?
Loving your tutorials John! Do you have anything more indepth regarding how and why you create methods this way? I get it all . I think I need to understand design concepts within development now. Just getting into OOP. Great stuff!
Do you still have the source code on your website when I clicked the link it wouldn't pop up?
Hi John. Great video. I have a question. Currently we are storing the URL's that the navigation menu items link to in the array. What happens if the path to the location of the folder is different. If you use the same navigation on each page then won't you run into problems when your using the menu on pages stored in subfolders? Is there a way around this?
Thanks
no, when you navigate to index.php for example, the user on the other end only sees the output, not the functions or php code
I just came across this video. Its great as I am just starting trying PHP. I noticed the link does not work anymore for the files you are using and I would love to play with them. Any chance they are still available somewhere?
Thanks Jhon, God bless you and keeping you going .
I am beginner . Please explain the difference between the videos as follows:
(1) How to Create a Website Template using PHP. ------ Published on 28 Apr 2013
(2) How to Create a Web Site Template From Start to Finish (HowtoMakeMyWebsite-- the monkey logo)-----Published on 21 May 2013
(3) How to Create a Web Site ----- Published on 21 May 2013
Which Vedio Should I watch First. Please guide
Hi, first of all thanks for the content, Im a php beginner and this is very useful. I have some trouble, what if i want to put php inside the string? I tried and works almost fine, but when i try to run sql queries I dont receive any rows. Is there another way to do if the string is code?
cool stuff Man keep up the good work.
Thanks! Appreciate it! :)
It is very interesting. However, may I request if you can kindly show tutorial building up the full website template using php step by step. please.
i got the source codes... Thanks a lot.
👀
How would you add an active class to each page when you are on it? For example moving from home to about would show a different background indicating you are on this page....
+Tyler Hidrogo I'd say add a different class to for each based on the URL you sniff with this code and then style the proper background based on that.
The header, footer and single files are all purely used as a template, so why separate them? Why not have a template.php which calls the functions, css etc and is called by the content page?
You definitely could. Have built a few WordPress themes in a similar fashion. You'll see a lot built this way though, too.
Hello John, I greatly appreciate this tutorial and will be looking through many more however, is there a chance that we can get a copy of the style.css document used within this tutorial? we went through a brief comment and view of the typed data and I understand we can make our own, though it would be helpful to have a copy on the side if possible.
+Zyriik Vacirca pretty sure that's available in the source code that goes with this. Link is in the description.
To jest, za proste ten Template jako: "PHP: "Linked"", bo w internecie są ostre te wirusy, i możesz stracić pliku na tym serwerze albo może ci i twoim zablokować dostęmp do tej strony internetowej.. Najlepiej ten Template użyj: "PHP: "Query"; "Flixsed"; "Tempere" i: "Ambere"", i uratujesz swój serwer i twoją stronę internetowa. A serwer trochę będzie kombinował sobie ale twoje bezpieczeństwo jest Ważniejsze niż strata zaufaności lub plików.
do you have the style sheet code anywhere? thats the part that throws me off the most and is creating a lot of trouble in my code
+Ashley Bladen I believe it comes with the source code available for this tutorial. Link is in the description.
Cool, really awesome. Gonna learn something from u, great man (y)
Alister Gray Potentially. The best way to handle this is to create a config.php file with a constant that defines the install URL. So something like define('HOME_URL', 'www.yourdomain.com/path-to-install'); Then you can use that constant to prefix your URLs and get the right to URL no matter where you install your application.
Thanks John. I understand the concept of using the config file, but not the exact implementation. Doesn't seem overly complicated so I'll have a dig into it and see what I come up with.
John Morris Man when i try and open the website it comes up with the code not the website design. why is it doing this? please help.
Most likely because you do not have a CSS file on your website/ in the
For example:
my website
WEBSITE CONTENT
What if one was to use a custom CMS with a template system? How would it differ?
The CMS system with visual editors etc, such as WordPress would make your site load way slower as it require more files for every function (and php is a server side script meaning your server would have to do calculations every time the page is loaded).
Tho, WordPress is one of the best website frameworks, it operate around 15% of the internet... Just very slow. if you don´t need complicated plugins i´d say just doing this (or hire someone to do it) would be the best solution.
Does your course cover Wordpress at all?
Thanks!
No problem
just curious. Did you take tips form WordPress?
He develops websites using Wordpress. Or at least he did so.
Hi John m new in PHP can you tell me how to build of edit this PHP code and make website in PHP and how can I edit the PHP website via FTP( FileZilla)
Plz reply as soon as possible ☺️
Hi John. How do you save this?
This looks like an Wordpress organization, correct me if I am wrong.
Hi John, hope you are doing well, I am getting an error and I am unable to find the solution on the internet or maybe I am just not able to understand whatever is there, can you please help me out whenever you are free.
Here is the error "Fatal error: Call to a member function navigation() on a non-object in C:\wamp\www\SimpleWebsite\functions.php on line 14"
Thank you for these amazing videos. :)
+prateek raina I answered this question here: ua-cam.com/video/8qrslJBAsjQ/v-deo.html
can't open the link for your source code please paste it here
He can't provide source code on UA-cam.
No Source Code available on your site... fake link
John I Am Mohammed And I Don't Have Any Idea Whats Are Want From Me