vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - [FMI] Encourage Avatar Usage (https://vborg.vbsupport.ru/showthread.php?t=290763)

b00k 11-14-2012 11:00 PM

[FMI] Encourage Avatar Usage
 
Enclosed is our Avatar Encouragement system. What this plugin does is look to see if a user is using an avatar or not. If the user is not using an avatar it will insert a default avatar the admin has selected. The avatar will be click-able to enter the users USERCP and will only be show to that specific user.


Notable Features:
Developed by ForuMedia Inc. We use our products on our network!
Avatar clicks to USERCP profile so user knows where to go to update avatar.
Avatar only appears for the user, not all users. This means you won't see the default avatar everywhere.
Enable usergroup filter. Who it works for, who it doesn't.
Ability to change path of missing avatar image (you can use a CDN!)

How to test if it works?
Delete your avatar. Go to a thread and see if you have your assigned default avatar listed.
You can also create a test account with a test thread / post with no USERCP set avatar and see if it works :)

Need Avatars?
10 Pack of "Click Me - add your avatar" images.

Footer Link
You may disable it however we would appreciate it if you didn't. It helps support our efforts.

Support
Support will only be offered on ForuMedia & vBorg.
Our support thread:

Install Details
See attached .txt file.

Admincp screen shot
https://vborg.vbsupport.ru/

b00k 11-15-2012 06:34 PM

reserved for updates.

scottct1 11-15-2012 07:42 PM

Interesting mod...

I can't find <a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">

In my postbit template. The closest I find is

<a class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">

Please advise :)

neopets 11-15-2012 08:02 PM

scott, just change
{vb:link member, {vb:raw post}}

to
<vb:if condition="$avae">profile.php?do=editavatar<vb:els e />{vb:link member, {vb:raw post}}</vb:if>

b00k 11-15-2012 08:05 PM

Hey Scott

please back up any of your templates etc :)

Quote:

Originally Posted by scottct1 (Post 2381346)
I can't find <a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">

The above mentioned code should be in postbit legacy and can be replaced.

Quote:

Originally Posted by scottct1 (Post 2381346)
<a class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">

the above mentioned code will be in the postbit and can be replaced.




Sorry, instructions were a bit vague. I will now update them for you guys.

RedTurtle 11-15-2012 08:16 PM

This is an awesome idea and will definitely help encourage users to use an avatar on my board.

Thank you for releasing this to the community! :D

BTW, is this compatible with vB3 also?

scottct1 11-15-2012 08:18 PM

I changed it to the line in your new instructions and it works, however the users avatar is now to the right of their name instead of the left.

b00k 11-15-2012 08:18 PM

Quote:

Originally Posted by RedTurtle (Post 2381355)
This is an awesome idea and will definitely help encourage users to use an avatar on my board.

Thank you for releasing this to the community! :D

BTW, is this compatible with vB3 also?

At some point we will release for vB3 :)

Very near future.

RedTurtle 11-15-2012 08:22 PM

Quote:

Originally Posted by TSR (Post 2381358)
At some point we will release for vB3 :)

Very near future.

Great to hear. Good to see a new developer on vBorg! Looking forward to the stuff you provide the community.

This mod is working great on my board.

Nominated :):up:

scottct1 11-15-2012 08:30 PM

Got i t working using this code instead.

<a class="postuseravatarlink" href="<vb:if condition="$avae">profile.php?do=editavatar<vb:els e />{vb:link member, {vb:raw post}} </vb:if>" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">

Only issue is the link for all the other avatars on that page turn to the profile.php?do=editavatar but its livable. :D

RedTurtle 11-16-2012 03:21 PM

Quote:

Originally Posted by scottct1 (Post 2381363)
Got i t working using this code instead.

<a class="postuseravatarlink" href="<vb:if condition="$avae">profile.php?do=editavatar<vb:els e />{vb:link member, {vb:raw post}} </vb:if>" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">

Only issue is the link for all the other avatars on that page turn to the profile.php?do=editavatar but its livable. :D

Hey Scott,

Actually I think you have it installed incorrectly. The point of the plugin is that only the user who is logged in and doesn't have an avatar should see a link over their default avatar to the Edit Avatar page. Nobody besides that user should see the link to profile.php?do=editavatar and even then only on their own avatar area.

You may want to redo your template edit, and look at neopets' post a few above to see what to replace.

b00k 11-16-2012 03:37 PM

Scott, a direct excerpt from my postbit from a 4.2.0 board that's a clean install with the modifcation code done.

PHP Code:

        <vb:if condition="$show['avatar']">
<
class="postuseravatarlink" href="<vb:if condition="$avae">profile.php?do=editavatar<vb:else />{vb:link member, {vb:raw post}}</vb:if>" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
                        <
vb:if condition="$post.avatarurl">
                            <
img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                        <
vb:else />
                            <
img src="{vb:stylevar imgdir_misc}/unknown.gif" />
                        </
vb:if>
                    </
a>
                </
vb:if> 


sticky 11-17-2012 04:47 AM

Anyway to make this so it rewards a user with rep points for setting an avatar?

dog-tag 01-02-2013 03:55 PM

Works very well and installed perfectly thank you!

If I were to improve it, I think I'd make the images rotate... just an idea.

K4GAP 02-28-2013 01:39 AM

Tagged for future use.

fxdigi-cash 02-28-2013 05:40 AM

is this mod works as default avatar for users who don't use avatar??

if so, I tried it and didn't work. I also tried the codes posted, but none worked...

any idea?

ForceHSS 02-28-2013 06:05 AM

Quote:

Originally Posted by fxdigi-cash (Post 2406888)
is this mod works as default avatar for users who don't use avatar??

if so, I tried it and didn't work. I also tried the codes posted, but none worked...

any idea?

vb version?
You must of done something wrong as this works


All times are GMT. The time now is 08:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01185 seconds
  • Memory Usage 1,763KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete