Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • jpcharbonneau Friend
    #189185

    Hi,

    The created date for Employer is incorrect when we create a new employer with the option “Import Employer From Joomla User”…

    Note// the same situation occur for “Publish date” element from the backend “Job Manager”…

    When we registered from the frontend registration form and when we publish a new job from the frontend, created date (employer) and publish date (jobs) is ok.

    Could you please help on that one,

    Thanks in advance,

    JP

    HeR0 Friend
    #499966

    Dear JP,

    It is weird!!! Did you edit function function importUsers($userType) in the administrator/components/com_jajobboard/controllers/jaimportuser.php file ?

    Pls do as follows:

    Find
    [PHP]$query = “INSERT INTO #__ja_profiles(user_id, approved) VALUES(‘{$user_id}’, ‘1’)”;[/PHP]

    change it to

    [PHP]$query = “INSERT INTO #__ja_profiles(user_id, created_date, approved) VALUES(‘{$user_id}’, ‘{$int_join_date}’, ‘1’)”;[/PHP]

    Hope this helps.

    Regards

    jpcharbonneau Friend
    #500041

    Hi HeR0!

    Thanks for your excellent support! I really appreciate.

    I did’nt edit function importUsers($userType) before…

    You we’re right on with your code modification suggestion! Employer Created date is fine now when we use the “Import Employer From Joomla User” functionality.

    The only issue that still left in the “Publish date” element from the backend of the “Job Manager”. We we create a new job from that feature, the default publish date is still 1969-12-31 19:00:00

    Do you have something to suggest?

    Thanks in advance!

    JP

    HeR0 Friend
    #500073

    Hello,

    Please open file administrator/components/com_jajobboard/assets/rendfield.php

    Find

    [PHP]case “DATE_CAL”:
    $dateFormat = $jbconfig[‘general’]->get(‘format_date’);
    if(!$dateFormat) {
    $dateFormat = “%Y-%m-%d %H:%M:%S”;
    }
    if($field->field_name == ‘created_date’){
    if ($value) {
    $value = date(str_replace(‘%’, ”, $dateFormat), strtotime($value));
    }
    $r = $value ;
    }else{
    $value = date(“Y-m-d H:i:s”, strtotime($value));
    $r = JHTML::_(‘calendar’, $value, $field->field_name, $field->field_name, “%Y-%m-%d %H:%M:%S”, array(‘class’ => isset($field->field_class) ? $field->field_class : “inputbox”, ‘size’ => ’25’, ‘maxlength’ => ’19’, $field->eventmouse => $field->functionjs));
    }
    break;[/PHP]
    and try to change it to
    [PHP]case “DATE_CAL”:
    $dateFormat = $jbconfig[‘general’]->get(‘format_date’);
    if(!$dateFormat) {
    $dateFormat = “%Y-%m-%d %H:%M:%S”;
    }
    if($field->field_name == ‘created_date’){
    if ($value) {
    $value = date(str_replace(‘%’, ”, $dateFormat), strtotime($value));
    }
    $r = $value ;
    }else{
    $value = $value ? $value : date(“Y-m-d H:i:s”);
    $value = date(“Y-m-d H:i:s”, strtotime($value));
    $r = JHTML::_(‘calendar’, $value, $field->field_name, $field->field_name, “%Y-%m-%d %H:%M:%S”, array(‘class’ => isset($field->field_class) ? $field->field_class : “inputbox”, ‘size’ => ’25’, ‘maxlength’ => ’19’, $field->eventmouse => $field->functionjs));
    }
    break;[/PHP]
    Hope this helps.

    jpcharbonneau Friend
    #500246

    Hi HeR0!

    You we’re right on! It works like a charm now!

    Many thanks!!!

    Best,

    JP

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  jpcharbonneau 11 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum