Functionalities added to BibAdmin whose code given below: * Main Keyword Cloud * Keyword Clouds * Author Photo Cloud * Coauthor Graph * Journal and Conference Clouds * Program Page * Keyword Definition === Main Keyword Cloud === in index.php ************************** echo "
|
";
$thelinkid=@mysql_connect("$host","$login_user_db","$login_pass_db");
$res = mysql_db_query($db_bibliography, "SELECT * FROM $tb_keywords ORDER BY `name` ASC;");
$maxnb=0;
while ($row=mysql_fetch_object($res )) {
$newnb = mysql_num_rows(mysql_db_query($db_bibliography, "SELECT * FROM $tb_pub_to_keyw WHERE `id_keyw`='".$row->id."';"));
if ($newnb>$maxnb){
$maxnb=$newnb;
}
}
$res = mysql_db_query($db_bibliography, "SELECT * FROM $tb_keywords ORDER BY `name` ASC;");
while ($row=mysql_fetch_object($res )) {
$res2 = mysql_db_query($db_bibliography, "SELECT * FROM $tb_pub_to_keyw WHERE `id_keyw`='".$row->id."';");
$coeff = mysql_num_rows($res2);
echo "name)."\" class=\"level".(floor(10*log(1+$coeff)/log(1+$maxnb )))."\">".str_replace(" ","-",$row->name)."(".$coeff.") ";
}
echo "
";
**************************
It uses the following CSS code for "petitnuage2":
++++++++++++++++++++++++++
.petitnuage2 {line-height:18px;font: normal small verdana, arial, helvetica, sans-serif; text-align: justify; border:0px #B6CDE1; padding:10px; position:relative;
width:100%}
.petitnuage2 a {text-decoration:none}
.petitnuage2 a:hover {color: white; background-color: #668AA8;}
.petitnuage2 a.level0 {font-size:8px;color:#DFDFDF;}
.petitnuage2 a.level1 {font-size:9px;color:#B8C9D6;}
.petitnuage2 a.level2 {font-size:10px;color:#668AA8;}
.petitnuage2 a.level3 {font-size:11px;color:#47657B;}
.petitnuage2 a.level4 {font-size:12px;color:#E76300;}
.petitnuage2 a.level5 {font-size:13px;color:#E76300;}
.petitnuage2 a.level6 {font-size:14px;color:#E76300;}
.petitnuage2 a.level7 {font-size:15px;color:#E76300;font-weight: bold}
.petitnuage2 a.level8 {font-size:16px;color:#E76300;font-weight: bold}
.petitnuage2 a.level9 {font-size:17px;color:#E76300;font-weight: bold}
.petitnuage2 a.level10 {font-size:18px;color:#FF3300;font-weight: bold}
.petitnuage_titre {font: normal small verdana, arial, helvetica, sans-serif; font-size:10px;color:gray; font-style:italic;}
++++++++++++++++++++++++++
=== Keyword Clouds ===
in show.php, in the part about author pages, after the "titlu" line:
**************************
$kwarray=array();
$res = mysql_db_query($db_bibliography, "SELECT * FROM $tb_pub_to_auth WHERE id_author='".$author_id."';");
while ($row = mysql_fetch_object($res)){
$ress2 = mysql_db_query($db_bibliography,"SELECT * FROM ".$tb_pub_to_keyw." WHERE id_pub=".$row->id_pub.";");
while ($row2 = mysql_fetch_object($ress2)){
if (array_key_exists($row2->id_keyw,$kwarray)){
$kwarray[$row2->id_keyw]++;
} else {
$kwarray[$row2->id_keyw]=1;
}
}
}
$maxnb=0;
$thekeywords=array();
foreach ($kwarray as $word_id => $value) {
$ress=mysql_db_query($db_bibliography,"SELECT * FROM ".$tb_keywords." WHERE id=".$word_id.";");
while ($row = mysql_fetch_object($ress)){
$thekeywords[$row->name]=$value;
if ($value>$maxnb){$maxnb=$value;}
}
}
function insensitive_uksort($a,$b) {
return strtolower($a)>strtolower($b);
}
uksort($thekeywords, "insensitive_uksort");
if (count($thekeywords)>0){
titlu("center", "$subt_col", "000000", "Associated keywords".$top_btn);
echo "
| |
|
|
|
|
";
$linkid=@mysql_connect("$host","$login_user_db","$login_pass_db");
$res = mysql_db_query($db_bibliography, "SELECT * FROM $tb_authors WHERE `picture`!='' ORDER BY `name` ASC;");
if (mysql_num_rows($res) > 0){
while ($row=mysql_fetch_object($res )) {
$res2 = mysql_db_query($db_bibliography, "SELECT * FROM $tb_pub_to_auth WHERE `id_author`='".$row->id."' AND `tip`='a';");
$coeff = 0;
while ($row2=mysql_fetch_object($res2)) {
$res3 = mysql_db_query($db_bibliography, "SELECT * FROM $tb_pub_to_auth WHERE `id_pub`='".$row2->id_pub."' AND `tip`='a';");
$coeff += 10/mysql_num_rows($res3);
}
if ($coeff>0){
echo "id.
"\">
Authors present in the database (size representing the number of publications, weighted by the number of coauthors on each publication)
|
|
";
$res = mysql_db_query($db_bibliography, "SELECT DISTINCT booktitle FROM $tb_publications WHERE entry_type='$entry_type' ORDER BY booktitle ASC;");
while ($row = mysql_fetch_object($res )){
$res2 = mysql_db_query($db_bibliography, "SELECT * FROM $tb_publications WHERE `booktitle`='".mysql_real_escape_string($row->booktitle)."';");
$coeff = mysql_num_rows($res2);
echo "booktitle)."\" class=\"level".(2*$coeff)."\">";
if (strpos($row->booktitle,")")){
$text=str_replace(")","",str_replace("(","",strstr($row->booktitle,"(")));
echo str_replace(" ","-",$text)."(".$coeff.") ";
} else {
echo str_replace(" ","-",$row->booktitle)."(".$coeff.") ";
}
}
echo
"
|
|
";
$res = mysql_db_query($db_bibliography, "SELECT DISTINCT journal FROM $tb_publications WHERE entry_type='$entry_type' ORDER BY journal ASC;");
while ($row = mysql_fetch_object($res )){
$res2 = mysql_db_query($db_bibliography, "SELECT * FROM $tb_publications WHERE `journal`='".mysql_real_escape_string($row->journal)."';");
$coeff = mysql_num_rows($res2);
echo "journal)."\" class=\"level".min(10,($coeff))."\">";
if (strpos($row->journal,")")){
$text=str_replace(")","",str_replace("(","",strstr($row->journal,"(")));
echo str_replace(" ","-",$text)."(".$coeff.") ";
} else {
echo str_replace(" ","-",$row->journal)."(".$coeff.") ";
}
}
echo
"
|
| name."\" title=\"Show publications on ".$row->name."\" class=\"subl\">".$row->name." |
|
".$row->about."
";
if (mysql_num_rows($res2)>1){
echo " name."\">".mysql_num_rows($res2)." publications in the database mention ".$row->name." ";} else{ echo " name."\">".mysql_num_rows($res2)." publication in the database mentions ".$row->name." "; } echo " |