Viewing 1 post (of 1 total)
  • Author
    Posts
  • brentwilliams2 Friend
    #192527

    Having an employer share his/her own jobs from your site will greatly improve the chances that the job posting will succeed. So what I have done is modify the confirmation page to give them instructions to do so. The basic functionality asks that the employer review the job and click “Done” or “Modify”. What I’ve done is make that a 3-step process:

    Step 1: Review the job and click modify if required
    Step 2: Share the job on social networks
    Step 3: Click “Done”

    All three of these steps are on the same page, so the majority of the modification is on views/jajobs/tmpl/jaview.php

    Note: This modification is done on 1.0.4, and may not work for other versions. Please test before using.

    First, find this line:

    <a class="button" href="<?php echo JURI::root().'index.php?option='. JBCOMNAME .'&view=jajobs&layout='.$new_task. '&cid[]='.$item->id. '&alias='.$alias.'&Itemid='. $this->Itemid ; ?>"><?php echo JText::_('DONE'); ?></a> 

    Go ahead and just remove that, as we will insert it later on.

    For the social buttons to work, we need to define the link of the final job post. This is bad code, I realize, but it works. Simply replace “yourwebsite.com” with your website name AND replace “79” with the primary job menu id for the site.I have this included higher up in the file, but you can put it near the bottom, as long as it’s before the next two sections.

    <?php
    $socialalias = JFilterOutput::stringURLSafe($item->title);
    $sociallink = 'http://www.yourwebsite.com';
    $sociallink .= JRoute::_('index.php?option=' . JBCOMNAME . '&view=jajobs&layout=jaview&cid[0]=' . $item->id . '&alias=' . $socialalias . '&Itemid=79');
    ?>

    The next two sections you will paste at the end of the document, although I’m breaking it up here so I can explain what each part does. So first, go to the end and paste this section:

    <?php if (JRequest::getVar('is_newjob')) : ?>
    <div style="color: #0055BBborder-top: 3px solid #84A7DBborder-bottom: 3px solid #84A7DBpadding: 10px;margin-bottom: 10px;background-color: #C3D2E5font-weight: bold;">
    Step 2: Share your job on LinkedIn, Facebook, Twitter, and Google+
    </div>
    <div style="padding-bottom:60px;">
    <div style="float:left;margin-right:10px;">
    <script src="//platform.linkedin.com/in.js" type="text/javascript">
    lang: en_US
    </script>
    <script type="IN/Share" data-url="<?php echo $sociallink ?>" title="<?php echo $this->item->title; ?>" data-counter="right"></script>
    </div>
    <div style="float:left">
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=134440073307002";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <fb:like href="<?php echo $sociallink ?>" send="false" width="270" show_faces="false"></fb:like>
    </div>
    <div style="float:left;">
    <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $sociallink ?>" data-via="apartment_jobs" data-dnt="true">Tweet</a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
    </div>
    <div style="float:left;">
    <div class="g-plusone" data-size="medium" data-href="<?php echo $sociallink ?>"></div>
    </div>
    </div>
    <?php endif ; ?>

    This does two things:

    1) It defines whether the message should show up. It only shows up if it is a new job
    2) It gives the social sharing buttons. There are different button styles, so you might want to play around with that.

    Important: Test that the buttons actually work. Some social sharing buttons need additional code at the top or bottom of the document. I have this code in my template, so it automatically shows up. But you may have to add it yourself.

    Next, you want to add this section right below the last at the very bottom:

    <?php if (JRequest::getVar('step') == 'verify') : ?>
    <div style="color: #0055BBborder-top: 3px solid #84A7DBborder-bottom: 3px solid #84A7DBpadding: 10px;margin-bottom: 10px;background-color: #C3D2E5font-weight: bold;">
    <?php if (JRequest::getVar('is_newjob')) { ?>
    Step 3: Click "Done" to finish your posting
    <?php } else { ?>
    Step 2: Click "Done" to finish your posting
    <?php } ?>
    </div>
    <a class="button" href="<?php echo JURI::root().'index.php?option='. JBCOMNAME .'&view=jajobs&layout='.$new_task. '&cid[]='.$item->id. '&alias='.$alias.'&Itemid='. $this->Itemid ; ?>"><?php echo JText::_('DONE'); ?></a> 
    <?php endif ; ?>

    What this does is tell the employer to click done. Since we don’t show the social sharing links when an employer simply edits a job, this step can be either 2 or 3 depending on the situation.

    So at this point we have added steps 2 and 3. Step 1 is simply changing the language file. So open up your language file (en-GB.com_jajobboard.ini for English websites), and modify the entry for “JOB_POSTING_PREVIEW”

    I used the following text: “Step 1: Review your job post and modify if necessary”

    I believe that’s it! It’s somewhat of a “first draft”, so it’s not as pretty as it could be, but I think it works pretty well. Now, when an employer adds a job, they will be instructed to review their post, share their job on social media sites, and click done.

Viewing 1 post (of 1 total)

This topic contains 1 reply, has 1 voice, and was last updated by  brentwilliams2 10 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum