vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Avatar Posts Hack (https://vborg.vbsupport.ru/showthread.php?t=25436)

phumphries 08-14-2001 10:00 PM

This one is almost a template modification, but here it is since it hacks avatar.php.

When adding multiple avatars, you can use the "Check All" box to select them all, but you still have to type in the desired number of posts for each if "0" is not what you are after.

So, I added a little JavaScript to let you set them all to the same number. This is especially useful if you are importing all your old avatars from Freddie's original hack, and they are already organized into directories based on post numbers.

In avatar.php in the Admin directory, find the JavaScript section that contains:
PHP Code:

<script language="JavaScript">
<!--
function 
CheckAll() 

Add this function after the CheckAll function and before the CheckCheckAll function (it really does not matter where you add it; that is just were I put it in the SCRIPT block):
Code:

function ChangeAll()
{
        var textboxcount=0;
        for (var i=0;i<document.form.elements.length;i++)
        {
                var e = document.form.elements[i];
                if ((e.name != 'allavatarposts') && (e.type=='text'))
                {
                        textboxcount++;
                        if (textboxcount % 2==0)
                                e.value = document.form.allavatarposts.value;
                }
        }
}

Then find:
Code:

<td align='center'><span class='tblhead'><b>Minimum Posts</b></span></td>";
and change it to:
Code:

<td align='center'><span class='tblhead'><b>Minimum Posts</b></span><br><input name='allavatarposts' type='text' size=8 value='0' onChange='ChangeAll();'></td>";
to add the AllAvatarPosts text box to the table's title bar.

That is it. When you upload multiple avatars, you can now type in a value in the AllAvatarPosts box, then check the CheckAll check box, and all the avatars are uploaded with the same post threshold value.

LuBi 08-26-2001 02:15 PM

What version does this hack work with?

phumphries 08-31-2001 08:07 PM

I have 2.0.3, but it should work with any of the 2.0.x releases.

The hack just adds some JavaScript to the Avatar import page.

LuBi 09-01-2001 01:40 PM

Where do I install this hack?

phumphries 09-04-2001 01:29 PM

avatar.php in the Admin directory.

I have clarified the instructions. Sorry about that.

LuBi 09-04-2001 01:31 PM

Found it, thanks a lot great hack.


All times are GMT. The time now is 01:14 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.01135 seconds
  • Memory Usage 1,719KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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