bingot

Topic: Side Bar - CATEGORY & NUMBERS of JOBS / CITY

im trying to decode the category and  numbers of jobs in sidebar.tpl

but i cant make it appear in all the pages.

my idea is that all the category and  number of the jobs / city . will be in all pages.  i try to alter the
{if $CURRENT_PAGE == ''} but nothing happen.

anyway. do you guys have any idea for this.

by the way  i see some posting about the paypal. would it be possible that it would be available for Featured posting??

im using  Jobberbase 1.9

thanx and more power

Last edited by bingot (2010-09-11 06:34:38)

putypuruty

Re: Side Bar - CATEGORY & NUMBERS of JOBS / CITY

Hi,

Tomorrow I'll post here the solution.

bingot

Re: Side Bar - CATEGORY & NUMBERS of JOBS / CITY

ohh thanx pls. kindly give me the solutions for this

im almost done with my site . you can check it here. www.jobsfixer.com

i just nee now the category and stats to show in all pages smile) with all of that counter etc.

thnx

putypuruty

Re: Side Bar - CATEGORY & NUMBERS of JOBS / CITY

To achieve what you want, you have to do the following:

- move the following code from page_home.php (by move I mean Cut but I guess that you get the point)

Code:

// get jobs
    $smarty->assign('jobs_count_all', $job->CountJobs());

    if (SIDEBAR_SHOW_WHAT == 'categories')
    {
        $smarty->assign('jobs_count_all_categs', $job->GetJobsCountForAllCategs());
    }
    else
    {
        $numberOfJobsInOtherCities = $job->GetNumberOfJobsInOtherCities();
        
        $smarty->assign('jobs_count_in_other_cities', $numberOfJobsInOtherCities);
        $smarty->assign('hide_other_cities_in_sidebar', $numberOfJobsInOtherCities < SIDEBAR_ONLY_CITIES_WITH_AT_LEAST_NUMBER_OF_JOBS);
        
        $jobsCountPerCity = $job->GetJobsCountPerCity();
        
        // exclude the cities that don't have at least the specified number of jobs 
        foreach ($jobsCountPerCity as $index => $jobsPerCity)
        {
            if ($jobsPerCity['jobs_in_city'] < SIDEBAR_ONLY_CITIES_WITH_AT_LEAST_NUMBER_OF_JOBS)
                unset($jobsCountPerCity[$index]);
        }
        
        $smarty->assign('jobs_count_per_city', $jobsCountPerCity);
    }

into the root index.php, before the line

Code:
switch($page)

- in _templates/default/sidebar.tpl, remove the {if $CURRENT_PAGE == ''} line and the {/if} on the last line

This should do it.

Please let us know if it works.

bingot

Re: Side Bar - CATEGORY & NUMBERS of JOBS / CITY

it is working .  but now i use all the sidebar the category and stats. with some modification.

anyway the thing is i try to create a highlighted selection on category like the category from the header..

and its not working well.  i cant get the ascii name of the category.

this is what im working on it

/////////////
<h4>Categories</h4>   
            <div id="categs-nav">
               <ul>
            {foreach item=job from=$jobs_count_all_categs }
           
        <li  {if $CURRENT_PAGE == $job.name_ascii_name } class="selected"{/if} >  <a href="{$BASE_URL}{$URL_JOBS}/{$job.categ_varname}/" style="font-size:12px">{$job.categ_name} - [ {$job.categ_count} ]</a></li>
        {/foreach}
           </ul>
           </div> 
////////

>>>  <li  {if id="{$CURRENT_PAGE}"  $CURRENT_PAGE == $job.categories_ascii_name } class="selected"{/if} > <<  this one

(note* this code came from the main category from the header =  <li id="{$categories[tmp].var_name}" {if $current_category == $categories[tmp].var_name}class="selected"{/if}> )

its nor working sad(

anyway thank you for your help. hope you can give me some  another advice on  this.

thnx
www.jobsfixer.com