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.645 commenti su “Tutorial: Integrare Facebook Connect in un sito sviluppato con CMS (Lesson 4)”

  1. Simply desire to say your article is as surprising. The clarity in your
    post is simply great and i can assume you are an expert on this
    subject. Well with your permission let me to grab your RSS feed to keep up to date with
    forthcoming post. Thanks a million and please continue the enjoyable work.

    Rispondi
  2. Hi there! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended
    up losing a few months of hard work due to no
    backup. Do you have any methods to protect against hackers?

    Rispondi
  3. An outstanding share! I have just forwarded this onto a coworker who
    has been conducting a little research on this.
    And he actually ordered me dinner simply because I stumbled upon it for him…
    lol. So allow me to reword this…. Thanks for the meal!!

    But yeah, thanx for spending some time to discuss this topic here on your internet site.

    Rispondi
  4. Hello I am so delighted I found your blog, I really found you by mistake, while I was browsing
    on Yahoo for something else, Anyhow I am here
    now and would just like to say thanks a lot for a marvelous post and
    a all round thrilling blog (I also love the theme/design), I don’t have
    time to look over it all at the minute but I have book-marked it and also included your RSS feeds, so when I have
    time I will be back to read more, Please do keep up
    the fantastic work.

    Rispondi
  5. you are in point of fact a excellent webmaster.
    The site loading speed is amazing. It kind of feels
    that you are doing any unique trick. In addition, The
    contents are masterpiece. you’ve done a magnificent job
    on this matter!

    Rispondi
  6. Today, I went to the beach with my children. I found a sea
    shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell to her ear and screamed.
    There was a hermit crab inside and it pinched her ear. She never wants to go back!
    LoL I know this is entirely off topic but I had to tell
    someone!

    Rispondi
  7. My brother recommended I would possibly like this website.

    He was totally right. This post actually made my day.
    You cann’t believe simply how so much time I had spent
    for this information! Thanks!

    Rispondi
  8. Greetings from California! I’m bored to tears at work
    so I decided to check out your website on my iphone during lunch break.
    I enjoy the information you provide here and can’t wait to take a look when I
    get home. I’m surprised at how quick your blog loaded on my phone ..
    I’m not even using WIFI, just 3G .. Anyways, awesome blog!

    Rispondi
  9. Your style is very unique compared to other folks I’ve
    read stuff from. I appreciate you for posting when you’ve got the opportunity,
    Guess I will just bookmark this blog.

    Rispondi
  10. amoxicillin online without prescription [url=https://amoxicillin.bid/#]amoxicillin 500 mg purchase without prescription[/url] where to buy amoxicillin 500mg

    Rispondi
  11. Hello! I could have sworn I’ve been to this website before but after reading through some of the post I realized it’s new to me.
    Anyhow, I’m definitely glad I found it and I’ll be bookmarking and checking back often!

    Rispondi
  12. Hello There. I found your weblog the usage of msn. This is an extremely neatly written article.
    I will be sure to bookmark it and return to learn more of your helpful info.

    Thank you for the post. I will certainly return.

    Rispondi
  13. Thank you for every other informative web site. The place else could I am getting that
    kind of info written in such a perfect method? I’ve a venture that I am just
    now running on, and I have been on the look out for such information.

    Rispondi
  14. I know this if off topic but I’m looking into
    starting my own weblog and was wondering what all is required to get setup?
    I’m assuming having a blog like yours would cost
    a pretty penny? I’m not very web smart so I’m not 100%
    certain. Any recommendations or advice would be greatly appreciated.
    Cheers

    Rispondi
  15. mexico drug stores pharmacies [url=https://mexicanpharm.shop/#]Certified Pharmacy from Mexico[/url] mexican online pharmacies prescription drugs mexicanpharm.shop

    Rispondi

Lascia un commento