Quote:
Originally Posted by CharlieDelta
Thanks Chris. Disabling the forum side block has worked. And yes it did appear in the default template.
|
If it appears even in your default template, then is better to keep my mouth close, and not because I admit that there is something wrong in my code.
In anycase, as I don't like to let you in the middle of the way, you can use the follow procedure to have the the widget/block appearing in your site:
1.- At Admincp-> Styles & Templates-> Style Manager-> Edit Templates-> CSS Templates add to additional.css
Code:
.minigraph {
float:{vb:stylevar left};
background-color:#cecece;
border: 1px solid #003366;
position:relative;
width:70px;
padding:0
}
.minigraph .minibar {
display:block;
position:relative;
background-image:url(christeris/reviews/images/bargraph.gif);
background-position:{vb:stylevar left} center;
background-repeat:repeat-x;
border-{vb:stylevar right}:1px solid #003366;
text-align:center;
color:#fff;
height:14px;
font-family:Arial, Helvetica, sans-serif;
font-size:8pt;
line-height:1.4em
}
.minigraph .minibar span {
position:absolute;
{vb:stylevar left}:1em
}
2.- Forget the code that exists in Widget_Block_Latest_Reviews.txt and use the code:
Code:
$maxreviews = 5;
global $db, $vbulletin, $vbphrase, $vboptions;
ob_start();
$qry = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."reviews_reviews WHERE active=1 AND status=1 AND logo<>'' ORDER BY postdate DESC LIMIT $maxreviews");
while ($row = $db->fetch_array($qry)) {
$thisreviewid = $row["id"];
$thisreviewtitle = htmlspecialchars_uni($row["title"]);
$thisreviewlink = 'reviews.php?do=viewreview&reviewid='.$row["id"].'';
$thisreviewlogo = 'christeris/reviews/photos/thumbs/'.$row["logo"].'';
$thisreviewbarwidth = intval($row["adminrating"] * 10);
$thisreviewrating = intval($row["adminrating"]);
$thisreviewratingtitle = $vbphrase["reviews_rating_".$thisreviewrating.""];
$html .= '<div class="cms_widget_post_bit widget_post_bit">
<div class="cms_widget_post_userinfo widget_post_userinfo">
<div class="cms_widget_post_useravatar widget_post_useravatar">
<a class="comments_member_avatar_link" href="'.$thisreviewlink.'">
<img src="'.$thisreviewlogo.'" alt="'.$thisreviewtitle.'" /></a>
</div></div><div class="cms_widget_post_comment widget_post_comment">
<h4 class="cms_widget_post_header widget_post_header">
<a href="'.$thisreviewlink.'">'.$thisreviewtitle.'</a></h4>
'.$thisreviewratingtitle.'
<span class="rating" style="float:right;">
<div class="minigraph">
<strong class="minibar" style="width:'.$thisreviewbarwidth.'%"><b>'.$thisreviewrating.'</b></strong>
</div></span></div></div>';
}
$output = $html;
ob_end_clean();