Jump to content

seblondres

Members
  • Content Count

    50
  • Joined

  • Last visited

Everything 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
  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. ok thanks, I have use css instead of <h1>, all good now.
  8. ok works fine now many thanks for your help. I have added the <h1> tag because I can't style it otherwise but that's another issue.
  9. 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>';?>
  10. Hi, I'm not sure where to add the <a href= </a> in the code below to make it as an hyperlink? <?php echo "<h1>{$_SERVER['SERVER_NAME']}</h1>"?> Many Thanks,
  11. Hi, Does anyone know how to upload files e.g. index.php or more to multiple domains hosted on the same host? a solution where I would just need to update one folder and it would get populated across all the domains. Many Thanks,
  12. upload file multiple domain

  13. All good, thanks a lot for your time and your patience!
  14. 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 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...
  15. 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>";} ?>
  16. 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,
  17. Thanks, but which APi? as mentioned above Adsense API seems to be for reporting only
  18. Thanks for your reply. I can't find the layout below in Adsense, can you? Ads by Google related to: jobs in New York New Yorker Job‎ www.jobrapido.com/new+yorker+job‎14 urgent openings. No timewasters!‎ New Yorker Job‎‎ 515 people follow Jobrapido on Google+ Jobs (Hiring Now)‎ www.jobsinyourarea.co/‎892 Jobs Available In Your Area.‎ Earn $8 - $65 per Hour. Hiring Now!‎‎ US Postal Service-Hiring‎ www.postaljobsauthority.com/NewYork‎$21/hr Start, Avg Pay $72K/yr‎ Check Our Map of the 1700 Openings.‎‎
  19. Thanks again, but the URL I have mentioned is from a reputable site and I have also see this type of layout on some other sites so there is definitely a way to do this with Google ads. Adsense API seems to be for reporting only. Here is another example of some Google ads with this type of sponsored links layout: http://new-york.jobtonic.com/
  20. Thanks for you reply. But I want to display ads on my website not advertise. Adsense doesn't have the type of sponsored links layout, so I wonder how this site does it http://vehicles.viva....uk/motorcycles
  21. Hi, Does anyone know how to display Google ads like the sponsored links on this site? (see above or below results) http://vehicles.vivastreet.co.uk/motorcycles Many Thanks, Seb
  22. 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>";?>
  23. 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
  24. Ok, every style works except....the marginTop :/. I still have a space between the new element created and the paragraphe.Any other suggestions?var p = document.getElementsByTagName("P").item(4);var newText = document.createTextNode("Print");var newElement = document.createElement('a');newElement.href = "http://www.google.fr/";newElement.style.marginLeft = "25px";newElement.style.marginTop = "0px";newElement.style.backgroundColor = "#ff8c00"; newElement.appendChild(newText);p.parentNode.appendChild(newElement);
×
×
  • Create New...