.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ==================== EXT: Link Disclaimer ==================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed: 2007-11-28T09:06:37 :Classification: link_disclaimer :Description: link_disclaimer :Keywords: link_disclaimer :Author: Tor de Vries/EngenderHealth :Email: tdevries@engenderhealth.org :Info 3: :Info 4: .. _EXT-Link-Disclaimer: EXT: Link Disclaimer ==================== Extension Key: **link\_disclaimer** Copyright 2007, Tor de Vries/EngenderHealth This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **EXT: Link Disclaimer 1** **Introduction 1** What does it do? 1 Sample Screenshot 1 **Installation and Configuration 2** **Known problems 4** **To-Do list 4** **Changelog 4** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ The Link Disclaimer extension redirects external links to an internal “disclaimer” page, which informs the user that they are leaving the main site. The disclaimer page offers users the option of continuing to the external page, or returning to the previous page. The extension adjusts all the links on a page, including hardcoded links in the page templates, links to files on other web sites, and even non-HTTP protocol links such as ftp and news. Content editors do not have to make any special adjustments to links or the way they add/edit links on a page, because the extension will automatically modify external links as pages are published. The extension intelligently handles links that appear in either the same window or in a pop-up windows (via an HTML “target” attribute), although this feature requires JavaScript to be enabled in the visitor's browser. The configuration options allow you to set the disclaimer page to any page within your Typo3 site, define a list domains whose links are exempt from being redirected, and determine whether the disclaimer page uses JavaScript for its links. Installation requires access to the template configuration of your web site's home page, and perhaps some slight technical knowledge of TypoScript. It has been tested on Typo3 v3.8.0 and v4.1.3 installations, under Microsoft IIS and Red Hat Linux/Apache. It has been successfully tested with other link-modifying extensions (such as Dimitri Tarassenko's Google Analytics extension). However, your mileage may vary. This extension was originally developed by EngenderHealth (the leading international reproductive health organization working to improve the quality of healthcare in the world's poorest communities) after a major donor requested that several donor-supported web sites include legal disclaimers on links to external online resources. Since the sites were powered with Typo3, we created an extension for all the sites to use. For more information about EngenderHealth, please visit `www.EngenderHealth.org `_ . Immense thanks to Derek Ludwig for his contributions to the code. .. _Sample-Screenshot: Sample Screenshot ^^^^^^^^^^^^^^^^^ Below is a screenshot of a sample disclaimer page. Of course, you can customize it however you like. |img-1| .. _Installation-and-Configuration: Installation and Configuration ------------------------------ After installing the extension, create a new web page within your site's root page, with the following specifications. |img-2| Make the page title whatever you want; in this example, it is “Notice of External Link”. More importantly, make sure to *uncheck* “Hide Page”, and to *check* “Hide in menu”. This way, the page will be accessible without appearing in any navigation menus. Save the page, then create a block of content within the page: |img-3| The most critical parts of this content are the link references for “forward” and “back”. The forward link ***must*** use an HREF value of “/#link\_disclaimer\_forward” while the back link ***must*** use a value of “/#link\_disclaimer\_backward”. The example pictured above shows this in Typo3 without the graphical editor; however, you can create the links however you prefer. The Link Disclaimer extension will rewrite these specific links when presenting the disclaimer page. (Note: the forward slash at the beginning of these links is absolutely necessary!) Save the content block. Preview the page and remember its URL, such as “ `http://www.yourserver.com/index.php?id=635 `_ ”. You will need this information in a minute. Next, go edit the template of your web site's home page (or root page). You need to add three lines of TypoScript to the Setup field: |img-4| The three variables are: - **page.config.linkdisclaimer\_page** identifies the URL of the disclaimer page you created earlier. Do not include the full domain name, but only the rest of the URL. In the example above, we've used “index.php?id=635”. Since this installation of Typo3 uses the “?id=#” format instead of full-text URLs, we have to add an ampersand (&) at the end of the address. If this were a full-text URL without an existing question mark, we would replace the ampersand with a question mark. Additionally, we have inserted a slash (/) at the beginning of the address, to ensure that it links to the main index page, but this may be unnecessary (or even problematic) depending on your installation of Typo3. Remove the slash if you are getting “page not found” errors. - *Note: if this configuration variable is missing or commented out, the extension will not load.* - **page.config.linkdisclaimer\_exceptions** is a comma-separated list of domain names that will not be redirected to the disclaimer page. For example, your web site may link to a trusted partner's site, or to a parent company, and there is no legal reason to require the disclaimer. With the domains, do not include the protocol prefix (e.g. “http://”) but merely the domain name itself. Multiple domains can be listed if separated by commas, but do not include any spaces. You cannot specify particular pages on a web site with this list, only entire domains. - *Note: if you have no domain exceptions, you must still have the variable, but don't put any values after the equal sign (=).* - **page.config.linkdisclaimer\_javascript** is a “yes” or “no” setting. If set to “yes” (recommended), the extension will use JavaScript for the forward and backward links on the disclaimer page. In this case, the links will be able to intelligently handle external links that appear in new windows (due to a TARGET attribute on the original link), and will remove the disclaimer page from the browser's history when continuing on to an external link. If set to “no”, the extension will use direct URLs for the forward and backward links, which might be better for some visitors, but is not as useful. - *Note: if you leave this variable out, the extension will assume a “yes” value.* Save the template information, then clear Typo3's caches. As a logged- in user, you will not see any modified links; it only adjusts the links for non-logged-in users. So log out or access the web site from completely different browser (or computer!) to test it. .. _Known-problems: Known problems -------------- The extension assumes that your HTML links are well-formed, with double-quotes (not single-quotes) around the tag attributes and no spaces in the URL. For example: - Good: *`_ ” title=”Popular search engine” target=”\_blank”>* - Bad: ** If your links are not well-formed, they may not be processed properly by this extension. There is even a slim (but unlikely) chance they will be mangled beyond usefulness. The disclaimer page is forcibly *not cached* in Typo3. If it was, the forward/backward links would not get updated with subsequent visits. This slows down the loading of the disclaimer page. I do not recommend having a list of site exceptions more than five or six domains. Beyond that, I suspect it will noticeably delay page processing. .. _To-Do-list: To-Do list ---------- - Make the code more efficient. (As always!) - Add protocol- and page-specific exception lists. - Offer alternative disclaimer presentations (in a pop-up dialog box, for example). - Process TARGET attributes in different ways (e.g. suppress them site- wide, or always force them for external links) .. _Changelog: Changelog --------- v1.0.1 beta – v1.0 beta – first public release |img-5| EXT: Link Disclaimer - 4 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 172 .. :id: graphics1 .. :name: graphics1 .. :width: 559 .. |img-2| image:: img-2.png .. :align: left .. :border: 0 .. :height: 245 .. :id: graphics2 .. :name: graphics2 .. :width: 546 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 318 .. :id: graphics3 .. :name: graphics3 .. :width: 611 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 362 .. :id: graphics4 .. :name: graphics4 .. :width: 543 .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102