Joom Shark : sh404sef Plugin for JS JOBS.. (1/5)

TOPIC: sh404sef Plugin for JS JOBS..

sh404sef Plugin for JS JOBS.. 7 years 6 months ago #804

  • soamz
  • soamz's Avatar
  • Offline
  • Senior Boarder
  • Joomla Services & Joomla Tutorials
  • Posts: 63
  • Karma: 0
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/
The administrator has disabled public write access.

Re:sh404sef Plugin for JS JOBS.. 7 years 6 months ago #805

  • soamz
  • soamz's Avatar
  • Offline
  • Senior Boarder
  • Joomla Services & Joomla Tutorials
  • Posts: 63
  • Karma: 0
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

?>
The administrator has disabled public write access.

Re:sh404sef Plugin for JS JOBS.. 7 years 6 months ago #807

  • Ahmad
  • Ahmad's Avatar
  • Offline
  • Administrator
  • Posts: 809
  • Thank you received: 21
  • Karma: 10
Yes SEF not working, it is my working list.
Please write your valuable review JS Jobs and JS Support Ticket at JED.
The administrator has disabled public write access.

Re:sh404sef Plugin for JS JOBS.. 7 years 6 months ago #809

  • soamz
  • soamz's Avatar
  • Offline
  • Senior Boarder
  • Joomla Services & Joomla Tutorials
  • Posts: 63
  • Karma: 0
Ok then.
Let me know. Thanks..
For now,I will just stay with it.
The administrator has disabled public write access.

Re:sh404sef Plugin for JS JOBS.. 7 years 6 months ago #816

  • Ahmad
  • Ahmad's Avatar
  • Offline
  • Administrator
  • Posts: 809
  • Thank you received: 21
  • Karma: 10
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.
Last Edit: 7 years 6 months ago by Ahmad.
The administrator has disabled public write access.

Re:sh404sef Plugin for JS JOBS.. 7 years 6 months ago #817

  • soamz
  • soamz's Avatar
  • Offline
  • Senior Boarder
  • Joomla Services & Joomla Tutorials
  • Posts: 63
  • Karma: 0
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
The administrator has disabled public write access.
Time to create page: 0.206 seconds