Understanding PHP templates [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am confused of the concept of templates in PHP. What does it really mean?What is the concept of templates in php?
template

A template is basically a visual representation of something (like data I.E), can be dynamic or not, the template should hold placeholders that will be replaced with values passed to the template. Usually a template is a skeleton that should serve only as the visual representation (styles, markup). The main purpose of templates is to separate the logic from the visualization.
In MVC, the templates would be the View Layer.

Related

How to create multiple language site when load data from database? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Normal, I usually define like this to create multiple languages for my site.
Like this:
en-en.php
define("HOMEPAGE", "Home Page");
vi-vi.php
define("HOMEPAGE", "Trang chủ");
Current, I load this menu from my database.
Has anything to create multiple language sites when load data from the database?
Thank you very much.
I would use Google's website translator
It's a simple plugin that allows you to convert any page to 100+ different languages live.

How to create a template used with PHP for web pages [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am trying to create an application that will have some similar looking pages. I am not sure what is the best way to do this.
Each page will have a header, side bar, content and footer.
The tricky part here is the sections will be similar but not the same. For example the header can have a combobox and different pages will have different data. One page will have a textbox.
The data will come from SQL server via PHP.
What would be the best way to handle this?
If you are using PHP then take a look into http://www.h2o-template.org/ - the templates will allow you to create similar structures and keeping them maintanable most importantly.
You can then have base template which encapsulates all of the similarities and extend sub templates from that which make each page unique.

Should Bootstrap handle scripts and styles instead of views? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am working on a distributed project where I saw various "appendStylesheet" and "appendScripts" on headLink which were added in Bootstrap.php.
Honestly, I am not much experienced with ZF (consider few months ~ 2 projects) and personally I think, it is not "semantic". You can always append scripts via layouts or if you want flexibility as per different views, they could be called to appendStyles as every view would want (if not coded in layouts).
My question is about working "collaboratively".
Should "views" related scripts be added on bootstrap or let it do the function of routing and implementing modules, etc?
styles and scripts should be added from the layout or viewscripts. this way you can easily switch the application's "design" from one to another by simply replacing the view and public folders.

How to implement XLIFF file format in to PHP? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Can any one please let me know how to implement XLIFF file format in to PHP? as of my knowledge it is for multilingual web development concept for CMS based projects. But not sure how it is to be implement on PHP i.e the methodology of reading/writing content into this XML file.
Please let me know if any other reference, URLs, books will be appreciable.
Thanks.
There is a XLIFF implementation into Zend Framework: http://framework.zend.com/manual/en/zend.translate.adapter.html
Here's another implementation: http://code.google.com/p/goatherd-php-library/

What type of documentation does WordPress code follow? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am trying to begin using some sort of standard for documenting my PHP code. Most of my code is in the form of WordPress plugins, some are getting quite complex, and I need to document it.
So my question is simple, what system does WordPress use to document their code?
I think it uses phpDoc.
There is also a guide for WordPress inline documentation.

Categories