function testRelatedTags() { $page = new folksoPage(38065); $this->assertTrue(is_string($page->RelatedTags(8170)), 'RelatedTags method does not return string'); $this->assertPattern('/cloudclass/', $page->RelatedTags(8170), 'RelatedTags does not produce a tag cloud'); }
<?php include_once 'folksoPage.php'; $page = new folksoPage(); $page->visit_resource($page_titre);
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <?php require_once 'folksoPage.php'; require_once 'folksoPageData.php'; $tagreq = strip_tags($_GET['tag']); if (strlen($tagreq) == 0 || strlen($tagreq) > 300) { die("Requête malformée, tag impossible"); } $page = new folksoPage($tagreq); $taglist = $page->TagResources(); ?> <head> <title>Fabula - Tag: <?php echo $page->title; ?> </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Language" content="fr-FR"/> <meta name="url" content="http://www.fabula.org/equipe.php"/> <meta name="verify-v1" content="zDUx4LU7GN3oeJAXLECA+BLOsYqjbBiaZwASPrPTcTs="/> <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://www.fabula.org" r (cb 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.fabula.org" r (n 0 s 0 v 0 l 0))'> <meta name="revisit-after" content="7 days"/> <meta name="distribution" content="Global"/> <meta name="author" content="Équipe de recherche Fabula"/> <meta name="description" content="Fabula, actualités et ressources pour les études littéraires : revue, annonces de colloques et d'appels à contribution, parutions, comptes rendus critiques, forums et débats"/> <meta name="keywords" content="Fabula, colloques, revues, acta, fiction, bibliographies, livres, auteurs, actualités, littératures, critique, lettres, littéraires, chercheurs, literature, genres, auteur, réception, représentation, mimésis, mimesis, analysis, criticism, theory, textes, stylistique, narratologie, herméneutique"/> <link rel="search" type="application/opensearchdescription+xml" title="Fabula" href="http://www.fabula.org/opensearch_fabula.xml"/> <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/>
list-style-type: none; } ul.cloudlist li { display: inline; padding-right: 1em;} .cloudclass1 {font-size: 10pt} .cloudclass2 { font-size: 12pt} .cloudclass3 { font-size: 14pt} .cloudclass4 { font-size: 16pt} .cloudclass5 { font-size: 18pt} </style> </head> <body> <div id="container"> <h1>Un nuage de tags</h1> <?php require_once 'folksoPage.php'; if ($_GET['demouri']) { $p = new folksoPage(); $pg = $p->format_cloud(0, $_GET['demouri']); if ($pg->is_valid()) { print $pg->html; } else { print $pg->status; } } ?> </div> </body> </html>