How to add new posts on my blog using html? - html

I've create one blog using html5 and css3. I need to add new posts on that blog by clicking a button. If I'll click that button one text area has to be open and it'll have the options like adding image, video and text. For example the text area that will be used to create questions in stack overflow site. Please help me to make this one...
Regards,
Sandra

You need to use some sort of server side language. You can use PHP/ even add your theme in wordpress so that you can add required functionality

You have to use a rich text editor wrote in Javascript ( you can find some on Internet) and also, you have to write some PHP to send the the input from textarea( when click on submit or publish button) to a table in database.
Examples of rich text editors:
http://www.tinymce.com/ and
http://nicedit.com/
About the php part, you can find some examples on http://www.w3schools.com/php/.

Related

Froala Editor bold button does not work as expected

I am building a web app that allows users to write their own html pages using the Froala editor integrated on my website.
The editor works really well and provides a great degree of control as well but, there is a small problem I am facing with the bold button. If you highlight some text inside the editor and click on the bold button, in the editor the text does become bold but in the corresponding html which is generated has a simple <strong> tag around it. Now when you load that html on a browser when it is delivered via a link or any other service, it does not show up as bold unless we write some css for it.
What I would like to know is:
Is this the correct behaviour?
Is there any fix or option that we need to control on Froala to make
it look bold?
Apart from writing custom css for it, if there are any options please let me know.
You can check out the said behaviour on one of the demo pages they have: Froala Demo
Thanks in Advance!
PS: Let me know if you guys need code samples from my end, I have not done anything(custom) apart from the samples available on their website.

Show/Hide feature using HTML only

I want to create an element where it performs a show/hide functionality of text when a user clicks on a button. I've found a helpful page through this link: http://www.meadinkent.co.uk/expand_sections.htm
The only issue I have is that it uses javascript. As I want to place this into Sharepoint, what Sharepoint does is remove the <script> everytime it's submitted, so javascript I'm assuming can't be used.
I want to know if there is a way to perform the same functionality as displayed in the page but with HTML only?
Thank you
You can add js by using Embed Code web part. Just go "Insert tab" and click "Embed Code". Then edit this and you will able to use js, css, html. So, you can use your helpful link.
Embed code webpart
You can use CSS to show/hide text. You can vist the following links, which may help you.
1) https://alexcican.com/post/hide-and-show-div/
2) How to show/hide div on click with stricly HTML/CSS

WordPress - enable/disable a div like a widget

I am building a custom WordPress site with my own theme. Is there a way in WordPress that would allow me to enable or disable a div in the sidebar similar to the way I enable or disable a widget?
For example, I have a div that is for a newsletter subscription form and a div that is for a call-to-action button. Is there a way that I can allow the WordPress administrator to choose which page to have the newsletter subscription form and which page to have the call-to-action button dynamically?
I have been searching but was unable to find any information. Perhaps I didn't have the right keyword?
Any suggestion would be greatly appreciated. Thanks!
For that to happen you would either have to go for the somewhat tricky solution, but on the other hand more satisfactory; create a custom options page with a true/false-solution using the Settings API. You can read more about that over at Codex here: https://codex.wordpress.org/Settings_API . They here refer to a handfull of external resources to learn more. This guide helped me when setting up my first built-from-scratch page; http://ottopress.com/2009/wordpress-settings-api-tutorial/ .
The other solution would be to use a plugin. The top shelf, best in class solution - if you ask me - would be Advanced Custom Fields; http://www.advancedcustomfields.com/ . It's a little bit of work to first get it's head around, perhaps, but when you get going you'll probably never look back. Creating awesome options pages is a breeze, and you probably will end up making all sorts of elements on your page optional - just because you can. But there's a catch; to create options pages you will have to buy the Pro version of it.

How to Make Text link to Hyperlinks in Facebook Comment? Comment plugin

Now this is very tricky thing. I have recently seen that many blogs do have facebook comment plugins where anyone can comment and place relevant links.
But the problem is those links are in text and are not hyperlink or you can say not clickable.
I found here in this article post right down you can see a facebook comment plugin, there you can see a text link is a hyperlink.
http://www.huffingtonpost.com/2014/11/25/black-friday-apple-deals-2014_n_6211754.html
Now my question how did that user do that? i mean from text to hyperlink. Becz normally it won't happen.
I have searched lot of stuff in google but i am not able to get the correct method.
The user doesn't make something that looks like a hyper-link display as a hyper-link, the webpage does!
What happens is that the scripting behind the page is using a reg is looking for a regular expression to pattern match URLs in the comments. When a match is found it'll be displayed as a hyper-link, if it doesn't match the regex it just displays as flat text instead of a hyper-link This either built into the Facebook comment plug-in or the website itself.
When text gets passed to HTML it has no way of telling what is and is not a link However if you process it through a script to identify links as being links you can tell it to display them as hyper-links rather than just plain text.
A great example/explanation of this is over at http://regexr.com/39i0i
Tl;Dr
Users don't make it happen, the plug-in/webpage make it happen.
With the exception of plug ins that require you use link tags, in the case of the page you linked though that is all that version of the Facebook plugin.

How can I format an html page so that when a link is added to G , it looks nice?

Im building a new website, and I was testing the ability to add a "link" to google plus and have the article and it's content (summary) get pulled into google+.
When I do this today, all I see is an image - and no text. I'm sure that there is some formatting change I can make to the page to make the text come in... But I don't know what to do.
If there is a guide somewhere I would like to read it, but I cannot find one. Thanks for the help
An example page:
http://alexedison.com/index.php?indexNum=8
The easiest way is to create snippet data for your page. Google provides a tool for doing this as well as additional information at:
https://developers.google.com/+/web/snippet
You can validate the data on your page using the Google structured data testing tool:
https://www.google.com/webmasters/tools/richsnippets
There is no problem in your webpage.
Google Plus has change the look of each post.
now it shows only Image, Title along with given URL.
if you visit Google Plus , you can see posts without description meta information.