*

Sparky

  • ***
  • 89 posts
Free Jobs Attributes Plugin update
« on: January 25, 2022, 10:03:48 AM »
Free UPDATE - Jobs Attributes Osclass Plugin - 3.4.1

Download and Save your current files before uploading these in case you don't like the changes.

This free update will simplify the arrangement, changes of some words , and also some items were deleted .

I am using Osclass 8.0.1 and the Delta Theme 1.2.1 , and I checked on Sigma 1.3.3 and Starter Theme 1.3.3 with my changes and it works for me.
-------------------------------------------------------------------
A Visual of the Format at the bottom
-------------------------------------------------------------------
item_detail.php  & item_edit.php   - below
-------------------------------------------------------------------
-------------------------------------------------------------------
item_detail.php

Code: [Select]
<?php
    $relations 
= array('HIRE' => __('Employment''jobs_attributes'), 'LOOK' => __('Looking for a job''jobs_attributes'));
    
$positions = array('UNDEF' => __('Select''jobs_attributes'), 'PART' => __('Part time''jobs_attributes'), 'FULL' => __('Full-time''jobs_attributes'));
    
$salary = array('HOUR' => __('Hour''jobs_attributes'), 'DAY' => __('Day''jobs_attributes'), 'WEEK' => __('Week''jobs_attributes'), 'MONTH' => __('Month''jobs_attributes'), 'YEAR' => __('Year''jobs_attributes'));
    
$index     trim(@$detail['e_relation']);
    
$locale    osc_current_user_locale();
?>

<h2><?php _e('Job Details''jobs_attributes'); ?></h2>
<div class="job-detail">
    <table>
        <?php if(@$relations[$index] != "") { ?>
        <tr>
            <td><label for="relation"><?php _e('Relation''jobs_attributes'); ?></label></td>
            <td><?php echo @$relations[$index]; ?></td>
        </tr>
        <?php ?>
        <?php if(@$detail['s_company_name'] != "") { ?>
        <tr>
            <td><label for="companyName"><?php _e('Company name''jobs_attributes'); ?></label></td>
            <td><?php echo @$detail['s_company_name']; ?></td>
        </tr>
        <?php ?>
        <?php if(@$detail['e_position_type'] != "") { ?>
        <tr>
            <td><label for="positionType"><?php _e('Position type''jobs_attributes'); ?></label></td>
            <td><?php echo $positions[$detail['e_position_type']]; ?></td>
        </tr>
        <?php ?>
        <?php if(@$detail['s_salary_text'] != "" ) { ?>
        <tr>
            <td><label for="salaryText"><?php _e('Wage or TBD''jobs_attributes'); ?></label></td>
            <td><?php echo @$detail['s_salary_text']; ?></td>
        </tr>
        <?php ?>
    </table>
    <?php if(isset($detail['locale'][$locale]['s_desired_exp']) && $detail['locale'][$locale]['s_desired_exp']!='') { ?>
    <div>
        <label for="desired_exp"><?php _e('Position Title''jobs_attributes'); ?></label>
        <p><?php echo @$detail['locale'][$locale]['s_desired_exp']; ?></p>
    </div>
    <?php ?>
    <?php if(isset($detail['locale'][$locale]['s_minimum_requirements']) && $detail['locale'][$locale]['s_minimum_requirements']!='') { ?>
    <div>
        <label for="min_reqs"><?php _e('Minimum Qualifications''jobs_attributes'); ?></label>
        <p><?php echo nl2br( @$detail['locale'][$locale]['s_minimum_requirements'] ) ; ?></p>
    </div>
    <?php ?>
    <?php if(isset($detail['locale'][$locale]['s_desired_requirements']) && $detail['locale'][$locale]['s_desired_requirements']!='') { ?>
    <div>
        <label for="desired_reqs"><?php _e('Required Qualifications''jobs_attributes'); ?></label>
        <p><?php echo nl2br( @$detail['locale'][$locale]['s_desired_requirements'] ); ?></p>
    </div>
    <?php ?>
    <?php if(isset($detail['locale'][$locale]['s_contract']) && $detail['locale'][$locale]['s_contract']!='') { ?>
    <div>
        <label for="contract"><?php _e('Benefits''jobs_attributes'); ?></label>
        <p><?php echo @$detail['locale'][$locale]['s_contract']; ?></p>
    </div>
    <?php ?>
    <?php if(isset($detail['locale'][$locale]['s_company_description']) && $detail['locale'][$locale]['s_company_description']!='') { ?>
    <div>
        <label for="company_desc"><?php _e('Job Description''jobs_attributes'); ?></label>
        <p><?php echo nl2br( @$detail['locale'][$locale]['s_company_description'] ) ; ?></p>
    </div>
    <?php ?>
</div>
<?php if(osc_get_preference('allow_cv_upload''plugin')=='1' && ((osc_get_preference('allow_cv_unreg''jobs_attributes')=='1' && !osc_is_web_user_logged_in()) || osc_is_web_user_logged_in())) { ?>
<br/>
<div id="cv_uploader">
    <noscript>
        <p><?php _e('Please enable JavaScript to use cv uploader''jobs_attributes'); ?>.</p>
    </noscript>
</div>
<script src="<?php echo osc_plugin_url(__FILE__); ?>js/fileuploader.js" type="text/javascript"></script>
<script>       
    function createUploader(){           
        var uploader = new qq.FileUploader({
            element: document.getElementById('cv_uploader'),
            action: '<?php
                
if(osc_version()<320) {
                    echo 
osc_ajax_plugin_url(osc_plugin_folder(__FILE__) . "cv_uploader.php?id=" osc_item_id());
                } else {
                    echo 
osc_route_ajax_url('jobs-attr-cvupload', array('id' => osc_item_id()));
                }; 
?>
',
            debug: false
        });           
    }
    window.onload = createUploader;     
</script>
<?php ?>
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
item_edit.php

Code: [Select]
<h2><?php _e('Job Details''jobs_attributes'); ?></h2>
<div class="jobs-attributes box">
    <div class="row">
        <label for="relation"><?php _e('Relation''jobs_attributes'); ?></label>
    </div>
    <div class="row _20">
        <?php
            
if( Session::newInstance()->_getForm('pj_relation') != "" ) {
                
$detail['e_relation'] = Session::newInstance()->_getForm('pj_relation');
            }
        
?>

        <br>
        <label for="hire"><?php _e('Employment''jobs_attributes'); ?></label>
        <input type="radio" name="relation" value="HIRE" id="hire" <?php if( @$detail['e_relation'] == 'HIRE' ) { echo 'checked'; }; ?>/>
    </div>
    <div class="row _20">
        <?php
            
if( Session::newInstance()->_getForm('pj_relation') != "" ) {
                
$detail['e_relation'] = Session::newInstance()->_getForm('pj_relation');
            }
        
?>

        <label for="look"><?php _e('Looking for a job''jobs_attributes'); ?></label>
        <input type="radio" name="relation" value="LOOK" id="look" <?php if( @$detail['e_relation'] == 'LOOK' ) { echo 'checked'; }; ?>/>
    </div>
    <div class="row _200">
        <?php
            
if( Session::newInstance()->_getForm('pj_companyName') != "" ) {
                
$detail['s_company_name'] = Session::newInstance()->_getForm('pj_companyName');
            }
        
?>

        <label for="companyName"><?php _e('Company Name''jobs_attributes'); ?></label>
        <input type="text" name="companyName" value="<?php echo @$detail['s_company_name']; ?>" />
    </div>
    <div class="row _200 auto">
        <?php
            
if( Session::newInstance()->_getForm('pj_positionType') != "" ) {
                
$detail['e_position_type'] = Session::newInstance()->_getForm('pj_positionType');
            }
        
?>

        <label for="positionType"><?php _e('Position Type''jobs_attributes'); ?></label>
        <select name="positionType" id="positionType">
            <option value="UNDEF" <?php if( @$detail['e_position_type'] == 'UNDEF' ) { echo 'selected'; }; ?>><?php _e('Select''jobs_attributes'); ?></option>
            <option value="PART" <?php if( @$detail['e_position_type'] == 'PART' ) { echo 'selected'; }; ?>><?php _e('Part-time''jobs_attributes'); ?></option>
            <option value="FULL" <?php if( @$detail['e_position_type'] == 'FULL' ) { echo 'selected'; }; ?>><?php _e('Full-time''jobs_attributes'); ?></option>
        </select>
    </div>
    <div class="row">
        <?php
            
if( Session::newInstance()->_getForm('pj_salaryText') != "" ) {
                
$detail['e_relation'] = Session::newInstance()->_getForm('pj_salaryText');
            }
        
?>

        <label for="look"><?php _e('Wage or TBD''jobs_attributes'); ?></label>
        <input type="text" name="salaryText" value="<?php echo @$detail['s_salary_text']; ?>" />
    </div>

<?php
    $locales 
osc_get_locales();
    if(
count($locales)==1) {
        
$locale $locales[0];
?>

        <div class="row">
            <?php
                
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                    
$data Session::newInstance()->_getForm('pj_data');
                    
$detail['locale'][$locale['pk_c_code']]['s_desired_exp'] = $data[$locale['pk_c_code']]['desired_exp'];
                }
            
?>

            <label for="desired_exp"><?php _e('Position Title''jobs_attributes'); ?></label>
            <input type="text" name="<?php echo @$locale['pk_c_code']; ?>#desired_exp" id="desired_exp" value="<?php echo @$detail['locale'][$locale['pk_c_code']]['s_desired_exp']; ?>" />
        </div>
        <div class="row">
            <?php
                
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                    
$data Session::newInstance()->_getForm('pj_data');
                    
$detail['locale'][$locale['pk_c_code']]['s_minimum_requirements'] = $data[$locale['pk_c_code']]['min_reqs'];
                }
            
?>

            <label for="min_reqs"><?php _e('Minimum Qualifications''jobs_attributes'); ?></label>
            <textarea name="<?php echo @$locale['pk_c_code']; ?>#min_reqs" id="min_reqs" ><?php echo @$detail['locale'][$locale['pk_c_code']]['s_minimum_requirements']; ?></textarea>
        </div>
        <div class="row">
            <?php
                
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                    
$data Session::newInstance()->_getForm('pj_data');
                    
$detail['locale'][$locale['pk_c_code']]['s_desired_requirements'] = $data[$locale['pk_c_code']]['desired_reqs'];
                }
            
?>

            <label for="desired_reqs"><?php _e('Required Qualifications''jobs_attributes'); ?></label>
            <textarea name="<?php echo @$locale['pk_c_code']; ?>#desired_reqs" id="desired_reqs" ><?php echo @$detail['locale'][$locale['pk_c_code']]['s_desired_requirements']; ?></textarea>
        </div>
        <div class="row">
            <?php
                
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                    
$data Session::newInstance()->_getForm('pj_data');
                    
$detail['locale'][$locale['pk_c_code']]['s_contract'] = $data[$locale['pk_c_code']]['contract'];
                }
            
?>

            <label for="contract"><?php _e('Benefits''jobs_attributes'); ?></label>
            <input type="text" name="<?php echo @$locale['pk_c_code']; ?>#contract" id="contract"  value="<?php echo @$detail['locale'][$locale['pk_c_code']]['s_contract']; ?>" />
        </div>
        <div class="row">
            <?php
                
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                    
$data Session::newInstance()->_getForm('pj_data');
                    
$detail['locale'][$locale['pk_c_code']]['s_company_description'] = $data[$locale['pk_c_code']]['company_desc'];
                }
            
?>

            <label for="company_desc"><?php _e('Job Description''jobs_attributes'); ?></label>
            <textarea name="<?php echo @$locale['pk_c_code']; ?>#company_desc" id="company_desc" ><?php echo @$detail['locale'][$locale['pk_c_code']]['s_company_description']; ?></textarea>
        </div>
    <?php } else { ?>
        <div class="tabber">
        <?php foreach($locales as $locale) {?>
            <div class="tabbertab">
                <h2><?php echo $locale['s_name']; ?></h2>
                <div class="row">
                    <?php
                        
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                            
$data Session::newInstance()->_getForm('pj_data');
                            
$detail['locale'][$locale['pk_c_code']]['s_desired_exp'] = $data[$locale['pk_c_code']]['desired_exp'];
                        }
                    
?>

                    <label for="desired_exp"><?php _e('Desired experience''jobs_attributes'); ?></label>
                    <input type="text" name="<?php echo @$locale['pk_c_code']; ?>#desired_exp" id="desired_exp" value="<?php echo @$detail['locale'][$locale['pk_c_code']]['s_desired_exp']; ?>" />
                </div>
                <div class="row">
                    <?php
                        
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                            
$data Session::newInstance()->_getForm('pj_data');
                            
$detail['locale'][$locale['pk_c_code']]['s_minimum_requirements'] = $data[$locale['pk_c_code']]['min_reqs'];
                        }
                    
?>

                    <label for="min_reqs"><?php _e('Minimum requirements''jobs_attributes'); ?></label>
                    <textarea name="<?php echo @$locale['pk_c_code']; ?>#min_reqs" id="min_reqs" ><?php echo @$detail['locale'][$locale['pk_c_code']]['s_minimum_requirements']; ?></textarea>
                </div>
                <div class="row">
                    <?php
                        
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                            
$data Session::newInstance()->_getForm('pj_data');
                            
$detail['locale'][$locale['pk_c_code']]['s_desired_requirements'] = $data[$locale['pk_c_code']]['desired_reqs'];
                        }
                    
?>

                    <label for="desired_reqs"><?php _e('Desired requirements''jobs_attributes'); ?></label>
                    <textarea name="<?php echo @$locale['pk_c_code']; ?>#desired_reqs" id="desired_reqs" ><?php echo @$detail['locale'][$locale['pk_c_code']]['s_desired_requirements']; ?></textarea>
                </div>
                <div class="row">
                    <?php
                        
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                            
$data Session::newInstance()->_getForm('pj_data');
                            
$detail['locale'][$locale['pk_c_code']]['s_contract'] = $data[$locale['pk_c_code']]['contract'];
                        }
                    
?>

                    <label for="contract"><?php _e('Contract''jobs_attributes'); ?></label>
                    <input type="text" name="<?php echo @$locale['pk_c_code']; ?>#contract" id="contract" value="<?php echo @$detail['locale'][$locale['pk_c_code']]['s_contract']; ?>" />
                </div>
                <div class="row">
                    <?php
                        
if( Session::newInstance()->_getForm('pj_data') != "" ) {
                            
$data Session::newInstance()->_getForm('pj_data');
                            
$detail['locale'][$locale['pk_c_code']]['s_company_description'] = $data[$locale['pk_c_code']]['company_desc'];
                        }
                    
?>

                    <label for="company_desc"><?php _e('Company description''jobs_attributes'); ?></label>
                    <textarea name="<?php echo @$locale['pk_c_code']; ?>#company_desc" id="company_desc"><?php echo @$detail['locale'][$locale['pk_c_code']]['s_company_description']; ?></textarea>
                </div>
                <div style="clear:both;"></div>
            </div>
        <?php ?>
        </div>
<?php ?>
<script type="text/javascript">
    tabberAutomatic();
</script>
« Last Edit: January 25, 2022, 10:31:12 AM by Sparky »