I wanted to add a +1 button on every post in my website. How do I do that? Any resources? I am also looking for Twitter's Tweet and Facebook's Like. Or Django does not handle that?
Check out the documents for Google Plus, it looks pretty straight forward:
The simplest way to include a +1 button on your page is by just
including the necessary JavaScript and adding a +1 button tag:
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone></g:plusone>
Related
I'm working with Django. To integrate a Rich Text Editor with my site, I use the django-CKEditor from https://github.com/django-ckeditor/django-ckeditor
While it works quite fine in the Admin Panel, I'd like to use it in frontend forms to allow the users of my website to edit their own texts via CKEditor. But I can not figure it out...
Is it true that this django-ckeditor can only be used in Admin Panel? If it isn't true, how to make it available in the frontend? Or any recommendation for other Rich Text Editor which I can use at the frontend?
Thanks a lot!!!
I just include ckeditor in static/js and apply it to whichever fields I need.
I initially tried what you are trying, and this (more conventional) way was super easy.
http://ckeditor.com/download
This is an old question, but here is a new answer for people directed here by a search engine...
The js is already downloaded with the package, no need to add it to your statics again, just load the js by adding
{{ form.media }}
in your templates <form> </form> section and RichtTextFields will be rendered using RichTextWidget (with ckeditor js). Expecting form to be the template variable holding the form.
Reference: https://pypi.org/project/django-ckeditor/#outside-of-django-admin
I have an ecommerce website. I have a help desk website hosted on another domain.
So what I want is to have an URL like this: "http://www.example.com/help" and it will take my customers to my help desk site which is hosted on another domain, let's say http://www.example2.com.
So when someone enters http://www.example.com/help" into their browser's address bar, they are taken to http://www.example2.com"
I think it should be fairly easy to achieve. Please point me in the correct direction.
Somewhere in the HTML of the web page you can paste a link like:
Here you put text you want your customer to see
If you want to redirect the customer to another URL, that question has been asked and answered here: Redirect from an HTML page
If you are using php for http://example.com/help page than you can simple paste following snippet to your help page
<?php header("Location: http://example2.com") ?>
this will redirect your user to example2.com directly!!
or you can use jquery in case you are not using php!!
<script>
$(document).ready(function(){
window.location = "http://example2.com";
});
</script>
Don't forget to add jquery library on header to get jquery working correctly,
hope this helps,
thanks.
I have searched for this a hundred times and only found how to add such tags in Blogger. I have not found a tutorial on how to remove those tags if they are added automatically by Blogger / Blogspot.
In my head area of one of my Blogspot blogs using a custom domain, the tag is added automatically as:
<link href='MY_GOOGLE_PLUS_URL' rel='publisher'/>
I try to remove it, but I cannot find the code anywhere in the template. I used the same template code (copy/pasted xml) in some other blog created by the same Google account. The code does not show there.
I have one more custom domain hosted at Blogger but it does not show the publisher tag automatically.
What am I missing?
After a day of messing around I'm answering my own question.
Turns out if we create a blogger blog (with a custom domain in my case) and add that blogger blog to the list of contributed blog in our Google Plus, rel=publisher of that Google Plus id is automatically added. Once I removed the link from my Google Plus, the code in the header:
<link href='MY_GOOGLE_PLUS_URL' rel='publisher'/>
Dissappears !!
just delete
<span class='meta_autor'>
Publisher: <a expr:href='data:post.authorProfileUrl'>
<data:post.author/>
</a><span class='meta_date'> - <data:post.timestamp/></span></span>
In your template search for
<b:include data='blog' name='all-head-content'/>
code. After finding this code remove it then save. Now check your rel="publisher"
tag gone from your theme.
I want to add a blacklist to my fb:comment plugin, I have it on my website, but facebook docs only show me how to add the blacklist for an app using the moderation dashboard. I do not have an app_id, I am just using the plugin
This does not apply for only using the plugin. This is my code:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:comments href="example.com" num_posts="2" width="500"></fb:comments>
I have also the meta-tag:
<meta property="fb:admins" content="1234567..ect">
I know how to add the blacklist when having an app, but when you are using just a plugin how can you add this blacklist, can be something like
<fb:comments blacklist="porn"... </fb:comments>
??
Thank you for your help.
Best Regards!
This can not be done, you must associate to an app_id if you want to use the blacklist
I'm hosting my blog in SquareSpace, and I need to add a <Script> tag at the footer of every post.
In the middle of this <Script> tag, I need to replace a value with the permalink for the current post.
So, in my home page, where I'm showing 5 posts, I need this <Script> to show up 5 times, each time with the permalink of the corresponding post inside it.
In wordpress, I can directly edit the HTML of posts, and I can do:
<script type="text/javascript">
var myVar = "<?php the_permalink() ?>";
... more code ...
</script>
How can I do this with SquareSpace?
I haven't found anywhere to edit the templates directly.
Thanks!
Daniel
I'm not exactly sure what you want to do or how to do it in Squarespace but here are a couple tips / resources:
If you login and go to your blog page, then switch to 'Structure Editing Mode' by clicking the cubes icon at the top right of the screen, you can then access the 'Configure this page' button for the blog page. In the configuration settings for the blog you can add the Permalink button to the bottom of every post.
If you login and go to 'Website Configuration' at the top left, then go to 'Website Settings > Code Injection' you can select different areas to edit. You might be able to do what you need here. You may need to upgrade your account to access the particular Code Injection Point you want to edit.
Another option is to just use the code injection point (no account upgrade needed) to apply the script in some way.
A great Squarespace resource is the Developers Forum at http://developers.squarespace.com
I hope this helps!!