Advertisement:

Author Topic: Help with Search Bar(Solved)  (Read 3809 times)

filipe

  • Jr. Member
  • **
  • Posts: 50
Help with Search Bar(Solved)
« on: November 21, 2013, 04:59:17 pm »
Hello
How can I change Select a Region and Select a Category to Portuguese, my site is in the Portuguese language....

Thks

« Last Edit: November 22, 2013, 07:05:19 pm by filipe »

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Help with Search Bar
« Reply #1 on: November 21, 2013, 05:32:40 pm »
@filipe

Check inc.search.php in your theme folder.

filipe

  • Jr. Member
  • **
  • Posts: 50
Re: Help with Search Bar
« Reply #2 on: November 21, 2013, 05:40:18 pm »
@filipe

Check inc.search.php in your theme folder.
Ok, thks but what do I have to do? I would like to change Select a Region to Seleccione um Concelho and Select a Category to Seleccione uma Categoria, in the script inc.search.php nothing of that....sorry  :(

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Help with Search Bar
« Reply #3 on: November 22, 2013, 10:31:28 am »
@filipe

Sorry man, my mistake, I need to check which file it is

filipe

  • Jr. Member
  • **
  • Posts: 50
Re: Help with Search Bar
« Reply #4 on: November 22, 2013, 12:11:59 pm »
@filipe

Sorry man, my mistake, I need to check which file it is
Ok, thks frosticek, I will wait for your help......

fog

  • Hero Member
  • *****
  • Posts: 1062
Re: Help with Search Bar
« Reply #5 on: November 22, 2013, 02:25:09 pm »
Hi, sorry @frosticek... i use repurpose theme, is the same theme twitter... i go help Filipe  ;)

@Filipe you can find in your twitter theme (functions.php). But i recomend you to use poedit if you go use two languages (English / Portuguese)

Code: [Select]
    function chosen_select_standard() {
        View::newInstance()->_exportVariableToView('categories', Category::newInstance()->toTree() ) ;
       
        if( osc_count_categories() > 0 ) {
            echo '<select name="sCategory" data-placeholder="' . __('Select a category...', 'twitter') . '" style="width: auto;" class="chzn-select"">' ;
            echo '<option></option>' ;
            while( osc_has_categories() ) {
                echo '<option value="' . osc_category_name() . '">' . osc_category_name() . '</option>' ;
                if( osc_count_subcategories() > 0 ) {
                    while( osc_has_subcategories() ) {
                        echo '<option value="' . osc_category_name() . '">&nbsp;&nbsp;&nbsp;&nbsp;' . osc_category_name() . '</option>' ;
                    }
                }
            }
            echo '</select>' ;
        }

E para as Regiões

Code: [Select]
    function chosen_region_select() {
        View::newInstance()->_exportVariableToView('list_regions', Search::newInstance()->listRegions('%%%%', '>=', 'region_name ASC') ) ;
       
        if( osc_count_list_regions() > 0 ) {
            echo '<select name="sRegion" data-placeholder="' . __('Select a region...', 'twitter') . '" style="width: 200px;" class="chzn-select"">' ;
            echo '<option></option>' ;
            while( osc_has_list_regions() ) {
                echo '<option value="' . osc_list_region_name() . '">' . osc_list_region_name() . '</option>' ;
            }
            echo '</select>' ;
        }
       
        View::newInstance()->_erase('list_regions') ;
    }

Regards

filipe

  • Jr. Member
  • **
  • Posts: 50
Re: Help with Search Bar
« Reply #6 on: November 22, 2013, 02:37:57 pm »
Obrigado fog
Strange it works for Select a region but does not work for Select a Category, why?
filipe

filipe

  • Jr. Member
  • **
  • Posts: 50
Re: Help with Search Bar
« Reply #7 on: November 22, 2013, 02:43:28 pm »
Obrigado fog
Strange it works for Select a region but does not work for Select a Category, why?
filipe
Sorry it works, happy....and here item-post?

fog

  • Hero Member
  • *****
  • Posts: 1062
Re: Help with Search Bar
« Reply #8 on: November 22, 2013, 02:52:29 pm »
You can find the code in item-post.php...   :D

Code: [Select]
                            <div class="clearfix">
                                <label><?php _e('Category''twitter') ; ?></label>
                                <div class="input">
                                    <?php item_category_select__('Select a category...''twitter') ) ; ?>
                                </div>
                            </div>

For regions

Code: [Select]
                            <?php item_country_box(__("Country""ptmade"), __("Select a country...""twitter")) ; ?>
                            <?php item_region_box(__("Region""ptmade"), __("Select a region...""twitter")) ; ?>
                            <?php item_city_box(__("City""ptmade"), __("Select a city...""twitter")) ; ?>

If you run repurpose theme, change the name "twitter" for "repurpose"

type:
Code: [Select]
__("Select a country...", "repurpose")) ; ?>
Regards

filipe

  • Jr. Member
  • **
  • Posts: 50
Re: Help with Search Bar
« Reply #9 on: November 22, 2013, 03:07:37 pm »
You can find the code in item-post.php...   :D

Code: [Select]
                            <div class="clearfix">
                                <label><?php _e('Category''twitter') ; ?></label>
                                <div class="input">
                                    <?php item_category_select__('Select a category...''twitter') ) ; ?>
                                </div>
                            </div>

For regions

Code: [Select]
                            <?php item_country_box(__("Country""ptmade"), __("Select a country...""twitter")) ; ?>
                            <?php item_region_box(__("Region""ptmade"), __("Select a region...""twitter")) ; ?>
                            <?php item_city_box(__("City""ptmade"), __("Select a city...""twitter")) ; ?>

If you run repurpose theme, change the name "twitter" for "repurpose"

type:
Code: [Select]
__("Select a country...", "repurpose")) ; ?>
Regards
Strange I made the changement, I make F5 it's good but after two seconds it comes like that I did not made any change!!!

fog

  • Hero Member
  • *****
  • Posts: 1062
Re: Help with Search Bar
« Reply #10 on: November 22, 2013, 03:10:50 pm »
Use ccleaner program.... he clean all browsers

Regards

filipe

  • Jr. Member
  • **
  • Posts: 50
Re: Help with Search Bar
« Reply #11 on: November 22, 2013, 03:43:18 pm »
Use ccleaner program.... he clean all browsers

Regards
I did that, does not work, what I did is this.....
 <h3><?php _e('Location', 'twitter') ?></h3>
                            <?php item_country_box(__("Country", "twitter"), __("Select a country...", "twitter")) ; ?>
                            <?php item_region_box(__("Region *", "twitter"), __("Escolha Distrito...", "twitter")) ; ?>
                            <?php item_city_box(__("City *", "twitter"), __("Escolha Concelho...", "twitter")) ; ?>
                            <!-- location end -->
                            <?php if( !osc_is_web_user_logged_in() ) { ?>
My site is this one....http://www.pequenosjobs.com/item/new

fog

  • Hero Member
  • *****
  • Posts: 1062
Re: Help with Search Bar
« Reply #12 on: November 22, 2013, 05:21:15 pm »
Sorry...

Edit javascript in the same file "item-post" in <head> tag...

Code: [Select]
        <script type="text/javascript">
            twitter_theme.text_select_subcategory = "<?php _e('Select a subcategory...''twitter') ; ?>" ;
            twitter_theme.category_selected_id    = "<?php echo item_selected_category_id() ; ?>" ;
            twitter_theme.subcategory_selected_id = "<?php echo item_selected_subcategory_id() ; ?>" ;
            twitter_theme.max_number_photos       = <?php echo osc_max_images_per_item() ; ?> ;
            twitter_theme.photo_remove_text       = "<?php _e('Remove''twitter') ; ?>" ;
            twitter_theme.max_images_fields_txt   = "<?php _e('Sorry, you have reached the maximum number of images per ad',  'twitter') ; ?>" ;
            twitter_theme.country_select_id       = "<?php echo get_country_id((osc_item() != null) ? osc_item() : array()) ; ?>" ;
            twitter_theme.region_select_id        = "<?php echo get_region_id((osc_item() != null) ? osc_item() : array()) ; ?>" ;
            twitter_theme.city_select_id          = "<?php echo get_city_id((osc_item() != null) ? osc_item() : array()) ; ?>" ;
            twitter_theme.ajax_url                = "<?php echo osc_base_url(true) . '?page=ajax' ?>" ;
            twitter_theme.text_select_country     = "<?php _e('Select a country...''twitter') ; ?>" ;
            twitter_theme.text_select_region      = "<?php _e('Select a region...''twitter') ; ?>" ;
            twitter_theme.text_select_city        = "<?php _e('Select a city...''twitter') ; ?>" ;
            twitter_theme.text_no_regions         = "<?php _e('No regions available''twitter') ; ?>" ;
            twitter_theme.text_no_cities          = "<?php _e('No cities available''twitter') ; ?>" ;
            twitter_theme.page                    = "form" ;
            twitter_theme.item_id                 = "" ;
        </script>

filipe

  • Jr. Member
  • **
  • Posts: 50
Re: Help with Search Bar
« Reply #13 on: November 22, 2013, 05:35:18 pm »
It works, great work fog, muito obrigado  ;)

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Help with Search Bar
« Reply #14 on: November 22, 2013, 05:52:00 pm »
@fog
You are welcome here.

@filipe
Sorry for delays  :-X