Web starter kit & php - php

how can I use php files using the Google web starter kit? I discovered today the Web-Starter-Kit from Google and I'm trying to get familiar with it. It works great but now I add some php code into the basic.html file and it does show in the preview file but in the /dist/ directory where the final code awaits it doesn't appear.
My question is how can I use php files using the Google web starter kit?

You should use files with extension (.php) for writing PHP code. Try changing basic.html to basic.php

Nope.
You should design the layout as normal html5 and css3 pages. Then make those static dynamic pages by replacing with php code.
Design different layout as static html pages first and then convert it to dynamic websites an easy way.

Related

How to identify external javascript, broken images and css files from wordpress theme using php / laravel

I would like to indentify external javascript, broken images and css from wordpress themes by using laravel and php.
Please let me any laravel package or php code for it.
Thanks,
Amol Rajhans

Integrating custom PHP script into drupal website

I'm trying to integrate a web conferencing tool, called Big Blue Button into my drupal website. I have downloaded a php script that will allow integration between my site and the Big Blue Button API.
In the readme, it says 'stick the entire directory into somewhere that can host php'. So the directory includes, for example, 'index.php', 'assets', 'css' and a few other files. So were do I put this and how can I access this Big Blue Button from a new page on my website? In my drupal folder, I have lots of different folders such as 'modules', 'profiles', 'sites' etc.
Can anyone help me to get this working?
Thanks
I would advise you to do it the Drupal way, i.e., create a custom module. If you're developing with Drupal, you may as well learn to do this.
You will find a lot of free Drupal tutorials here:
http://codekarate.com/daily-dose-of-drupal
Creating a single page is fairly easy. You will need to look at hook_menu. Download the examples module and look at the Menu examples go create a simple page.
Create a subfolder in your custom module to hold the Big Blue Button files and try calling your php script from your menu callback function.
If you've never done this sort of thing, it may seem daunting at first, but have a try & you will find out it's not that difficult.
I would first try putting the entire folder on the same level as the Drupal folder, not within.
you need to create a page w/in Drupal and then link to the index.php of the tool.
That's the kind of thing I have done before, though not with this specific tool... in other words, I just used an iframe to pull it in. That or I've just opened it up in another window.
Integrating actually 'within' Drupal would take more and be creating a custom module which, judging from your question is probably more than you want or can do at this moment.
Try pulling it into an iframe... or possibly loading that index.php into a div via jquery using load().....there may be a newer method but have a look.

Calling PHP tags from within a groovy gsp using grails php plugin

I am trying to integrate a wordpress blog into my grails application. Wordpress is php, so grails obviously doesn't immediately work with that. There is a (quite dated) grails php plugin here: http://grails.org/plugin/php, which I've downloaded and installed. The plugin worked great and allowed me to get Wordpress up and running.
The problem I'm having is trying to display the wordpress content within a groovy gsp page. The content is accessible using PHP tags. However, the description of the grails php plugin states:
You could use JSP include to load PHP page from a JSP page under
web-app
You cannot include a .php from a .gsp yet, check GRAILS-3906
So I can't include php in a gsp. They mention some workarounds like including entire php pages, but... am I out of luck?
Has anyone done this before? The web seems so sparse for answers. Thanks.
I would rather try the opposite approach:
Let the site be developed using wordpress and a wp-plugin can integrate your grails app using restful call proxyed by e custom wordpress plugin.

WordPress or PHP script to pick an image file from a plugin folder

I'm creating a WordPress plugin that allows a user to select one of several image files that are distributed with it. Is there a simple technique for allowing the user to view the files in a filebrowser-like interface and pick one? I want it to look as similar as possible to picking a file in the normal file upload dialog.
I ended up adapting the code from this filebrowser that utilizes scandir. It has a nice simple interface and the code is simple enough to incorporate into a plugin.

How to add php code directly into article using Jumi plugin

Hi every one I have installed Jumi plugin version 2.0 in joomla 1.5 and tried to write php code in the article. I'm able to use the code if I store the php source in an external file and call it within the content like {jumi [../../filename.php]}. But I'm not able to write the same code directly into the content using JCE editor. I'm getting an error like 'Jumi is working but the source needts to come under square brackets'. The problem is that I need to use a php variable output for a div tag and js also. I have no clue of how to overcome this.
Never had much luck with JUMI for that and other reasons, so switched to DirectPHP and kept the PHP right in the article itself.

Categories