Page 1 of 8

Avatar of poster on Index and Viewforum 1.2.1a

PostPosted: Fri Jun 22, 2007 12:54 am
by lefty
MOD Title:Avatar of poster on Index and Viewforum
MOD Description:Shows the last poster's avatar in on the Index and subforums as well as the author's avatar and last poster's avatar on Viewforum
MOD Version:1.2.1a
phpBB Version:3.0.6

MOD Download: Avatar of poster on Index and Viewforum 1.2.1a
------------------------------------------------------------
SMALL BUG IN PROSILVER:
After editing the files, please do the following:
open styles/prosilver/template/viewforum_body.html

find
Code: Select all
<!-- ENDIF-->

replace with
Code: Select all
<!-- ENDIF -->

------------------------------------------------------------
Demo:
prosilver index
Image
prosilver viewforum
Image
subsilver2 index
Image
subsilver2 viewforum
Image

PostPosted: Fri Jun 22, 2007 10:59 pm
by lefty
Bug found thanks to saaiberke
Code: Select all
Open includes/functions_posting.php

FIND
         $update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_avatar = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['user_avatar']) : '') . "'";
         $update_sql[$row["{$type}_id"]][] = $type . '_last_poster_avatar_type = ' . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['user_avatar_type']) : '') . "'";
         $update_sql[$row["{$type}_id"]][] = $type . '_last_poster_avatar_width = ' . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['user_avatar_width']) : '') . "'";
         $update_sql[$row["{$type}_id"]][] = $type . '_last_poster_avatar_height = ' . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['user_avatar_height']) : '') . "'";


REPLACE WITH
         $update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_avatar = '" . (($row['poster_id'] != ANONYMOUS) ? $db->sql_escape($row['user_avatar']) : '') . "'";
         $update_sql[$row["{$type}_id"]][] = $type . '_last_poster_avatar_type = ' . (($row['poster_id'] != ANONYMOUS) ? $db->sql_escape($row['user_avatar_type']) : '');
         $update_sql[$row["{$type}_id"]][] = $type . '_last_poster_avatar_width = ' . (($row['poster_id'] != ANONYMOUS) ? $db->sql_escape($row['user_avatar_width']) : '');
         $update_sql[$row["{$type}_id"]][] = $type . '_last_poster_avatar_height = ' . (($row['poster_id'] != ANONYMOUS) ? $db->sql_escape($row['user_avatar_height']) : '');

first post updated,  mod version changed to v0.1.1

PostPosted: Sun Jun 24, 2007 8:27 pm
by lefty
updated install instructions to be compliant with RC2

PostPosted: Tue Aug 21, 2007 10:51 pm
by lefty
upgraded to fix bug when moving, merging posts via mcp.

to upgrade from version 0.1.2 just do the change for includes/functions_admin.php

PostPosted: Sun Oct 28, 2007 9:33 pm
by lefty
updated to v 020 which fixes a bug when updating the avatar, also now fixes the problem when avatars smaller then the max dimensions are uploaded.

to upgrade from 0.1.3 to 0.2.0
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_user.php
#
#-----[ FIND ]------------------------------------------
#
user_update_avatar($user_id, $sql_ary['user_avatar'], $sql_ary['user_avatar_type'], $sql_ary['user_avatar_width'], $sql_ary['user_avatar_width']);
#
#-----[ REPLACE WITH ]------------------------------------------
#
user_update_avatar($user_id, $sql_ary['user_avatar'], $sql_ary['user_avatar_type'], $sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']);
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_display.php
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('forumrow', array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$avatar_max_dimensions = $avatar_width = $avatar_height = '';
if ( !empty($row['forum_last_poster_avatar']) )
{
$avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed

if ( $row['forum_last_poster_avatar_width'] >= $row['forum_last_poster_avatar_height'] )
{
$avatar_width = ( $row['forum_last_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['forum_last_poster_avatar_width'] ;
$avatar_height = ( $avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['forum_last_poster_avatar_width'] * $row['forum_last_poster_avatar_height']) : $row['forum_last_poster_avatar_height'] ;
}
else
{
$avatar_height = ( $row['forum_last_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['forum_last_poster_avatar_height'] ;
$avatar_width = ( $avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['forum_last_poster_avatar_height'] * $row['forum_last_poster_avatar_width']) : $row['forum_last_poster_avatar_width'] ;
}
}

#
#-----[ FIND ]------------------------------------------
#
// if you want the avatar resized to another width then 40, change the value 40 to whichever you like
// Use the following if you want to keep the original avatar size
// 'LAST_POSTER_AVATAR' => get_user_avatar($row['forum_last_poster_avatar'], $row['forum_last_poster_avatar_type'], $row['forum_last_poster_avatar_width'], $row['forum_last_poster_avatar_height']),
'LAST_POSTER_AVATAR' => get_user_avatar($row['forum_last_poster_avatar'], $row['forum_last_poster_avatar_type'], '40', ''),


#
#-----[ REPLACE WITH ]------------------------------------------
#
'LAST_POSTER_AVATAR' => get_user_avatar($row['forum_last_poster_avatar'], $row['forum_last_poster_avatar_type'], $avatar_width, $avatar_height),
'LAST_POSTER_AVATAR_MARGIN' => ( $avatar_width == $avatar_max_dimensions ) ? 5 : ( $avatar_max_dimensions - $avatar_width + 5 ),
'AVATAR_WIDTH' => $avatar_max_dimensions,
#
#-----[ FIND ]------------------------------------------
#
// have to add this as otherwise IE wont show the avatar properly ... IE SUCKS
if ( empty($avatar_height) )
{
return '<img src="' . $avatar_img . '" width="' . $avatar_width . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
else
{
return '<img src="' . $avatar_img . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
#
#-----[ REPLACE WITH ]------------------------------------------
#   restoring the original code, careful though if you have other avatar mods installed from me, they may be using the previous code
return '<img src="' . $avatar_img . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
// Send vars to template
$template->assign_block_vars('topicrow', array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$avatar_img = $avatar_max_dimensions = $topic_last_poster_avatar_height = $topic_last_poster_avatar_width = $topic_first_poster_avatar_width = $topic_first_poster_avatar_height = '';

if ( !empty($row['topic_first_poster_avatar']) || !empty($row['topic_last_poster_avatar']))
{
$avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed

if ( $row['topic_first_poster_avatar_width'] >= $row['topic_first_poster_avatar_height'] )
{
$topic_first_poster_avatar_width = ( $row['topic_first_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_width'] ;
$topic_first_poster_avatar_height = ( $topic_first_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_width'] * $row['topic_first_poster_avatar_height']) : $row['topic_first_poster_avatar_height'] ;
}
else
{
$topic_first_poster_avatar_height = ( $row['topic_first_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_height'] ;
$topic_first_poster_avatar_width = ( $topic_first_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_height'] * $row['topic_first_poster_avatar_width']) : $row['topic_first_poster_avatar_width'] ;
}

if ( $row['topic_last_poster_avatar_width'] >= $row['topic_last_poster_avatar_height'] )
{
$topic_last_poster_avatar_width = ( $row['topic_last_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_width'] ;
$topic_last_poster_avatar_height = ( $topic_last_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_width'] * $row['topic_last_poster_avatar_height']) : $row['topic_last_poster_avatar_height'] ;
}
else
{
$topic_last_poster_avatar_height = ( $row['topic_last_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_height'] ;
$topic_last_poster_avatar_width = ( $topic_last_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_height'] * $row['topic_last_poster_avatar_width']) : $row['topic_last_poster_avatar_width'] ;
}

}
#
#-----[ FIND ]------------------------------------------
#
// if you want the avatar resized to another width then 40, change the value 40 to whichever you like
// Use the following if you want to keep the original avatar size
// 'TOPIC_AUTHOR_AVATAR' => get_user_avatar($row['topic_first_poster_avatar'], $row['topic_first_poster_avatar_type'], $row['topic_first_poster_avatar_width'], $row['topic_first_poster_avatar_height']),
'TOPIC_AUTHOR_AVATAR' => get_user_avatar($row['topic_first_poster_avatar'], $row['topic_first_poster_avatar_type'], '40', ''),
#
#-----[ REPLACE WITH ]------------------------------------------
#  
'TOPIC_AUTHOR_AVATAR' => get_user_avatar($row['topic_first_poster_avatar'], $row['topic_first_poster_avatar_type'], $topic_first_poster_avatar_width, $topic_first_poster_avatar_height),
'TOPIC_AUTHOR_AVATAR_MARGIN' => ( $topic_first_poster_avatar_width == '' ) ? '' : (( $topic_first_poster_avatar_width == $avatar_max_dimensions ) ? 5 : ( $avatar_max_dimensions - $topic_first_poster_avatar_width + 5 )),
'AVATAR_WIDTH' => $avatar_max_dimensions ,
#
#-----[ FIND ]------------------------------------------
#
// if you want the avatar resized to another width then 40, change the value 40 to whichever you like
// Use the following if you want to keep the original avatar size
// 'LAST_POST_AUTHOR_AVATAR' => get_user_avatar($row['topic_last_poster_avatar'], $row['topic_last_poster_avatar_type'], $row['topic_last_poster_avatar_width'], $row['topic_last_poster_avatar_height']),
'LAST_POST_AUTHOR_AVATAR' => get_user_avatar($row['topic_last_poster_avatar'], $row['topic_last_poster_avatar_type'], '40', ''),
#
#-----[ REPLACE WITH ]------------------------------------------
#
'LAST_POST_AUTHOR_AVATAR' => get_user_avatar($row['topic_last_poster_avatar'], $row['topic_last_poster_avatar_type'], $topic_last_poster_avatar_width, $topic_last_poster_avatar_height),
'LAST_POST_AUTHOR_AVATAR_MARGIN'=> ( $topic_last_poster_avatar_width == $avatar_max_dimensions ) ? 5 : ( $avatar_max_dimensions - $topic_last_poster_avatar_width + 5 ),
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/forumlist_body.html
#
#-----[ FIND ]------------------------------------------
#
<dd class="lastpost"><span><div style="float: left; padding-top: 0px; margin-right: 5px;">{forumrow.LAST_POSTER_AVATAR}</div>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<dd class="lastpost"><span><div style="float: left; padding-top: 0px; margin-right: {forumrow.LAST_POSTER_AVATAR_MARGIN}px;">{forumrow.LAST_POSTER_AVATAR}</div>
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/viewforum_body.html
#
#-----[ FIND ]------------------------------------------
#
<dt style="<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS -->background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{topicrow.TOPIC_FOLDER_IMG_ALT}"> <div style="float: left; padding-top: 3px; margin-right: 5px;">{topicrow.TOPIC_AUTHOR_AVATAR}</div><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<dt style="<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS -->background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{topicrow.TOPIC_FOLDER_IMG_ALT}"> <div style="float: left; padding-top: 3px; margin-right: {topicrow.TOPIC_AUTHOR_AVATAR_MARGIN}px;">{topicrow.TOPIC_AUTHOR_AVATAR}</div><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
#
#-----[ FIND ]------------------------------------------
#
<dd class="lastpost"> <div style="float: left; padding-top: 0px; margin-right: 5px;">{topicrow.LAST_POST_AUTHOR_AVATAR}</div><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
#
#-----[ REPLACE WITH ]------------------------------------------
#
<dd class="lastpost"> <div style="float: left; padding-top: 0px; margin-right: {topicrow.LAST_POST_AUTHOR_AVATAR_MARGIN}px;">{topicrow.LAST_POST_AUTHOR_AVATAR}</div><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
#
#-----[ OPEN ]------------------------------------------
#
styles/subsilver2/template/forumlist_body.html
#
#-----[ FIND ]------------------------------------------
#
<td width="40">{forumrow.LAST_POSTER_AVATAR}</td>
<td align="center" width="100%" nowrap="nowrap">
#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- IF forumrow.LAST_POSTER_AVATAR --><td width="{forumrow.AVATAR_WIDTH}">{forumrow.LAST_POSTER_AVATAR}</td><!-- ENDIF -->
<td align="center"  nowrap="nowrap">
#
#-----[ OPEN ]------------------------------------------
#
styles/subsilver2/template/viewforum_body.html
#
#-----[ FIND ]------------------------------------------
#
<td >{topicrow.TOPIC_AUTHOR_AVATAR}</td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- IF topicrow.TOPIC_AUTHOR_AVATAR --><td align="center" width="{topicrow.AVATAR_WIDTH}" >{topicrow.TOPIC_AUTHOR_AVATAR}</td><!-- ENDIF -->
#
#-----[ FIND ]------------------------------------------
#
<td >{topicrow.LAST_POST_AUTHOR_AVATAR}</td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- IF topicrow.LAST_POST_AUTHOR_AVATAR --> <td width="{topicrow.AVATAR_WIDTH}">{topicrow.LAST_POST_AUTHOR_AVATAR}</td><!-- ENDIF -->
#
#-----[ FIND ]------------------------------------------
#
<td >{topicrow.TOPIC_AUTHOR_AVATAR}</td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- IF topicrow.TOPIC_AUTHOR_AVATAR --><td align="center" width="{topicrow.AVATAR_WIDTH}" >{topicrow.TOPIC_AUTHOR_AVATAR}</td><!-- ENDIF -->
#
#-----[ FIND ]------------------------------------------
#
<td >{topicrow.LAST_POST_AUTHOR_AVATAR}</td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- IF topicrow.LAST_POST_AUTHOR_AVATAR --> <td width="{topicrow.AVATAR_WIDTH}">{topicrow.LAST_POST_AUTHOR_AVATAR}</td><!-- ENDIF -->
#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
Refresh all your templates and clear your cache via the ACP after editing the template files.
Copy avatar_update.php to the root folder and run it to update earlier topic author or last post avatar data.


Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Sun Jan 27, 2008 11:01 am
by lefty
works with gold

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Sun Jan 27, 2008 12:20 pm
by Archer
I´ve found a bug.

Here some screenshots:

Image

The first avatar is shown to big. I think, because there´s no category, this is only a forum with one forum under it

Image

Here are shown all avatars to big. This is a forum in a category, which has 3 forums under it.

I think, the bug is, that you haven´t defined, how big an avatar should be, which is in an forum under an forum

sry for very bad english, i hope that you can understand me :mrgreen:

greetz Archer

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Sun Jan 27, 2008 6:42 pm
by lefty
hi, could you please post your includes/functions_display.php?

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Mon Jan 28, 2008 3:45 pm
by Archer
I´ve uploaded it in a .txt file on my webspace for you.

Here´s the link: http://schropp.sc.ohost.de/functions_display.txt

Edit: When i use the Windows Internet Explorer, then the to big ava´s aren´t shown:

Image
Image


(normally i use Mozilla Firefox 2.0.0.11)

Edit2: The Bug exists since I´ve updated my Board to phpBB RC8, before it worked perfectly...

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Mon Jan 28, 2008 7:24 pm
by lefty
ok, i think there was a glitch in the install file.

open functions_display.php

find
Code: Select all
    $avatar_max_dimensions = $avatar_width = $avatar_height = '40';
      if ( !empty($row['forum_last_poster_avatar']) )
      {
      $avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed
      
         if ( $row['forum_last_poster_avatar_width'] >= $row['forum_last_poster_avatar_height'] )
         {
         $avatar_width = ( $row['forum_last_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['forum_last_poster_avatar_width'] ;
         $avatar_height = ( $avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['forum_last_poster_avatar_width'] * $row['forum_last_poster_avatar_height']) : $row['forum_last_poster_avatar_height'] ;
         }
         else
         {
         $avatar_height = ( $row['forum_last_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['forum_last_poster_avatar_height'] ;
         $avatar_width = ( $avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['forum_last_poster_avatar_height'] * $row['forum_last_poster_avatar_width']) : $row['forum_last_poster_avatar_width'] ;
         }
      }


REPLACE WITH
nothing is replacing this, just delete

then find
Code: Select all
      $template->assign_block_vars('forumrow', array(
         'S_IS_CAT'         => false,

before add
Code: Select all
    $avatar_max_dimensions = $avatar_width = $avatar_height = '40';
      if ( !empty($row['forum_last_poster_avatar']) )
      {
      $avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed
      
         if ( $row['forum_last_poster_avatar_width'] >= $row['forum_last_poster_avatar_height'] )
         {
         $avatar_width = ( $row['forum_last_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['forum_last_poster_avatar_width'] ;
         $avatar_height = ( $avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['forum_last_poster_avatar_width'] * $row['forum_last_poster_avatar_height']) : $row['forum_last_poster_avatar_height'] ;
         }
         else
         {
         $avatar_height = ( $row['forum_last_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['forum_last_poster_avatar_height'] ;
         $avatar_width = ( $avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['forum_last_poster_avatar_height'] * $row['forum_last_poster_avatar_width']) : $row['forum_last_poster_avatar_width'] ;
         }
      }

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Wed Mar 19, 2008 5:41 pm
by ReneV
Hello,

I have install the mod for avatar view at the index like forums.
But no all things are working perfect, only at the main the avatars dont get a width ore height?
http://forum.cichlidenkwekers.nl/index.php

View forum is working perfect.
http://forum.cichlidenkwekers.nl/viewforum.php?f=14

Is there sombody that can help.
Please excus my bath language...

Greetings, Rene

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Wed Mar 19, 2008 5:48 pm
by lefty
hi rene,
did you make this change in the functions_display.php?

Code: Select all
#
#-----[ FIND ]------------------------------------------
#
      $template->assign_block_vars('forumrow', array(
         'S_IS_CAT'         => false,
#
#-----[ BEFORE, ADD ]------------------------------------------
#
      $avatar_max_dimensions = $avatar_width = $avatar_height = '';
      if ( !empty($row['forum_last_poster_avatar']) )
      {
         $avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed
      
         if ( $row['forum_last_poster_avatar_width'] >= $row['forum_last_poster_avatar_height'] )
         {
            $avatar_width = ( $row['forum_last_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['forum_last_poster_avatar_width'] ;
            $avatar_height = ( $avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['forum_last_poster_avatar_width'] * $row['forum_last_poster_avatar_height']) : $row['forum_last_poster_avatar_height'] ;
         }
         else
         {
            $avatar_height = ( $row['forum_last_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['forum_last_poster_avatar_height'] ;
            $avatar_width = ( $avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['forum_last_poster_avatar_height'] * $row['forum_last_poster_avatar_width']) : $row['forum_last_poster_avatar_width'] ;
         }
      }


... and does $avatar_max_dimensions say 40 or is it empty?

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Wed Mar 19, 2008 6:03 pm
by ReneV
Hello,

I have make the update that you are writing.
And max_demension is set to 40, buth still there will be no width and height

Olso i have try to set ( thats writing in thi topix):
Code: Select all
$avatar_max_dimensions = $avatar_width = $avatar_height = '27';

Buth then the height is 27 buth olso the width is 27.

I cant understand what i im doing wrong?

Thanks for helping, and best regargs

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Wed Mar 19, 2008 6:12 pm
by lefty
rene, that was not an update, that was part of the instructions.

may i suggest you doublecheck your edits against the installation instructions. you must have missed an instruction or e.g. put code before instead of after ...

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Wed Mar 19, 2008 7:23 pm
by ReneV
Hello,

I have check all the settings and have view the install again, buth still the avatar at the main is at full width and height.
At IE there is no avatar becaus the width="" and height="".
When i go to vieuwforum the avatar is at the size width40 and height 27.

I cant find the wrong settings, can you tell me where i most serach, i thing that i most serach at the functions_display ?
Buth whene i cant find it can i set a width like 40px and height 27px, becaus all avatars are the same whidth and height at my forum?

Thanks for helping, its a nice mod.
I have vieuw the setting for prosilver style and you are writing at the mod the line:
Code: Select all
<div style="float: left; padding-top: 0px; margin-right: {forumrow.LAST_POSTER_AVATAR_MARGIN}px;">

Whit this margin setting the avatar is at the left to the line so maby its nice to set:
Code: Select all
<div style="float: left; padding-top: 0px; margin: 0px {forumrow.LAST_POSTER_AVATAR_MARGIN}px;">

Now left and right are 5px and te avatar is not stadning to the left line.

Greetings...

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Wed Mar 19, 2008 7:54 pm
by lefty
i know for a fact that it does work so i can only imagine a wrong edit.

if you give me temp ftp access i can have a look, or you can also send me the edited files if you like.

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Fri May 16, 2008 12:38 pm
by Shugi
Hi!

Thanks for that cool mod! But i've got a problem: I turned in some forum guest-posting on, but i keep getting the error-message:

Code: Select all
Incorrect integer value: '' for column 'topic_first_poster_avatar_type' at row 1 [1366]


(I already gave the "anonymous"-user an avater, but that doesnt help)

Any help is appreciated!

Shu'Gi



P.S. My forum URL is: http://www.tatort-tarot.de/forum/

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Fri May 16, 2008 5:34 pm
by lefty
hI Shu'Gi,
you can write german as well if you like, it just happens that most people write english here ;) german is just as supported here. just havent had the time to make something out of the site after i had to wipe it ;)

as for your problem, you probably found a bug. i never tried guest posting which is probably why this is happening, i will have to look into it. will try tonight, at least to get you going but if i dont find the time it will be sometime next week...

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Fri May 16, 2008 6:34 pm
by lefty
only looking at it briefly, there are bugs that need fixing, i have time to do that tonight so if you want to send me ur include/functions_posting.php i can try to make the changes that should get you going for now with guest user posting

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Fri May 16, 2008 7:03 pm
by Shugi
Hi!

Thanks for your help!

I made changes myself as well now, which seem to work ... i changed in some of the sql-commands the "" to "0"

for example:
Code: Select all

      'topic_first_poster_avatar_width'   => (($user->data['user_id'] != ANONYMOUS) ? $user->data['user_avatar_width'] : ''),


changed to
Code: Select all
      'topic_first_poster_avatar_width'   => (($user->data['user_id'] != ANONYMOUS) ? $user->data['user_avatar_width'] : '0'),


Thanks,
Andreas

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Fri May 16, 2008 7:22 pm
by lefty
you can try this file if you like, i have not tested it so hopefully there is no typo.

in any case, you better make a backup first.

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Fri May 16, 2008 9:29 pm
by Shugi
Works great so far, will keep you informed if there are problems occuring.
Thank you very much! :)

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Fri May 16, 2008 10:39 pm
by lefty
super, werd die tage mal ueber den ganzen code gehen muessen ;)

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Sat May 17, 2008 9:40 am
by Shugi
hmm, vielleicht doch nicht ..

SQL ERROR [ mysql4 ]

Unknown column 'forum_last_poster_avatar_type' in 'field list' [1054]

SQL

UPDATE forum_topics SET topic_replies_real = topic_replies_real + 1, topic_bumped = 0, topic_bumper = 0, topic_replies = topic_replies + 1, topic_last_post_id = 28474, topic_last_poster_id = 2, topic_last_poster_name = 'ShuGi', topic_last_poster_colour = '0066FF', topic_last_post_subject = 'Re: Tageskarten Schattenblume - Crowley', topic_last_post_time = 1211013495, topic_last_poster_avatar = '2.gif', forum_last_poster_avatar_type = 1, forum_last_poster_avatar_width = 80, forum_last_poster_avatar_height = 96 WHERE topic_id = 3033

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: includes/functions_posting.php
LINE: 2368
CALL: dbal_mysql->sql_query()

FILE: posting.php
LINE: 1007
CALL: submit_post()

Re: [Beta ]Avatar of poster on Index and Viewforum 0.2.0

PostPosted: Sat Sep 27, 2008 11:15 pm
by sK*sl!ce
hi lefty! :kuhsmilie:

i'm having a little trouble... there is an extra set of users at the end of the viewforum.php. the install went fine, so i don't know where this extra comes from. here's a screenshot:

Image

any ideas? :scared3:

thanks :thumbsup: