Extension:TyntBackLinks

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
TyntInsight

Release status: stable

Implementation User activity
Description Automatically adds a link back to your site when your content is copied.
Author(s) André Mafei Bezerra (AndremafeiTalk)
Last version 0.1
MediaWiki 1.15.1
License No license specified
Download No link

Check usage (experimental)

Tynt Insight monitors when users copy content from your web site and automatically adds a link back to the original page when your content is pasted.

Example:
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi.


Read more: http://webmap.in/w/Index.php#ixzz0JSUnUmvQ


[edit] How to Install

1) Create an account on http://www.tynt.com/ and get your script.

2) Create the file '/extensions/TyntBackLinks/TyntBackLinks.php' with the source bellow.

3) Add to LocalSettings.php:

require_once( "$IP/extensions/TyntBackLinks/TyntBackLinks.php" );
$wgTyntBackLinksScript = '##########';


4) Replace the ########## with your script created on http://www.tynt.com/
Example:

require_once( "$IP/extensions/TyntBackLinks/TyntBackLinks.php" );
$wgTyntBackLinksScript = '<script type="text/javascript">tyntVariables = {"ap":"Leia mais: "};</script>
<script type="text/javascript" src="http://tcr.tynt.com/javascripts/Tracer.js?
user=dUwIuifWar349ladbiUt4I&amp;s=122&amp;lang=pb"></script>';

[edit] Source

PHP code for: /extensions/TyntBackLinks/TyntBackLinks.php


<?php
if ( !defined( 'MEDIAWIKI' ) ) {
        die( 'This file is a MediaWiki extension, it is not a valid entry point' );
}
 
$wgExtensionCredits['other'][] = array(
        'path'           => __FILE__,
        'name'           => 'Tynt BackLinks',
        'version'        => '0.1',
        'author'         => 'Andre Mafei Bezerra - created for http://webmap.in',
        'description'    => 'Inserts backlinks on the copied text using script by http://www.tynt.com/',
        'url'            => 'http://www.mediawiki.org/wiki/Extension:TyntBackLinks',
);
 
 
$wgHooks['SkinAfterBottomScripts'][]  = 'efTyntBackLinksHookText';
 
function efTyntBackLinksHookText(&$skin, &$text='') {
        global $wgTyntBackLinksScript;
        $text .= '<!-- Tynt BackLinks - start - http://www.mediawiki.org/wiki/Extension:TyntBackLinks -->' . $wgTyntBackLinksScript . '<!-- Tynt BackLinks - end -->' ;
        return true;
}
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox