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. of course like your website but you need to take a look at the spelling on quite a
    few of your posts. Many of them are rife with spelling problems and I to find
    it very troublesome to inform the reality however I’ll surely
    come back again.

    Rispondi
  2. I don’t even know the way I ended up right here,
    however I believed this submit was great. I don’t realize who you might be but certainly you
    are going to a famous blogger in case you aren’t already.
    Cheers!

    Rispondi
  3. It’s a shame you don’t have a donate button! I’d most certainly donate to this excellent blog!

    I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account.

    I look forward to fresh updates and will talk about this blog with my Facebook group.
    Chat soon!

    Rispondi
  4. Hi there, I found your blog by the use of Google while searching for a related subject, your web site came up,
    it seems great. I have bookmarked it in my google bookmarks.

    Hi there, just become alert to your weblog via Google, and found that it’s really informative.
    I’m gonna watch out for brussels. I will appreciate if you continue this
    in future. Lots of other people will probably be
    benefited from your writing. Cheers!

    Rispondi
  5. Its like you read my mind! You seem to know a lot about this, like you wrote the
    book in it or something. I think that you can do with some pics to drive the message home a little bit, but instead of that, this is wonderful blog.
    A fantastic read. I will certainly be back.

    Rispondi
  6. A person necessarily help to make seriously posts I might state.
    That is the very first time I frequented your website page and thus far?
    I surprised with the research you made to create this
    particular put up incredible. Wonderful activity!

    Rispondi
  7. Hello! This is my first visit to your blog! We are a group of volunteers and
    starting a new initiative in a community
    in the same niche. Your blog provided us beneficial information to work on. You have done a outstanding job!

    Rispondi
  8. My brother recommended I may like this blog. He was entirely right.

    This submit truly made my day. You can not imagine just how much time I had spent
    for this info! Thanks!

    Rispondi
  9. This is the right site for anybody who hopes to find out about this topic.
    You understand a whole lot its almost hard to argue with you (not
    that I personally will need to…HaHa). You certainly put a new
    spin on a topic that has been discussed for years. Great stuff,
    just great!

    Rispondi
  10. Magnificent goods from you, man. I have understand
    your stuff previous to and you are just too
    great. I actually like what you have acquired here, certainly like what you are saying and the way
    in which you say it. You make it entertaining and you still take care of to keep it smart.
    I can not wait to read much more from you. This is
    actually a great web site.

    Rispondi
  11. My partner and I stumbled over here by a different web page and thought I should check things
    out. I like what I see so i am just following you. Look forward to going over your
    web page repeatedly.

    Rispondi
  12. My brother recommended I might like this web site.
    He used to be totally right. This post actually made my day.
    You can not consider simply how a lot time I had spent for this info!
    Thank you!

    Rispondi
  13. Its such as you read my thoughts! You seem to know a lot about this, such as you wrote the ebook in it or something.
    I believe that you just could do with some percent to force the message house a bit, but other than that, that is fantastic blog.

    A great read. I’ll certainly be back.

    Rispondi
  14. I’m impressed, I have to admit. Rarely do I come across a blog
    that’s equally educative and engaging, and without a doubt,
    you’ve hit the nail on the head. The issue
    is an issue that not enough men and women are speaking intelligently about.
    I am very happy that I found this during my hunt for something concerning this.

    Rispondi
  15. Aw, this was an exceptionally nice post. Taking the time and actual
    effort to create a superb article… but what can I say… I put things
    off a lot and don’t seem to get nearly anything done.

    Rispondi

Lascia un commento