Welcome, Guest
Username: Password: Remember me

TOPIC: sh404sef Plugin for JS JOBS..

sh404sef Plugin for JS JOBS.. 8 years 3 days ago #804

  • soamz
  • soamz's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Joomla Services & Joomla Tutorials
  • Posts: 63
  • Thank you received: 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/

Please Log in or Create an account to join the conversation.

Re:sh404sef Plugin for JS JOBS.. 8 years 3 days ago #805

  • soamz
  • soamz's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Joomla Services & Joomla Tutorials
  • Posts: 63
  • Thank you received: 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

?>

Please Log in or Create an account to join the conversation.

Re:sh404sef Plugin for JS JOBS.. 8 years 3 days ago #807

  • Ahmad
  • Ahmad's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 823
  • Karma: 10
  • Thank you received: 22
Yes SEF not working, it is my working list.

Please Log in or Create an account to join the conversation.

Please write your valuable review JS Jobs and JS Support Ticket at JED.

Re:sh404sef Plugin for JS JOBS.. 8 years 3 days ago #809

  • soamz
  • soamz's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Joomla Services & Joomla Tutorials
  • Posts: 63
  • Thank you received: 0
Ok then.
Let me know. Thanks..
For now,I will just stay with it.

Please Log in or Create an account to join the conversation.

Re:sh404sef Plugin for JS JOBS.. 8 years 2 days ago #816

  • Ahmad
  • Ahmad's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 823
  • Karma: 10
  • Thank you received: 22
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 Log in or Create an account to join the conversation.

Please write your valuable review JS Jobs and JS Support Ticket at JED.
Last Edit: by Ahmad.

Re:sh404sef Plugin for JS JOBS.. 8 years 2 days ago #817

  • soamz
  • soamz's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Joomla Services & Joomla Tutorials
  • Posts: 63
  • Thank you received: 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

Please Log in or Create an account to join the conversation.

Time to create page: 0.247 seconds

Please publish modules in offcanvas position.