Follow these steps to easily add a Gravatar to the guestbook:
You will need to create the directory folder within
blocks
,guestbook
,templates
and copy the file fromconcrete\blocks\guestbook\view.php
into thetemplates
directory. After you've copied it, rename it togravatar.php
to make it clear what the templates are 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 the following loop; it's not the whole content of the file! Insert the highlighted lines in your file:foreach($posts as $p) { ?> <?php if($p['approved'] || $bp->canWrite()) { ?> <div class="guestBook-entry"> <?php if($bp->canWrite()) { ?> <div class="guestBook-manage-links"> ...