Facebook: WordPress code to display the number of comments / shares / likes for the current blog post for administrators only

Hi,

Let’s say you have a Facebook page and you want to know how many likes / shares / comments does the current blog post has. I made a script, based on this article, which allows you so see how many likes / shares / comments a blog post has.

It will give you an information like this:

sharesvslikes

How to do it? 

Citește mai departe

The sick pleasures of rich people

Sometimes, I meet people driving expensive cars and running big business who want to negotiate with me things. Making a site, things like that. And what strikes me is their willingness to negotiate. At first, I thought “hmm, they must have made those money by being good with power & negotiation, so this is an explanation”. But I think it’s more than this. Once you reach a level in your life, you get bored of things. You have pretty much everything in life, and nothing really excites you. And you enjoy the thrill of negotiation. You actually like & have pleasure in being better than the person in front of you. Most poor people would have two problems in negotiation: The lack of experience & practice. The feeling that they’re, somehow, inferior when they negotiate. The rich people don’t have any of these problems. They have lots of experience with negotiations (1) and they perfectly know they’re better than the person in front of them (2). The second point excites them, so they keep on doing this. So, the next time a guy driving an expensive car comes to you and tells you you should leave your prices them, try and have your excitement. Negotiate with them, smiling, knowing that you won’t care if you lose them, and enjoy the pleasure of seeing them annoyed by your lack of cooperation. Enjoy the game and don’t let them run over you. But, on the other hand, if you do need the name of that client on your portfolio, …

Citește mai departe

“I’m good, you’re evil” – What should come out of this?

Let’s say X does something wrong. What should you do? You have the option of complaining. You’ll help others avoid the same mistake you’ve made. You have the option of putting some rules. If X damages your property, you want to make sure the next time something will be different, from X knowing that the thing is a wrong thing to do, to not having a contact with X anymore. You have the option of ignoring this and moving forward. I’ll talk about this option here: If you ignore the thing X does to you, it will haunt you. You’ll think about that thing, and it will consume you. But, mostly, you will tend to focus on your mistakes in the relationship with X (not filtering things right at the beginning, ignoring some signs, not taking precautions). Thus, you’ll tend to solve things better next time. You’ll be better at handling business the next time. X can change. If X does something wrong to me, yes, I can tell everybody about my side of the story. But I am believer in human improvement. I don’t think that one who did a mistake will always repeat that mistake. That person may do so, but it also may not. It’s OK to give detailed feed-back to X, in order to improve. But, mostly, that feed-back needs to be asked for, not given without a request. You can and may give feed-back chaotically, but it’s not always a good idea. It is possible that if take action and …

Citește mai departe

The Grand Budapest Hotel (2014) – a brave movie

They say The Grand Budapest Hotel (2014) is a comedy. I’d say it’s a bit more serious than that. The main two characters – M. Gustave and Mr. Moustafa (Zero) have great courage. To be what they want (noble). To go after a psychopath, to fight police and armies. To protect nobility, beauty, poetry, kindness at all costs. M. Gustave is very polite, at times flirting, at times seeming he is as polite just to get better in life. But events prove otherwise. When escaping, he is polite. When he has an alibi, due to politeness, he doesn’t use it. He doesn’t confuse politeness with being weak. He fights until he dies. A hero! The movie itself has the courage to be different than others. It’s not an easy take. It tries to makes things simple, but it present powerful things, shocking at times. Yes, it is lots of fun, but mostly due to the fact that the main characters are different. I watched it two times. I really really enjoyed it. I recommend it!

Ce aplicații să pui pe telefonul mobil?

Ce aplicații să pui pe telefonul mobil?

Bun. Ai un telefon mobil. Ce aplicații să iei în seamă? Contacts+ site / Contacts + iOS / Contacts +  Android – cea mai mare facilitate a aplicației e că îți permite să sincronizezi pozele de avatar ale prietenilor tăi de pe Facebook și Google Plus cu contactele din telefon. Sigur, asta presupune că contactele din telefon au nume similare cu ce ai pe Facebook (dacă scrii pe telefon Dan, aplicația nu va ști la cine te referi din contactele de pe Facebook). Se instalează rapid, îi dai acces la contactele tale de pe Facebook, și aplicația face sincronizarea între contacte și numerele de telefon. Mie mi-a găsit vreo 40% din contacte (deși la mine contactele au forma [nume prenume text descriptiv], nu ca pe Facebook doar [nume prenume]). E gratuită. Call Log Calendar – Android – probabil există aplicații similare și pe alte platforme, eu știu doar de Android. Îți permite să salvezi automat în Google Calendar istoricul apelurilor. Odată salvat, va fi stocat acolo permanent, și poți să vezi în 2015 pe cine ai sunat pe 4 februarie 2014. În varianta gratuită, trebuie să lansezi tu aplicația și să îi dai manual să sincronizeze cam o dată pe lună / o dată la două luni (poți updat-a 500 de apeluri odată). În varianta premium (10 lei), salvarea se face automat. Pentru aceeași facilitate, pentru SMS-uri: SMS Backup (gratuită) Authy site / Authy iOS / Authy 2 Android – Recomand de mult timp sisteme de securitate în 2 pași – adică să ai nevoie de încă un device, în plus față de parolă, pentru …

Citește mai departe

SEO: Cum afișezi produse asemănătoare?

SEO: Cum afișezi produse asemănătoare?

Să zicem că ai un site, vrei să afișezi 5 “Produse asemănătoare” / “Related products”, în subsolul paginii. Ai 1.000 de produse în site, și o pagină pe care vrei să pui 5 produse asemănătoare (să ai pe acea pagină o casetă “vezi produse asemănătoare”; în casetă să fie 5 produse din cele 1.000). Cum faci asta optim, din punct de vedere SEO? Ai următoarele opțiuni: Poți afișa aleatoriu 3 produse, la fiecare vizită a cuiva în site, fie el om sau Google. Aplici o funcție de tip rand() și când intră cineva pe pagină, va vedea 3 produse random. Poți afișa același lucru ca mai sus, dar după niște criterii – în loc să iei 3 produse din site, iei 3 produse din categoria curentă. Adică, dacă sunt în secțiunea rochii, subcategoria rochii de seară, îmi afișezi alte 3 rochii de seară. Poți să faci generarea random în funcție de un anumit criteriu, dar acel criteriu să fie fix. Adică funcția rand() se folosește de ora și data curentă și generează, de fiecare dată, alt rezultat. Cum ar fi să folosești un lucru care nu se schimbă, și e specific paginii curente. Exemplu: URL-ul articolului pe care îl citești acum este “https://olivian.ro/produse-asemanatoare/”. Cu un tool online sau cu un program, poți atribui un cod numeric literelor din URL (h = 104, t = 116, t = 116, p = 112, : = 58, / = 47, / = 47, o = 111, l = 108, i = 105, v = 118, i = 105, a = …

Citește mai departe

Cum să faci SEO pentru un site, dacă site-ul folosește AJAX, și URL-urile conțin anchors (#)? Răspuns – hash bang sytnax (pentru hashtag)

Cum să faci SEO pentru un site, dacă site-ul folosește AJAX, și URL-urile conțin anchors (#)? Răspuns - hash bang sytnax (pentru hashtag)

Problema e clară:

URL-urile din site sunt de forma:

site.ro/#desprenoi,

site.ro/#servicii,

site.ro/#contact,

iar Google le ignoră, deși conțin lucruri diferite, pentru că tot ce e după “#” este ignorat. Cum să faci, totuși, ca pagina să fie indexată?

Michael Coghlan - Lots of Hash, https://flic.kr/p/a41JdZ
Michael Coghlan – Lots of Hash, https://flic.kr/p/a41JdZ

Citește mai departe

Despre concursuri și crearea de bloguri ca metodă de linkbuilding

Despre concursuri și crearea de bloguri ca metodă de linkbuilding

Se dau două ipoteze:

  • Merită să organizezi un concurs pentru linkbuilding? (să dai un premiu, prin tragere la sorți, ca motivație pentru un concurs la care bloggeri să scrie pe tema site-ului tău și să facă trimitere către site)
  • Alternativ, e OK să îți faci tu propria rețea de bloguri pentru linkbuilding?
Manuel M. Almeida - Natural network, https://flic.kr/p/ffUhBc
Manuel M. Almeida – Natural network, https://flic.kr/p/ffUhBc

Citește mai departe

Backgammon Strategies

I played some backgammon these days with my father. He says the following: I should focus on winning. I should focus on learning the optimal route. I should avoid making mistakes. He seem to enjoy winning. I say the following: I should focus on learning. The best way to learn something is by making mistakes. I deliberately allow myself to make mistakes, even if this makes me lose some games. I really enjoy the excitement you get by being very close to winning and then to see him try so hard to beat me due to a mistake I make. We have some disputes based on this. :) In chess, I tend to have some fixed moves at the beginning, and then adapt to the situation. My father is very close to having an algorithm good-for-all at backgammon, which makes the game dull and boring. He just have to learn and remember his algorithm. A computer could do this very easily. Chess, and my style of backgammon, are not like that. You need flexibility. Sure, this implies some mistakes, but it’s more fun (I think).

Sfat de carieră în online

Sgt. Pepper57 - Career lane

Să zicem că ești o persoană care locuiește în România, în afara Bucureștiului. Și ai un job călduț, dar ai vrea să faci niște bani suplimentari. Te-ai gândit la online. Ce să faci? Termen scurt – Este mult mai simplu să faci rapid bani în off-line decât în online. Dacă ai libere serile, caută un job de seară. Nu sunt multe, cu siguranță, dar poți găsi ceva de făcut. Pe termen scurt, asta e o alegere bună. Termen mediu – Când oamenii se gândesc la “cum să fac bani din online?” se gândesc la un site / reclame / afiliere. Să producă, într-un fel sau altul, conținut și să câștige din reclame, sau să intermedieze lucruri (magazin online, și rămâi cu profit). Da, poți merge pe varianta asta, dar nu e pe termen scurt. Va trebui să investești, ca minim timp și energie, iar ca maxim nu există limită. Am detaliat aici. Riscul cu varianta asta e să intri în cercul vicios al SPAM-ului. Vei vedea oameni care fac SPAM și cărora le merge, și vei dori să îi imiți. Evită asta. Termen lung – Dacă te interesează termen lung, nu ai nevoie de mine să îți dau sfaturi. :) PS, 2019.07.05: Why “follow your passion” is bad advice.