Find Jobs
Hire Freelancers

Convert script into google like pagination

$30-100 USD

Fechado
Publicado há mais de 14 anos

$30-100 USD

Pago na entrega
I have this RSS parsing code and it paginates , but only uses 'next' and 'previous' links instead of how google does it. I want it to read like this: first 1 2 3.... last I want it to look like this: [login to view URL] ## Deliverables I have this RSS parsing code and it paginates , but only uses 'next' and 'previous' links instead of how google does it. I want it to read like this: first 1 2 3.... last I want it to look like this: [login to view URL] <code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"><?php <br /></span><span style="color: rgb(0, 119, 0);">require_once(</span><span style="color: rgb(221, 0, 0);">'[login to view URL]'</span><span style="color: rgb(0, 119, 0);">); <br /> <br /></span><span style="color: rgb(255, 128, 0);">// Set your own configuration options as you see fit. <br /></span><span style="color: rgb(0, 0, 187);">$feed </span><span style="color: rgb(0, 119, 0);">= new </span><span style="color: rgb(0, 0, 187);">SimplePie</span><span style="color: rgb(0, 119, 0);">(); <br /></span><span style="color: rgb(0, 0, 187);">$feed</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">set_feed_url</span><span style="color: rgb(0, 119, 0);">(array( <br /></span><span style="color: rgb(0, 0, 187);">link1 <br />link2 <br /></span><span style="color: rgb(0, 119, 0);">..... <br />)); <br /></span><span style="color: rgb(0, 0, 187);">$success </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$feed</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">init</span><span style="color: rgb(0, 119, 0);">(); <br /> <br /> <br /> <br /></span><span style="color: rgb(255, 128, 0);">// Make sure the page is being served with the right headers. <br /></span><span style="color: rgb(0, 0, 187);">$feed</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">handle_content_type</span><span style="color: rgb(0, 119, 0);">(); <br /> <br /></span><span style="color: rgb(255, 128, 0);">// Set our paging values <br /></span><span style="color: rgb(0, 0, 187);">$start </span><span style="color: rgb(0, 119, 0);">= (isset(</span><span style="color: rgb(0, 0, 187);">$_GET</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'start'</span><span style="color: rgb(0, 119, 0);">]) && !empty(</span><span style="color: rgb(0, 0, 187);">$_GET</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'start'</span><span style="color: rgb(0, 119, 0);">])) ? </span><span style="color: rgb(0, 0, 187);">$_GET</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'start'</span><span style="color: rgb(0, 119, 0);">] : </span><span style="color: rgb(0, 0, 187);">0</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(255, 128, 0);">// Where do we start? <br /></span><span style="color: rgb(0, 0, 187);">$length </span><span style="color: rgb(0, 119, 0);">= (isset(</span><span style="color: rgb(0, 0, 187);">$_GET</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'length'</span><span style="color: rgb(0, 119, 0);">]) && !empty(</span><span style="color: rgb(0, 0, 187);">$_GET</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'length'</span><span style="color: rgb(0, 119, 0);">])) ? </span><span style="color: rgb(0, 0, 187);">$_GET</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'length'</span><span style="color: rgb(0, 119, 0);">] : </span><span style="color: rgb(0, 0, 187);">5</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(255, 128, 0);">// How many per page? <br /></span><span style="color: rgb(0, 0, 187);">$max </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$feed</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_item_quantity</span><span style="color: rgb(0, 119, 0);">(); </span><span style="color: rgb(255, 128, 0);">// Where do we end? <br /> <br />// When we end our PHP block, we want to make sure our DOCTYPE is on the top line to make <br />// sure that the browser snaps into Standards Mode. <br /></span><span style="color: rgb(0, 0, 187);">?></span><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "\"> <br /> <br /><html xmlns="" xml:lang="en-US" lang="en-US"> <br /><head> <br /><title>SimplePie: Demo</title> <br /> <br /><link rel="stylesheet" href="[login to view URL]" type="text/css" media="screen, projector" /> <br /> <br /></head> <br /> <br /><body> <br /><div id="site"> <br /><span style="color: rgb(0, 0, 187);"><?php <br /></span><span style="color: rgb(255, 128, 0);">// If we have an error, display it. <br /></span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$feed</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">error</span><span style="color: rgb(0, 119, 0);">()) <br />{ <br />echo </span><span style="color: rgb(221, 0, 0);">'<div class="sp_errors">' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">"\r\n"</span><span style="color: rgb(0, 119, 0);">; <br />echo </span><span style="color: rgb(221, 0, 0);">'<p>' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">htmlspecialchars</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$feed</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">error</span><span style="color: rgb(0, 119, 0);">()) . </span><span style="color: rgb(221, 0, 0);">"</p>\r\n"</span><span style="color: rgb(0, 119, 0);">; <br />echo </span><span style="color: rgb(221, 0, 0);">'</div>' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">"\r\n"</span><span style="color: rgb(0, 119, 0);">; <br />} <br /></span><span style="color: rgb(0, 0, 187);">?> <br /></span> <br /><span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$success</span><span style="color: rgb(0, 119, 0);">): </span><span style="color: rgb(0, 0, 187);">?> <br /><?php <br /></span><span style="color: rgb(255, 128, 0);">// get_items() will accept values from above. <br /></span><span style="color: rgb(0, 119, 0);">foreach(</span><span style="color: rgb(0, 0, 187);">$feed</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_items</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$start</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">$length</span><span style="color: rgb(0, 119, 0);">) as </span><span style="color: rgb(0, 0, 187);">$item</span><span style="color: rgb(0, 119, 0);">): <br /></span><span style="color: rgb(0, 0, 187);">$feed </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$item</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_feed</span><span style="color: rgb(0, 119, 0);">(); <br /></span><span style="color: rgb(0, 0, 187);">?> <br /></span> <br /><div class="chunk"> <br /> <br /><h4><span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">if (</span><span style="color: rgb(0, 0, 187);">$item</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_permalink</span><span style="color: rgb(0, 119, 0);">()) echo </span><span style="color: rgb(221, 0, 0);">'<a href="' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$item</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_permalink</span><span style="color: rgb(0, 119, 0);">() . </span><span style="color: rgb(221, 0, 0);">'">'</span><span style="color: rgb(0, 119, 0);">; echo </span><span style="color: rgb(0, 0, 187);">$item</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_title</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">true</span><span style="color: rgb(0, 119, 0);">); if (</span><span style="color: rgb(0, 0, 187);">$item</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_permalink</span><span style="color: rgb(0, 119, 0);">()) echo </span><span style="color: rgb(221, 0, 0);">'</a>'</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span></h4> <br /> <br /><p class="footnote">Source: <a href="<span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(0, 0, 187);">$feed</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_permalink</span><span style="color: rgb(0, 119, 0);">(); </span><span style="color: rgb(0, 0, 187);">?></span>"><span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(0, 0, 187);">$feed</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_title</span><span style="color: rgb(0, 119, 0);">(); </span><span style="color: rgb(0, 0, 187);">?></span></a> | <span style="color: rgb(0, 0, 187);"><?putenv</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"TZ=US/Pacific"</span><span style="color: rgb(0, 119, 0);">); echo </span><span style="color: rgb(0, 0, 187);">$item</span><span style="color: rgb(0, 119, 0);">-></span><span style="color: rgb(0, 0, 187);">get_date</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'j M Y | g:i a'</span><span style="color: rgb(0, 119, 0);">); </span><span style="color: rgb(0, 0, 187);">?></span></p> <br /> <br /></div> <br /> <br /><span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">endforeach; </span><span style="color: rgb(0, 0, 187);">?> <br /><?php </span><span style="color: rgb(0, 119, 0);">endif; </span><span style="color: rgb(0, 0, 187);">?> <br /></span> <br /><span style="color: rgb(0, 0, 187);"><?php <br /></span><span style="color: rgb(255, 128, 0);">// Let's do our paging controls <br /></span><span style="color: rgb(0, 0, 187);">$next </span><span style="color: rgb(0, 119, 0);">= (int) </span><span style="color: rgb(0, 0, 187);">$start </span><span style="color: rgb(0, 119, 0);">+ (int) </span><span style="color: rgb(0, 0, 187);">$length</span><span style="color: rgb(0, 119, 0);">; <br /></span><span style="color: rgb(0, 0, 187);">$prev </span><span style="color: rgb(0, 119, 0);">= (int) </span><span style="color: rgb(0, 0, 187);">$start </span><span style="color: rgb(0, 119, 0);">- (int) </span><span style="color: rgb(0, 0, 187);">$length</span><span style="color: rgb(0, 119, 0);">; <br /> <br /></span><span style="color: rgb(255, 128, 0);">// Create the NEXT link <br /></span><span style="color: rgb(0, 0, 187);">$nextlink </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(221, 0, 0);">'<a href="?start=' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$next </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">'&length=' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$length </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">'">Next &raquo;</a>'</span><span style="color: rgb(0, 119, 0);">; <br />if (</span><span style="color: rgb(0, 0, 187);">$next </span><span style="color: rgb(0, 119, 0);">> </span><span style="color: rgb(0, 0, 187);">$max</span><span style="color: rgb(0, 119, 0);">) <br />{ <br /></span><span style="color: rgb(0, 0, 187);">$nextlink </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(221, 0, 0);">'Next &raquo;'</span><span style="color: rgb(0, 119, 0);">; <br />} <br /> <br /></span><span style="color: rgb(255, 128, 0);">// Create the PREVIOUS link <br /></span><span style="color: rgb(0, 0, 187);">$prevlink </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(221, 0, 0);">'<a href="?start=' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$prev </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">'&length=' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$length </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">'">&laquo; Previous</a>'</span><span style="color: rgb(0, 119, 0);">; <br />if (</span><span style="color: rgb(0, 0, 187);">$prev </span><span style="color: rgb(0, 119, 0);">< </span><span style="color: rgb(0, 0, 187);">0 </span><span style="color: rgb(0, 119, 0);">&& (int) </span><span style="color: rgb(0, 0, 187);">$start </span><span style="color: rgb(0, 119, 0);">> </span><span style="color: rgb(0, 0, 187);">0</span><span style="color: rgb(0, 119, 0);">) <br />{ <br /></span><span style="color: rgb(0, 0, 187);">$prevlink </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(221, 0, 0);">'<a href="?start=0&length=' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$length </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">'">&laquo; Previous</a>'</span><span style="color: rgb(0, 119, 0);">; <br />} <br />else if (</span><span style="color: rgb(0, 0, 187);">$prev </span><span style="color: rgb(0, 119, 0);">< </span><span style="color: rgb(0, 0, 187);">0</span><span style="color: rgb(0, 119, 0);">) <br />{ <br /></span><span style="color: rgb(0, 0, 187);">$prevlink </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(221, 0, 0);">'&laquo; Previous'</span><span style="color: rgb(0, 119, 0);">; <br />} <br /> <br /></span><span style="color: rgb(255, 128, 0);">// Normalize the numbering for humans <br /></span><span style="color: rgb(0, 0, 187);">$begin </span><span style="color: rgb(0, 119, 0);">= (int) </span><span style="color: rgb(0, 0, 187);">$start </span><span style="color: rgb(0, 119, 0);">+ </span><span style="color: rgb(0, 0, 187);">1</span><span style="color: rgb(0, 119, 0);">; <br /></span><span style="color: rgb(0, 0, 187);">$end </span><span style="color: rgb(0, 119, 0);">= (</span><span style="color: rgb(0, 0, 187);">$next </span><span style="color: rgb(0, 119, 0);">> </span><span style="color: rgb(0, 0, 187);">$max</span><span style="color: rgb(0, 119, 0);">) ? </span><span style="color: rgb(0, 0, 187);">$max </span><span style="color: rgb(0, 119, 0);">: </span><span style="color: rgb(0, 0, 187);">$next</span><span style="color: rgb(0, 119, 0);">; <br /></span><span style="color: rgb(0, 0, 187);">?> <br /></span> <br /><p>Showing <span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(0, 0, 187);">$begin</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span>&ndash;<span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(0, 0, 187);">$end</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span> out of <span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(0, 0, 187);">$max</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span> | <span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(0, 0, 187);">$prevlink</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span> | <span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(0, 0, 187);">$nextlink</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span> | <a href="<span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(221, 0, 0);">'?start=' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$start </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">'&length=5'</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span>">5</a>, <a href="<span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(221, 0, 0);">'?start=' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$start </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">'&length=10'</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span>">10</a>, or <a href="<span style="color: rgb(0, 0, 187);"><?php </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(221, 0, 0);">'?start=' </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(0, 0, 187);">$start </span><span style="color: rgb(0, 119, 0);">. </span><span style="color: rgb(221, 0, 0);">'&length=20'</span><span style="color: rgb(0, 119, 0);">; </span><span style="color: rgb(0, 0, 187);">?></span>">20</a> at a time.</p> <br /></div> <br /> <br /></body> <br /></html></span></code>
ID do Projeto: 2972446

Sobre o projeto

10 propostas
Projeto remoto
Ativo há 14 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
10 freelancers estão ofertando em média $62 USD for esse trabalho
Avatar do Usuário
See private message.
$29,75 USD em 4 dias
5,0 (66 avaliações)
5,8
5,8
Avatar do Usuário
See private message.
$42,50 USD em 4 dias
4,8 (86 avaliações)
5,4
5,4
Avatar do Usuário
See private message.
$17 USD em 4 dias
4,7 (88 avaliações)
5,0
5,0
Avatar do Usuário
See private message.
$63,75 USD em 4 dias
4,9 (16 avaliações)
4,0
4,0
Avatar do Usuário
See private message.
$34 USD em 4 dias
5,0 (20 avaliações)
3,9
3,9
Avatar do Usuário
See private message.
$21,25 USD em 4 dias
4,9 (11 avaliações)
2,8
2,8
Avatar do Usuário
See private message.
$17 USD em 4 dias
4,6 (4 avaliações)
2,1
2,1
Avatar do Usuário
See private message.
$11,05 USD em 4 dias
4,5 (1 avaliação)
0,7
0,7
Avatar do Usuário
See private message.
$42,50 USD em 4 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$297,50 USD em 4 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$59,50 USD em 4 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a)
4,9
17
Membro desde abr. 19, 2010

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.