Tutorial: Integrare Facebook Connect in un sito sviluppato con CMS (Lesson 4)

Spread the love

Siamo giunti oramai all’ultima lezione di questo tutorial e sarete diventati sicuramente degli abili “integratori” di Facebook nel Vostro sito.

Vediamo dunque quest’oggi qualche ultimo particolare per affinare ancor più le nostre personalizzazioni al contenuto di Facebook sul nostro sito web.

Un difetto spesso riscontrato di un nostro utente loggato in Facebook riguarda la dimensione delle foto dell’avatar. E’ necessario per un’essenziale questione estetica far si che tutti gli avatar abbiano la stessa dimensione…cioè come quella di Facebook (48 x 48 Pixel).
Il plug-in di Facebook Connect installato sul nostro CMS però imposta una larghezza standard di 48 Pixel lasciando invariata invece l’altezza (cioè di qualsiasi dimensione), e questo sicuramente creerà un disordine grafico all’interno di un layout magari curato ad hoc. Per permettere il ridimensionamento degli avatar in automatico a quelli delle dimensioni di Facebook (48 x 48 Pixel), procediamo nel seguente modo:

Aprite con Notepad++ (per chi necessitasse di un rinfresco vedi lezione 3) e con questo, editate il file fbConnectLogic.php come abbiamo sempre fatto.

Per effettuare l’editing basta portarsi alla riga 365 (sempre al lato destro del vostro schermo” e cambiare il valore di
size=”thumb” con il parametro di size=”square”.

Il gioco è fatto.

Altra modifica che possiamo ottenere è quella di eliminare il link del profilo Facebook nei commenti qualora egli non sia logato ed inserire un link autonomo.
Per fare ciò, necessiterà all’interno del file comments.php (sempre modificandolo con un editor html), inserire il seguente codice:

<?php
    if(is_user_fbconnect($comment->user_id)){
        comment_author();
    }else{
        comment_author_link();
    }
?>

Così, l’autore del commento non loggato in Facebook avrà libertà di inserire il proprio link.

Finisce qui la mini-guida dell’integrazione tra Facebook ed il nostro sito realizzato con WordPress, molteplici ancora sono le modifiche che possono essere effettuate al plug-in qualora non si scegliesse di utilizzare le Widget standard.

Torneremo sull’argomento qualora ci saranno nuovi sviluppi, per ora l’unico augurio è quello di una “buona Face-integrazione”.

2.646 commenti su “Tutorial: Integrare Facebook Connect in un sito sviluppato con CMS (Lesson 4)”

  1. Hey there excellent website! Does running a blog like this take a
    large amount of work? I’ve very little knowledge of programming but I had been hoping to start my own blog in the near future.

    Anyway, should you have any ideas or tips for new blog owners please
    share. I know this is off subject nevertheless I just wanted to ask.
    Thanks!

    Rispondi
  2. Hi just wanted to give you a quick heads up and let you know a
    few of the pictures aren’t loading correctly. I’m not sure why
    but I think its a linking issue. I’ve tried it in two different browsers
    and both show the same outcome.

    Rispondi
  3. Very nice post. I just stumbled upon your weblog and wanted to say that I’ve really enjoyed browsing your
    blog posts. In any case I will be subscribing to your rss feed and
    I hope you write again soon!

    Rispondi
  4. When I originally commented I seem to have clicked the -Notify me
    when new comments are added- checkbox and now every time a comment is added I recieve 4
    emails with the exact same comment. There has to be a means you can remove
    me from that service? Cheers!

    Rispondi
  5. I’m impressed, I have to admit. Seldom do I come across
    a blog that’s both equally educative and engaging, and let
    me tell you, you have hit the nail on the head.
    The issue is something that not enough folks are speaking intelligently about.

    I’m very happy that I found this during my hunt for something regarding this.

    Rispondi
  6. Today, while I was at work, my sister stole my apple ipad and
    tested to see if it can survive a twenty five foot drop, just so she can be a youtube sensation. My
    iPad is now broken and she has 83 views. I know this is completely
    off topic but I had to share it with someone!

    Rispondi
  7. Greetings from Ohio! I’m bored to death at work so I decided to check out your website
    on my iphone during lunch break. I enjoy the information you
    present here and can’t wait to take a look when I get home.
    I’m shocked at how fast your blog loaded on my cell
    phone .. I’m not even using WIFI, just 3G .. Anyways, good blog!

    Rispondi
  8. Can I simply just say what a relief to discover someone who genuinely understands what they’re discussing
    on the web. You actually realize how to bring an issue to light and make it important.
    More people should check this out and understand this side of the story.
    I was surprised you are not more popular because you most certainly possess the gift.

    Rispondi
  9. can you buy zithromax online [url=http://zithromaxbestprice.icu/#]zithromax 250 mg pill[/url] can i buy zithromax over the counter in canada

    Rispondi

Lascia un commento