Integrating custom PHP script into drupal website - php

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.

Related

Developer Transitioning to Drupal/Wordpress

For the past 3 years I have been a PHP developer writing and creating websites in a "Vanilla" fashion (no CMS). When I created or altered a site I would write my own html, php, css and js files. I just started a job this week as a web developer at a small company that exclusively uses Drupal7/8 and Wordpress.
I was assigned, what in my mind is a simple task, of creating a landing page with a carousel and a form on it. In my past vanilla life this would take me all of two hours to have it live. This site however was created in Drupal 7 by a developer no longer at the company.
I have been through both Lynda.com courses on Drupal 7&8 development and have a good grasp on the concepts, but still don't know where to even begin.
Is there anyone out there who has come from a similar background of web development outside of a CMS and has since moved into it that can give me some advice on where to begin?
Thanks!
I followed the step in this video:
https://www.youtube.com/watch?v=WsLA7n9fknc
and here was the output I got on the page:
here
You should try to install and use drupal contrib modules to create the carousel and the form, for example:
Create a view with Views Slideshow module, you could start following this example:
https://www.drupal.org/docs/7/modules/views-slideshow/creating-a-slideshow
Use the webform module to create a simple form, please see the following tutorial: https://www.ostraining.com/blog/drupal/webform-module

how to add joomla site header in my custom php file without using ready made plugin or module?

I have been develope one site in joomla framework. Now my trouble is that client want one custom page in this site. so, please guide me how to i setup theme interface in this custom page?
Although this is not my favorite solution, instead of including Joomla in your script, you can put your script inside an article with an extension that can read your code, like DirectPHP and others.
You can make something like error.php which is really a mini application that renders a single page. You can see in the core how elements of the emplae are used and you can evn pull in modules and so on.

How to go about allowing plugins for a custom framework?

First off, this isn't really a programming question but more of a programming concept question. Basically, I've built a bespoke PHP framework to speed up deployment on my end and I want some kind of plugin system in place that will allow me to add specific features to the base of the framework (like the SQL class or maybe a Twitter package) that will allow me to throw them into a folder and not have to actually edit the base for every new project.
Any ideas of the best way of going about this?
Here is a nicely written post by #ircmaxell on how to do that and what are the options:
Handling Plugins In PHP
Also check out:
Best way to allow plugins for a PHP application
what im doing in my cms:
for each plugin i make a folder latin-named of this plugin's name.
i create a /translations folder in there too. Check here.
have a single php file that has 2 basic functions, the plugin_install and plugin_uninstall (you know, things to happen on install/unistall like tables creation/drop)
create a special page of your system that reads these plugins, installed and not and give an on/off switch so users can install/unistall them.
load these single files mentioned above by a single call to include_once on top of your index page (or administration page) so to include whatever functionality they offer.
enabled plugins will be loaded (include_once) from your main page, and also their functionality, so each plugin can call each other's as well.

PHP-based CMS that can use static files as pages and include a forum and blog?

I am currently working on a project documentation site for an OSS PHP project. Presently all of the docs are written in Markdown and stored as separate files.
I would really like to keep the core documentation as static files within the project so that they can be downloaded and used as well as read on my website. But on the website, I'd like to render those pages from within a CMS.
In addition to presenting the code docs, I also want to provide a forum for discussion and a blog.
Wordpress is what I have experience with, but is there a better system for what I am trying to accomplish specifically?
For Blog and CMS I would suggest stick with Wordpress since you already have experience on it. And as far as Forum is concerned I would suggest SimplePress forum. I have been using it on my Wordpress installation and found it really good. You can see live forum on the link above to see how it looks in real world.
Also Wordpress has several nice plugins like Download Manager that will give you ability to manage your downloads/files.
Can't confirm if wp is the best, but it's certainly good enough.
To include your docs, you'll have to write a plugin, not likely that you will find one existing that does exactly what you want.
For forum, you should find a plugin. Google for posts similar to this to choose a best match.
Firstly Wordpress isn't a framework.
I believe CakePHP has the functionality to load hardcoded pages when they're placed in the webroot folder of the app. I'm unsure as to how they're loaded in regards to routing/templating however.

integratable php blog API for existing site?

I'm inheriting a php project of a complete website. It's currently static; the owner just wants a blog on the front page to keep things fresh. Is there a mature PHP blog software out there that I can make a few calls to and have a blog up and running on their front page, without having to convert their entire existing site to a blog or CMS software?
That's one of the use cases for Serendipity. It has a configuration option specifically for that. So unlike Wordpress you don't need to hack it. It's not as featureful and a somewhat bloated package, but has a far better security track record.
http://www.s9y.org/123.html <- embedding howto

Categories