As a project I would like to create a website that allows a user to login (create a login/password if doesn't exist) and enter some data for the day (say miles run, calories burned, situps done, etc). The website would record this data for the user for that day and build a running log of various activities. The user would be able to go back and edit entries. The user could then view the history of their various activities.
I have written some perl code to handle the various analysis that I intend to do on the user-entered data. I also can easily create a perl script to save a flat file with the user generated data appended with the data and allow editing.
But I have no clue how to get this into a web experience and unfortunately I don't even know where to start!
Any idea how I should go about doing this? It doesn't need to be a super fancy website, just functional. Where should I start?
Thank you
See Ovid's CGI Course. CGI.pm is a simple Perl tool to create web pages. For more advanced tool look at Mojolicious framework. I use CGI::Application framework but it is old and for me it is already too simple, Catalyst and Mojolicious are more advanced.
I would use WordPress or Drupal as the basic framework. In Drupal7 you'd create a new content type, in Wordpress you'd create a new "Post Type" (new as of WP 3.0) for users to enter data. You'd then write code to fetch & process that data.
But you could off course just use WordPress with the Runners Log plugin (and Drupal probably has a similar plugins), if you wouldn't want to do the coding ;-)
Related
I am totally new in this concept. I received a task in which I need to create Moodle plugin for course.
In my course I have two sections where Only videos will be uploaded by teacher. I want to create a plugin to use user webcam while they are playing that video and capture the screenshot. For example, they click on play then webcam will start. so, my question is.
is this possible? and where should I start doing development like in local folder? or in mod folder. I just need some guidance from where I need to start. although I have a simple core code written by myself in php and JavaScript where I can start video when user play video. but I want to integrate that into Moodle, but I don't know from where to start.
I did some research, but it shows the activity plugins should be in /mod folder but I don't know how I should start.
Here's the documentation for developing an activity plugin - although it can be complicated if you are new to Moodle
https://docs.moodle.org/dev/Activity_modules
If you are new to Moodle, there is a free beginners course here for developers
https://moodle.academy/enrol/index.php?id=64
Also recording video isn't an easy task - its always worth checking to see if a plugin already exists - here are contributed plugins
https://moodle.org/plugins/?q=record%20video
Poodll is a popular set of plugins, they already have one for recording video
https://moodle.org/plugins/qtype_poodllrecording
Maybe use one of those as the basis for your plugin
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
I'm developing a web application where users can upload multiple plugins. I want to give an extra value to my app with a feature like wordpress plugin version adviser. I don't know how to deep in this area in order to investigate. I hear someting like "pingtracks", but not sure if this the correct way. Well, that's my doubt, how can I determinate if there is a new plugin version to uptade?
Thanks in advance.
PS: There is a table in my db with all plugins relevent data like url, author, current version, etc.
Each plugin should have a URL for some sort of update manifest. The resource at that URL should contain information such as currently available versions, and the URLs of files that need to be updated. This file could be as simple as static JSON data.
Please remember to use HTTPS, so that it is harder to spoof your update site.
Every time that user uploads a new plugin, check the "current version" in your DB and compare it with the last same-named plugin uploaded. (create another table for saving needed data for example)
For people interested in doing web apps for Google TV, especially those with video content, the easiest way is use Google TV Templates: https://developers.google.com/tv/web/docs/gtv-templates.
The original Google TV Templates were developed with video source files hard coded in Javascript file. A number of people have asked about how to implement a backend with PHP and MySQL and store video sources there so that they can be dynamically loaded from frontend within the Templates. The following article was written to address this question.
https://developers.google.com/tv/web/docs/ajax_gtv_templates_tutorial
The tutorial walks you through how to set up a database in MySQL (i.e. schema, sample data), PHP code to serve data, and modified Javascript to do AJAX loading.
Currently to add video source data into the database, one can use straight SQL but it may be more desirable to build a PHP admin front end.
A bug was recently reported by Maurizio on Google TV Developers +page: https://plus.google.com/117492290125593364976/posts:
"Hi, i downloaded the html5 template mysql version. it is working fine but if i add more than one category , the last one added is repeted. Do u have any idea of how i can fix this problem? many thanks."
I'll follow up with a fix.
A fix to this bug is available and a new download is at: http://gtv-resources.googlecode.com/files/gtv_template2_ajax_php_mysql.tgz
The actual fix is in this php file:
http://code.google.com/p/gtv-resources/source/browse/trunk/gtv_template2_ajax_php_mysql/videosources.php
If there is interest, please ask a question and I'll write up an admin page as well.
I want to build a site that allows user to get filtered subsets of some information I have stored on a database. The information will change frequently and I will want to create a post every now and again to say when new information or features become available, so the site has CMS aspects and web app aspects.
Coming from a desktop programming environment, I have to admit I'm not entirely certain how far a CMS like Drupal or WordPress can take me. The web app would basically be a form with several interdependent options and a Submit button. When the Submit button is clicked, I would want to call a web service that returns the information in one of a variety of formats.
So will I need to install my CMS and have an iframe or just a link to the web app which is developed completely outside of it, or can I build my web app's front end directly in the CMS (and hopefully achieve a nice, integrated look) and just have it call the service behind a button?
I half-expect that this web app would become a WordPress/Drupal plugin, or am I barking up the wrong tree?
Yes you can do this. Try out jquery, I think is already included (at leas in wordpress). "Break into" the layot part add js file of your own that makes an AJAX call to a url and returns some HTML from there and puts that content into a certain HTML component (a div that you also add there by your self with a certain id).
User clicks a button, triggers the ajax call and voila.
There are also complicated ways like developing your own plugin that makes SOAPCalls and integrated with the wordpress/drupal etc. But as you say that you are a desktop developer this is the closest aproach to you knwoledge and perspective.
AJAX LOAD WITH JQUERY