You certainly noticed the frequently updated news on our home page. The box contains news from 342 external sources - freediving portals (websites of AIDA INternational and some of their national branches, DeeperBlue.net, Freedive Central, Esprit Apnée, Plongeur, ...), major freediving websites, personal blogs of some prominent freedivers (i.e. Nitsch, Stepanek, Mifsud, ...), diverse freediving forums, and also headlines from some news agencies. The external websites are being scanned for news automatically every 10 minutes, so you get the up-to-date list of news every time you refresh our home page.
If you own or maintain a freediving related website, you can easily insert our freediving news feeds there too. Simply place the following code to the place you want it to appear on the page:
<script type="text/javascript" src="http://apnea.cz/feed.html"></script>
The news box comes with the default size of 200 x 300 pixels. This is the size of the inner box, together with the header and footer, the envelope is around 30 pixels higher. You can easily redefine the size by assigning the height (h) and width (w) in the URL call:
<script type="text/javascript" src="http://apnea.cz/feed.html?w=180&h=200"></script>
If you want to change the size of the text appearing in the news box, you can do it in this way:
<div style="font-size:60%"><script type="text/javascript" src="http://apnea.cz/feed.html?w=180&h=200"></script></div>
Another possibility to change the formatting, including colors, background colors, alignment, padding, etc., is by redefining the style sheet. Download the default CSS file apnea.cz.css, modify as needed, and place it in the same directory as the page where you use our news feed. Do not link or add any CSS in your code! Simply placing the modified apnea.cz.css into the same directory as your page is sufficient. You do not need adding the css file if you do not plan modifying it, or if you do not understand CSS.
Not only you can entirely redefine the look of the box with the help of the CSS file, but by assigning filter keywords (argument search), and the language (argument search), you can also display news about specific topic, from certain source(s) only, or in your language only. The argument size specifies how many news items will appear in the scrollable box (maximally 100). If you set the size argument high, it may slow down the loading of your page, especially if you decide to use several news boxes. By setting the argument brief to 1, the list will contain the headlines only (no dates, and no names of source websites).
By default, headlines of news and articles from news websites and blogs will be listed. If you want to show new messages in several freedving forums, you can set the parameter cat=forum. If you want to have both news and forum posts in the same box, use cat=all. There are also some other categories, such as cat=blog, cat=products, cat=news, or cat=articles. In the filter expression search, you can use simple keywords and logical expression too. See some examples below:
<div style="font-size:80%"> <script type="text/javascript" src="http://apnea.cz/feed.html?w=250&h=80&lng=FR&cat=forum&brief=1&size=5"></script> </div>
<script type="text/javascript" src="http://apnea.cz/feed.html?w=300&h=120&search=shark-freediving+OR+deeperblue&size=20"></script>
<script type="text/javascript" src="http://apnea.cz/feed.html?w=180&h=200&lng=EN&search=nitsch+AND+NOT+deeperblue"></script>
You can use multiple boxes on the same page, and each can be set with different parameters. In this way you can have boxes with news in different languages, from different sources, or about different topics.
We recommend using the UTF-8 character encoding in the HTML header of your page, otherwise characters in some languages may not display properly in the news box. If you cannot change the encoding of your page, you may prefer filtering the news by the method mentioned above - either with a search expression, or by specifying the English language only.
Another possibility is specifying the character set used on your page in the news feed call URL as shown below. If you are unsure what character set you use, look at the HTML code of the page - the charset specification is usually visible in one of the first lines of the HTML header. If there is no such setting, add the following line just under the >head< tag:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
In the following way you can force the news feed to display in your respective character set, but keep on mind that some foreign character sets such as cyrilic, or chinese traditional texts will be partially discarded (that's still better though than having broken characters on the screen). Only the UTF-8 charset supports all languages simultaneously
<script src="http://apnea.cz/feed.html?w=150&h=200&size=20&charset=iso-8859-1" type="text/javascript"></script>
You should also specify the DOCTYPE tag at the very top of your page. Without it, diverse browsers interpret CSS formatting often very differently, and you might have problems with the box size formatting. It was tested with the following DOCTYPE, but some others will also work:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">