Ir ao conteúdo

Quick Flickr Widget, WordPress.

Boa tarde,

Hoje pela tarde estava a estudar e nos interva-los dos estudos estava dando uma olhada nos plugins para o wordpress. Achei um interessante. O Quick-flickr-widget. Um widget para exibir fotos do flickr no seu site. Você pode configura-lo de diversas maneiras, para pegar as ultimas fotos, para utilizar tags, para pegar fotos random. Está ultima, eu não me simpatizei muito, já que ela utiliza de um feed disponivel pelo flickr com suas ultimas atualizações. Fiquei um tempo pensando sobre como melhorar este recurso e tive uma idéia ao me lembrar de outro widget. Eu poderia pegar todas as tags, embaralhar as mesmas e escolher uma aleatoriamente e utilizar esta tag como parametro para uma consulta randomica. Fazendo um random de TAG e em seguida das fotos que possuiam a tag.

Após algumas pesquisas na API do flickr e em outros widgets descobri como poderia pegar as tags. Criei uma função que retornava uma tag aleatoria para o usuario X.

Implementei na mão isso dentro do código do quick flickr widget porém ainda não estava satisfeito, queria compartilhar isso com outros usuarios que também não gostavam da randomização do widget. Então estudei um pouco o codigo do quick flickr widget e fiz algumas modificações, adicionei uma nova checkbox para selecionar se deseja ou não a randomização por tag, adicionei um if e algumas outras linhas necessarias para salvar/pegar está nova opção e pronto.

Testei meio que por cima, as combinações de opções, ativar e desativar e está funcionando. Entrei em contato com o autor para ver se ele tem interesse de disponibilizar essas funções no widget dele. Bom, mesmo que ele não queira, você pode baixar o widget com as modificações aqui.

Então é isso. Quick-Flickr-Widget com randomização por tags.

Até mais,
Matheus Bratfisch

PS: Deixei a versão do mesmo como 1.2.7.2 provisoriamente, já que eu realizei as atualizações em duas etapas adicionei o .2 na versão atual do widget. Provavelmente se o autor for utilizar essa mudança a versão será outra.

Publicado emphpwordpress

5.227 Comentários

  1. 888 poker promotion code united states, usa gambling ranking and united kingdom
    online pokies welcome bonus, or usa mobile what are the odds of casino war (Mittie)

  2. Alright listen up because I’m about to save you a massive headache. Swear some of these “luxury” fleets should be in a museum. You land at MIA, tired, grab an Uber to the rental office, and bam — surprise $1500 hold on your card. No thanks, I’m too old for this nonsense. miami car rental luxury — skip the airport counters entirely. any local will tell you the same thing. leather that doesn’t glue to your legs in July heat. I’ve tested maybe 25 rental outfits across Dade and Broward. what you book is what you get, period. rates change daily with demand so don’t sleep on it:
    luxury suv rental miami luxury suv rental miami also bring polarized shades unless you enjoy driving blind into sunset. Anyway at least there’s one honest rental joint left in this town.

  3. Denemek isteyen arkadaşlara hep soruyorum. Herkes farklı bir şey söylüyor kafam karıştı. Güncel bilgileri kontrol edip süreci hatasız başlattım. En sonunda doğru adrese ulaştım ve size de tüm detayları aktarmak istedim, güncel bilgilere buradan bakabilirsiniz: 1xbet 1xbet. Yani anlatmak istediğim şu — spor bahisleri konusunda iddialı olanlar bilir.

    Hiçbir sıkıntı yaşamadım şu ana kadar. İşin doğrusunu söylemek gerekirse — en güvendiğim adres burası oldu artık. Herkese hayırlı olsun…

  4. I’ve got the scars to prove it. You find this amazing deal online: brand new Beamer, unlimited miles, price that makes you smile. Plus they freeze $2500 on your card for a week. Eight years in South Florida and these clowns still almost get me. luxury car rental in miami. anyone who’s waited for an Uber in August understands. leather seats that won’t weld themselves to your thighs in July. most are shiny turds with five-star fake reviews on Google Maps. Finally found one outfit that doesn’t play stupid games. prices swing like crazy so check before the weekend rush:
    suv rental near me suv rental near me Yeah parking in South Beach will cost you a nice bottle of wine — but that’s the Miami tax. drive safe and absolutely skip that “windshield protection” upsell — pure profit for them, zero value for you.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *