Osclass forums

Support forums => Themes => Twitter => Topic started by: filipe on November 21, 2013, 04:59:17 pm

Title: Help with Search Bar(Solved)
Post by: filipe 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

(http://img690.imageshack.us/img690/2633/fmxo.png)
Title: Re: Help with Search Bar
Post by: frosticek on November 21, 2013, 05:32:40 pm
@filipe

Check inc.search.php in your theme folder.
Title: Re: Help with Search Bar
Post by: filipe 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  :(
Title: Re: Help with Search Bar
Post by: frosticek on November 22, 2013, 10:31:28 am
@filipe

Sorry man, my mistake, I need to check which file it is
Title: Re: Help with Search Bar
Post by: filipe 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......
Title: Re: Help with Search Bar
Post by: fog 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
Title: Re: Help with Search Bar
Post by: filipe 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
Title: Re: Help with Search Bar
Post by: filipe 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?
(http://img268.imageshack.us/img268/9704/hlih.png)
Title: Re: Help with Search Bar
Post by: fog 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
Title: Re: Help with Search Bar
Post by: filipe 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!!!
Title: Re: Help with Search Bar
Post by: fog on November 22, 2013, 03:10:50 pm
Use ccleaner program.... he clean all browsers

Regards
Title: Re: Help with Search Bar
Post by: filipe 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
Title: Re: Help with Search Bar
Post by: fog 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>
Title: Re: Help with Search Bar
Post by: filipe on November 22, 2013, 05:35:18 pm
It works, great work fog, muito obrigado  ;)
Title: Re: Help with Search Bar
Post by: frosticek on November 22, 2013, 05:52:00 pm
@fog
You are welcome here.

@filipe
Sorry for delays  :-X
Title: Re: Help with Search Bar(Solved)
Post by: filipe on November 22, 2013, 06:14:40 pm
@fog
You are welcome here.

@filipe
Sorry for delays  :-X
frosticek, fog understands alot of this, thks frosticek and fog for the help.....
Filipe from Paris
Title: Re: Help with Search Bar
Post by: fog on November 22, 2013, 06:32:13 pm
Hi people, thanks for your kind words  :)
I'm used to dealing with the  repurpose theme is my theme of choice. I do not know everything, but what i can help and save some time to others, is already good.

PS: @frosticek is one of the good programmers in this forum... like i say... i just use repurpose theme all days (are diferent situations)

By the way, congratulations for your job with seo all in one  :)

Regards for you guys
Title: Re: Help with Search Bar
Post by: frosticek on November 22, 2013, 06:59:40 pm
Thank you guys

@filipe
You can add to header of this topic [Solved]
Title: Re: Help with Search Bar
Post by: filipe on November 22, 2013, 07:06:39 pm
Thank you guys

@filipe
You can add to header of this topic [Solved]
Did it....
Thks