How to integrate this line in TYPO3
I tried
<link rel="preconnect" href="https://fonts.gstatic.com">
page.includeCSS {
file1 = https://fonts.gstatic.com
file1.external = 1
file1.preconnect = 1
}
but file1.preconnect not working correctly.
The URL is only partly transferred: https://....org/artikel/
Any idea how to solve this? Any other information needed?
Latest TYPO3 version 7.6.11, tx_news 5.2 and rx_shariff 9.0.0
Thanks for your help.
My problem was the canonical tag the missing addQueryString (thanks for the hint to Georg Ringer)
Here is my working code:
page.headerData {
700 = TEXT
700 {
stdWrap.typolink.parameter.data = TSFE:id
stdWrap.typolink.forceAbsoluteUrl = 1
stdWrap.typolink.returnLast = url
stdWrap.typolink.parameter.intval = 1
stdWrap.typolink.useCacheHash = 1
stdWrap.typolink.addQueryString = 1
stdWrap.typolink.addQueryString.method = GET
stdWrap.typolink.addQueryString.exclude = id, cHash
htmlSpecialChars = 1
wrap = <link href="|" rel="canonical" />
}
}
I'm using TYPO3 7.6.3with the great News-Extension from Georg Ringer news 4.1.0.
I need the Tag-Search from tx_newsas a Select-Box, so I include the Plugin and change the Template /EXT:myext/Resources/Private/Extensions/News/Templates/Tag/List.html from a ul/li-List to the selectbox. This part is working fine!
But I need this select-box not as a Content Element, I need it at my Footer-Navigation, which I made with TypoScript. How can I use the tx_news-Template (Tag/List.html) into my Footer-Partial?
Here's the screen:
My version of the tag-list .. as a search box
I'v tried it like this ..
...
20 = CONTENT
20 {
table = tx_news_domain_model_tag
select {
selectFields = tx_news_domain_model_tag.title
orderBy = tx_news_domain_model_tag.title asc
### pid folder 'tags'
pidInList = 32
}
renderObj = COA
renderObj {
10 = TEXT
10.field = uid
10.wrap = <option value="|">
10.wrap.insertData = 1
20 = TEXT
20.field = title
20.wrap = |</option>
20.wrap.insertData = 1
}
}
20.wrap = <form method="get" action="/index.php"><input type="hidden" name="id" value="17" /><select name="tx_news_pi1[overwriteDemand][tags]"><option value="" selected>Tag Suche</option>|</select></form>
...
and it works (thanks colin!)!
Also helpful: https://www.auxnet.de/typo3-datenbankabfragen-mit-typoscript/
I'm trying to share a URL from a flash as3 website, and i can't make it work quite properly...
I tried both ways given here : How to create a share button in AS3
First one works :
import flash.net.navigateToURL;
import flash.net.URLVariables;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
share_btn.addEventListener(MouseEvent.CLICK, shareClickHandler);
function shareClickHandler(evt:MouseEvent):void
{
var varsShare:URLVariables = new URLVariables();
varsShare.u = 'http://domain.com/pageN.html';
varsShare.t = 'Title Page';
var urlFacebookShare:URLRequest = new URLRequest('http://www.facebook.com/sharer.php');
urlFacebookShare.data = varsShare;
urlFacebookShare.method = URLRequestMethod.GET;
navigateToURL(urlFacebookShare, '_blank');
}
But, the post says :
In order to use a picture add the following Metatags:
<meta name="title" content="my title" />
<meta name="description" content="my description" />
<link rel="image_src" href="images/thumbnail_image.jpg" />
But HOW ????
The second solution shows how to add parameters:
var req:URLRequest = new URLRequest();
req.url = "http://www.facebook.com/dialog/feed";
var vars:URLVariables = new URLVariables();
vars.app_id = "000000000000"; // your application's id
vars.link = "http://YourSite.com";
vars.picture = "https://www.google.com/intl/en_com/images/srpr/logo3w.png";
vars.name = "name name";
vars.caption = "caption caption caption";
vars.description = "description description description";
vars.message = "message message message message message";
vars.redirect_uri = "http://YourSite.com";
req.data = vars;
req.method = URLRequestMethod.GET;
navigateToURL(req, "_blank");
But it's NOT using the Facebook sharer.....
I tried many many different ways to combine both solutions but i get nothing but weird url not working...
Please, can someone help me with that, or show me how to use that second solution but with the sharer ?
Thanks a lot for any help
You need to add OpenGraph Meta Tags to the Page you are trying to share (http://domain.com/pageN.html in your example above`). The metatags you've given in your question should be added there so the Facebook Sharing Script can pick it up.
Add the below code between the <head> and </head> tags in your HTML code:
<meta name="title" content="my title" />
<meta name="description" content="my description" />
<link rel="image_src" href="images/thumbnail_image.jpg" />
what I usually do - I create a facebook application - Website with Facebook Login, add Apps domains, then in your html add this javascript function:
function postToFacebook(link){
var caption = encodeURIComponent("this is cool");
var name = encodeURIComponent("My cool Site");
var pathToPicture = "http://yoursite.com/coolpicture.jpg";
var redirect = "http://yoursite.com/redirect.html";
var id = "123456789098876"; // your application id
var theLink = link; // the link you want to share - this is passed as a variable from flash, similary you can pass any variables from flash
var fbencoded = "http://www.facebook.com/dialog/feed?app_id=" + id + "&link=" + theLink + "&picture=" + pathToPicture + "&name=" + name + "&caption=" + caption+ "&redirect_uri=" + redirect;
window.open(fbencoded, "_blank");
}
In flash whenever you want to share just call this javascript function and new window will be opened with facebook share window:
ExternalInterface.call("postToFacebook", "http://mysite.com/#/cool-page")
This way you can pass any vars to that function. For example you can have different pictures whenever someone is sharing, which would be impossible with just meta tags.....
Only thing is you have to create that redirect.html - which must be within your domain, that is linked to your application. In redirect you can have something simple as this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<meta http-equiv="REFRESH" content="0;url=http://www.facebook.com">
</head>
<body>
</body>
</html>
It would just redirect the user to facebook.
Hope this helps.
This is the way I got to use the Share Dialog from a button in AS3. I hope it helps you
import flash.net.navigateToURL;
share_btn.addEventListener(MouseEvent.CLICK, shareClickHandler);
function shareClickHandler(evt:MouseEvent):void
{
var fb_title = "titulo";
var fb_desc = "descripcion";
var fb_url = "http://mibff.com.mx/";
var fab_img = "http://mibff.com.mx/MiBFF_new.jpg";
var facebookSharer:String = "http://www.facebook.com/sharer.php?s=100&p[title]=" + fb_title + "&p[summary]=" + fb_desc + "&p[url]=" + fb_url + "&p[images][0]=" + fab_img;
var jscommand:String = "window.open('" + facebookSharer + "','win','width=626,height=316,toolbar=no,scrollbars=no,resizable=no');";
var sharer:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);");
navigateToURL(sharer,"_self");
//trace(facebookSharer);
}
I created my own custom template and backend layout.
Here is my backend layout code :
backend_layout {
colCount = 3
rowCount = 2
rows {
1 {
columns {
1 {
name = Solution 1
colPos = 1
}
2 {
name = Solution 2
colPos = 0
}
3 {
name = Solution 3
colPos = 2
}
}
}
2 {
columns {
1 {
name = Products 1
colPos = 3
}
2 {
name = Products 2
colPos = 4
}
3 {
name = Products 3
colPos = 5
}
}
}
}
}
Here is my custom template, I just have included the section of html file :
<div class="row" id="solution">
<!-- ###SOLUTIONLEFT### Start-->
<!-- ###SOLUTIONLEFT### End-->
<!-- ###SOLUTIONMID### Start-->
<!-- ###SOLUTIONMID### End-->
<!-- ###SOLUTIONRIGHT### Start-->
<!-- ###SOLUTIONRIGHT### End-->
</div>
<div class ="row" id="product">
<!-- ###PRODUCTLEFT### Start -->
<!-- ###PRODUCTLEFT### End -->
<!-- ###PRODUCTMID### Start -->
<!-- ###PRODUCTMID### End -->
<!-- ###PRODUCTRIGHT### Start -->
<!-- ###PRODUCTRIGHT### End -->
</div>
My page template code is :
page.10.subparts {
SOLUTIONLEFT< styles.content.getLeft
SOLUTIONMID< styles.content.get
SOLUTIONRIGHT< styles.content.getRight
PRODUCTLEFT < styles.content.getLeft
PRODUCTMID < styles.content.get
PRODUCTRIGHT < styles.content.getRight
}
I am trying to display product page info in second row. I am not able to do. So how to display it. Am I following proper way for creating template in typo3?
Can i do something like PRODUCTLEFT = style.content.getLeft.select = where row = 1 to display content from second row in backend?
You are nearly correct. You just need to specify the colPos from the Backend Layout of the content you want to assign to a subpart in your TypoScrip:
page.10.subparts {
...
PRODUCTLEFT < styles.content.get
PRODUCTLEFT.select.where = colPos=3
...
}
styles.content.get styles.content.getLeft and styles.content.getRight are just preconfigured for the default colPos configuration TYPO3 shipps out of the box (0, 1 and 2).