• Главная
  • Поиск
    •  
  • Здравствуйте, Гость

Автор Тема: Плагин карта pегионов России  (Прочитано 15683 раз)
  • *
  • Сообщений: 13
« Ответ #30 : 11 Сентябрь 2016, 15:16:12 »
Уменьшил на 50%.

Код main.php можешь выложить?

Вот он:

<?php
    /*
     *      Osclass – software for creating and publishing online classified
     *                           advertising platforms
     *
     *                        Copyright (C) 2014 OSCLASS
     *
     *       This program is free software: you can redistribute it and/or
     *     modify it under the terms of the GNU Affero General Public License
     *     as published by the Free Software Foundation, either version 3 of
     *            the License, or (at your option) any later version.
     *
     *     This program is distributed in the hope that it will be useful, but
     *         WITHOUT ANY WARRANTY; without even the implied warranty of
     *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *             GNU Affero General Public License for more details.
     *
     *      You should have received a copy of the GNU Affero General Public
     * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
     */

    // meta tag robots
    osc_add_hook('header','bender_follow_construct');

    bender_add_body_class('home');


    $buttonClass = '';
    $listClass   = '';
    if(bender_show_as() == 'gallery'){
          $listClass = 'listing-grid';
          $buttonClass = 'active';
    }
?>
<?php osc_current_web_theme_path('header.php') ; ?>
<?php russian_i_map(); ?>
<form action="<?php echo osc_base_url(true); ?>" method="get" class="search nocsrf" <?php /* onsubmit="javascript:return doSearch();"*/ ?>>
        <input type="hidden" name="page" value="search"/>
        <div class="main-search">
            <div class="cell">
                <input type="text" name="sPattern" id="query" class="input-text" value="" placeholder="<?php echo osc_esc_html(__(osc_get_preference('keyword_placeholder', 'bender'), 'bender')); ?>" />
            </div>
            <?php  if ( osc_count_categories() ) { ?>
                <div class="cell selector">
                    <?php osc_categories_select('sCategory', null, __('Select a category', 'bender')) ; ?>
                </div>
                <div class="cell reset-padding">
            <?php  } else { ?>
                <div class="cell">
            <?php  } ?>
                <button class="ui-button ui-button-big js-submit"><?php _e("Search", 'bender');?></button>
            </div>
        </div>
        <div id="message-seach"></div>
    </form>
<div class="clear"></div>
<div class="latest_ads">
<h1><strong><?php _e('Latest Listings', 'bender') ; ?></strong></h1>
 <?php if( osc_count_latest_items() == 0) { ?>
    <div class="clear"></div>
    <p class="empty"><?php _e("There aren't listings available at this moment", 'bender'); ?></p>
<?php } else { ?>
    <div class="actions">
      <span class="doublebutton <?php echo $buttonClass; ?>">
           <a href="<?php echo osc_base_url(true); ?>?sShowAs=list" class="list-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span><?php _e('List', 'bender'); ?></span></a>
           <a href="<?php echo osc_base_url(true); ?>?sShowAs=gallery" class="grid-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span><?php _e('Grid', 'bender'); ?></span></a>
      </span>
    </div>
    <?php
    View::newInstance()->_exportVariableToView("listType", 'latestItems');
    View::newInstance()->_exportVariableToView("listClass",$listClass);
    osc_current_web_theme_path('loop.php');
    ?>
    <div class="clear"></div>
    <?php if( osc_count_latest_items() == osc_max_latest_items() ) { ?>
        <p class="see_more_link"><a href="<?php echo osc_search_show_all_url() ; ?>">
            <strong><?php _e('See all listings', 'bender') ; ?> &raquo;</strong></a>
        </p>
    <?php } ?>
<?php } ?>
</div>
</div><!-- main -->
<div id="sidebar">
    <?php if( osc_get_preference('sidebar-300x250', 'bender') != '') {?>
    <!-- sidebar ad 350x250 -->
    <div class="ads_300">
        <?php echo osc_get_preference('sidebar-300x250', 'bender'); ?>
    </div>
    <!-- /sidebar ad 350x250 -->
    <?php } ?>
    <div class="widget-box">
        <?php if(osc_count_list_regions() > 0 ) { ?>
        <div class="box location">
            <h3><strong><?php _e("Location", 'bender') ; ?></strong></h3>
            <ul>
            <?php while(osc_has_list_regions() ) { ?>
                <li><a href="<?php echo osc_list_region_url(); ?>"><?php echo osc_list_region_name() ; ?> <em>(<?php echo osc_list_region_items() ; ?>)</em></a></li>
            <?php } ?>
            </ul>
        </div>
        <?php } ?>
    </div>
</div>
<div class="clear"><!-- do not close, use main clossing tag for this case -->
<?php if( osc_get_preference('homepage-728x90', 'bender') != '') { ?>
<!-- homepage ad 728x60-->
<div class="ads_728">
    <?php echo osc_get_preference('homepage-728x90', 'bender'); ?>
</div>
<!-- /homepage ad 728x60-->
<?php } ?>
<?php osc_current_web_theme_path('footer.php') ; ?>

  • *
  • Сообщений: 1
« Ответ #31 : 11 Март 2017, 20:44:02 »
Здравствуйте!
Если выбрать любой регион, то работает нормально, а вот "Москва и московская область" - нет подходящих результатов.
Как исправить?

И по выделению региона - он выделяется в зависимости от региона пользователя? У меня вообще ни один регион не выделен, как это сделать?

  • *
  • Сообщений: 1
« Ответ #32 : 04 Август 2017, 10:13:28 »
Перезалейте файл, пишет ошибка при открытии.

Оффлайн Dis
  • Admin
  • *****
  • Сообщений: 1745
    • Шаблоны и плагины Osclass
« Ответ #33 : 05 Август 2017, 13:14:15 »
Перезалейте файл, пишет ошибка при открытии.
Вложение удалил, теперь плагин скачать можно тут:https://osclass.pro/karta-rossii/
Доработки любой сложности.
Задание присылайте в личку.

  • *
  • Сообщений: 1
« Ответ #34 : 06 Январь 2018, 16:59:00 »
А реально ли так же карту Украины сделать? Быть может кто-то может взяться?

  • *
  • Сообщений: 3
« Ответ #35 : 08 Сентябрь 2020, 18:02:24 »
Привет всем, поставил карту в шаблон , в плагине указывается точная строка и фаил в который нужно ее вставить, так же указывается строка с изменением цвета, я нашел эту строку но у меня совсем все иначе!( под какой шаблон вообще пилили плагин?) Подскажите пожалуйста как мне теперь изменить размер? Может кто можеть выложить готовый код с размером? Чтоб оставалось цыферки менять в коде. Я не спец в PHP  просто делаю себе сайт))) Спасибо.
« Последнее редактирование: 08 Сентябрь 2020, 18:52:56 от Mnu »

  • *
  • Сообщений: 2
« Ответ #36 : 07 Февраль 2022, 09:30:24 »
При клике на любой регион на карте пишет "Нет подходящих результатов". Если кликнуть на главной странице по региону в "местоположении", то результаты поиска по региону выводит. Вот пример вывода в адресной строке по клику на Москву и Московскую обл.
Данный плагин:
https://my_sate/index.php?page=search&sRegion=%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0%20%D0%B8%20%D0%9C%D0%BE%D1%81%D0%BA%D0%BE%D0%B2%D1%81%D0%BA%D0%B0%D1%8F%20%D0%BE%D0%B1%D0%BB%D0%B0%D1%81%D1%82%D1%8CА вот верный адрес, при котором все показывает:
https://my_sate/moskovskaya-oblast-r781871Почему адреса формируются по разному, как это поправить?

 


test