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. Its like you read my mind! You seem to know so much about this, like
    you wrote the book in it or something. I think that you can do with a few pics to drive the message home a little bit,
    but other than that, this is wonderful blog. An excellent read.
    I’ll certainly be back.

    Rispondi
  2. It’s perfect time to make some plans for the future and it is time
    to be happy. I have read this post and if I could I desire to
    suggest you some interesting things or tips.
    Maybe you can write next articles referring to this article.
    I desire to read even more things about it!

    Rispondi
  3. Hi there, I found your web site via Google whilst looking for
    a similar subject, your web site got here up, it seems to be great.

    I have bookmarked it in my google bookmarks.
    Hello there, simply become aware of your blog through Google, and located
    that it’s really informative. I’m gonna watch out for brussels.
    I’ll be grateful in the event you continue this
    in future. Numerous other people will likely be benefited from your writing.
    Cheers!

    Rispondi
  4. Somebody essentially lend a hand to make severely posts I would state.

    This is the first time I frequented your web page and up to now?

    I amazed with the research you made to create this actual post amazing.
    Great task!

    Rispondi
  5. 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 really like the information you present here and can’t wait to take a look when I get home.
    I’m amazed at how fast your blog loaded on my cell phone
    .. I’m not even using WIFI, just 3G .. Anyways, wonderful blog!

    Rispondi
  6. We are a gaggle of volunteers and starting a
    new scheme in our community. Your site provided us
    with valuable information to work on. You have performed an impressive process and our
    whole neighborhood will probably be thankful
    to you.

    Rispondi
  7. Wow that was unusual. I just wrote an really long comment but after I
    clicked submit my comment didn’t show up. Grrrr…
    well I’m not writing all that over again. Regardless, just wanted to say excellent
    blog!

    Rispondi
  8. When I initially left a comment I seem to have clicked the -Notify me
    when new comments are added- checkbox and from now
    on whenever a comment is added I receive 4 emails with the exact same
    comment. Perhaps there is an easy method you can remove me from that service?
    Thank you!

    Rispondi
  9. Please let me know if you’re looking for a writer for
    your weblog. You have some really good articles and I feel I would be a
    good asset. If you ever want to take some of the
    load off, I’d absolutely love to write some articles for your blog in exchange for
    a link back to mine. Please shoot me an e-mail if interested.
    Regards!

    Rispondi
  10. I’m really loving the theme/design of your site. Do you ever
    run into any browser compatibility problems? A small number
    of my blog visitors have complained about my website not operating
    correctly in Explorer but looks great in Opera.
    Do you have any solutions to help fix this problem?

    Rispondi
  11. Wow, superb blog format! How lengthy have you ever been running
    a blog for? you made blogging glance easy. The overall look of your website is magnificent, let alone the content!

    Rispondi
  12. This design is incredible! You definitely know how to keep a reader amused.
    Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Great
    job. I really loved what you had to say, and more than that,
    how you presented it. Too cool!

    Rispondi
  13. I’m impressed, I have to admit. Seldom do I encounter a blog that’s equally educative and amusing, and without a doubt, you’ve hit the nail on the head.
    The problem is something that too few people are speaking intelligently about.
    I’m very happy that I stumbled across this during my hunt for something relating to this.

    Rispondi
  14. With havin so much content and articles do you ever run into any problems of plagorism
    or copyright violation? My blog has a lot of unique
    content I’ve either created myself or outsourced but it appears a lot of it is popping it up all over the internet without my permission. Do you know
    any methods to help stop content from being stolen? I’d genuinely appreciate it.

    Rispondi
  15. Its such as you read my mind! You seem to know a lot approximately this, such as you
    wrote the book in it or something. I believe that you could do with a few
    % to force the message house a little bit, however
    instead of that, that is great blog. A great read. I’ll definitely be back.

    Rispondi
  16. A motivating discussion is definitely worth comment. I believe that you should publish more on this subject, it may
    not be a taboo subject but typically people don’t talk about these topics.

    To the next! Cheers!!

    Rispondi
  17. Have you ever considered publishing an e-book or guest authoring on other sites?

    I have a blog based on the same subjects you discuss and would really like to have you share some stories/information. I know my subscribers would value your
    work. If you’re even remotely interested, feel free to send me an e mail.

    Rispondi
  18. Magnificent items from you, man. I have take into accout your stuff prior to and you’re just too wonderful.
    I actually like what you’ve bought right here, certainly like
    what you are saying and the best way by which you assert it.
    You’re making it entertaining and you still take care of to keep it sensible.
    I can not wait to learn much more from you.

    This is really a tremendous website.

    Rispondi

Lascia un commento