Wordpress Cusutom Page, With PHP,js html and css - facebook

How can I implement a full html,php,js and css page into a wordpress page?
Example:
I have a app.php that has a text box, when You press enter it displays the text with a php echo. With the users profile picture from Facebook.
How Can I inset/implement that into a WordPress page?

HTML/PHP: The simplest way may just be to create an extra template in your theme. You can view WordPress template hierarchy here: Template Hierarchy
JS/CSS: If the JavaScript and CSS makes the most sense to be embedded (it usually does!), you can use hooks and actions in a simple plugin (or potentially your functions.php page) to include the JavaScript and CSS you need.
wp_enqueue_script
wp_enqueue_style
Note: I have not personally used functions.php (found in your theme files) to call these sorts of hooks, but I assume it would work just fine.
If you are using a theme that constantly receives updates, it is worth building a plugin to do the job. If not, it's easiest to just modify the theme.

There are two options as far as I know. First one is that you embed the code directly into your posts, and install the plugin called PHP execution. Second, try to create your own page template, and place your own code in the template. then you can create a page in the dashboard and select the template.

Related

Magento2 Home page cms: from where content is coming in my home page cms

I am seeing that couple of blocks getting called in my home page because i am seeing them rendered in fontend but they are not being called from cms page content. Is there any other place i can look for?
It can be called from various places as below:
You can see what template files being called in Homepage CMS page, than can search the block id in those template files.
Search in theme directory.
possible if there is layout handle hook in any extension (but for that you have to check in all custom modules)
The best way to detect is to turn on Template path hints if it is coming from phtml(template) file than you will definitely get the location.

Creating a new page template in Typo3

I'm using Typo3 for the first time and have been asked to update a site built on it.
Making changes to existing templates so far has been OK since they were mainly CSS changes or replacing images. Now though I need to create a couple of new page templates.
What's the easiest way to go about this? The existing site has a home.html and layout.hmlt in the fileadmin directory. Do I need to create a new html file there, if so how do I use this as a new template for some of my pages?
I'm coming from a mainly WordPress background in terms of CMS (I've nearly given in a recoded the site as a WordPress site since I think it would be quicker at this stage) but I'd really prefer to figure this out.
Any suggestions would be greatly appreciated as I'm pulling my hair out trying to read through the documentation and getting nowhere. The site is using Typo3 version 4.4.6
Thanks!
How you add a new template to your page depends on how templating is handled. Sadly TYPO3 has a poor templating out of the box, so there is most likely an extension that does the job on your site.
Probably one of these:
automaketemplate
templa_voila
flux & fluidpages
Check if one of these extension is installed and add a new page template according to the extensions manual or specify your question afterwards.
Edit:
If plain TYPO3 was used, you'll find something like
page = PAGE
page.10 = TEMPLATE
page.10 {
file = fileadmin/myTemplate.html
}
in your Typoscript. You can add tmplate files like the ones that are already there. To use a different template on a page, you have to replace the page.10.file with the template you want to use. This can be done with a new template record (crated in backend via the template module). But this is a rather anoying procedure to change the template, because you have to create each time you want to change the page template for a page and its children. That is why mostly extensions are used for this.
The out of the box situation gets better with newer TYPO3 versions but in 4.4.6 there are no Backend Layouts that could be uses for a template switch ot something like that.
In Addition to change the mere file you have to adjust the subparts or marker that are filled with the content. You'll find that configured in your TypoScript as well

Theme Specific Wordpress Custom Fields

I'm currently in the process of building a wordpress multi-site for a client. I've completed aspect #1, which was creating Theme-1. Theme-1 was built utilizing excessive amounts of the AdvancedCustomFields PLUGIN.
I'm working to build Theme-2, this one is the primary theme that will be utilized for all of the sub-sites created through the multi-site option. The issue I'm having is that the AdvancedCustomFields are no longer an option, I need to build all of the customization into the functions.php file directly.
Is it possible to create custom fields through the theme directly - without utilizing a plugin?
I need the theme pages to have "Left Side" "Right Side" "Footer" as WYSIWYG editors. So if someone goes to create a new page all of these field settings are there by default.
Is this possible?
It's possible, using the wp_editor function to get the WYSIWYG functionality. See this question on the WordPress stackexchange site. It's demonstrated as a plugin, but you could just as easily put the code in your theme.

How to add CSS, Images to a page in CQ5?

I am creating a new template and then a page from SCRATCH in CQ5. But I can't find the option to add my own CSS/images/JS to the page.
I mean a place to add/upload the actual files.
All the tutorials I've seen talk only about creating a template based on an existing template. Is there any tutorial on how to create the page from scratch ?
Your CSS and JavaScript go into nodes under /etc/designs/[your project's name]/clientlibs. (Ordinarily, you would set the page property cq:designPath of your content's home page to be /etc/designs/[your project's name] to point to this.) It's common practice to set up a subfolder of clientlibs called default, where your general-purpose style sheets and JavaScript go; you can set up other clientlibs for special-case script and style sheets. The simplest way to incorporate your script and style sheets into your page template is the <cq:includeClientLib> JSP tag.
The Adobe docs on clientlibs will also be useful to you, and explains how to use the tag.
#David , thanks for your answer, but for now, I got a better way to add and then use external files using WebDAV with CQ5.
The basic integration of WebDAV with CQ5 application is mentioned in this page

TYPO3: Custom options for "insert plugin" in backend

I am learning TYPO3 and extensions, for now, I've created a test extension about image uploading, handling and showing.
I have done the Backend for upload a new image, show a list, and edit image properties (once selected). This part is already implemented and working.
Now I am missing the "include" part, I mean, to insert an image in page via Insert Plugin on BackEnd.
My problem: When I select insert plugin, and I manually select my registered plugin, I want to render there a fluid template with options, image list, and so.
These options are for the user to select an image, a size, and so, for it to be shown in selected page.
I don't know which method have typo3 for showing templates in that part, so I am requesting a hint from where to config a template to be used there by TYPO3.
Note: This is not about asking implementations, just a hint to start and implement it myself.
You should not code that on your own.
I guess you are looking for TCA. In special for your Plugin you are looking for "flexforms". I guess this wiki page can help you get started with some examples.