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. Thanks for one’s marvelous posting! I quite enjoyed reading it, you happen to be a
    great author. I will be sure to bookmark your blog and will often come back later on. I
    want to encourage that you continue your great work, have a nice
    holiday weekend!

    Rispondi
  2. Heya this is somewhat of off topic but I was wanting to know if
    blogs use WYSIWYG editors or if you have to manually code with HTML.

    I’m starting a blog soon but have no coding experience so I wanted
    to get guidance from someone with experience. Any help would be greatly appreciated!

    Rispondi
  3. With havin so much written content do you
    ever run into any issues of plagorism or copyright infringement?
    My site has a lot of exclusive content I’ve either written myself or outsourced
    but it seems a lot of it is popping it up all over the web
    without my agreement. Do you know any ways to help prevent content from being stolen? I’d truly appreciate
    it.

    Rispondi
  4. You’re so cool! I don’t suppose I’ve read through something like this before.

    So good to discover another person with some unique thoughts on this issue.
    Seriously.. thanks for starting this up. This site is something that is needed on the internet,
    someone with a bit of originality!

    Rispondi
  5. After I originally left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and now whenever a comment is added I
    receive 4 emails with the same comment. Perhaps there is a means
    you can remove me from that service? Thank you!

    Rispondi
  6. whoah this blog is magnificent i really like reading your articles.
    Stay up the great work! You recognize, a lot of individuals are hunting
    around for this info, you can aid them greatly.

    Rispondi
  7. Hello this is somewhat of off topic but I was wondering if blogs
    use WYSIWYG editors or if you have to manually code with
    HTML. I’m starting a blog soon but have no coding expertise so I wanted to get guidance from
    someone with experience. Any help would be greatly appreciated!

    Rispondi
  8. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I
    get four e-mails with the same comment. Is there any way you can remove me from that
    service? Cheers!

    Rispondi
  9. When I originally commented I clicked the “Notify me when new comments are added”
    checkbox and now each time a comment is added I
    get several emails with the same comment. Is there any
    way you can remove me from that service? Cheers!

    Rispondi
  10. Right here is the perfect web site for anybody who
    wants to find out about this topic. You understand a whole lot
    its almost tough to argue with you (not that I really will need to…HaHa).
    You definitely put a brand new spin on a topic that has been discussed for many years.
    Excellent stuff, just wonderful!

    Rispondi

Lascia un commento