HTML Update News Page - html

I have a site which is basically a few HTML Pages. I no have a requirement to create a facility where a site admin can create and maintain a News section.
I am just pondering what my options are? It needs to be a fairly simple process to maintain news items and ideally not be database driven. Although I'm struggling to see how I can achieve this.
Any help is much appreciated.
Thanks

CuteNews should do what you want. It uses a flat file to store the news items so you don't need a database.

Not sure I understood well, but if you mean you have news in static HTML pages and you want to update them, without doing it by hand, you would have to write a script that creates new ones or updates the existing ones, but that's all too complicated in my oppinion.
The way to go is Server-side language (PHP, ASP etc) and database (MySQL, PostgreSQL etc).

Related

Building a website - Displaying product information

I am building an e-commerce website for a friend, I have some knowledge of HTML and CSS but I wouldn't class myself as advanced on the subject. I said I would do it as a favor/experience.
I just have a question about displaying multiple products information. My page currently has 12 items on it, do I need to create separate pages for each of those products with some information on it like so:
www.shoes.com/trainers/shoe1.html or www.shoes.com/trainers/shoe2.html
etc or is there a more efficient way of doing it.
I only ask because after looking around, the end urls do not contain pages like the above but look more like the following:
www.shoes.com/index.php?id_product=1025&controller=product
If anyone could help me out or point me somewhere I'd appreciate it.
Store your products in a database, if at all possible. This way you can use queries to sort and filter your products easily.
You are further looking for a dynamic website (http://php.net/manual/en/tutorial.php), using, for example, a .php script getting the desired data in MySQLi, for example (http://www.w3schools.com/php/php_ref_mysqli.asp)
With this, you can create any lists and links using, for example, the product ID to refer to a product, like in your example ("?id_product=1025")
Your PHP script would look for id_product ($_GET["id_product"]) and use this to query your database and get the desired data.
What you want to do is a dynamic website. You build a database with all the products, and create a "template" html page for how you want the product page to look like. For that, you will need to know a server side scripting language, like PHP or ASP.
If you are only familiar with HTML and CSS, your only option is building a "static" website, by creating an html page for each product. if there's alot of products it will be tedious and ineffective.
I would suggest a ready CMS, like wordpress for example. It has many "store" plugins you can download. one of the is Woocommerce. it's free to download but has paid plugins. I use it and i am happy.
You have to paginate your data, to do this you have to create a database first then using any server side scripting language
for example this article guide you how to paginate your data with PHP
http://code.tutsplus.com/tutorials/how-to-paginate-data-with-php--net-2928
I will just explain two types URL
www.shoes.com/trainers/shoe1.html
www.shoes.com/trainers/shoe2.html
The above method is a good way when you look at SEO point of view. Search Engine efficiently works with static URLs.
www.shoes.com/index.php?id_product=1025&controller=product
Second means, you are building a website with PHP and you are passing product id in URL as ?id_product=1025. As you mentioned if you are creating E-Commerce website static page design will be a bad practice. Since you want to design each product page.
My Suggestion is you can try Magento which is having most of the features of E-Commerce Web.

Using a database to store and get html pages for website

I've got a lack of understanding at the moment. I'm developing a website with many articles and instead of creating a .html page for every article, I thought about storing the text into a database and get it from there (somehow) again.
I'm totally unsure if it is the common way to store text in a database. How do all of the "big" websites handle the mass of articles they publish? They won't create single pages neither but instead using a database, I guess.
But how can I achieve this? How can I store whole html files with divs and jquery and stuff into a database and get them when clicking on a link? Might XML be a keyword?
First of all, you need to clearly understand how things should work.
Clearly the approach of creating a page per article cannot work for multiple reasons:
if you have a huge number of articles you'll need to have a huge number of pages
if you need to change something small in design, you'll need to make that change for every single stored article
What you need to do is to create a more generic page, which has all the common stuff for all articles in it (a place for title, a place for content). The articles themselves can be stored in a database. When opening a page for a specific article, your application should place the title and content in the right place in that page.
This approach is universal _ it will work for any number of articles.
The keywords you are looking for are : Dynamic, Content Management.
In order to achieve this, you should learn a scripting language, PHP for example.
You will find a lot of tutorials to get started and how to make your website a bit more dynamic.
But you were right about the database part, most blogging systems and other content providers use databases to store all of this in data tables. PHP (and some other languages) would allow you to interface the database and the content you provide to your users.
You should look into using a web development framework like ruby on rails. Rails has templating that essentially let's you define variables inside of your html (e.g. "text of article").
As for storing the text of the article, the way I do things like that is to store them in a file on my server and then fetch that file using AJAX and then insert into an html file.
Most sites accomplish this by having templates, in which the common-to-every-page html is stored in a file. Page-specific data (article text, etc.) is stored in the database and "inserted" into the relevant parts of the template before returning to the client.
download word press and check how it work! it will help you
http://wordpress.org/download/

Use Form to create new page

I am trying to find a way for a user to come to my site and fill in a form and when they submit the form a new webpage is made. I want to make it create a new webpage in an admin area so I can view what they have submitted without having to troll my databases. I am assuming this is possible because the concept is hardly new, but hours of scanning google has left me empty handed on any remotely close tutorial or anything of that nature. Perhaps I simply do not know how to word it, I am very new at forms but I am assuming this has something to do with the form action. Are there tutorials for this that someone can link me to or can someone give me a quick explanation? I can figure out the work for myself, I just need a point in the right direction. Thank you.
You're going to need to learn about 1) persistant storage (a database), 2) a server side programming language (HTML is purely for creating the structure of a web page), and ... I dunno, a lot more. I would suggest you actually look at a CMS (content management system) and see if that gets you where you want to go.
Databases don't interact with HTML in that way without some sort of application sitting between the site and the database. It doesn't have to be a PHP application, but something is going to have to store and get data from the db, and something is going to have to dynamically create these pages you want. And that's going to be some sort of programming language -- or a content management system like Drupal.
(Also, don't forget about security, support, etc. You write the app, you have to support it. =)

Loading contents of a webpage into database

I've got several pages about products that I want to load into a database and instead of creating a separate html page for each product, I was thinking of creating a single page that will display whatever product the user clicks on. Each product page will have a similar structure with its name, picture, description, bullet points for features (varies from product to product), price.
My question is if I want to store all those information in a database (I imagine I would need a different field for each paragraph, picture, name, each bullet point, etc) is there a way to get around that? To store all those information in a single field or as few as possible and still keep the formatting. It seems like I would be overloaded with the number of fields I have to manage.
I'm starting to doubt if this was even a good idea to begin with...
Do not store all that information in a single field. If you are going to do that, then just create the HTML page and save yourself the trouble of having a database that you aren't properly utilizing.
What you need to do is identify the relationship between all parts of your page. For example, if a single product can have multiple photos you would want to define a multi table relationship that defines a one-to-many relationship between the Product and ProductImage tables.
Grasping how relational databases relate to the data you are working with can be difficult at first and it might pay off to hire someone for a few hours to go over what you are trying to do and how to implement this effectively using a DB. Since it is a real world example for you it will be an excellent way to learn. Good luck!
You're not the first person to want to do something like this. It's a very common problem that has a well established solution. You need to use what's called a web content management system. WCMSs allow you to use a common template throughout your website while filling in specific stuff for each page. I recommend Joomla because it's easy to setup, easy to use, and most web hosts support it. But you can also look at stuff like Wordpress or Drupal. Wordpress is more blog centric though and Drupal has a steep learning curve.

How can I get my content from a Joomla blog into Blogger or Wordpress?

I have an old joomla site (v 1.0.11) that I would really like to move over to Blogger or Wordpress. The commenting on the site uses AkoComment which was an add on module. Basically, I want to transfer:
posts
comments
users
css
I haven't found a good tool out there to do this. What tools would be best to begin to work with this data? The joomla database is MySql. I would prefer to use blogger as you don't have to pay to host sites on it. That means though that I don't have direct access to the database. Blogger takes Atom feeds as import. The default Atom feed on Joomla will only list the last five posts though, not all, and won't include comments.
Any help here would be appreciated!
There's no easy way. All your user data in particular will be impossible to migrate due to the completely different ways the two systems would handle passwords and so on.
For the posts though, you probably can migrate them. You'll have to study the format of each platform's database tables and create a query or two to migrate data. For example, something like the below would work. Most of the variables listed here are not the actual ones, you'll need to replace them with whatever's appropriate. The 1 is whatever your ID is in the new system.
INSERT INTO wordpress_db.wp_posts ( `wp_author`, `wp_post`, `wp_date` )
SELECT 1, `content`, `posted` FROM joomla_db.jos_content
Write an HTTP bot to submit the data from your database or build a megafeed with all your Joombla blog entries. I personally enjoy coding this kind of scripts.