I have a folder containing a php booking system,that i want to render as un article and add it to the main menu of the site.
The solution that i end with, is to use the joomla URL Wrapper. But it brokes my design as it render it inside an iframe.
Is there another way to do that?
Use Jumi, it includes PHP files into articles, without iframes.
Usage:
{jumi [path/to/file.php]}
Jumi website
That requires an integration work. At least you'd rather think of the way to give some Jooml Component wrapper to your booking sysytem. which at least involves creating a com_yourcomname folder, and a yourcomname.php that will dispatch your actions to the actions of the booking component and, perhaps, filter the urls in the output so that they match the Joomla url building convetions. If do this properly, your app will appear as a page content (not an article)
Related
Is it possible to build a single-page website with silverstripe? Is it a bad idea - in sight of silverstripe?
How would a template look like to load all articles from several categories and subcategories in silverstripe?
Thanks for any links to tutorials, code-snipets, etc.
I have built backbone.js 'apps' with SilverStripe. You load the front end resources as you would any other SS project. I prefer not to use SS template vars to include assets (js/css), as js applications require strict placement guidelines (although it is possible to load everything using the Requirements class).
Check out the RESTful server docs for examples of usign the SilverStripe CMS to control your data, and use API endpoints to access this data from the front end. In fact, there is no need to have the SS backend and the single page app front end on the same server in this scenario, which is the beauty of REST.
For link handling in single page apps, you can use PushState or listen for hash change events. Either way, the front end JS handles routing, rather than usign SS's Director class.
Please provide more details on what you are trying to do if you'd like more specific help.
how can I develop a multipage website?
should I develop all other linked pages in same way I created the homepage?
I am intending to develop a PHP website for a store and I wanna link each products to their individual pages. but since there are lots of products its kinda tedious to create individual pages each product.
SO Instead of creating many different pages for each product can I create one dynamically changing page and use it for all the product links?I mean can I create a single page whose basic layout will always remain the same but only few content will change in accordance to the selected product.
Yes, you can do that; its very common to create a page that dynamically changes.
For example, you can create a php file that takes care of the header portion of the site, then simply call it within your index.php page as so:
<? show_header(); ?>
Take a look at this website to get started!
http://www.techiwarehouse.com/engine/d3bf2317/Building-Dynamic-Web-Pages-with-PHP
The site i provided is great to start playing with PHP, it provides good information with easy to follow steps.
Another great resource is the IBM PHP PDF:
http://www.ibm.com/developerworks/linux/tutorials/l-php/l-php-pdf.pdf
Finally my personal favorite, "Practical PHP & MySQL" PDF:
http://utopia.duth.gr/~stavtran/vivlia/PHP_and_MySQL.pdf
Its also worth noting that there are Content Management Systems out there (CMS) such as Joomla, Worpress which are very easy and powerful, a lot of these CMS's allow for plugins which will make your life so much easier. If your goal is to simply have a solid working e-commerce website that sells products and you don't really wish to do hardcore php,mysql,javascript,css,html,jquery coding ;-)
Content Management Systems
http://wordpress.org/
http://www.joomla.org/
You can implement a single page, lets call it product.php. Then you can use theGET method to dynamically call the page. It would look like this product.php?id=1 where id=1 is the primary key of the product in a MySQL table. And you could fetch various products just changing the id in url.
You can create multipage PHP website using following method:
1) Create a folder and name it “my_first_php_website”.
2) Create following folders in your “my_first_php_website” folder.
“images”, “includes”
3) Create following folders in “includes” folder.
“css”, “js”
4) Create following files in “my_first_php_website” folder.
-> “index.php”, “header.php”, “footer.php”, “sidebar.php”, “nav.php”, “404.php”, “about.php”, “functions.php”
Create following file in “css” folder.
-> “style.css”
Put your website logo in “images” folder.
-> “my_website_logo.png”
5) Now follow step by step tutorial to create your first website using PHP.
Source: Web Designer Tricks
Ive created a portfolio website for myself, there is a gallery which users can enter, click on a thumbnail and then go to a new html page with the full image and description. Now on this full image page i have a list of other fullimage pages for project 2,3,4,5, etc..
But obviously manually updating project2.html to have a list of all other projects minius project 2 in the sub nav is very tedious and mistakes will occus when i have to do it for all 12 plus pages. So im after the page people are viewing not to appear in that sub nav.
My problem is.. Do i scrap the custom html site and move onto a cms.. The logical step for this sort of dynamic nav. Or do i try and include php if possible. Can anyone suggest the best approach for this, im aware it might in the longrun be easier to run off a cms but i do like the control i get and knowledge i hand crafted my html.
Thanks
Mat
If you wanted to do this with php, you could do so by making a single file containing the navigation, for example nav.html:
Project 1
Project 2
Project 3
all the project pages would then need to be php files, with the appropriate .php extension, and in each of them you would have:
<p>All your normal page html about the project and such that's above your navigation</p>
<?php
include("nav.html");
?>
<p>Anything underneath your navigation</p>
Alternatively, the CMS is a viable choice, or if you particularly fancied learning some php, you could actually code a perfectly servicable system to do this without too much trouble yourself.
If your don't want to use CMS , you can create a php file to handle requests for example , a php file that receive this request :
http://myfolio.com/moreinfo.php?album_id=1&
now in the php file you can get informatin from DB and folders then create a HTML Stream and then output it.
I'm quite new to Drupal and want do some editing of the header. I want a custom toolbar to appear on every page. I've already created that toolbar in a file called toolbar.php. It has a layer which is fixed and will appear on top of every page.
How do I include the toolbar.php in the header template of drupal?
The toolbar refers to $user which is a global Drupal variable and I want to test toolbar.php before publishing it to the site. Is there anyway I can do that?
Regards,
Dasith
Of the two methods above the first is easier if you understand the basic idea of html and CMS templates, the second will be easier if you are a programmer.
First thing to check is that you really need to do this! Can't you restyle one of the existing menus (Primary or secondary) to do this - will make your life (and anyone who works on the site in the future) a lot easier.
The other thing you can do is look into adding an output region, basically something where you put the php into a drupal friendly format and then effectively do a 'drupal print'. This is how the toolbar, search box etc are done. You still need to alter the templates as above.
Yes for sure. If you want to have the html produced by your function/file appear on every page of the site then you will need to over-ride the page.tpl.php file in the theme you are using and essentually add the html to that file.
To gain access to the $user variable, just declare it in your script.
global $user;
open page.tpl.php file in a code editor and save as page-front.tpl.php (with two dashes if you are using Drupal 7.. one dash with Drupal 6) and upload it to your theme's directory. Clear your cache by going to configuration->Performance->Clear All Cache. Then referesh the page. Now your homepage is using page-front.tpl.php as it's template file. Every page will need its own template file. The page machine name comes after the hyphen so the user page template uses page-user.tpl.php. You can edit it as you want. The proper way to really do this is to use hook_theme() to pass variables to the template file. One variable could be the html which creates your custom header.
See also http://drupal.org/node/457740 Beginners Guide to over riding theme output
So I've built my site in Code Igniter and there are a number of pages where I feel it'd be easiest if the client could edit the content inline - much like what MojoMotor offers.
I'm not interested in using mojomotor but I wondered if anyone had done anything like this for their code igniter project?
As an idea of how it could work:
I was thinking that the client admin user could login to the normal custom built admin CMS area. After logged in, with session set, they can browse out to the public site for selected pages.
These pages will have a check for that admin session built in and if it's present, it can include a js file, which will overlay an admin banner and somehow enable the fields (perhaps content divs with a certain id or class relating to the corresponding table/field in DB) for editing.
--EDIT--
I've seen quite a few js inline editors around. I guess my confusion is over how best to integrate them with my database and controllers - i.e. idea of having the div id/class somehow map to the db field.
The bottom line is that MojoMotor is a CodeIgniter app and not a library. Therefore trying to work the code into your existing CodeIgniter project is not really an option.
But if you're willing, you can integrate your CodeIgniter project into MojoMotor and have the benefits of both. Here is a series of articles written on how to do this.
This is one example of the code you are looking for . You'll have to adapt the method for use with CI