MyCV Readme file Luis A. Leiva Jun 18 2010 ------------------------------------------------------------------------ MyCV is an easy-to-use web-based framework to create a showcase CV. Requests, discussions and suggestions for improvements can be sent by email to luileito [AT] doctor.upv.es. 1. Directory structure /bib Your bibliographies /css MyCV Base styles /docs Your custom documents (images, documents, etc.) /js MyCV Base scripts /plugins MyCV Plugins (JavaScript add-ons) /sys MyCV System files, classes, etc. /themes MyCV Themes /widgets MyCV Widgets (PHP add-ons) config.php Your configuration file index.php MyCV loader file mycv.dtd DTD for validating your CV file favicon.ico Site icon (see http://en.wikipedia.org/wiki/Favicon) example.xml A sample CV file, with commented examples of formatting 2. Requirements Your web server needs PHP 5 with DOM support. See: http://www.php.net/manual/en/book.dom.php A lite version was developed some time ago. It used the simplexml library instead, however it did not validate the XML source nor there were class interfaces. For that reason it is deprecated and no longer maintained. 3. Customizing MyCV class Just extend the class and override its methods on index.php; e.g.: class CustomCV extends MyCV { function getBirthDay(DOMElement $node) { echo "Born in " . parent::getBirthDay($node); } function getAddress(DOMElement $node) { echo "Living in " . parent::getAddress($node); } function pageStarts() { parent::pageStarts(); echo '
© '.date("Y").' John Doe, ltd.
'; parent::pageEnds(); } } // Then... $mycv = new CustomCV("example.xml"); $mycv->render(); // MyCVLite class does not use DOM, class interfaces, // neither validates the loaded XML file against DTD 4. Plugins vs Widgets Plugins are composed of just JavaScript and CSS files. Their goal is to manipulate the page DOM *after* the page is fully rendered, and does not allow custom configuration (it only would be possible by manually editing the corresponding files of the plugin directory). Widgets are composed of PHP files (as well as JavaScript and CSS, if necessary). Their goal is to manipulate the page DOM *before* the page is fully rendered, and provide a basic interface to configure (some of) their properties. This way, a table of contents (TOC) is better to be deployed as a plugin, since typically it will traverse the page headings, create 'virtual' anchors, and add the TOC as an HTML element, usually a (unordered or ordered) list. On the other hand, if one wish to display a header image then a widget will be the better choice, since the user would need to specify wich image should be loaded. ------------------------------------------------------------------------ end of MyCV Readme file