Jump to content

Forum icons - are they really necessary?


Olivier Turbis

Recommended Posts

  • Replies 72
  • Created
  • Last Reply

didnt try it but would be something like


<style>

/* This should be moved to css file of course

 * we are only adding it here for testing purpose

 */

#userAvatar img

{

	max-width: 25px;

	max-height: 25px;

	clear:both;

}

</style>

 <td class='short altrow' id="userAvatar"><a href='{parse url="showuser={$data['starter_id']}" seotitle="{$data['seo_first_name']}" template="showuser" base="public"}'>{$memberAvatar}</a></td>

Link to comment
Share on other sites

Actually yeah the above code will work so I'm going to clean the codes a little bit and re-write how to add them to your forums

Step 1:

Goto ACP > Look & Feel > Skin Name > Forum Index > forumindexTemplate > Find:


                                                <td class='short altrow'>{parse replacement="{$data['folder_img']}"}</td>

Replace it with


<!-- sacred --> 

<php>

$theMember    = IPSMember::load($data['starter_id'], 'core,extendedProfile');

if ( $theMember['avatar_location'] == ""){

$memberAvatar = "<img src='{$this->settings['img_url']}/profile/default_thumb.png' width='25px' height='25px' alt='Img'/>";

}else{

$memberAvatar = IPSMember::buildAvatar($theMember,0,1);

}

</php>



                                                <td class='short altrow' id="userAvatar"><a href='{parse url="showuser={$data['starter_id']}" seotitle="{$data['seo_first_name']}" template="showuser" base="public"}'>{$memberAvatar}</a></td>

Click Save Then Click CSS button > ipb_styles.css



/* General block */


Add above that:


/* 

 * Yes, That's the right place for you

 */

#userAvatar img

{

        max-width: 25px;

        max-height: 25px;

        clear:both;

}



Save and that should be it!

Link to comment
Share on other sites

I decided to go out loud about this so heres my final codes to display:

[*]The Starter Avatar [*]Last Poster Avatar NOTE:: if you wnt to display only the Starter Avatar then use the codes in this [url=" Step 1: Goto ACP > Look & Feel > Skin Name > Forum Index > forumindexTemplate > Find:












                                                <td class='short altrow'>{parse replacement="{$data['folder_img']}"}</td>

Replace it with


<!-- sacred --> 

<php>

$defaultAvatar = "<img src='{$this->settings['img_url']}/profile/default_thumb.png' width='25px' height='25px' alt='Img'/>";


$theMember     = IPSMember::load($data['starter_id'], 'core,extendedProfile');

if ( $theMember['avatar_location'] == ""){

$memberAvatar = $defaultAvatar;

}else{

$memberAvatar = IPSMember::buildAvatar($theMember,0,1);

}


if ( $data['starter_id'] == $data['last_poster_id'])

{

   $lastMember    = $theMember;

   $lastMemberAvatar = $memberAvatar;

}else{


$lastMember    = IPSMember::load($data['last_poster_id'], 'core,extendedProfile');

if ( $lastMember['avatar_location'] == ""){

$lastMemberAvatar = $defaultAvatar;

}else{

$lastMemberAvatar = IPSMember::buildAvatar($lastMember,0,1);

}

}

</php>



                                                <td class='short altrow' id="userAvatar"><a href='{parse url="showuser={$data['starter_id']}" seotitle="{$data['seo_first_name']}" template="showuser" base="public"}'>{$memberAvatar}</a> 

                          <span><a href='{parse url="showuser={$data['last_poster_id']}" seotitle="{$data['seo_last_name']}" template="showuser" base="public"}'>{$lastMemberAvatar}</a></span></td>

Click Save Then Click CSS button > ipb_styles.css



/* General block */


Add above that:


/* 

 * Yes, That's the right place for you

 */

#userAvatar img

{

        max-width: 25px;

        max-height: 25px;

        clear:both;

}

#userAvatar span img

{

        max-width: 15px;

        max-height: 15px;

        position: relative;

        left:10px;top:-6px;

}

Save and that should be it!





post-130346-005280200 1287119015_thumb.p
Link to comment
Share on other sites


QQ Before I change or add it on our forums.



1. Does it any more page loading time?


2. Does general user as to download more images, before actually loading page?



In short, does it effects overall performance?



Thanks Sacred!



well since its in forumindex page then you should be fine regardig the page load

as for images, of course it load more images since it shows the starter and last poster image!
my suggest is you try it for you self .. and see the age load diffrence .. im sure its not something you will notice .. also its only one edit so its not much of work , but, like i stated before it is an ugly hack
Link to comment
Share on other sites


Personally I like the icons. I don't think there's enough space for a profile picture (making the rows taller I think would look strange) plus I like having an indication of if I've posted in the topic - which if was kept it would seem to me as if you're just replacing one repetitive icon with another.



Like Matt says though - what we think isn't particularly important :)





I do like the icons too. :wub:
Link to comment
Share on other sites

I don't know if it will work..but you're really the one!!
+1 for your help!!

Edit:

IPSMember::buildAvatar( $someMemberIDhere);   

This is not so clear: I'm going to try. Edit2: only to avoid a "live" crash, is the boardindex template the file, and where approax is the exact point to put the code:

 <!-- sacred --> 

<php>

$defaultAvatar = "<img src='{$this->settings['img_url']}/profile/default_thumb.png' width='25px' height='25px' alt='Img'/>";


$theMember     = IPSMember::load($data['starter_id'], 'core,extendedProfile');

if ( $theMember['avatar_location'] == ""){

$memberAvatar = $defaultAvatar;

}else{

$memberAvatar = IPSMember::buildAvatar($theMember,0,1);

}


if ( $data['starter_id'] == $data['last_poster_id'])

{

   $lastMember    = $theMember;

   $lastMemberAvatar = $memberAvatar;

}else{


$lastMember    = IPSMember::load($data['last_poster_id'], 'core,extendedProfile');

if ( $lastMember['avatar_location'] == ""){

$lastMemberAvatar = $defaultAvatar;

}else{

$lastMemberAvatar = IPSMember::buildAvatar($lastMember,0,1);

}

}

</php>



                                                <td class='short altrow' id="userAvatar"><a href='{parse url="showuser={$data['starter_id']}" seotitle="{$data['seo_first_name']}" template="showuser" base="public"}'>{$memberAvatar}</a> 

                          <span><a href='{parse url="showuser={$data['last_poster_id']}" seotitle="{$data['seo_last_name']}" template="showuser" base="public"}'>{$lastMemberAvatar}</a></span></td> 

Link to comment
Share on other sites


I don't know if it will work..but you're really the one!!


+1 for your help!!



Edit:


IPSMember::buildAvatar( $someMemberIDhere);   

This is not so clear: I'm going to try. Edit2: only to avoid a "live" crash, is the boardindex template the file, and where approax is the exact point to put the code:

 <!-- sacred --> 

<php>

$defaultAvatar = "<img src='{$this->settings['img_url']}/profile/default_thumb.png' width='25px' height='25px' alt='Img'/>";


$theMember     = IPSMember::load($data['starter_id'], 'core,extendedProfile');

if ( $theMember['avatar_location'] == ""){

$memberAvatar = $defaultAvatar;

}else{

$memberAvatar = IPSMember::buildAvatar($theMember,0,1);

}


if ( $data['starter_id'] == $data['last_poster_id'])

{

   $lastMember    = $theMember;

   $lastMemberAvatar = $memberAvatar;

}else{


$lastMember    = IPSMember::load($data['last_poster_id'], 'core,extendedProfile');

if ( $lastMember['avatar_location'] == ""){

$lastMemberAvatar = $defaultAvatar;

}else{

$lastMemberAvatar = IPSMember::buildAvatar($lastMember,0,1);

}

}

</php>



                                                <td class='short altrow' id="userAvatar"><a href='{parse url="showuser={$data['starter_id']}" seotitle="{$data['seo_first_name']}" template="showuser" base="public"}'>{$memberAvatar}</a> 

                          <span><a href='{parse url="showuser={$data['last_poster_id']}" seotitle="{$data['seo_last_name']}" template="showuser" base="public"}'>{$lastMemberAvatar}</a></span></td> 





Thanks, the 1st code was only to get you started, its not the full code.
will post the right codes here in a few when i finish work
Link to comment
Share on other sites


For the life of me, I cant figure out how to apply these changes to the new content page for new posts. Anyone have any ideas?



Hello, Shadow82x, I know you from SMF.
Do you mean [url=" tutorial doesn't work on your board, or the new posts don't give the correct mini-me output avatar?
Link to comment
Share on other sites


For the life of me, I cant figure out how to apply these changes to the new content page for new posts. Anyone have any ideas?




Open ACP > L & F > Skin Name > Search > asForumTopics : Find


<td class='short altrow'>{parse replacement="{$data['_icon']}"}</td>

Replace with :



<!-- sacred --> 

<php>

$defaultAvatar = "<img src='{$this->settings['img_url']}/profile/default_thumb.png' width='25px' height='25px' alt='Img'/>";


$theMember     = IPSMember::load($data['starter_id'], 'core,extendedProfile');

if ( $theMember['avatar_location'] == ""){

$memberAvatar = $defaultAvatar;

}else{

$memberAvatar = IPSMember::buildAvatar($theMember,0,1);

}


if ( $data['starter_id'] == $data['last_poster_id'])

{

   $lastMember    = $theMember;

   $lastMemberAvatar = $memberAvatar;

}else{


$lastMember    = IPSMember::load($data['last_poster_id'], 'core,extendedProfile');

if ( $lastMember['avatar_location'] == ""){

$lastMemberAvatar = $defaultAvatar;

}else{

$lastMemberAvatar = IPSMember::buildAvatar($lastMember,0,1);

}

}

</php>



                                                <td class='short altrow' id="userAvatar"><a href='{parse url="showuser={$data['starter_id']}" seotitle="{$data['seo_first_name']}" template="showuser" base="public"}'>{$memberAvatar}</a> 

                          <span><a href='{parse url="showuser={$data['last_poster_id']}" seotitle="{$data['seo_last_name']}" template="showuser" base="public"}'>{$lastMemberAvatar}</a></span></td>




Thats it..
Also i assume you already added the CSS part in my other posts so you can resize the images! if not, then go to my other post and grab the codes

Link to comment
Share on other sites


It should be a nice way to create avatar on "boardindex" of the latest "poster" member, at the right of the all forums.





Look & Feel > Skin Name > Board Index > boardindexTemplate > Find :


<if test="lastPosterID:|:$forum_data['last_poster_id']">

add after



<!-- sacred --> 

<php>

$theMember    = IPSMember::load($forum_data['last_poster_id'], 'core,extendedProfile');

if ( $theMember['avatar_location'] == ""){

$memberAvatar = "<img src='{$this->settings['img_url']}/profile/default_thumb.png' width='25px' height='25px' alt='Img'/>";

}else{

$memberAvatar = IPSMember::buildAvatar($theMember,0,1);

}

</php>

Then Find:


<a href='{parse url="showuser={$forum_data['last_poster_id']}" template="showuser" seotitle="{$forum_data['seo_last_name']}" base="public"}' title='{$this->lang->words['view_profile']}'>{$forum_data['last_poster_name']}</a>{parse template="user_popup" group="global" params="$forum_data['last_poster_id'], $forum_data['seo_last_name']"}


Replace it with


<div id="userAvatar">{$memberAvatar}<br><a href='{parse url="showuser={$forum_data['last_poster_id']}" template="showuser" seotitle="{$forum_data['seo_last_name']}" base="public"}' title='{$this->lang->words['view_profile']}'>{$forum_data['last_poster_name']}</a>{parse template="user_popup" group="global" params="$forum_data['last_poster_id'], $forum_data['seo_last_name']"}

</div>



Thats it .. again to resize the images you must apply the css part in my other posts

Also again
This is an ugly hack .. actually very ugly!!


Edit:: forgot to add that this will only show teh last poster avatar .. not the strater .. not sure if teh poster id is being passed and TBH im kinda lazy to look in forums class file

Link to comment
Share on other sites


That worked, genious :thumbsup:


However I've preferred to remove it due the bad position (under last topic data). However put this in a tutorial, as it's really good, very good.


Thank you man.



you can reposition it just put the {$memberAvatar} anywere you want


thanks & you welcome
Link to comment
Share on other sites


This is one of those situations where it's irrelevant what I think. We have to go with the masses.



I do tend to agree that the forum icons only duplicate information shown elsewhere and I certainly don't look at them anymore. I'd rather have the person's "face" rather than a repeated icon. It makes it more personal.



If we were to do this then I think we should just do it. No options, no hooks, etc. Too many options makes for poor software.



Please consider the people who want a nice clean interface. I have a lot of users who view the forums (rightly or wrongly) when they're supposed to be working, who would object to avatars / profile pictures appearing more than they currently do.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...