Follow these steps to easily add a Gravatar to the guestbook:
You will now need to create the following directory structure:
blocks/guestbook/templates
. Next, copyview.php
fromconcrete/blocks/guestbook/view.php
and place it inblocks/guestbook/templates
and then rename it togravatar.php
to make it clear what the template is going to be used for.The default block template contains quite a lot of code as it contains some functions to manage the comments. We won't have to bother with it, but we have to find our way around it. There are only a few lines we have to insert; open
gravatar.php
and search for<div class="contentByLine">
and insert the highlighted lines before thediv
element.<div class="guestBook-entry<?php if ($c->getVersionObject()->getVersionAuthorUserName() == $u->getUserName()) { ?> authorPost <?php } ?>"> <?php if ($bp->canWrite()) { ?> <div class="guestBook...