how to create my own news feed to my website? - html

Well I have a website, and I wanted to add a feature of an articles that I write sometimes for my business, my website is only one page so i want some free plugin, that I will be able to add content without using any code every time, and not start creating a full php website. any idea guys?
thanks..(the website is a full html no joomla or wordpress)

The question is absurdly broad, but we can tackle this as best as possible. We're going to assume the following things here:
You know CSS
You know HTML
As such, you're probably aware of how to create tables, columns, and such. So I'll operate under the assumption that you know how to design and create your pages.
Your best bet is to use a PHP include function (or several) that references a file. As such, your index.html will need to become index.php. It's only a single line of PHP so it shouldn't cause issue, and the line itself is fairly simple.
<?php include 'directory/file.html';?>
Now you'll obviously need to either create your own directory or name your own files. The files referenced do not need to be PHP nor do they need <html> or <body> tags. They'll be included and styled in the page as is, wherever the PHP include is placed.
This means that you can just edit your included file(s), which will allow you to move these posts around your page as needed simply by moving your PHP function. If you precede the PHP line with a <p> tag, you don't even need to add tags into the included file, although I'd recommend doing all of your tagging in the included file rather than the index.php
If there's anything else, comment and let me know. Hope this helped to some degree! Again, broad question.

Related

Firefox HTML inspector: how to copy single HTML tag?

I have a website and need to transport a form to another website. I however only need certain tags not the whole form block with all it's tables and divs.
When selecting a html-tag in inspector, I can copy inner HTML, outer HTML or CSS styles but how can I just copy that very exact tag I selected without it's child nodes, just the selected line in HTML code?
I ask this because the HTML is minified and I can't just select and copy a tag in source. Same when I chose "copy outer HTML" I get the whole HTML subtree minified, means everything in one line.
How can I quickly search and copy certain tags from the three without grabbing everything in the branch?
Edit: People, thanks for all your suggestions but please note that I wrote about a MINIFIED HTML page I have here.
Just open Debugger near Inspector
Then find page file... then copy with any select range as you want
UPDATE
if it minify click here
If I understood what you want try this
Since your question seems unsolved yet, let me come up with a creative approach I use for similar tasks from time to time:
(1) Creative solution: Page manipulation
If you don't have a javascript framework of your choice (e.g. jQuery) on that page, add it using a browser-extension that adds it when page has loaded.
Then you write a bit of javascript code that removes unwanted child elements of the desired parents in a loop or so. That sounds like lots of work but since you asked this question I assume you need dozens if not hundreds of elements so it might be worth taking the time to write such loop(s).
When the code you injected processed the page and removed everything you don't want, you can then copy the code like mentioned by others here.
(2) Alternative solution: Beautify the code beforhand
If the given solution(s) don't work for you, one could try to beautify the code by copying the source to a webpage that auto-indends html/js code. You could then optionally save it into a html-file and approach that one again like mentioned here before.
Sidenote
If either this idea is too much work or you need this frequently you are probably approaching this on the wrong side. When working on frontend (only) you are always limited to what you have. If you could approach from the backend you could then build from the data/information whatever you need. If you could provide a bit more information about why you need this and how much code you are talking about one could maybe come up with a more sustainable solution!

Is it better to use HTML Include for common parts among many pages?

I'm trying to figure out what the norm or standard convention is. Let's say I have a website, and most pages have the same navigation bar, and same footer. Would it be better, or more efficient, to create two different HTML files then, nav.html and foot.html, and just include them into each of my web pages using
<div w3-include-HTML="nav.html"></div>
Or is it more common to just rewrite the same code over all of the pages? I understand I would need to include the JS with the 'include' method, I'm just trying to figure out the standard practices for web development.
I have been working with web designing for some time, and I feel that including separate files is much better than repeating the same code over and over. It keeps the code clean, and easy to debug later. If you want to change anything for the footer, for example, if you rewrite the code over and over it will be quite tedious to change the code of each and every code. On the other hand, if you have them as separate files, this would be done by simply editing a single code. Including separate files is much more efficient than rewriting the same code.

How to locate an HTML file on localhost using Google Developer Tools?

I'm building a website using Wordpress on Localhost. I'm learning the structure of the webpage by editing the HTML and CSS using Google Developer Tools. I want to know which file I'm editing and where on the hard drive it is located.
I have edited the height and width of an element inside the circle marked but when I try to save the file, it asks me for a location to save which I'm unaware of. One the left is the HTML code, how can I locate the file with that HTML code?
how can I locate the file with that HTML code?
You can’t – not really, not from within your browser, because your browser doesn’t see individual “files”, it only sees the complete HTML source code of the one resource it requested, that might have been composed of lots of different files, plus functions that generate HTML code dynamically – so that actual piece of HTML code might not even be written as such within a file.
You might be able to identify different sections of the HTML document though – and with a little knowledge of the template structure and output logic of WordPress, you should be able to find out what the relevant file to look in might most likely be.
Another thing I’d suggest, is that you get yourself an IDE that allows you to search across all files in the whole project folder – and than look for certain class names, IDs etc. on the HTML element in question or near/above it. If you search for those, you might get lucky as well. (Although a lot of times those classes/IDs might be output dynamically as well, so you won’t find them inside of a template file as such.)
Especially with little knowledge of WP template structures, it might take some trial and error to find the piece of code and file you are actually looking for.
The Google Developer Tools is not a code editor, so whilst you can try out different options I'm not aware that you can save it, and if you can, I wouldn't say it's a good idea.
Wordpress uses PHP, a language which HTML code is embedded with PHP code. For example the code <a href='<?php echo(link1);?>'>Home</a> has had the href attribute embedded with a PHP variable. If you want to find the HTML code, look at the PHP files in your Wordpress directory, index.php is the landing page code.
One thing to bear in mind is that not all the HTML code will be included in one PHP file, it is usually included from several files, and much of the content will be in the wp-content directory, keep an eye out for the PHP include or require commands.
Google developer tool is just to check, once you are done with the editing, You have to copy your css code- and paste in your css file.
To get the css file look at the below image.
Hope your question got clarified!!

Way to "include" a file that contains your <head> elements for several pages?

My question relates to the tag in HTML.
I am putting together a project that includes a lot of different php pages/frames. Is there any way I can have one file that can be "included" (for lack of a better term/way) into my tag that incorporates my several stylesheets/scripts? Reason is I do not want to copy and paste the same scripts over and over and if I find there is one script or stylesheet I forgot to incorporate or I made a typo, I would like to be able to change just that one file.
I am picturing a feature similar to #require where it is like the text is just pasted into the code in replace of that #require when compiled.
Hope the question is clear enough. Thanks.

how to convert html template to joomla template?

I have a html template that has multiple pages like home, about us,contact,services,... and I want to convert it to a joomla template.I spent a lot of time for searching a good tutorial in google like this:
http://www.learning.asarayan.com/education-website-design/joomla-training2/334-convert-html-to-joomla-template
but non of them can answer my question: how can I convert ALL pages of html to joomla??I mean that I can convert one page for example home to joomla and define its position but what about other pages?
can anybody introduce me a COMPLETE tutorial???
sorry for my poor english
thanQ
You may start with tutorial posted at below address
http://www.tobacamp.com/tutorial/5-easy-steps-converting-html-template-to-joomla-template/
There is no automatic converter or out of the box solution for this, neither any tutorial to help you.
The best way to sort out the issue is by duplicating the template with the help of Artisteer. You can just recreate the template design and feel with Artisteer. Download link: www.artisteer.com/?p=downloads
You need to change your mindset from that for a static template to that for a dynamic template.
In joomla templates there is a base layout called index.php as you know. But that is very skeletal usually, is just defines some locations on a page, includes your css and javascript that is common to all of your pages. This gives your site a common look and feel and ensures a good user experience.
For your css for the individual pages you would normally just include that in the template.css file or similar.
Within the index file you will see places that say jdoc:inlcude. These are the places that actually include the layouts that provide detailed html for specific blocks on the page, typically there will be one component jdoc (there cannot be more than one) and many modules and module ones as well as some others.
The html for these documents is found in the components/com_componentname/view/viewname/tmpl folders.
To override the core layouts you use the template override system by placing same named files in the html folder of your template. You can look at the included templates to see how this works. There is pretty good documentation of this on the joomla documentation site.
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core will get you started.
Also this may be a point of confusion. In a CMS you strive to separate content from presentation. So if you enter the core information in the cms, i.e enter the contact information in com_contact, and enter most of your current content into individual articles you will start to see how it actually works. I would usually recommend first entering all of your static content into the appropriate places, then work on making the rendered pages look exactly the way you want them to.