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. mexico drug stores pharmacies [url=http://mexicopharm.com/#]Mexico pharmacy online[/url] best online pharmacies in mexico mexicopharm.com

    Rispondi
  2. Superb site you have here but I was curious if you knew of any community forums
    that cover the same topics talked about in this article? I’d really like to be a
    part of online community where I can get feedback from other experienced individuals that
    share the same interest. If you have any recommendations, please let me know.

    Thanks a lot!

    Rispondi
  3. Greetings I am so delighted I found your blog page, I really found you by error, while I was searching
    on Bing for something else, Anyways I am here now and would just
    like to say thanks a lot for a fantastic post and a all
    round exciting blog (I also love the theme/design), I don’t have time to read it
    all at the minute but I have saved it and
    also added in your RSS feeds, so when I have time I
    will be back to read more, Please do keep up the fantastic work.

    Rispondi
  4. Greetings! Quick question that’s totally off topic.
    Do you know how to make your site mobile friendly?
    My site looks weird when viewing from my iphone. I’m trying to find a theme or plugin that might be able to resolve this
    problem. If you have any recommendations, please share.
    Many thanks!

    Rispondi
  5. Do you mind if I quote a few of your posts as long as I provide credit and sources
    back to your site? My website is in the very same niche as yours and my visitors would genuinely benefit from a lot of the information you provide here.
    Please let me know if this okay with you. Regards!

    Rispondi
  6. I’m extremely impressed together with your writing talents
    as neatly as with the format to your blog. Is that this a paid subject
    matter or did you customize it yourself? Either way stay up
    the excellent quality writing, it’s uncommon to see a nice weblog like this one today..

    Rispondi
  7. online canadian pharmacy [url=http://canadapharm.life/#]Canadian online pharmacy[/url] canadian online pharmacy canadapharm.life

    Rispondi

Lascia un commento