Supreme Directory: Repositioning the ratings in list-view
This topic contains 2 replies, has 2 voices, and was last updated by Atilla Boz 7 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: 3 rows, listings, lists, lists view, rating position, star rating, supreme directory
-
AuthorPosts
-
March 11, 2017 at 10:09 pm #366762
Hello everyone,
I have changed the view of my listings in list view mode. Usually on the right side there are the stars rating icons etc and below that there is alot of whitespace if you have a longer description text.
Since with help of GD support we added a left sidebar in the listings we needed some extra space in the content area and re-positioned the stars to below the title.
I changed the following file for that (and a little CSS, float left etc):
wp-content/plugins/geodirectory/geodirectory-templates/listings-listview.phpI deleted this code from its usual place and re-added it below line 212 after
<?php } ?>
where the code for the title ends. Now it has a cleaner look and we have some extra space, too.
<div class="geodir-addinfo clearfix <?php echo apply_filters('geodir_listing_listview_addinfo_extra_class', '', 'listing'); ?>"> <?php /** * Called before printing review stars html. * * @since 1.5.3 * @param object $post The post object. * @param string $view The view type, default 'listing'. */ do_action( 'geodir_before_review_html', $post, 'listing' ); $review_show = geodir_is_reviews_show('listview'); if ($review_show) { if (!$preview) { $post_avgratings = geodir_get_post_rating($post->ID); /** * Called before the rating stars are output on the listings view template. * * @since 1.0.0 * @param float $post_avgratings The average rating for the post. * @param int $post->ID The post ID. * @see 'geodir_after_review_rating_stars_on_listview' */ do_action('geodir_before_review_rating_stars_on_listview', $post_avgratings, $post->ID); echo geodir_get_rating_stars($post_avgratings, $post->ID); /** * Called after the rating stars are output on the listings view template. * * @since 1.0.0 * @param float $post_avgratings The average rating for the post. * @param int $post->ID The post ID. * @see 'geodir_before_review_rating_stars_on_listview' */ do_action('geodir_after_review_rating_stars_on_listview', $post_avgratings, $post->ID); } ?> <a href="<?php comments_link(); ?>" class="geodir-pcomments"><i class="fa fa-comments"></i> <?php geodir_comments_number($post->rating_count); ?></a> <?php } /** * Called after printing favorite html. * * @since 1.0.0 */ do_action( 'geodir_after_favorite_html', $post->ID, 'listing' ); /** * Called after printing map pin point. * * @since 1.0.0 * @since 1.5.9 Added $post as second param. * @param int $post->ID The post id. * @param object $post The post object. */ do_action( 'geodir_listing_after_pinpoint', $post->ID ,$post); if ($post->post_author == get_current_user_id()) { ?> <?php $addplacelink = get_permalink(geodir_add_listing_page_id()); $editlink = geodir_getlink($addplacelink, array('pid' => $post->ID), false); $upgradelink = geodir_getlink($editlink, array('upgrade' => '1'), false); $ajaxlink = geodir_get_ajax_url(); $deletelink = geodir_getlink($ajaxlink, array('geodir_ajax' => 'add_listing', 'ajax_action' => 'delete', 'pid' => $post->ID), false); ?> <span class="geodir-authorlink clearfix"> <?php if (isset($_REQUEST['geodir_dashbord']) && $_REQUEST['geodir_dashbord']) { /** * Called before the edit post link on the listings view template used on the author page. * * @since 1.0.0 * @see 'geodir_after_edit_post_link_on_listing' */ do_action('geodir_before_edit_post_link_on_listing'); ?> <a href="<?php echo esc_url($editlink); ?>" class="geodir-edit" title="<?php _e('Edit Listing', 'geodirectory'); ?>"> <?php $geodir_listing_edit_icon = apply_filters('geodir_listing_edit_icon', 'fa fa-edit'); echo '<i class="'. $geodir_listing_edit_icon .'"></i>'; ?> <?php _e('Edit', 'geodirectory'); ?> </a> <a href="<?php echo esc_url($deletelink); ?>" class="geodir-delete" title="<?php _e('Delete Listing', 'geodirectory'); ?>"> <?php $geodir_listing_delete_icon = apply_filters('geodir_listing_delete_icon', 'fa fa-close'); echo '<i class="'. $geodir_listing_delete_icon .'"></i>'; ?> <?php _e('Delete', 'geodirectory'); ?> </a> <?php /** * Called after the edit post link on the listings view template used on the author page. * * @since 1.0.0 * @see 'geodir_before_edit_post_link_on_listing' */ do_action('geodir_after_edit_post_link_on_listing'); } ?> </span> <?php } ?> </div>
How would you suggest to make this change, without changing the core files? Is there a hook to manage this in a more update-friendly manner? Or maybe you should change the position in the next update, if there is no other special reason why the stars and the footer DIV get so much space for such little content?
Kind regards,
AtillaMarch 13, 2017 at 1:12 pm #366952A valid license is required to view this reply.
You may need to login
OR
Buy either a Membership or valid license for this product.
Thanks, Team GeoDirectory!
March 15, 2017 at 2:18 am #367370A valid license is required to view this reply.
You may need to login
OR
Buy either a Membership or valid license for this product.
Thanks, Team GeoDirectory!
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket