Now we will make a modification for Follower widget. I found this tutorial from o-om (thanks for it). Let's continue here
Look this image below, standar follower widget withour border.

So we will make it more neatly or easy looking with the additional border like this.

When you're in the area mode login, the link will remain on the Manage position replaces Link View All. so do not worry the changes of coding.
To add a border (margin) on the image, Choose Edit HTML, and copy-paste all the CSS code below should put the code under the code <b:skin> <! [CDATA [
/* Follower (Modified by o-om.com)----------------------------------*/.follower-grid {width:150px;}.follower {width:32px; height:32px; float:left; margin:2px;}.follower-img {float: left; border:1px solid #222; margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px;}.follow-this {margin:0.5em 0.5em 0.5em 0; font-weight:bold;}.followers-canvas {margin:0.5em 0.5em 0.5em 0; font-weight:bold;}
Now the next steps is :
Choose Edit HTML and check on Expand Widget Templates. now find this code below
<b:widget id='Followers1' locked='false' title='Your title write here' type='Followers'><b:includable id='main'><b:if cond='data:title != ""'><h2 class='title'><data:title/> (<data:totalFollowerCount/>)</h2></b:if>
<div expr:id='data:widget.instanceId + "-wrapper"'><b:if cond='data:followingLinkPresent'><div class='follow-this profile-link item-control following-follow-this'><a expr:href='"javascript:_FollowersView._openPopup(\"" + data:followUri + "\");"'><data:followThisMessage/></a></div><div class='follow-this profile-link item-control following-stop-following-this'><a expr:href='"javascript:_FollowersView._openPopup(\"" + data:followUri + "\");"'><data:stopFollowingMessage/></a></div></b:if><div class='followers-grid'><b:if cond='data:totalFollowerCount == 0'><div class='profile-link item-control following-follow-this'><data:emptyFollowersMessage/></div></b:if><!--Relies on the js written out in navbar.gxp--><b:loop values='data:followers' var='follower'><div class='follower'><a expr:href='data:follower.profileUrl' expr:title='data:follower.displayName' rel='nofollow'><img class='follower-img' expr:alt='data:follower.displayName' expr:height='data:follower.imageHeight' expr:onerror='"this.onerror=null;this.src=\"" + data:anonFollowerImageUrl + "\";"' expr:onload='"setAttributeOnload(this, \"src\", \"" + data:follower.imageUrl + "\")"' expr:width='data:follower.imageWidth' src='http://img1.blogblog.com/img/blank.gif'/></a></div></b:loop><div class='clear'/></div><div class='followers-canvas profile-link'><data:followersFooterMessage/><span class='item-control following-not-admin'><a expr:href='data:followersUri'><data:viewAllMessage/></a></span><span class='item-control blog-admin'><a expr:href='data:manageFollowersUri'><data:manageFollowersMessage/></a></span></div>
Now change the red code with this code below:
<div class='followers-grid'><b:if cond='data:totalFollowerCount == 0'><div class='profile-link item-control following-follow-this'><data:emptyFollowersMessage/></div></b:if><!--Relies on the js written out in navbar.gxp--><b:loop values='data:followers' var='follower'><div class='follower'><a expr:href='data:follower.profileUrl' expr:title='data:follower.displayName' rel='nofollow'><img class='follower-img' expr:alt='data:follower.displayName' expr:height='data:follower.imageHeight' expr:onerror='"this.onerror=null;this.src=\"" + data:anonFollowerImageUrl + "\";"' expr:onload='"setAttributeOnload(this, \"src\", \"" + data:follower.imageUrl + "\")"' expr:width='data:follower.imageWidth' src='http://img1.blogblog.com/img/blank.gif'/></a></div></b:loop><div class='clear'/></div><div expr:id='data:widget.instanceId + "-wrapper"'><b:if cond='data:followingLinkPresent'><div class='follow-this profile-link item-control following-follow-this'><a expr:href='"javascript:_FollowersView._openPopup(\"" + data:followUri + "\");"'><data:followThisMessage/></a> -<span class='item-control following-not-admin'><a expr:href='data:followersUri'><data:viewAllMessage/></a></span><span class='item-control blog-admin'><a expr:href='data:manageFollowersUri'><data:manageFollowersMessage/></a></span> - <data:followersFooterMessage/></div><div class='follow-this profile-link item-control following-stop-following-this'><a expr:href='"javascript:_FollowersView._openPopup(\"" + data:followUri + "\");"'><data:stopFollowingMessage/></a></div></b:if>
Then save, now you have modifi your follower widget.
Don’t forget to follow this blog. Have a nice day
0 comments:
Post a Comment