vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   allowing avatar to only display once per thread? (https://vborg.vbsupport.ru/showthread.php?t=41978)

michealo 08-06-2002 12:58 PM

allowing avatar to only display once per thread?
 
i did multiple searches here and couldnt find anything to do this

my forum has a "journal" section where people start thier own specific thread, and only THEY can respond in that thread, with new entries.

it works fabulous, but it looks kinda rediculous seeing the same persons avatar the entire length of the thread with every reply

i just need the member's avatatar so show up for the 1st post and not any additional reply

i only need this done inside a specific sub-forum

thanks in advance

michealo 08-09-2002 05:09 PM

*bump*

anyone? thanks

Tim Wheatley 08-09-2002 10:30 PM

I'd be interested in this too if it's done.

C'mon - join the march people! :D

Riddel 08-10-2002 04:05 AM

hmm maybe you can make a special template for that forum and take out the avatars from the postbits all together?

[D]Vincent 08-10-2002 04:28 AM

There is an allow sigs once per thread, maybe someone could edit the code to work with avatars also.

michealo 08-12-2002 03:34 PM

one last hope

thanks

Logician 08-22-2002 08:30 AM

edit admin/functions.php, find:

PHP Code:

        if ($avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="";
        } else {
            eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
        } 

Replace it AS:

PHP Code:

$log_arr_post_userid=$post[userid];
if (
$shown_avatar) {$testavatar1=in_array($log_arr_post_userid,$shown_avatar);}
if (
$avatarurl=="" or ($forum[forumid]==AND $testavatar1) or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
$post[avatar]="";
} else {
eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
$shown_avatar[]=$post[userid];
unset(
$testavatar1);


Replace X with your forumid in which you dont want multi-avatars of the same user..

In functions.php find:

PHP Code:

global $bbuserinfo,$session,$ignore,$cookietimeout

Replace it as:
PHP Code:

global $bbuserinfo,$session,$ignore,$cookietimeout,$shown_avatar

Edit showthread.php, find

PHP Code:

if ($action=="showpost") { 

after that add:
PHP Code:

$shown_avatar=array(); 

That's all..

michealo 08-22-2002 09:40 AM

Parse error: parse error in /home/sites/home/web/forums/admin/functions.php on line 160

Fatal error: Call to undefined function: getuserinfo() in /home/sites/home/web/forums/admin/sessions.php on line 323

Logician 08-22-2002 10:36 AM

try now

michealo 08-22-2002 04:38 PM

thanks for all the help so far, logician

i tried the updated code, no errors this time BUT

i made sure i changed the forum id to 31, and checked that forum, and the avatars still display like normal in every post

i even made a test post in my thread, and my avatar still displayed

Logician 08-22-2002 07:15 PM

sorry about that, my bad.. Reapply the code, I corrected it and tested it, it works now..

michealo 08-22-2002 07:33 PM

genius, logician

pure genius

thank you


All times are GMT. The time now is 04:50 PM.

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.02533 seconds
  • Memory Usage 1,742KB
  • 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
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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