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! This is kind of off topic but I need some advice from an established blog.
    Is it very difficult to set up your own blog? I’m not very techincal but I
    can figure things out pretty quick. I’m thinking about making my own but I’m not sure where
    to start. Do you have any points or suggestions? Thank you

    Rispondi
  2. wonderful publish, very informative. I ponder why the other experts of this
    sector don’t realize this. You should proceed your writing.
    I’m confident, you’ve a huge readers’ base already!

    Rispondi
  3. Hi, I think your web site could possibly be having browser compatibility issues.
    Whenever I look at your web site in Safari, it looks
    fine but when opening in Internet Explorer,
    it has some overlapping issues. I just wanted to give you a quick heads up!
    Other than that, excellent website!

    Rispondi
  4. Hey excellent website! Does running a blog like this require a great deal of work?

    I have no knowledge of programming however I had been hoping
    to start my own blog in the near future. Anyhow, if you have any
    ideas or tips for new blog owners please share. I understand this is
    off subject however I simply had to ask. Many thanks!

    Rispondi
  5. Heya exceptional website! Does running a blog
    like this require a great deal of work? I’ve very little understanding of programming however I had been hoping
    to start my own blog soon. Anyhow, if you have any ideas or
    tips for new blog owners please share. I know this is off topic however I simply needed to
    ask. Appreciate it!

    Rispondi
  6. Pretty component of content. I just stumbled upon your blog and in accession capital to say
    that I acquire in fact enjoyed account your blog posts.
    Any way I will be subscribing in your augment or even I achievement you get right of entry
    to constantly quickly.

    Rispondi
  7. Hi there, i read your blog from time to time and
    i own a similar one and i was just wondering
    if you get a lot of spam feedback? If so how do you stop it, any plugin or anything you can advise?
    I get so much lately it’s driving me insane so any support is very much
    appreciated.

    Rispondi
  8. An interesting discussion is definitely worth comment.
    I do think that you ought to publish more on this topic, it may not be
    a taboo subject but typically people do not discuss these topics.
    To the next! Best wishes!!

    Rispondi
  9. Outstanding post however I was wanting to know if you could write a litte more on this subject?

    I’d be very grateful if you could elaborate a little bit further.
    Kudos!

    Rispondi
  10. I used to be recommended this blog by way of my cousin. I am no longer sure
    whether or not this submit is written by him as no one else know such distinct
    about my difficulty. You are incredible! Thanks!

    Rispondi

Lascia un commento