osclass / Osclass

With Osclass, get your own classifieds site for free. Build your own Osclass installation and start advertising real estate, jobs or whatever you want- in minutes!
http://osclass.org/
648 stars 344 forks source link

please help with custom plugin attributes #2244

Closed jevgenj closed 6 years ago

jevgenj commented 6 years ago

custom attributes plugin does not work multilanguage # please help
this piece of code from the file conf.php here it must be done

        <div class='add_attribute'>
            <h2 class='render-title sub_heading'><?php _e('Add Attribute', CA_PLUGIN_NAME); ?></h2>
            <form method='post' action='<?php echo osc_admin_base_url(true);?>'>
                <input type='hidden' name='page' value='plugins' />
                <input type='hidden' name='action' value='renderplugin' />
                <input type='hidden' name='file' value='<?php echo osc_plugin_folder(__FILE__); ?>conf.php' />
                <input type='hidden' name='plugin_action' value='add_field' />
                <input type='hidden' name='group_id' value='<?php echo $group_id; ?>' />
                <?php $locales = osc_get_locales();
                ?>          

         <?php foreach($locales as $locale) {?>
        <h2><?php echo $locale['s_name']; ?></h2>
        <input class='text_input' type='text' name='<?php echo $locale['pk_c_code']; ?>field_label' value='' />
        <?php } ?>  

                <p class='field_options'>
                    <input class='text_input' type='text' name='field_options' value='' />
                    <span class='options_text'><?php _e('Separate options with commas (eg. a, b, c).', CA_PLUGIN_NAME); ?></span>

                </p>
                <p>
                    <select class='field_type' name='field_type'>
                        <option value='checkbox'><?php _e('Checkbox', CA_PLUGIN_NAME); ?></option>
                        <?php $selected = ($type == 'date') ? " selected='selected'" : ''; ?>                               
                        <option value='date'<?php echo $selected; ?>><?php _e('Date', CA_PLUGIN_NAME); ?></option>
                        <?php $selected = ($type == 'radio') ? " selected='selected'" : ''; ?>  
                        <option value='radio'<?php echo $selected; ?>><?php _e('Radio', CA_PLUGIN_NAME); ?></option>
                        <?php $selected = ($type == 'select') ? " selected='selected'" : ''; ?> 
                        <option value='select'<?php echo $selected; ?>><?php _e('Select', CA_PLUGIN_NAME); ?></option>
                        <?php $selected = ($type == 'text') ? " selected='selected'" : ''; ?>   
                        <option value='text'<?php echo $selected; ?>><?php _e('Text', CA_PLUGIN_NAME); ?></option>
                        <?php $selected = ($type == 'textarea') ? " selected='selected'" : ''; ?>   
                        <option value='textarea'<?php echo $selected; ?>><?php _e('Text Area', CA_PLUGIN_NAME); ?></option>                         
                    </select>                       
                </p>
                <p>
                    <label class='required'><input class='checkbox_input' type='checkbox' name='field_required' value='1' /><?php _e('Require', CA_PLUGIN_NAME); ?><br /></label>
                    <label><input class='checkbox_input' type='checkbox' name='field_search' value='1' checked='checked' /><?php _e('Search', CA_PLUGIN_NAME); ?><br /></label>
                    <label class='range'><input class='checkbox_input' type='checkbox' name='field_search_limits' value='1' /><?php _e('Search Limits', CA_PLUGIN_NAME); ?><br /></label>
                </p>
                <p><button class='btn btn-mini' type='submit'><?php _e('Create', CA_PLUGIN_NAME); ?></button></p>
            </form>
        </div>
garciademarina commented 6 years ago

If you are referring to Custom fields, CF are not multilanguage compatible.