Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > uCash & uShop
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Custom Avatar Action Details »»
Custom Avatar Action
Version: , by Link14716 Link14716 is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-16-2005 Last Update: Never Installs: 0
 
No support by the author.

Here is the custom avatar action from 1.0.0 made to work on 0.95. It should work correctly, if you already installed it from the other thread, then upload this new version of action.customavatar.php.

Make a new template: uttstore_inputs_file:
HTML Code:
<input type="hidden" name="MAX_FILE_SIZE" value="$field[maxsize]" /><fieldset style="text-align: right;"><legend>$field[topphrase]</legend>
<div style="float: left;">$field[mainphrase]</div> <input type="file" name="$name" value="$value" size="$field[size]"></fieldset>
In your uttstore_standard_inputs template:

Find:
HTML Code:
<form action="ushop.php" method="post">
Replace with:
HTML Code:
<form action="ushop.php" method="post" enctype="multipart/form-data">
In includes/functions_uttstore.php:
Find:
PHP Code:
function uttstore_globalize_fields($fields) {
    
// Because damnit, I am about to gouge my eyes out.
    
$_FIELD $_POST['_FIELDS'];
    foreach (
$fields as $name => $field) {
        if (
$field['datatype'] == 'INT') {
            
// integer value - run intval() on data
            
$_FIELDS["$name"] = intval($_FIELD[$name]);
        } elseif (
$field['datatype'] == 'POINTS') {
            
$_FIELDS["$name"] = uttpoints_number_format($_FIELD[$name]);
        } elseif (
$field['datatype'] == 'STR_NOHTML') {
            
// html-safe string - trim and htmlspecialchars data
            
$_FIELDS["$name"] = htmlspecialchars_uni(trim($_FIELD[$name]));
        } elseif (
$field['datatype'] == 'STR') {
            
// string - trim data
            
$_FIELDS["$name"] = trim($_FIELD[$name]);
        } else {
            
$_FIELDS["$name"] = $_FIELD[$name];
        }
    }
    return 
$_FIELDS;

Replace with:
PHP Code:
function uttstore_globalize_fields($fields) {
    
// Now with the added bonus of working!
    
$_FIELD $_POST['_FIELDS'];
    
// Some backported code from 1.0.x is in here.
    
foreach ($fields as $name => $field) {
        if (
$field['bypassfields'] != true) {
            
$data $_FIELD[$name];
        } else {
            
$data $_POST[$name];
        }
        if (
$field['datatype'] == 'INT') {
            
// integer value - run intval() on data
            
$_FIELDS["$name"] = intval($data);
        } elseif (
$field['datatype'] == 'POINTS') {
            
$_FIELDS["$name"] = uttpoints_number_format($data);
        } elseif (
$field['datatype'] == 'STR_NOHTML') {
            
// html-safe string - trim and htmlspecialchars data
            
$_FIELDS["$name"] = htmlspecialchars_uni(trim($data));
        } elseif (
$field['datatype'] == 'STR') {
            
// string - trim data
            
$_FIELDS["$name"] = trim($data);
        } else {
            
$_FIELDS["$name"] = $data;
        }
    }
    return 
$_FIELDS;

Finish this by making a new action for uttstore/action.customavatar.php (and obviously upload it to the right location).

Download Now

File Type: (21.4 KB, 32 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-09-2005, 09:10 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. Otherwise it would be pointless, wouldn't it?
Reply With Quote
  #13  
Old 04-10-2005, 05:36 PM
carolmyt carolmyt is offline
 
Join Date: Jan 2005
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exactly. Ok, awesome, I can't wait to install this. My members are seriously getting violent over the previously suggested prospect of buying custom avs; if I don't get this going soon, riots will probably start breaking out.
Reply With Quote
  #14  
Old 04-12-2005, 01:52 AM
LauraFL LauraFL is offline
 
Join Date: Jan 2005
Location: Florida
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to modify this so that you are buying avatars for users other than yourself?
Reply With Quote
  #15  
Old 04-17-2005, 08:24 PM
Wifey Wifey is offline
 
Join Date: Mar 2004
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I forgot to post - I ended up reverting everything on my own and that worked, so you were right!
Reply With Quote
  #16  
Old 04-27-2005, 05:26 PM
asianboi asianboi is offline
 
Join Date: Apr 2005
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello

so this is for the Upload Custom Avatars only. Is there a way to make it active in the generic avatars folder?
Reply With Quote
  #17  
Old 04-27-2005, 10:39 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by asianboi
Hello


so this is for the Upload Custom Avatars only. Is there a way to make it active in the generic avatars folder?
As the action says, it is for custom avatars.
Reply With Quote
  #18  
Old 05-11-2005, 09:58 PM
carolmyt carolmyt is offline
 
Join Date: Jan 2005
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have two members now who say that they bought an av, and it took the points, but the new av didn't show. I've tested it after both complaints, and it worked fine for me, so i'm not sure its actually a problem with a hack, but i thought i'd mention it and see.
Reply With Quote
  #19  
Old 05-11-2005, 11:47 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just do what I'm doing. Wait for the new uShop.. *Don't know how much longer I can wait though!!*
Reply With Quote
  #20  
Old 05-12-2005, 05:13 PM
carolmyt carolmyt is offline
 
Join Date: Jan 2005
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, I think I'm gonna stick with what I'm doing, which is asking if this is something that's come up before, or what possible cause other than user delinquency could be the issue.

Now its 3 members. One of them was trying to uploaded an animated gif. The file is within size and byte constraints. Is there any reason an animated gif wouldn't upload?

The hack is taking there money, and listing the exchanges as successful, the new av just isn't appearing. Any reason why this would be happening, it'd be nice to know.
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 07:13 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.04831 seconds
  • Memory Usage 2,348KB
  • Queries Executed 27 (?)
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
  • (3)bbcode_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete