Welcome, Guest. Please login or register.
Did you miss your activation email?
May 16, 2012, 10:06:23 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155094 Posts in 21661 Topics by 7721 Members
Latest Member: arrow345
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Citation snippet  (Read 1700 times)
doc
Guest
« on: February 04, 2007, 04:02:57 PM »

Hi,

just finished a citation snippet which allows to display german citations from http://www.zitate-online.de/.

To install the module, go to the Addons page in the backend of WebsiteBaker and upload it as usual. Once the upload is finished, you can use the new function: display_citation().

Options available:
echo display_citation(1);  ... citation of the day (only text)
echo display_citation(2);  ... citation of the day (text + author image)
echo display_citation(3);  ... random citation (only text)
echo display_citation(4);  ... random citation (text + author image)

Adding CSS to your template
As I like modules which creates valid HTML, XHTML, I decided to outsource the required CSS definitions for displaying the citation to the external file: citation.css (/modules/citation). As WB is not able (at least up to v2.6.5) to import CSS definitions on the fly into the <head> section of index.php in your template folder, you need to do this manually.

Two way to achieve this:
1) copy all CSS definition in citation.css to the CSS file of your template
2) add the following code line to the index.php file of your template (between <head> and </head>

Code:
  <link href="<?php echo WB_URL ."/modules/citation/citation.css"?>" rel="stylesheet" type="text/css" media="screen" />

Have fun
Regards Christian

[Edit 7. Feb. 07]
Attachment removed. Download latest version from miscellaneous section at addons repository http://addons.websitebaker.org/pages/modules.php
« Last Edit: November 04, 2008, 08:03:32 PM by doc » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7970



WWW
« Reply #1 on: February 05, 2007, 07:19:57 PM »

Hello,

thanks doc, again a very nice snippet for WB. Added it to the addons repository in the miscellaneous category. Unfortunately it seems only to be a snippet for german speaking people.

Matthias
Logged
doc
Guest
« Reply #2 on: February 05, 2007, 07:26:53 PM »

Hi,

if anybody knows a website like http://www.zitate-online.de, which provides citations in languages other than German, let me know (prefer english). I will than try to integrate that into the snippet.

Regards Christian
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6974


WWW
« Reply #3 on: February 05, 2007, 08:59:07 PM »

Check out this one here: http://www.aphids.com/quotes/index.shtml

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

doc
Guest
« Reply #4 on: February 05, 2007, 09:04:50 PM »

Hhm, not exactly what I was thinking about. The website http://zitate-online.de provides a service which creates random citations with a image of the author, as well as the citation of the day.
A similar service like this would make things more easy to integrate, but a first comment what is good  smiley

Regards Christian
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!