TYPO3 Reea Blog

This will be shown to users with no Flash or Javascript.

Facebook like, Twitter, FB Comment (full path)


lib.facebook = COA_INT
lib.facebook {
	10 = TEXT
	10.typolink.parameter.data = TSFE:id
	10.typolink.returnLast = url
	10.typolink.rawUrlEncode = 1
	#10.typolink.useCacheHash = 1
	10.typolink.addQueryString = 1
	10.typolink.addQueryString.method = GET
	10.typolink.addQueryString.exclude = id
	10.dataWrap = {TSFE:baseUrl}|
	#10.typolink.forceAbsoluteUrl = 1
	wrap = <div class="fb-like" data-href="|" data-send="true" data-layout="button_count" data-width="200" data-show-faces="false"></div>
}

lib.twitter = COA_INT
lib.twitter {
	10 = TEXT
	10.typolink.parameter.data = TSFE:id
	10.typolink.returnLast = url
	10.typolink.rawUrlEncode = 1
	#10.typolink.useCacheHash = 1
	10.typolink.addQueryString = 1
	10.typolink.addQueryString.method = GET
	10.typolink.addQueryString.exclude = id
	10.dataWrap = {TSFE:baseUrl}|
	#10.typolink.forceAbsoluteUrl = 1
	wrap = <a href="|" class="twitter-share-button" data-lang="de">Twittern</a>
}

lib.facebookComment = COA_INT
lib.facebookComment {
	10 = TEXT
	10.typolink.parameter.data = TSFE:id
	10.typolink.returnLast = url
	10.typolink.rawUrlEncode = 1
	#10.typolink.useCacheHash = 1
	10.typolink.addQueryString = 1
	10.typolink.addQueryString.method = GET
	10.typolink.addQueryString.exclude = id
	10.dataWrap = {TSFE:baseUrl}|
	#10.typolink.forceAbsoluteUrl = 1
	wrap = <div class="fb-comments" data-href="|" data-num-posts="2" data-width="500"></div>
}

Facebook share and thumbnails

page.config.absRefPrefix < config.baseURL

Facebook new exemple


# get URL of the page
temp.getLink = COA
temp.getLink {
	10 = TEXT
        10.wrap = http://|/
        10.data = getIndpEnv: HTTP_HOST
        10.rawUrlEncode = 1
        20 = TEXT
        20.typolink.parameter = {page:uid}
        20.typolink.parameter.insertData = 1
        20.typolink.addQueryString = 1
        20.typolink.returnLast = url
        20.rawUrlEncode = 1
}

# get subtitle/title of the page
temp.getTitle = COA
temp.getTitle {
        10 = TEXT
        10.data = page : subtitle // page : title
        10.insertData = 1
        10.rawUrlEncode = 1
}

# make the share link with icon and text
temp.socialBookmarks = COA
temp.socialBookmarks {
    # Facebook
    10 = COA
    10 {
        10 = COA
        10.htmlSpecialChars = 1
        10.wrap = <li><a href="|" target="_blank">
        10 {
            10 = TEXT
            10.value = http://www.facebook.com/share.php
            20 = COA
            20.wrap = ?u=|
            20 {
            	10 < temp.getLink
            }
            30 < temp.getTitle
            30.wrap = &title=|
        }
        
        20 = IMAGE
        20.file = fileadmin/templates/eriksverden/icons/art-facebook.png
        20.altText = Del på Facebook
        20.titleText = Del på Facebook
        20.params = class="facebook"        

        30 = TEXT
        30.value = <span>Facebook</span></a></li>
    }
    #Just repeat for Technorati etc.
}
blog comments powered by Disqus