Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-12-2002, 05:02 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Avatar Listing as text.....

Some of my users have mentioned that when changing their Avatar... it takes FOREVER to load in the avatars. On my old UBB board, I had an option to List the avatars as names... is this availble in VB? is there a hack for it?

So the avatars would appear in a dropdown box!

Thanx
Reply With Quote
  #2  
Old 10-13-2002, 10:22 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
Reply With Quote
  #3  
Old 10-13-2002, 10:24 PM
Eander Eander is offline
 
Join Date: Mar 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I'm familiar with the UBB avatar bit where it just has a dropdown box that changes the image via javascript. I'll see what I can do

Ok.. here's the original from member.php:

PHP Code:
  $avatarcount 0;
  while (
$avatar=$DB_site->fetch_array($avatars)) {
    
$avatarid=$avatar[avatarid];
    if (
$avatarcount==0)
      
$avatarlist .= '<tr>';
    eval(
"\$avatarlist .= \"".gettemplate("modifyavatarbit")."\";");
    
$avatarcount++;
    if (
$avatarcount==$numavatarswide) {
      
$avatarlist .= '</tr>';
      
$avatarcount 0;
    }
  }
  if (
$avatarcount!=0) {
    while (
$avatarcount $numavatarswide) {
      
$avatarlist .= '<td bgcolor="{firstaltcolor}">&nbsp;</td>';
      
$avatarcount++;
    }
    
$avatarlist .= '</tr>';
  } 
You want to make it look like this:

PHP Code:
  $avatarcount 0;
$avatarlist.="<tr><td bgcolor=\"{firstaltcolor}\"><img name=avatarswitch src=images/blank.gif></td><td bgcolor=\"{firstaltcolor}\"><select name=newavatar onChange=\"switchimg(this);\"><option value=\"\">";
  while (
$avatar=$DB_site->fetch_array($avatars)) {
    
$avatarid=$avatar[avatarid];
$avatarlist.="<option value=\"$avatar[avatarpath]\">$avatar[title]";
/*
    if ($avatarcount==0)
      $avatarlist .= '<tr>';
    eval("\$avatarlist .= \"".gettemplate("modifyavatarbit")."\";");
    $avatarcount++;
    if ($avatarcount==$numavatarswide) {
      $avatarlist .= '</tr>';
      $avatarcount = 0;
    }
*/
  
}
  if (
$avatarcount!=0) {
/*
    while ($avatarcount < $numavatarswide) {
      $avatarlist .= '<td bgcolor="{firstaltcolor}">&nbsp;</td>';
      $avatarcount++;
    }
*/
    
$avatarlist .= '</tr>';
  } 
I just commented out all the old stuff.

Next you want to edit your modifyavatar template.

At the top of the template find $headinclude . Put this in after it:

Quote:
<script language="javascript">
function switchimg(newimg) {
var URL = newimg.options[newimg.selectedIndex].value;
document['avatarswitch'].src=URL;
}
</script>

Also, you're going to need a blank gif image for a starter. I've attached one for you. It's 1x1 and transparent. Should do nicely.
Reply With Quote
  #4  
Old 10-13-2002, 10:44 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Eander
Hmm, I'm familiar with the UBB avatar bit where it just has a dropdown box that changes the image via javascript. I'll see what I can do
Brilliant. Thankyou. I owe you one.
Reply With Quote
  #5  
Old 10-15-2002, 09:57 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Eander. Thank you for helping me with this.

Slight problem. I have done all the code, but it drop down box has nothing in it, and its got Pages,1,2,3 at the bottom of the box.

Heres the pic.

Do you know the problem?
Thanx
Attached Images
File Type: jpg avatar.jpg (25.7 KB, 0 views)
Reply With Quote
  #6  
Old 10-15-2002, 10:15 PM
Eander Eander is offline
 
Join Date: Mar 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
PHP Code:
$avatarcount 0;
$avatarlist.="<tr><td bgcolor=\"#13486D\"><img name=avatarswitch src=images/blank.gif></td><td bgcolor=\"#13486D\"><select name=newavatar onChange=\"switchimg(this);\"><option value=\"\">";
  while (
$avatar=$DB_site->fetch_array($avatars)) {
    
$avatarid=$avatar[avatarid];
$avatarlist.="<option value=\"$avatar[avatarpath]\">$avatar[title]";
/*
    if ($avatarcount==0)
      $avatarlist .= '<tr>';
    eval("\$avatarlist .= \"".gettemplate("modifyavatarbit")."\";");
    $avatarcount++;
    if ($avatarcount==$numavatarswide) {
      $avatarlist .= '</tr>';
      $avatarcount = 0;
    }
*/
  
}
  if (
$avatarcount!=0) {
/*
    while ($avatarcount < $numavatarswide) {
      $avatarlist .= '<td bgcolor="#13486D">&nbsp;</td>';
      $avatarcount++;
    }
*/
    
$avatarlist .= '</tr>';
  } 
The only thing I can think of is it having problems with the select not being ended, though it worked on my server. Try this instead:

PHP Code:
$avatarcount 0;
$avatarlist.="<tr><td bgcolor=\"#13486D\"><img name=avatarswitch src=images/blank.gif></td><td bgcolor=\"#13486D\"><select name=newavatar onChange=\"switchimg(this);\"><option value=\"\">";
  while (
$avatar=$DB_site->fetch_array($avatars)) {
    
$avatarid=$avatar[avatarid];
$avatarlist.="<option value=\"$avatar[avatarpath]\">$avatar[title]";
/*
    if ($avatarcount==0)
      $avatarlist .= '<tr>';
    eval("\$avatarlist .= \"".gettemplate("modifyavatarbit")."\";");
    $avatarcount++;
    if ($avatarcount==$numavatarswide) {
      $avatarlist .= '</tr>';
      $avatarcount = 0;
    }
*/
  
}
  if (
$avatarcount!=0) {
/*
    while ($avatarcount < $numavatarswide) {
      $avatarlist .= '<td bgcolor="#13486D">&nbsp;</td>';
      $avatarcount++;
    }
*/
    
$avatarlist .= '</select></tr>';
  } 
Reply With Quote
  #7  
Old 10-15-2002, 10:22 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope. Still the same problem.
I have over 100 avatars, if thats a problem. I named a few of them to see if they would appear but nothing.
Reply With Quote
  #8  
Old 10-17-2002, 02:58 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have fiddled with it, but nothing. Still comes up with the same problem.
Reply With Quote
  #9  
Old 10-19-2002, 02:58 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I solved half the problem!
It now lists the avatar names. yay! had to name them all.

However:

When I select an Avatar and click SUBMIT it comes up with this error

There has been an error in the upload. Please ensure that the file has been correctly selected and that the upload has taken place successfully.

Thanx
Reply With Quote
  #10  
Old 10-21-2002, 03:16 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by obiwan8472
I solved half the problem!
It now lists the avatar names. yay! had to name them all.

However:

When I select an Avatar and click SUBMIT it comes up with this error

There has been an error in the upload. Please ensure that the file has been correctly selected and that the upload has taken place successfully.



Thanx
help. anyone?
Theres a shiny nickle in it for the person who can help me!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04825 seconds
  • Memory Usage 2,298KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete