A publishing site and a Team Site are common in many ways but there are some differences. Here I am going to talk about the High level differences without going Into too much of detail.
One of the main differences between a Publishing Site and a Team Site is that a publishing site can be customized to a larger extent than a Team Site. If you are planning to Install a 3rd Party tool like Akumina or Live Tiles, you could either deploy it on a publishing site or you could deploy it on the Team Site and activate the Publishing Features under Site Settings.
Some of the libraries that are available by default on a Team Site are not there on a Publishing Site. Some of them are News Feed and Calendars.
Finally, A Team Site is light weight whereas a Publishing Site requires more resources. So, while creating a new site you would need to think about the requirements and accordingly make a decision on which type of site you would need to create.
The strpos function in PHP is used to determine whether a string is contained in another string.
If there is a string A that contains the following words “The cat is sleeping” and you have another string B that contains this “cat”
One could use the strpos function to determine whether string B belongs to any element is string A. In this case the word cat from string B is present in string A
The If Statement
Will return True since string B belongs to string A
The common use of this function is to determine the position of the first occurrence of the substring in a string
Github is a popular source code management system that uses the Git version control.
The first thing to do is create a Github Account. After you do that in order to start version control in a project, one would have to create a repository. This can be done on the website. All you have to do is goto Github and click on New Repository.
You would then be taken to a page where you need to give a Name for the repository and specify whether you would like the repository to be made public or private. By Default it is set to Public. For Private repositories one would be charged $7/month where you could create as many private repositories you want. But private repositories as the name suggests cannot be seen by anyone unless you Invite someone.
So, there! you have created your 1st Repository
Error Reporting is very Important in order to know exactly which part of the code is not working and to get the cause or the reason for it to not work. We as developers might always think that our code would not run Into any errors after we make the design. But errors are something that happens and it’s something that one does not foresee while coding. It is akin to driving on the road and getting Involved in an accident or if your car breaks down. These events are not planned.
So Suppose we get an error, we need to know what exactly is causing the Issue in order to fix it. Each language has it’s own way for reporting errors. In PHP, in order to enable error reporting, one needs to create a special file in the Project Folder. The file is called php.ini
In this file all you have to do is Include this one line of code-
display_errors = on ;
This turns on error reporting on the project folder.
So, next time if you are working on a project make sure that error reporting is enabled. This is not done by default.
The Array Push method in PHP is used for Inserting elements Into an array. The Syntax goes something like this-
$array is the Array
$element is the element that needs to be Inserted Into an array.
Now 2 is an element of the array.
The visibility property is similar to the Display Property in CSS. The visibility property controls whether you would like the element to be displayed or not.
For Instance if you have an element which is not being displayed in the home page and you want it to be displayed, all you have to do is set the property to unset.
This removes the previous value and makes the element visible.
What you could also do this set the property to visible. Something like this-
To learn more about this property, please refer this Doc from MDN https://developer.mozilla.org/en-US/docs/Web/CSS/visibility
This property is something which I came across while discussing with a colleague. It’s amazing how one can encounter new stuff everyday which you never really thought existed.
Bootstrap CDN is a convenient way to explore the functionalities of Bootstrap without the hassle of downloading and saving it to your local server. All you would have to do is paste some script tags on the header of your HTML page that would link to the files in the Bootstrap Server.
As I write this blog, the latest Version of Bootstrap is v4.0.0-alpha. You can find the script tags to Include on your page over here.
Be aware that once you are using features like DropDowns, they won’t work. The reason being that Dropdowns require JQuery and that is not normally given with the CDN. You would have to explicitly specify a script tag to compile JQuery. And make sure that is the first tag that you put on your header tag before the Bootstrap script tags.
Your header should eventually look something like this-
Once you have this on your header , the dropdowns should work 🙂