www.mamboteam.com
Jx Development
Home arrow Support Forum
Friday, 19 March 2010
 
 
Main Menu
Home
FAQs
Portfolio
File Archive
Bug Reports
Support Forum
Development Update
Work in Progress
Web Links
Contact Me
Component Demos
Jobline Demo
Mamblog Demo
Jambook Demo
Login Form





Lost Password?
No account yet? Register
Who's Online
We have 29 guests online
Newsletter

Subscribe to our newsletter.






Donate
If you use and like my scripts, and would like further developments, please consider donating a few bucks.

External links
www.ledutveckling.com - The Yard - Utvecklaren - Rollspel.nu - Spelwebben - Gardener's Game Garage - My Pet Peeves - PSPnuts

Interesting Sites
Joomla!
Joomlahut
Netshine Joomla Tutorial
JX extensions on JED
Support Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Need additional Job Type (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Need additional Job Type
#5807
philippe (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Need additional Job Type 4 Months, 3 Weeks ago Karma: 0  
How can I add an additional job type?
Right now we got: Full Time, Part Time and Internship.
I would love to add: Temporary
Could someone help me figure out what files need to be edited?
Thank you for your help.

I am using the latest version 1.1.3.1
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/10/27 17:42 By philippe.
  The administrator has disabled public write access.
#5811
dev (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:Need additional Job Type 4 Months, 2 Weeks ago Karma: 0  
Here is what I did. I make no expressed or implied guarantee about the completeness of this.


Add to your language file around line 14:
jobline->language->english.php

before
Code:

DEFINE('_JL_JOBTYPE_FULLTIME', 'Full-time'); DEFINE('_JL_JOBTYPE_PARTTIME', 'Part-time');
after
Code:

DEFINE('_JL_JOBTYPE_FULLTIME', 'Full-time'); DEFINE('_JL_JOBTYPE_PARTTIME', 'Part-time'); DEFINE('_JL_JOBTYPE_TEMPORARY', 'Temporary');
Add to jobline.php around line 459: before
Code:

$jobtypelist = array(); $jobtypelist[] = mosHTML::makeOption( '0', _JL_JOBTYPE_FULLTIME ); $jobtypelist[] = mosHTML::makeOption( '1', _JL_JOBTYPE_PARTTIME ); $jobtypelist[] = mosHTML::makeOption( '2', _JL_JOBTYPE_INTERNSHIP );
after
Code:

$jobtypelist = array(); $jobtypelist[] = mosHTML::makeOption( '0', _JL_JOBTYPE_FULLTIME ); $jobtypelist[] = mosHTML::makeOption( '1', _JL_JOBTYPE_PARTTIME ); $jobtypelist[] = mosHTML::makeOption( '2', _JL_JOBTYPE_INTERNSHIP ); $jobtypelist[] = mosHTML::makeOption( '3', _JL_JOBTYPE_TEMPORARY );
Alter the job type search in jobline.php around line 642 (note that the code treats internships differently, so I lumped temporary work in with full/part time): before
Code:

// Only show one job type $typequery = ""; if ( $type != "" ) { switch ( $type ) { case "internships": $typequery = "\n AND c.jobtype = 2"; break; case "normal": $typequery = "\n AND ( c.jobtype = 0 OR c.jobtype = 1 )"; break; default:
after
Code:

// Only show one job type $typequery = ""; if ( $type != "" ) { switch ( $type ) { case "internships": $typequery = "\n AND c.jobtype = 2"; break; //case "normal": $typequery = "\n AND ( c.jobtype = 0 OR c.jobtype = 1 )"; break; case "normal": $typequery = "\n AND ( c.jobtype = 0 OR c.jobtype = 1 OR c.jobtype = 3 )"; break; default:
Alter jobline.common.php around line 88: before
Code:

function getJobTypeString( $jobtype ) { $ret = ""; switch ( $jobtype ) { case '0': $ret = _JL_JOBTYPE_FULLTIME; break; case '1': $ret = _JL_JOBTYPE_PARTTIME; break; case '2': $ret = _JL_JOBTYPE_INTERNSHIP; break; } return $ret; }
after
Code:

function getJobTypeString( $jobtype ) { $ret = ""; switch ( $jobtype ) { case '0': $ret = _JL_JOBTYPE_FULLTIME; break; case '1': $ret = _JL_JOBTYPE_PARTTIME; break; case '2': $ret = _JL_JOBTYPE_INTERNSHIP; break; case '3': $ret = _JL_JOBTYPE_FULLORPART; break; } return $ret; }
Now for the administrative screens. Add to admin.jobline.php around line 383: before
Code:

// make the select list for the job types $jobtypelist = array(); $jobtypelist[] = mosHTML::makeOption( '0', _JL_JOBTYPE_FULLTIME ); $jobtypelist[] = mosHTML::makeOption( '1', _JL_JOBTYPE_PARTTIME ); $jobtypelist[] = mosHTML::makeOption( '2', _JL_JOBTYPE_INTERNSHIP );
after
Code:

// make the select list for the job types $jobtypelist = array(); $jobtypelist[] = mosHTML::makeOption( '0', _JL_JOBTYPE_FULLTIME ); $jobtypelist[] = mosHTML::makeOption( '1', _JL_JOBTYPE_PARTTIME ); $jobtypelist[] = mosHTML::makeOption( '2', _JL_JOBTYPE_INTERNSHIP ); $jobtypelist[] = mosHTML::makeOption( '3', _JL_JOBTYPE_TEMPORARY );
Alter admin.jobline.html.php around line 55: before
Code:

var jobtypes = new Array("<?php echo _JL_JOBTYPE_FULLTIME; ?>", "<?php echo _JL_JOBTYPE_PARTTIME; ?>", "<?php echo _JL_JOBTYPE_INTERNSHIP; ?>");
after
Code:

var jobtypes = new Array("<?php echo _JL_JOBTYPE_FULLTIME; ?>", "<?php echo _JL_JOBTYPE_PARTTIME; ?>", "<?php echo _JL_JOBTYPE_INTERNSHIP; ?>", "<?php echo _JL_JOBTYPE_TEMPORARY; ?>");
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/10/30 23:28 By dev.
  The administrator has disabled public write access.
#5823
philippe (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Need additional Job Type 4 Months ago Karma: 0  
Thank you so much for helping with that additional option.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
Advertisement
Polls
Is Joomla 1.0 support needed in future releases of our extensions?
 
Latest News
Most Read
Latest Commented
Bug Reporting (1 comments)
Mamblog - User blog component (61 comments)
The road to Jobline v1.2 (5 comments)
Export vBulletin users to Mambo (6 comments)
Jobline Documentation (4 comments)
Latest Posts

More...
 
Top! Top!