Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: ascaland on May 08, 2011, 02:23:05 PM

Title: Transparent Offline Avatars - 1.1
Post by: ascaland on May 08, 2011, 02:23:05 PM
Transparent Offline Avatars


Author: Project Evolution (http://www.simplemachines.org/community/index.php?action=profile;u=164151) || Link to Modification (http://custom.simplemachines.org/mods/index.php?mod=2995) || Support Topic (http://www.simplemachines.org/community/index.php?topic=433298.0)



Transparent Offline Avatars is a modification which uses Javascript to set a specified transparency level on member's avatars if they are offline. This doesnt affect any XHTML or CSS validation in any way.

Created by Anthony Calandra/Project Evolution - 2011.
Title: Re: Transparent Offline Avatars
Post by: akbora on May 08, 2011, 05:56:05 PM
It is good but similar mod exists already in smf's world.

Here it is: http://custom.simplemachines.org/mods/index.php?mod=1764

What is different?
Title: Re: Transparent Offline Avatars
Post by: busterone on May 08, 2011, 06:51:52 PM
The one you referred to is outdated and is no longer supported by the mod author. M-DVD has not been active in the last 15 months.
Title: Re: Transparent Offline Avatars
Post by: ascaland on May 08, 2011, 08:50:17 PM
Also, my modification does not produce any validation errors or warnings. As for the other mod, im not sure.
Title: Re: Transparent Offline Avatars
Post by: Apllicmz on May 29, 2011, 02:01:34 AM
ok
nice mod
when Update

Dont forget portuguese

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
            $txt['enable_transparent_avatars'] = 'Activar  Avatares Offline transpar&ecirc;nte?';
            $txt['transparent_avatars_tab'] = 'Avatares Offline transparente';
            $txt['avatar_transparency_level'] = 'Definir em percentagem a transpar&ecirc;ncia<div class="smalltext">Por examplo: 20<br />O menor percentual - o menos vis&iacute;vel</div>';
]]></add>
        </operation>
    </file>
   
    <file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
            $txt['enable_transparent_avatars'] = 'Activar  Avatares Offline transpar&ecirc;nte?';
            $txt['transparent_avatars_tab'] = 'Avatares Offline transparente';
            $txt['avatar_transparency_level'] = 'Definir em percentagem a transpar&ecirc;ncia<div class="smalltext">Por examplo: 20<br />O menor percentual - o menos vis&iacute;vel</div>';
]]></add>
        </operation>
    </file>

Title: Re: Transparent Offline Avatars
Post by: ascaland on May 29, 2011, 02:12:18 AM
Awesome, thanks for the translation. :)
Title: Re: Transparent Offline Avatars
Post by: Kurakama on May 30, 2011, 01:51:46 PM
great  mod (:
Title: Re: Transparent Offline Avatars
Post by: yakyakyak on May 31, 2011, 05:24:45 AM
RC3 installs perfect, however it is not working with the Default Avatar Mod

The default avatar for members offline is unaffected

Title: Re: Transparent Offline Avatars
Post by: MiY4Gi on August 12, 2011, 10:16:10 PM
I tried installing this mod on 2.0 Gold, but my load.php file had 3 errors. I thought I could manually edit the code, but the code that needs to be edited isn't there.

For example,

I must find the code:


($profile['id_attach'] > 0 ? '<img class="avatar"


but the only code I could find containing "($profile['id_attach']" is


      array(
         'name' => $profile['avatar'],
         'image' => $profile['avatar'] == '' ? ($profile['id_attach'] > 0 ? '<img src="' . (empty($profile['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $profile['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $profile['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($profile['avatar'], 'http://') ? '<img src="' . $profile['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($profile['avatar']) . '" alt="" class="avatar" border="0" />'),
         'href' => $profile['avatar'] == '' ? ($profile['id_attach'] > 0 ? (empty($profile['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $profile['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $profile['filename']) : '') : (stristr($profile['avatar'], 'http://') ? $profile['avatar'] : $modSettings['avatar_url'] . '/' . $profile['avatar']),
         'url' => $profile['avatar'] == '' ? '' : (stristr($profile['avatar'], 'http://') ? $profile['avatar'] : $modSettings['avatar_url'] . '/' . $profile['avatar'])
      ),


Has anyone else experienced this?
Title: Re: Transparent Offline Avatars
Post by: ascaland on August 12, 2011, 11:06:55 PM
What modifications do you have installed?
Title: Re: Transparent Offline Avatars
Post by: MiY4Gi on August 13, 2011, 10:33:04 AM
Quote from: Project Evolution on August 12, 2011, 11:06:55 PM
What modifications do you have installed?

1.   Discourage IE6                                           2.1.1
2.   dQuoteSelection                                   2.4
3.   Double Post Stopper                           1.1
4.   Remember Position After Login/Logout      1.2   
5.   Anti-Spam Links                                   1.0.1
6.   Join date and Location in Posts           1.2   
7.   Menu without limit level                           1.0.4
8.   Highslide 4 SMF                                   0.7a    
9.   Aeva Media                                           1.4w   
10.   vBulletin Style Meta Tags                           1.1   
11.   Quote and code like vb4                           1.0
12.   Google +1                                           1.0   
13.   Previous and Next Topic Enhancement   1.0
14.   Member NotePad                                   2.0.2
15.   Drafts                                                   1.1.1
16.   Copyright & Footer Links                           3.2
17.   Topics Filter                                           3.2
18.   PortaMx 1.4                                           1.4
19.   Remove Message Icon                           1.1.1
20.   Add GooglePlus to Posts                           1.0
21.   Forum Firewall                                           1.1.3
22.   H1 Tags in link tree                               1.1
23.   Bad Behavior mod                                   1.5.3
24.   Add And Remove Buttons                           0.4
25.   Simple .htaccess Cache Mod                   2.6
26.   SMF Quiz                                                   1.0.8 beta4
27.   Started By Column                                   1.4
28.   Hide Signatures from Guests                   2.0
29.   Hide Avatars from Guests                   2.0
30.   Boilerplates for posts                           3.0
31.   Button 1 Menu Extender for 6 custom buttons mod           1.0
32.   Ad Managment                                    3.0.1
33.   Additional Home page Title | S-Ace        3.3
34.   Bookmarks                                           2.3
35.   SMF Trader System                                   1.6
36.   Hide User Names from Guests                   1.1
37.   6 Custom buttons / tabs with Sub Menus (4)                    0.5   
38.   Sitemap                                                   2.2.0
39.   Caps_Lock_Detection_on_Login           1.1.0.1
40.   Vote polls with points                           0.1.1
41.   SMF Topic Prefix Mod                           1.2.2
42.   Facebook_Like v.2.0                           2.0
Title: Re: Transparent Offline Avatars
Post by: ascaland on August 13, 2011, 11:43:50 AM
Definitely has to be this,
Quote29.   Hide Avatars from Guests                   2.0

But all your really doing is replacing the class attribute,
class="avatar"

To this,
' . (!$profile['is_online'] && !empty($modSettings['enable_transparent_avatars']) ? 'class="avatar avatarOffline"' : 'class="avatar"') . '
Title: Re: Transparent Offline Avatars
Post by: MiY4Gi on August 13, 2011, 12:03:38 PM
Mm, so is there any way for me to install this mod without uninstalling Hide Avatars from Guests?
Title: Re: Transparent Offline Avatars
Post by: ascaland on August 13, 2011, 12:08:36 PM
Not without manually editting. But like I said above, the only thing your doing with that code you posted is copy and paste.
Title: Re: Transparent Offline Avatars
Post by: MiY4Gi on August 13, 2011, 02:55:16 PM
No, I don't mind manual editing, but I don't know which code to paste where. Remember, I can't find the code that I need to replace, so you'll need to tell me which code to replace instead.
Title: Re: Transparent Offline Avatars
Post by: ascaland on August 13, 2011, 03:32:53 PM
Take a look at the parsing instructions,
http://custom.simplemachines.org/mods/index.php?action=parse;mod=2995;attach=176869;smf_version=2.0
Title: Re: Transparent Offline Avatars
Post by: MiY4Gi on August 13, 2011, 07:15:41 PM
If it was just the task of searching for the correct code and replacing it, then I would be able to do it. The issue is that the code I need to replace is different now. It's got a whole truckload of code mashed in so that the code I need to find is broken up and scattered. They're all in the same array still, just at different parts of the array now.

Any suggestions?
Title: Re: Transparent Offline Avatars
Post by: ascaland on August 13, 2011, 07:19:47 PM
Post your Load.php.......................
Title: Re: Transparent Offline Avatars
Post by: MiY4Gi on August 13, 2011, 08:07:47 PM
Here you go.
Title: Re: Transparent Offline Avatars
Post by: ascaland on August 14, 2011, 06:47:19 PM
Give the attached below a try.
Title: Re: Transparent Offline Avatars - 1.1
Post by: hcfwesker on November 15, 2011, 03:55:27 PM
Another nice mod, Project Evolution.  thanx for sharing. :)
Title: Re: Transparent Offline Avatars - 1.1
Post by: Wutzmann on March 15, 2014, 09:38:06 PM
Where can i set the transparency level?
Title: Re: Transparent Offline Avatars - 1.1
Post by: ascaland on March 16, 2014, 02:44:41 PM
Quote from: Wutzmann on March 15, 2014, 09:38:06 PM
Where can i set the transparency level?

There is a setting in the same place where you enable/disable the mod.
Title: Re: Transparent Offline Avatars - 1.1
Post by: Wutzmann on March 16, 2014, 04:35:13 PM
Quote from: Anthony` on March 16, 2014, 02:44:41 PM
Quote from: Wutzmann on March 15, 2014, 09:38:06 PM
Where can i set the transparency level?

There is a setting in the same place where you enable/disable the mod.

Can't belive your answer  >:(

Ok, the author of this mod can't help me.

Can anyone else please help me where i can find the pleace to enable and set up the mod?
Title: Re: Transparent Offline Avatars - 1.1
Post by: ascaland on March 16, 2014, 05:58:46 PM
Quote from: Wutzmann on March 16, 2014, 04:35:13 PM
Quote from: Anthony` on March 16, 2014, 02:44:41 PM
Quote from: Wutzmann on March 15, 2014, 09:38:06 PM
Where can i set the transparency level?

There is a setting in the same place where you enable/disable the mod.

Can't belive your answer  >:(

Ok, the author of this mod can't help me.

Can anyone else please help me where i can find the pleace to enable and set up the mod?

You asked specifically for that setting..? But since your attitude is quite poor, have fun on your own.
Title: Re: Transparent Offline Avatars - 1.1
Post by: Wutzmann on March 18, 2014, 02:59:16 AM
Quote from: Anthony` on March 16, 2014, 05:58:46 PM
You asked specifically for that setting..? But since your attitude is quite poor, have fun on your own.

Thank you for your support  ::)
Title: Re: Transparent Offline Avatars - 1.1
Post by: Wutzmann on April 18, 2014, 01:03:00 PM
Sorry Anthony,

unfortunately, my English is not the best, I did not mean you're lying, but that if one finds the settings he sees, of course, where he set the transparency.

I could not believe that you assumed that someone is so stupid and then not see it.

If I install the mod, then settings are nowhere to be found, no!

I hope I have not written back as a nonsense  ;D
Title: Re: Transparent Offline Avatars - 1.1
Post by: ascaland on April 18, 2014, 01:09:02 PM
Quote from: Wutzmann on April 18, 2014, 01:03:00 PM
Sorry Anthony,

unfortunately, my English is not the best, I did not mean you're lying, but that if one finds the settings he sees, of course, where he set the transparency.

I could not believe that you assumed that someone is so stupid and then not see it.

If I install the mod, then settings are nowhere to be found, no!

I hope I have not written back as a nonsense  ;D

Is the setting visible there? Are you changing it but nothing is happening?
Title: Re: Transparent Offline Avatars - 1.1
Post by: Wutzmann on April 21, 2014, 08:21:55 AM
Quote from: Anthony` on April 18, 2014, 01:09:02 PM
Is the setting visible there? Are you changing it but nothing is happening?

No Settings  :(

If there were then but under settings modification - settings or?
Title: Re: Transparent Offline Avatars - 1.1
Post by: ascaland on April 21, 2014, 11:31:39 AM
Quote from: Wutzmann on April 21, 2014, 08:21:55 AM
Quote from: Anthony` on April 18, 2014, 01:09:02 PM
Is the setting visible there? Are you changing it but nothing is happening?

No Settings  :(

If there were then but under settings modification - settings or?

Hm, they should all be in the same place. The checkbox and a textfield should both be there. Maybe it didn't install correctly? Try reinstalling again and see what happens.
Title: Re: Transparent Offline Avatars - 1.1
Post by: IP_Board_Rules on May 24, 2023, 11:00:41 PM
Hello Anthony, I am sorry for bringing up this old topic but I am expiriencing the very same problem as the member posting before me. On SMF 2.0.18 it seems that the function from managesettings.php is not displayed. The mod settings are missing for me in the Admin area.
Title: Re: Transparent Offline Avatars - 1.1
Post by: GL700Wing on May 25, 2023, 06:49:29 AM
Quote from: atanua on May 24, 2023, 11:00:41 PMThe mod settings are missing for me in the Admin area.
@atanua To display the settings for this mod you need to make the following two code change in ./Sources/Subs.php

Find:
function integrateModifyModificationsTOA($subActions) {Replace With:
function integrateModifyModificationsTOA(&$subActions) {
Find:         
function integrateAdminAreasTOA($admin_areas) {Replace With:         
function integrateAdminAreasTOA(&$admin_areas) {
Important Note: In order to uninstall this mod you will need to reverse these changes.
Title: Re: Transparent Offline Avatars - 1.1
Post by: IP_Board_Rules on May 25, 2023, 10:39:33 AM
Thank you so much! This was a very helpfull! Reply and fixed it! Thank you!