×

Notice

The forum is in read only mode.

sh404sef Plugin for JS JOBS..

15 years 1 month ago #804 by soamz
Hey Ahmad,
Hee I got one, but I dont know,why its not working with your latest 1.0.5 version.
Can you please help as without SEF, its just doesnt meet any requirement. :dry:

Attached file. Place t under com_sh404sef/sef_ext/
15 years 1 month ago #805 by soamz
Replied by soamz on topic sh404sef Plugin for JS JOBS..
Damn, it dint get attached.
Ok im writing the code, you just save it as com_jsjobs.php

<?php
/**
* sh404SEF support for the com_jsjobs component (v 1.0.4.2) available at joomshark.com
* Author: Josh Rosenthal
* contact: IGetWork.com
*
* This extension will give the SEF advance style URLs to the JS Jobs component.
* Place this file (com_jsjobs.php) in the /components/com_sh404sef/sef_ext directory
*
* Copyright (C) 2009 Josh Rosenthal, IGetWork.com , All rights reserved.
* Use freely, but please give a link to IGetWork.com
* or add the following code in to your template once
* <img src=\" IGetWork.com/tracking/IGetWork%20track.gif alt=\"IGetWork - get paid to list and find work\" width=\"1\" height=\"1\" lang=\"en\" xml:lang=\"en\">
*/

defined( \'_JEXEC\' ) or die( \'Direct Access to this location is not allowed.\' );

//


standard plugin initialize function - don\'t change
global $sh_LANG, $sefConfig;
$shLangName = \'\';
$shLangIso = \'\';
$title = array();
$shItemidString = \'\';
$dosef = shInitializePlugin( $lang, $shLangName, $shLangIso, $option);
if ($dosef == false) return;
//
standard plugin initialize function - don\'t change


// Handle argument: Itemid
if (eregi(\'Itemid=[0-9]+\', $string) === false) { // if no Itemid in non-sef URL
//global $Itemid;
if ($sefConfig->shInsertGlobalItemidIfNone && !empty($shCurrentItemid)) {
$string .= \'&Itemid=\'.$shCurrentItemid; // append current Itemid
$Itemid = $shCurrentItemid;
shAddToGETVarsList(\'Itemid\', $Itemid); // V 1.2.4.m
}
if ($sefConfig->shInsertTitleIfNoItemid)
$title[] = $sefConfig->shDefaultMenuItemName ?
$sefConfig->shDefaultMenuItemName : getMenuTitle($option, null, $shCurrentItemid );
$shItemidString = $sefConfig->shAlwaysInsertItemid ?
_COM_SEF_SH_ALWAYS_INSERT_ITEMID_PREFIX.$sefConfig->replacement.$shCurrentItemid
: \'\';
} else { // if Itemid in non-sef URL
$shItemidString = $sefConfig->shAlwaysInsertItemid ?
_COM_SEF_SH_ALWAYS_INSERT_ITEMID_PREFIX.$sefConfig->replacement.$Itemid
: \'\';
}
if (!empty($Itemid)){
shRemoveFromGETVarsList(\'Itemid\');
}

//base directory for this application
$title[] = \'work\';

/* handle random variables */
// VARIABLE: view
if (isset($view)){
$view = @$view;
shRemoveFromGETVarsList(\'view\');
} else {
$view = null;
}
if (!empty($view)){
shRemoveFromGETVarsList(\'view\');
}

// VARIABLE: c
if (isset($c)){
$c = @$c;
shRemoveFromGETVarsList(\'c\');
} else {
$c = null;
}

// VARIABLE: jobcat
if (isset($jobcat)){
$jobcat = @$jobcat;
//TODO:recode js_jobs to allow URL category/$cn.html and shRemoveFromGETVarsList(\'jobcat\');
} else {
$jobcat = null;
}

// VARIABLE: cn
if (isset($cn)){
$cn = @$cn;
shRemoveFromGETVarsList(\'cn\');
} else {
$cn = null;
}

// VARIABLE: vj
if (isset($vj)){
$vj = @$vj;
shRemoveFromGETVarsList(\'vj\');
} else {
$vj = null;
}

// VARIABLE: jobid
if (isset($jobid)){
$jobid = @$jobid;
} else {
$jobid = null;
}

// VARIABLE: layout
if (isset($layout)){
//TODO: internationalize manually-added $title[] elements
$layout = @$layout;
if($layout == \'listjobs\'){
$title[] = \'category\';

$temptitle=getMenuTitle($option, (isset($task) ? @$task : null), $Itemid, null, $shLangName );
if($temptitle=\"/\"){
// make page title the categories/[js_job_categories.cat_title].html
$sql = \"SELECT cat_title FROM #__js_job_categories WHERE id = \".$jobcat;
$database->setQuery($sql);
if (isset($shLanguage) && shIsMultilingual()) {
$rows = @$database->loadObjectList( \'\', true, $shLanguage);
} else {
$rows = @$database->loadObjectList( );
}
if ($database->getErrorNum()) {
//TODO: determine if this if is even necessary
// die( $database->stderr() );
} elseif(@count($rows) > 0) {
if (!shIsHomepage( $shLink )) { // V1.2.4.q homepage detection
if(!empty($rows[0]->cat_title)) {
$temptitle = $rows[0]->cat_title;
}
}
}
}
$title[] = $temptitle;
} elseif($layout == \'viewjob\') {
$title[] = \"view job\";
} elseif($layout == \'jobapply\') {
$title[] = \"apply for job\";
} elseif($layout == \'formjob\') {
//TODO: figure out how to use the menu title when posting a new job and \"edit job\" when appropriate
$title[] = \"edit job\";
} elseif($layout == \'empview\') {
//TODO: figure out how to use the menu title when posting a new job and \"my resume\" when appropriate
$title[] = \"my resume\";
} else {
// make page title the /page-title.html
$title[] = getMenuTitle($option, (isset($task) ? @$task : null), $Itemid, null, $shLangName );
}
} else {
$layout = null;

// make page title the /page-title.html
$title[] = getMenuTitle($option, (isset($task) ? @$task : null), $Itemid, null, $shLangName );
}
shRemoveFromGETVarsList(\'layout\');

shRemoveFromGETVarsList(\'option\');
shRemoveFromGETVarsList(\'lang\');




//
standard plugin finalize function - don\'t change
if ($dosef){
$string = shFinalizePlugin( $string, $title, $shAppendString, $shItemidString,
(isset($limit) ? @$limit : null), (isset($limitstart) ? @$limitstart : null),
(isset($shLangName) ? @$shLangName : null));
}
//
standard plugin finalize function - don\'t change

?>

15 years 1 month ago #807 by Ahmad
Replied by Ahmad on topic sh404sef Plugin for JS JOBS..
Yes SEF not working, it is my working list.

Please write your valuable review JS Jobs and JS Support Ticket at JED.
15 years 1 month ago #809 by soamz
Replied by soamz on topic sh404sef Plugin for JS JOBS..
Ok then.
Let me know. Thanks..
For now,I will just stay with it.
15 years 1 month ago - 15 years 1 month ago #816 by Ahmad
Replied by Ahmad on topic sh404sef Plugin for JS JOBS..
Hi,

Please try this file and give me feedback.
If you get any problem, please mail me all details.

Attachment com_jsjobs.zip not found


Please write your valuable review JS Jobs and JS Support Ticket at JED.
15 years 1 month ago #817 by soamz
Replied by soamz on topic sh404sef Plugin for JS JOBS..
After I activated it, the whole site is gone and it gives this error,

Parse error: syntax error, unexpected $end in /home/qubc/public_html/jussate/components/com_sh404sef/sef_ext/com_jsjobs.php on line 242
Time to create page: 0.085 seconds

Please publish modules in offcanvas position.