Forum

Tab langages order
 
Notifications
Clear all

Tab langages order

3 Posts
2 Users
0 Likes
276 Views
(@eterc)
Posts: 2
New Member
Topic starter
 

Hello,
I 'm from Belgium and i ve a multi langage osclass site (french and dutch)

My problem is that when i try to publish an ad, the dutch langage tab is always first even if the user has chosesn french as main langage

Sometimes they write their ad in french in the dutch tab because they don't see they are in the dutch tab.

Where can i search to modify code to have the main tab the same as the user language ?

Thanks

 
Posted : 31/03/2020 3:28 pm
Defected
(@dftd)
Posts: 614
Honorable Member Admin
 

Depending on your theme, it might be oc-content/themes/your_theme/item-post.php file or oc-includes/osclass/frm/Item.form.class.php.

Post your item-post.php so I can be sure.

Available for custom Osclass development. www.defected.dev

 
Posted : 01/04/2020 1:10 am
(@eterc)
Posts: 2
New Member
Topic starter
 

Hi,
Here is my item-post.php file

Thanks for you help

<?php
/*
* Copyright 2017 osclass-pro.com
*
* You shall not distribute this theme and any its files (except third-party libraries) to third parties.
* Rental, leasing, sale and any other form of distribution are not allowed and are strictly forbidden.
*/
osc_enqueue_script('jquery');
osc_enqueue_script('jquery-ui');
osc_enqueue_script('global');
osc_enqueue_script('fineuploader');
osc_enqueue_script('plugins');
osc_enqueue_script('tabber');
osc_enqueue_script('jquery-validate');

?>
<!DOCTYPE html>
<html lang="<?php echo str_replace('_', '-', osc_current_user_locale()); ?>">
<head>
    <?php osc_current_web_theme_path('head.php'); ?>
    <meta name="robots" content="noindex, nofollow" />
    <meta name="googlebot" content="noindex, nofollow" />

    <!-- only item-post.php -->
    <?php ItemForm::location_javascript(); ?>
    <?php
    if(osc_images_enabled_at_items() && !bitfinder_is_fineuploader()) {
        ItemForm::photos_javascript();
    }
    ?>
    <script type="text/javascript">

        function uniform_input_file(){
            photos_div = $('div.photos');
            $('div',photos_div).each(
                function(){
                    if( $(this).find('div.uploader').length == 0  ){
                        divid = $(this).attr('id');
                        if(divid != 'photos'){
                            divclass = $(this).hasClass('box');
                            if( !$(this).hasClass('box') & !$(this).hasClass('uploader') & !$(this).hasClass('row')){
                                $("div#"+$(this).attr('id')+" input:file").uniform({fileDefaultText: fileDefaultText,fileBtnText: fileBtnText});
                            }
                        }
                    }
                }
            );
        }

        <?php if(osc_locale_thousands_sep()!='' || osc_locale_dec_point() != '') { ?>
        $().ready(function(){
            $("#price").blur(function(event) {
                var price = $("#price").prop("value");
                <?php if(osc_locale_thousands_sep()!='') { ?>
                while(price.indexOf('<?php echo osc_esc_js(osc_locale_thousands_sep());  ?>')!=-1) {
                    price = price.replace('<?php echo osc_esc_js(osc_locale_thousands_sep());  ?>', '');
                }
                <?php }; ?>
                <?php if(osc_locale_dec_point()!='') { ?>
                var tmp = price.split('<?php echo osc_esc_js(osc_locale_dec_point())?>');
                if(tmp.length>2) {
                    price = tmp[0]+'<?php echo osc_esc_js(osc_locale_dec_point())?>'+tmp[1];
                }
                <?php }; ?>
                $("#price").prop("value", price);
            });
        });
        <?php }; ?>
    </script>
    <!-- end only item-post.php -->
</head>
<body>
<?php osc_current_web_theme_path('header.php'); ?>

<div class="container content">
    <div class="forcemessages-inline">
        <?php osc_show_flash_message(); ?>
    </div>
    <!-- content -->
    <div class="post_adf">
        <div class="container seachproducts">
            <div class="post__form disbox">
                <form name="item" action="<?php echo osc_base_url(true);?>" class="form" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="action" value="item_add_post" />
                    <input type="hidden" name="page" value="item" />
                    <div class="form__title">
                        <p class="title__text"><?php _e('Publish a listing', 'bitfinder'); ?></p>
                    </div>
                    <div class="form-group form-control__dbl">
                        <p class="group__title"><?php _e('Select a category', 'bitfinder')?> <span>*</span></p>
                        <div class="dbl__row">
                            <div class="dbl__item">
                                <div class="select_box">
                                    <?php ItemForm::category_multiple_selects(null, null, __('Select a category', 'bitfinder')); ?>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php if(osc_get_preference('custom-fileds', 'bitfinder') == 'top'){ ?>
<div class="form-group bitfindertab">
                        <div class="box">
                            <?php ItemForm::plugin_post_item(); ?>
                        </div> </div>
                    <?php } ?>
<div class="form-group bitfindertab">
              <?php ItemForm::multilanguage_title_description(); ?>
                    </div>
                    <?php if( osc_images_enabled_at_items() ) { ?>
                    <div class="form__title">
                        <p class="title__text"><?php _e('Add images','bitfinder')?></p>
<span class="text_upload"><?php _e('You can upload up to', 'bitfinder'); ?> <?php echo osc_max_images_per_item(); ?> <?php _e('pictures per listing', 'bitfinder'); ?></span>
                    </div>
                    <div class="form-group form-group__price">
                        <p class="group__title"><?php _e('Images', 'bitfinder'); ?> <span></span></p>
                        <?php if(osc_images_enabled_at_items()) {
                            if(bitfinder_is_fineuploader()) {
                                ItemForm::ajax_photos();
                            }
                        } else { ?>
                            <div id="photos" class="upload-images">
                                <div class="row">
                                    <input type="file" name="photos[]" />
                                </div>
                            </div>
                            <a href=""#"" onclick="addNewPhoto(); uniform_input_file(); return false;"><?php _e('Add new photo', 'bitfinder'); ?></a>

                        <?php } ?>
                    </div>
                    <?php } ?>
                    <!--  -->
                    <?php if( osc_price_enabled_at_items() ) { ?>
                    <div class="form__title">
                        <p class="title__text"><?php _e('Price', 'bitfinder'); ?></p>
                    </div>
                    <div class="form-group form-group__price" >
                        <p class="group__title"><?php _e('Price', 'bitfinder'); ?> <span>*</span></p>
                        <div class="form-group-sm" style="float: left">
                        <?php ItemForm::price_input_text(); ?>
                        </div>
                        <div class="select_currency">
                        <?php ItemForm::currency_select(); ?>
                        </div>
                    </div>
                    <?php } ?>
                   
                    <?php if(osc_get_preference('item-post', 'bitfinder') == 'countries'){ ?>
<div class="form__title">
                        <p class="title__text"><?php _e('Listing Location', 'bitfinder'); ?></p>
                    </div>
                    <div class="form-group">
                        <p class="group__title"><?php _e('Country', 'bitfinder'); ?> <span>*</span></p>
                        <div class="select">
                            <?php ItemForm::country_select(osc_get_countries(), osc_user()); ?>
                        </div>
                    </div>
                    <?php } ?>
<?php if(osc_get_preference('item-post-loc', 'bitfinder') == 'enable'){ ?>
                    <div class="form-group">
                        <p class="group__title"><?php _e('Region', 'bitfinder'); ?> <span>*</span></p>
                        <div class="select">
                            <?php ItemForm::region_select(osc_get_regions(), osc_user()) ; ?>
                        </div>
                    </div>
                    <div class="form-group">
                        <p class="group__title"><?php _e('City', 'bitfinder'); ?> <span>*</span></p>
                        <div class="select">
                            <?php ItemForm::city_select(osc_get_cities(osc_user_region()), osc_user()) ; ?>
                        </div>
                    </div>
                    <div class="form-group form-group-sm">
                        <p class="group__title"><?php _e('City Area', 'bitfinder'); ?> <span></span></p>
                        <?php ItemForm::city_area_text(osc_user()); ?>
                    </div>
                    <div class="form-group form-group-sm">
                        <p class="group__title"><?php _e('Address', 'bitfinder'); ?> <span></span></p>
                        <?php ItemForm::address_text(osc_user()); ?>
                    </div>
<?php } ?>
                    <?php if(!osc_is_web_user_logged_in() ) { ?>
                    <div class="form__title">
                        <p class="title__text"><?php _e("Seller's information", 'bitfinder'); ?></p>
                    </div>
                    <div class="form-group form-group-sm">
                        <p class="group__title"><?php _e('Name', 'bitfinder'); ?> <span></span></p>
                        <?php ItemForm::contact_name_text(); ?>
                    </div>
                    <div class="form-group form-group-sm">
                        <p class="group__title"><?php _e('E-mail', 'bitfinder'); ?> <span>*</span></p>
                        <?php ItemForm::contact_email_text(); ?>
                    </div>
                    <div class="form-group">
                        <div class="checkbox">
                            <input type="checkbox" name="showEmail" id="showEmail">
                            <label for="showEmail"><?php _e('Show e-mail on the listing page', 'bitfinder'); ?></label>
                        </div>
                    </div>
                    <?php } ?>

                    <?php if(osc_get_preference('custom-fileds', 'bitfinder') == 'bottom'){ ?>
<div class="form-group">
                        <div class="box">
                            <?php ItemForm::plugin_post_item(); ?>
                        </div>
</div>
                    <?php } ?>
                    <?php if( osc_recaptcha_items_enabled() ) {?>
<script type="text/javascript">
                                                            var RecaptchaOptions = {
                                                                theme : 'clean'
                                                            };
                                                        </script>
<div class="form-group">
                        <div class="box">
                            <div class="captch" style="transform:scale(0.8);transform-origin:0 0">
                                <?php osc_show_recaptcha(); ?>
                            </div>
                        </div></div>
                    <?php }?>
<?php if( function_exists( "MyHoneyPot" )) { ?>
<?php MyHoneyPot(); ?>
<?php } ?> 

                    <div class="clearfix"></div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-primary">
                            <?php _e('Publish', 'bitfinder'); ?>
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!-- content -->

</div>
<div class="clearfix"></div>
<?php osc_current_web_theme_path('footer.php'); ?>
</body>
</html>

 
Posted : 03/04/2020 5:07 pm
Share: