How to make twitter links open in a new window - html

On my site the twitter links open in the parent window. I can't find any reference to the links in the HTML any ideas how to make them open in a new window?
www.wefewlondon.com
Thanks

The tweet markup is generated by the jQuery.tweet plugin. They explain how to achieve the desired outcome in example #6 on their homepage.
Effectively, all you need to do is add this line at line 33 of your main.js:
$(this).find("a").attr("target","_blank");

I looked at your javascript/lib/jquery.tweet.js file.. look at the
return ""+escapeHTML(text)+"";
part... add "target="_blank" and that should do it
return "<a href=\""+escapeHTML(url)+"\ target=_blank>"+escapeHTML(text)+"</a>";

Where the link is written, for example here:
$2
You can append the target attribute:
$2

Related

Blogger Soho theme: How to modify function of Jump Link button?

I am using the Blogger SOHO theme for my Blog:
https://www.firozemistry.com
In the Featured Post, clicking on the Jump Link "Open" opens the page after the first line of text. How do I modify the HTML code to make the Jump Link open the page right at the top?
I have tried poking around in the HTML code of Featured Post widget, but I can't figure out how to do it.
I am a novice, and not well versed in HTML, so I would be most grateful in any help. Thanks in advance!
Regards,
Firoze
Go to Theme > Edit HTML
Click anywhere inside the code area and press CTRL + F
Search for fragment "more" and remove it
Update
Put this code before </body> tag to remove #more from link href
<script>
var link = document.querySelector('.jump-link a');
link.href = link.href.replace('#more', '');
</script>

Change title of Keycloak login

I want to know how to change title on login page via Keycloak?
The easiest way is to change the following line in themes/base/login/messages/messages_[your_language].properties.
loginTitle=Log in to {0}
However, I suggest you should read the official document and create your original theme.
You can change to themes[your theme]\login\resources\css\login.css
You can add like this
/* Title */
#kc-page-title::after {
content: " to MyHomeLogin"
}
I suggest the following if you are working with a custom theme.
Go to themes/base/login.
Copy the file template.ftl
Go to themes/custom/login -> 'custom' or the name of your theme
Paste the template.ftl file there
Open template.ftl
Search for the element
Replace the content with your desired text
Save it and reload the page
I prefer this method because it only overwrites the base theme at runtime without making any changes to the base theme directly. Thanks.

How to style Twitter widget using my own CSS

I have my own design for a Twitter feed and I want to style the default feed using my own design. Is there a way to do that?
The issue is that you can't use the CSS selectors because it appears only after the loading the page.
Please check this pic to give you more idea about what I need
Thanks,
Well, You can customize Your twitter widget by doing something like this:
Default Code
<a class="twitter-timeline" href="Pagelink" data-widget-id="Page ID">Tweets by #Test</a>
To remove Header footer, Just add data-chrome="nofooter transparent noheader transparent" and it will look something like this:
<a class="twitter-timeline" href="Pagelink" data-widget-id="Page ID" data-chrome="nofooter transparent noheader transparent">Tweets by #Test</a>
For more customization like link color, Borders etc refer to this article. https://dev.twitter.com/docs/embedded-timelines#customization
I hope this helps :)
1# Getting a fully customisable timeline like suggested earlier (by using the API), would require that you fetch the timeline as a json file (https://api.twitter.com/1.1/statuses/home_timeline.json) and manually loop them in your display. More details here https://dev.twitter.com/rest/reference/get/statuses/home_timeline
2# This is as close as I could come with your design #shadeed9. Most of the restrictions are here https://dev.twitter.com/overview/terms/display-requirements
3# This JS snippet will let you add custom CSS styles to the Twitter embed widget: https://github.com/kevinburke/customize-twitter-1.1 by Kevin Burke
If this solves your question, kindly accept it!
If by twitter widget you mean the embedded timelines, then see the "client side options" section of the docs https://dev.twitter.com/docs/embedded-timelines for options that you can set.
If you want totally customised output using CSS, then you'll need to write your own solution using the API to spit out content that can be styled.

Embedding Gist into Blogger not working

I have the following gist...
https://gist.github.com/4445255
I try adding it to my Blogger entry (per here) into my post by adding this to the very end...
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>
finally in position I add
<div class="gistLoad" data-id="4445255" id="gist-GistID">Loading ....</div>
But it just shows loading...
The script you just referenced (gistLoader.js) contains a call to the function initGist(), which I do not see anywhere.
It is also looking for a DOM element by the id "gistPrinter", when the element you have created has an id of "gist-GistID".
I'm not familiar with gist, maybe someone else can correct me.
EDIT: I found initGist() here: https://raw.github.com/moski/gist-Blogger/master/public/gistBlogger.js
I hadn't yet converted my project over to a Dynamic View. So I went to Template>Dynamic View.
There is a little issue, saving formatting only seems to work in IE for dynamic views...
http://productforums.google.com/forum/#!topic/blogger/S_uVwRQQrOY%5B1-25-false%5D
You forgot to setup on of the attributes. It should look like this.
<div class="gistLoad" data-id="4445255" id="gist-4445255">Loading ....</div>
I had recently found this issue wherein the gist was not loading after putting the embed url eg
<script src="https://gist.github.com/dishabhatt123/43e98122304000687293b4c3ef3dc474.js"></script>
directly into the HTML view of my blog. Here is what has finally helped me after grilling down.
Basically browsers does not support random included scripts hence using rawgist. Place the below script on the top of bottom of the page.
<script src="https://rawgit.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>
Then, add the div as under:
<div class="gistLoad" data-id="43e98122304000687293b4c3ef3dc474" id="gist-43e98122304000687293b4c3ef3dc474">Loading or something, this is just text to display while the browser pulls the gist....</div>
Here, in the above div, data-id ="whereveryourgistidis" and id="gist - whereveryourgistidis"
In the above example of embed url, my gist Id is '43e98122304000687293b4c3ef3dc474'. You can replace it with your gist id from the embed url.
Please Note: you will not see the gist in 'Compose view'. But when you preview your blog, you can see it!!

Cakephp Link is not recognized in HTML

I generate in Cakephp with Html->link a link
echo $this->Html->link('Download',array(
'plugin'=> 'galleries',
'controller'=> 'galleries',
'action'=> 'download',
$download),array('class'=>'down'));
The output is
Download
This link is not recognized. I can not click on it.
But if I put the output link and implement it in the HTML code, all is fine
After this I tried to echo the link - same problem.
This is a snippet from my view
<nav>next<?php if($download){ echo $this->Html->link('Download',array('plugin' => 'galleries', 'controller' => 'galleries','action' => 'download', $download),array('class'=>'down')); } ?>prev</nav>
Maybe somebody can give me a little hint?
Solution:
It was not a PHP Problem but CSS Problem... specially a z-index Problem in my Jquery Plugin (ImageViewer) rolleyes
The schemata of the HTML is:
<article><div class="info"><nav></nav</div></article><article><div class="info"><nav></nav</div></article><article><div class="info"><nav></nav</div></article>
The Problem were the nav tags in every article tag. The "prev&next" links appear in every nav structure but not the "download" link. ergo: i can click on the "prev&next" links but not on the "download" link... So, for a fast solution i set the z-index for my current article view. But i must rework my HTML Code structure
Thanks for reading my question.