I'm trying to use Addthis (http://www.addthis.com) script to place things like Facebook "Like" buttons on my pages. When I put the "Like" code in and save it TinyMCE strips part of the code out? For example. This is the Follow Us code.
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
</div>
After I save and check again the fb:like:layout="button_count" section is removed by TinyMCE.
Note: I use TinyMCE within EpiServer CMS 6 R2
Is there a way to fix this?
Thanks.
You will need to configure tinymce not to stripout those attributes.
Have a look at the tinymce configuration parameter valid_elements.
Related
I use AddToAny plugin to a Joomla website. I need to replace the code so I can "preview page" instead of "print" (ctrl+p).
I found AddToAny files into /plugins/content/addtoany, but I see no code for print service code
There is no code in the plugin for links generation, unless if you're talking about the css class to add a specific link (see below).
All the links are generated via the AddToAny's js: http://static.addtoany.com/menu/page.js
As you probably already know, all the rendering is generated with classes (powered by the js file above): https://www.addtoany.com/buttons/customize/standalone_services
<div class="a2a_kit a2a_kit_size_32 a2a_default_style">
<a class="a2a_button_facebook"></a>
<a class="a2a_button_twitter"></a>
<a class="a2a_button_google_plus"></a>
<a class="a2a_button_pinterest"></a>
<a class="a2a_dd" href="https://www.addtoany.com/share"></a>
</div>
<script type="text/javascript" src="//static.addtoany.com/menu/page.js"></script>
This means the links themselves are not "generated" in the plugin, so your solutions are whether try to override the plugin via the MVC override plugin or develop your own solution.
So I've spent a day on Google, and trying bits of jquery/javascript to do what I'm looking to do and am officially stuck.
I'm building a site using Squarespace, with the Marquee theme applied. I would like to be able to add a custom link in the primary navigation to send users to an alternative language version of each specific page.
But, I'm struggling. Ive found solutions on here that should work, but I don't think I'm applying it right. Ive tried adding a single link to the navigation and using a script on each page (in the code injection point of the head section) point that link somewhere else.
This would mean I have a single link in the navigation (which is standard across the site) pointing users to whichever page I want...on a per page basis. I know there is a solution out there....just can't make it work!
The section I need the link to work from is:
<div id="desktopNav" data-content-field="navigation-mainNav" data-annotation-alignment="bottom left">
<nav class="main-nav" id="yui_3_17_2_1_1450478013910_660">
<div class="nav-wrapper" id="yui_3_17_2_1_1450478013910_659">
<ul class="cf" id="yui_3_17_2_1_1450478013910_658">
<li class="page-collection">
<span>Menu</span>
</li>
</ul>
</div>
</nav>
</div>
None of this can be edited directly though...
I was thinking something like this could work, but I cant work out how to apply it to my situation...
Change href value for a hyperlink
Any help, gratefully received!
I fixed it...using this:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('a[href*="original.site"]').attr('href', 'http://website.com');
});
</script>
It allows me to point a single link in the navigation (which cant be edited directly) to whatever I want it to go to.
I am trying to use facebook share button to my wordpress theme. I have use this code for that
<div class="fb-share-button btn btn-default" data-href="<?php the_permalink(); ?>" data-type="button_count"></div>
It is showing the share button. You can check the result here http://www.racecarwow.com/crazy-crash-v2-0/ . But my goal is , the share button will be look like the share button of this site http://blog.petflow.com/bravo-heroic-little-girl-saves-a-trapped-puppys-life/ .
I think, http://lipis.github.io/bootstrap-social/ will be a good solution for me. But i could not understand how can i use <div class="fb-share-button btn btn-default" data-href="<?php the_permalink(); ?>" data-type="button_count"></div> to that button. Please help me.
Yes ! i have got the solution by combining following the two site
http://ostr.io/code/html-social-like-share-buttons-no-javascript.html
http://lipis.github.io/bootstrap-social/
Hope it will be helpful for other person.
Well, it appears, that you have a slight mistake in your code, there is no function like the_parmalink() in Wordpress so far, but the correct one is the_permalink().
This function retrieves the permanent link to the post currently being processed in The Loop (as you can guess from it's name).
This tag must be within The Loop, and is generally used to display the permanent link for each post, when the posts are being displayed. Since this template tag is limited to displaying the permalink for the post that is being processed, you cannot use it to display the permalink to an arbitrary post on your web site.
Refer to get_permalink() if you want to get the permanent link for a post, given its unique post id.
So fix your code and try again:
<div class="fb-share-button btn btn-default" data-href="<?php the_permalink();?>" data-type="button_count"></div>
I have a checkbox for agreeing to the terms and conditions of a contenst, and the user wants the terms linked in the label. I've attempted to do something like this:
<s:checkbox name="iagree" fieldValue="true" label="By entering, I acknowledge that I have read, understand, and agree to the
<a href='/rules.pdf'>Official Rules</a>, <a href='/about-us/terms-of-use/'>Terms of Use</a>, and <a href='/about-us/privacy-policy/'>Privacy Policy</a>."/>
Unfortunately, the JSP is escaping my markup, and so you actually see the brackets, tags, etc. Is there an attribute I can add to make sure that the HTML is actually used as HTML?
Curiously, I have a struts radio group, and it is allowing markup just fine.
Just use HTML <label> tag and place checkbox along with text and links inside it. And use simple theme for the <s:checkbox> tag.
<label>
<s:checkbox name="iagree" fieldValue="true" theme="simple"/>
By entering, I acknowledge that I have read, understand, and agree to the
<a href='/rules.pdf'>Official Rules</a>,
<a href='/about-us/terms-of-use/'>Terms of Use</a>,
and <a href='/about-us/privacy-policy/'>Privacy Policy</a>.
</label>
I am currently developing a Web App under jQTouch, and I want to know how I should proceed to redirect the user automatically to another page of my Web App.
For instance, let's suppose I have this code :
<div id="foo1">
...
</div>
<div id="foo2">
...
</div>
Now, let's suppose that the currently visible block is foo1. Which code should I write in my JavaScript file to redirect to block foo2 (as though I clicked a link with href="#foo2")?
Thanks and sorry for my English (I'm French).
You may use the jQT.goTo() to transfer to another page, e.g.
jQT.goTo('#foo2', 'slideup');
If you just want to trigger a click event on a link, you could use the click function in jQuery:
<a id="goToFoo2" href="#foo2">Go To Foo2</a>
<script>$("#goToFoo2").click()</script>
A standard link
Link
will not work, but you are on the right track, it just has to be in the correct setting (either a button, or a list). so either:
<ul class="rounded">
<li class="arrow">
Link
</li>
</ul>
or
<a class="button" href="#foo2">Link</a>
will work.