Thread: Portal Software - [Chris] Reviews
View Single Post
  #153  
Old 05-28-2013, 04:37 AM
Christos Teriakis Christos Teriakis is offline
 
Join Date: Jul 2011
Location: Thessaloniki, Greece
Posts: 1,228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CharlieDelta View Post
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();
Reply With Quote
Благодарность от:
CharlieDelta
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01111 seconds
  • Memory Usage 1,788KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_box_bit
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete