• Resolved TataVostru

    (@tatavostru)


    How can i display image from custom field inside GD Star Rathing

    I use a template for GD star Rathing:

    <div class="box_actori_vot">
    <div class="box_actori_img"><span class="nr_actor">%RANK_ID%</span>
    <img src="%IMAGE%"/></div>
    <div class="box_actori_title"><a href="%PERMALINK%">%TITLE%</a></div>
    <div class="box_actori_zodie"><b>Nota:</b>:%RATING% </div>
    <div class="box_actori_data"><b>Voturi</b>:%VOTES%</div>
    <div class="box_actori_votare">%STARS%</div>
    </div>

    This code was generated trought builder in GD Star Rathing :

    wp_gdsr_render_rating_results(array('template_id' => 48, 'rows' => 5, 'select' => 'persoane', 'hide_empty' => false, 'min_votes' => 0, 'min_count' => 5, 'image_from' => 'custom', 'image_custom' => 'img_actor', 'image_resize_x' => 55, 'image_resize_y' => 70, 'rating_size' => '16', 'rating_thumb_size' => '16'));

    The images from custom field don’t show up… anny solution for this.

    Site: https://www.cinema.trancelevel.com – sidbar right 5 Actors
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter TataVostru

    (@tatavostru)

    This is the function, i think there is a missing text

    foreach ($all_rows as $row) {
                    if ($widget["image_from"] == "content") {
                        $row->image = gdFunctionsGDSR::get_image_from_text($row->post_content);
                    } else if ($widget["image_from"] == "custom") {
                        $row->image = get_post_meta($row->post_id, $widget["image_custom"], true);
                    } else $row->image = "";
    
                    $row->image = apply_filters('gdsr_widget_image_url_prepare', $row->image, $widget, $row);
    
                    if ($row->image != "" && intval($widget["image_resize_x"]) > 0 && intval($widget["image_resize_y"]) > 0) {
                        $row->image = GDSRRenderT2::prepare_image($row->image, $widget["image_resize_x"], $widget["image_resize_y"]);
                    }
    Thread Starter TataVostru

    (@tatavostru)

    im getting somting like this…

    <div class="box_actori_vot">
    <div class="box_actori_img"><span class="nr_actor">1</span>
    <img src="459">459</div>
    <div class="box_actori_title"><a href="https://cinema.trancelevel.com/persoane/liam-neeson/">Liam Neeson</a></div>
    <div class="box_actori_zodie"><b>Nota:</b>:9.1 </div>
    <div class="box_actori_data"><b>Voturi</b>:7</div>
    <div class="box_actori_votare"><div style="text-align:left; padding: 0; margin: 0; background: url(https://cinema.trancelevel.com/wp-content/plugins/gd-star-rating/stars/oxygen/stars16.png); height: 16px; width: 160px;"><div style="background: url(https://cinema.trancelevel.com/wp-content/plugins/gd-star-rating/stars/oxygen/stars16.png) bottom left; padding: 0; margin: 0; height: 16px; width: 145.6px;"></div></div></div>
    </div>

    [ Please do not bump, that’s not permitted here. ]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘GD Star Rathing problem – images from custom field.’ is closed to new replies.