Jump to content

seblondres

Members
  • Posts

    50
  • Joined

  • Last visited

Posts posted by seblondres

  1. Thanks but when I add the class then the groupon feed don't appear any more:

     

    My Css:

    .desc p { margin-top: 0;}

    JS code:

     

    <script>$(function() {$(document).ready(function(){$.getJSON("https://partner-int-api.groupon.com/deals.json?country_code=UK&tsToken=IE_AFF_0_201236_212556_0&filters=category:food-and-drink&offset=0&limit=10&callback=?",function(data){$.each(data.deals, function(i,data){var div_data ="<div class="desc"><a href='"+data.dealUrl+"'>"+data.title+"</a><p>"+data.highlightsHtml+"</p></div>";$(div_data).appendTo("#showdata");});});return false;});});</script>
  2. Thanks for your feedback and the link. I have added:

    document.getElementById('showdata').style.display = 'block';

    to

    $(function() {$(document).ready(function(){$.getJSON("https://partner-int-api.groupon.com/deals.json?country_code=UK&tsToken=IE_AFF_0_201236_212556_0&filters=category:food-and-drink&offset=0&limit=50&callback=?",function(data){$.each(data.deals, function(i,data){var div_data ="<div><a href='"+data.dealUrl+"'>"+data.title+"</a><p>"+data.highlightsHtml+"</p></div>";$(div_data).appendTo("#showdata");document.getElementById('showdata').style.display = 'block';});});return false;});});

    but I still have a space between the tittle and the description :facepalm:

  3. ok thanks for your answer. In PHP, I'm able to add a variable in the URL (see: &offset='.$start.') and then rebuild the url with http_build_query and $start+10. It works fine, but since Groupon only support JSON, I was looking for a similar solution in JavaScript by passing a variable in the URL.

    https://partner-int-api.groupon.com/deals.json?country_code=IE&tsToken=IE_AFF_0_201236_212556_0&division_id=dublin&offset='.$start.'&limit=20
  4. That's right, I'd like to be able to add +10 to "&offset=" so on click on a button it will looks like "&offset=10", on another click it will looks like "&offset=20" etc.

  5. Hi,

     

    I have this URL from the Groupon API:

    https://partner-int-api.groupon.com/deals.json?country_code=IE&tsToken=IE_AFF_0_201236_212556_0&division_id=dublin&offset=0&limit=20

    The &offset=0 is use for pagination. So I was wondering how could I add a "Next" link or "Button" to add +10 to &offset= so users can call the next 10 deals? I've been working with JSON to retrieve the deals and I was thinking of an onclick event, if someone could point me to the right direction.

     

    Many Thanks,

    Seb

  6. Hi,

     

    I'm trying to display the following results inline.

     

    For the moment the outcome is as follow:

     

    Title

     

    Description

     

    and I'd like to remove the space between the two so it looks like the below with also the title underline:

     

    Title

    Description

     

    Here is the code:

    $(function() {$(document).ready(function(){$.getJSON("https://partner-int-api.groupon.com/deals.json?country_code=UK&tsToken=IE_AFF_0_201236_212556_0&filters=category:food-and-drink&offset=0&limit=50&callback=?",function(data){$.each(data.deals, function(i,data){var div_data ="<div><a href='"+data.dealUrl+"'>"+data.title+"</a><p>"+data.highlightsHtml+"</p></div>";$(div_data).appendTo("#showdata");});});return false;});});

    Thanks for your help,

    Seb

  7. thanks for your help , it works apart that when I click on the link the page is not found because the url contains the domain name twice e.g. mysite.com/mysite.com

    <?php echo '<h1><a href="' . $_SERVER['SERVER_NAME'] . '">' . $_SERVER['SERVER_NAME'] . '</a></h1>';?>
  8. ok thanks a lot, the space is gone now. But the description is now next to the title instead of being just below and if I add a <br> at the end, I end up with the space again :facepalm:

     

    Currently:

     

    Purchasing Graduate Development Programme - UKRolls-Royce (7 days ago) - Rolls-Royce Purchasing Graduate Development Programme... possible value from that spend. Our Purchasing Graduate Development Programme is designed to give you an...

     

    But I'd like the description just below with no space between the title and the description.

     

    Purchasing Graduate Development Programme - UK

    Rolls-Royce (7 days ago) - Rolls-Royce Purchasing Graduate Development Programme... possible value from that spend. Our Purchasing Graduate Development Programme is designed to give you an...

  9. Hi,

     

    Thanks for your help. I have added the class + the css but I got the following error - see: http://gradsjobs.co.uk/

     

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/emploica/gradsjobs/indeed.php on line 35 - See more at: http://gradsjobs.co.uk/#sthash.tmliP1UT.dpuf

    foreach($xml->results->result as $result) {		echo "<h3 class="InlineMeAndNext"><a href=".$result->url.">".$result->jobtitle."</a></h3>";		echo "<p><b>".$result->company."</b> (".$result->formattedRelativeTime.") <b>".$result->city."</b> - ".$result->snippet."</p>";} ?>
  10. Hi,

     

    I've been working with the indeed jobs API and I have a line break after the title that Id'like to get rid off.

     

    Jobs Results:

    Graduate Scheme - 2015

     

    Crossrail Ltd (2 days ago) London - Crossrail vacancies Graduate Scheme - 2015 Graduate Scheme - 2015 Job title Graduate Scheme - 2015... visit our designated Graduate Scheme page for more...

     

    Here is the code:

     

    foreach($xml->results->result as $result) {echo "<h3><a href=".$result->url.">".$result->jobtitle."</a></h3>";echo "<p><b>".$result->company."</b> (".$result->formattedRelativeTime.") <b>".$result->city."</b> - ".$result->snippet."</p>";} ?>
    I can't find out why there is a line break between the two echo, any idea?
    Many Thanks,
  11. Thanks for your reply.

     

    I can't find the layout below in Adsense, can you?

     

    Ads by Google related to: jobs in New York
    www.jobrapido.com/new+yorker+job14 urgent openings. No timewasters!New Yorker Job
    515 people follow Jobrapido on Google+
    www.jobsinyourarea.co/892 Jobs Available In Your Area.Earn $8 - $65 per Hour. Hiring Now!
    www.postaljobsauthority.com/NewYork$21/hr Start, Avg Pay $72K/yrCheck Our Map of the 1700 Openings.
  12. Many thanks for taking the time to answer my question. I had a look at some pagination scripts and built the below and...it works fine!

     

    <?php$search = $_GET["job"];$start = $_GET["start"];$query = http_build_query(array("job" => $search, "start" => $start+10));echo "<a href='/enterprises-a.php?$query'>Next</a>";?>

  13. Hi Everyone,

     

    I’m currently using the indeed API to retrieve jobs. Users can either use the search box or click on some hyperlinks e.g. Java Developer. If they click on a hyperlink, I’m using &GET to pick up the keywords from the URL to query Indeed e.g. www.sitename.com/index.php?job=java in this case the page will display all the jobs that contain the keyword java.

    Now the indeed API is limited to 25 jobs per request, but they have a parameter call “start” that can be added at the end of the URL above to call more jobs e.g. www.sitename.com/index.php?job=java&start=10 will call the next 10 jobs.

     

    So I’m trying to figure out, how I could add a next / previous link at the bottom of the pages that will add that piece of code &start=10, &start=20 etc. in the URL so users can call more jobs, any idea?

     

    Thanks for your help,

    Seb

×
×
  • Create New...