AvatarOnBoard

Started by Bulakbol, February 18, 2008, 10:39:03 PM

Previous topic - Next topic

Bulakbol

Quote from: teaser on February 19, 2008, 11:17:22 PM
Ok Now the problem is that I kind of replaced the old boardindex.php with the new one and i reactivated the plugin but its not showing up.



Hi Teaser. Here's your BoardIndex.php. Put it back in your Sources folder. Back up the original one. Make sure this mod was installed before using this file because of the additional fields in the settings table.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Bulakbol

Quote from: FERNSIDE on February 19, 2008, 11:04:20 PM
Quote from: JohnyB on February 19, 2008, 08:07:41 AM
@Fernside. Attach your BoardIndex.template.php and I'll take a look at it.

Thanks JohnyB :)

Its attached.

Hi Fernside. I took a long shot. I am not using TP so I am not sure if this will work. Try it anyway and if there are little things to fix, we'll try to fix it.  Im keeping my fingers crossed.  :)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Eliana Tamerin

Uninstall your mod, ignore the warning about the boardindex, then reinstall it. That should restore it to your board. Else, you can go into the file and add in the mod manually.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Sabre™

Quote from: JohnyB on February 20, 2008, 01:04:05 AM
Hi Fernside. I took a long shot. I am not using TP so I am not sure if this will work. Try it anyway and if there are little things to fix, we'll try to fix it.  Im keeping my fingers crossed.  :)

Buddy..  Uncross your fingers mate.
Cause you my friend, are brilliant at what you do :)
Works 100%, and without a hitch.
Respect :)

Thanks again Johny..    And  Bravo mate  ;)   
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Kimmie

fantastic mod JohnyB. I installed both this one and the avatars@index and they work together perfectly. :)


Thanks for all your hard work!

Bulakbol

Thanks Sabre and Kimmie. Thank you too for trying my mod.  ;D
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

teaser


Bulakbol

Quote from: teaser on February 20, 2008, 09:31:18 AM
Thanks man it worked.

Cool.  8) I can sleep better now. haha. I thank you too.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Kimmie

I wanted to add that I installed it on a forum using TP and a custom theme, that already had the avatar@index installed and even though it didnt list my theme during the installation, it installed perfectly, and they both work together flawlessly. :)

Bulakbol

Quote from: Kimmie on February 21, 2008, 12:55:13 AM
I wanted to add that I installed it on a forum using TP and a custom theme, that already had the avatar@index installed and even though it didnt list my theme during the installation, it installed perfectly, and they both work together flawlessly. :)

That's great. I installed the Avatar@Index and found out that the avatar is for topic starter in the message index. The avatar of this mod is for the last poster. Thanks again.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Kimmie

#30
I think I spoke too soon in my last post...lol (sorry). Im gettin these errors in my log:

8: Undefined variable: mini_avatar
File: /home/patriotg/public_html/Sources/MessageIndex.php
Line: 718

8: Undefined index: avatar
File: /home/patriotg/public_html/Themes/default/MessageIndex.template.php (main sub template - eval?)
Line: 58

The 2nd error only happens when one of my staff (or myself) is posting in one specific child board that is off limits to regular members. The avatar at index shows up but not this one. I have another child board in that same area that they both show up on (weird) - edit.. ok I found another board that this error is happening on - and its a board that all members have access to.  ::) (edit... this error even happens if all we do is view the board index -  i just tried it)

Anything I can do to fix it?

It looks to me what the 1st one is doing (corse I could be wrong..lol) is: With this mod installed there are now "2" entries on the profile page for "noavatar". The error seems to happen everytime a member makes a post - "until" that person selects an avatar or selects the "noavatar" that comes with this mod.

(actually... I wonder if also adding the mod that makes people select an avatar at registration will resolve this without me having to edit the code)


Here is line 718 from my messageindex.php:

'avatar' => $mini_avatar['avatar'] == '' ? ($mini_avatar['ID_ATTACH'] > 0 ? '<img src="' . (empty($mini_avatar['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $mini_avatar['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $mini_avatar['filename']) . '" alt="" height="'.$modSettings['miniAvatarHeight'] .'px" width="'.$modSettings['miniAvatarWidth'] .'px" align="absmiddle" border="0" />' : '') : (stristr($mini_avatar['avatar'], 'http://') ? '<img src="' . $mini_avatar['avatar'] . '" alt="" height="'.$modSettings['miniAvatarHeight'] .'px" width="'.$modSettings['miniAvatarWidth'] .'px" align="absmiddle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($mini_avatar['avatar']) . '" alt="" height="'.$modSettings['miniAvatarHeight'] .'px" width="'.$modSettings['miniAvatarWidth'] .'px" align="absmiddle" border="0" />'),  // Avatars at Index By alperuzi

Bulakbol

Hello Kimmie. Sorry about that, but looking at the bottom of the codes you posted, it says // Avatars at Index By alperuzi. I didn't use mini_avatar variable so I am sure it's not from my mod. It's from the Avatar@Index mod by Alperuzi. You also have error in line 58, can you post line 58 too so i can see if it's coming from my mod?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Kimmie

okie dokie...hang on..lol

(this is just really weird because one of those errors - on line 58 - is only happening on two child boards - and it just started happening tonight..lol)

Kimmie

LIne 58 from the Themes/default/MessageIndex.template.php  file:

', $board['last_post']['member']['avatar'], '

Bulakbol

#34
No problem.  :) Check Avatar@Index comments/support thread. He might have the sulution there. You can uninstall my mod to see if it will solve your problem.

<edit>
Ok, that looks like from my mod. Can you post more that one line. About 5 lines?
</edit>
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Bulakbol

Here's part of the code in MessageIndex.template,php. Check your file and see if there's missing code.

</td>';
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
', $board['last_post']['member']['avatar'], '
</td>';
echo '
<td class="windowbg2" valign="middle" width="22%"><small>';
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Kimmie

#36
k be back in a jiffy with it..hehe


if (!$modSettings['disable_avatar'])
            echo '
            <td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
               ', $board['last_post']['member']['avatar'], '
            </td>';
            echo '
            <td class="windowbg2" valign="middle" width="22%"><small>';

Bulakbol

Fix the Avatar@Index mod error first. Then if you still have problem with line 58, let me know. We will check Sources/MessageIndex.php if the error still appear after you fix the Avatar@Index mod.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Kimmie

Quote from: JohnyB on February 22, 2008, 03:31:09 AM
Fix the Avatar@Index mod error first. Then if you still have problem with line 58, let me know. We will check Sources/MessageIndex.php if the error still appear after you fix the Avatar@Index mod.

ok thanks for the help. What I may do first is uninstall your mod and see if the errors go away. If they do, I might try installing it manually (thats gonna be fun being as I have never done one manually..lol), and see if the errors come back.

*any tips ya wanna throw at me on the manual install please do as I have never done one..lol*

Bulakbol

Try the package parser. It will help you how to do the manual edit.

http://sleepycode.com/PackageParser/index.php

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Advertisement: