vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [uCash/uShop] Transactions Addon With a 'message' (https://vborg.vbsupport.ru/showthread.php?t=79434)

TyleR 04-04-2005 10:00 PM

[uCash/uShop] Transactions Addon With a 'message'
 
Hi

This is my first 'hack' per-say (released ;)), so do bear with me :p

This is a hack I had made for my site, for some weird reason I have no answer to :rolleyes: ..anyways, it will add an option for your users to add a message when he/she donates to another person on your board, and displays transactions based on a userid input (e.g. transaction.php?userid=1), the default showing the transactions done by the person currently logged in, and a global transaction, showing all donations made on your board :)

BIG Thanks goes to Deaths for the help he provided me on in putting this hack together.

ChangeLog
  • Version 1.2 (11/7/05)
    • Added "View {username}'s Transations" link into postbit(_legacy)
    • Fixed Page Generation issues
    • Phrase added to show error message if no transactions exist
    • Made the install file a bit easier to understand :)

That about sums it all up..please click INSTALL if you use this hack :)

Deaths 04-05-2005 07:48 PM

My pleasure mate :).

TyleR 04-05-2005 07:49 PM

also: if anyone knows how to cut down an image (screenshot), i'll post them :)..it said my ss was too big =\

Polo 04-05-2005 11:37 PM

Quote:

Originally Posted by TanK DaWg
also: if anyone knows how to cut down an image (screenshot), i'll post them :)..it said my ss was too big =\

save the images in gif format...

Polo 04-05-2005 11:50 PM

Quote:

Originally Posted by TanK DaWg
also: if anyone knows how to cut down an image (screenshot), i'll post them :)..it said my ss was too big =\

save the images in gif format...

TyleR 04-06-2005 12:18 AM

Quote:

Originally Posted by Polo
save the images in gif format...

Tried to..same message (File Too Big...) :(

Marco van Herwaarden 04-06-2005 06:06 AM

Thanks for sharing. 2 remarks:
- You can set this to be an addon in the hack details page.
- You are creating a possible SQL insertion. First you do a globalize to an integer for the userid, this is good and would force it to be an integer and removing the SQL insertion possibility. In the query however you are using the $_REQUEST['userid'], making it possible to use a non integer value. Best would be to change this to simple $userid.

Deaths 04-06-2005 07:21 AM

Hmm, I told him to do so, he must've forgotten :D

TyleR 04-06-2005 07:55 AM

umm..it's in there?

PHP Code:

globalize($_REQUEST,  array('userid' => INT)); 


Marco van Herwaarden 04-06-2005 08:07 AM

Quote:

Originally Posted by TanK DaWg
umm..it's in there?

PHP Code:

globalize($_REQUEST, array('userid' => INT)); 


Yes like i said it is in there, but so is:
PHP Code:

 $getuser $DB_site->query('SELECT * from ' TABLE_PREFIX 'utt_store_history WHERE userid="' $_REQUEST['userid'] . '" AND action="Donate" ORDER BY historyid DESC'); 

change "' . $_REQUEST['userid'] . '" to a simple $userid

TyleR 04-06-2005 08:12 AM

Changed & Updated. Thanks Marco ;)

Marco van Herwaarden 04-06-2005 08:25 AM

Looking save now :D

Just one tip for future coding:
PHP Code:

    $getuser $DB_site->query('SELECT * from ' TABLE_PREFIX 'utt_store_history WHERE userid="' $userid '" AND action="Donate" ORDER BY historyid DESC'); 

There is no need to stop the string and insert a variable if you use double-quotes (") around the the string. Also numerical var's in a query don't need to be quoted at all, and if quoting alphanumerical data best to use single quotes ('). So the above line could also be written as:
PHP Code:

    $getuser $DB_site->query("SELECT * from " TABLE_PREFIX "utt_store_history WHERE userid=$userid AND action='Donate' ORDER BY historyid DESC"); 


Vevina 04-07-2005 03:20 PM

sweet installed :)

TyleR 04-08-2005 02:03 AM

heh ;)

TyleR 04-08-2005 11:42 AM

if anyone can 'teach' me the pagination, please send me a PM :)

TyleR 04-08-2005 03:42 PM

woo, thanks Deaths..this now has pagination :D

Updating the zip & sending out an update now :)

Vevina 04-08-2005 07:43 PM

This is awesome just what i wanted ThankYou :)

Deaths 04-09-2005 08:03 AM

No problem mate ;).

jzewatsky 04-09-2005 08:17 PM

I'm not clear on where the message is shown when a user donates to another user. Also, does the option to leave a message when donating extend to using Admin Donate?

Thanks for all you work.

redcow 04-10-2005 12:03 PM

thanks

TyleR 04-10-2005 09:52 PM

@jzewatsky: It doesnt extend to the admin donate as of yet, this is planned in the next version which will also feature an automated PM on donations..And the messeges show on the transaction page provided in the zip file.

@redcow: No problem :)

snowlion 04-11-2005 01:21 AM

Quote:

Originally Posted by TyleR
@jzewatsky: It doesnt extend to the admin donate as of yet, this is planned in the next version which will also feature an automated PM on donations..And the messeges show on the transaction page provided in the zip file.

I hoped come fast !

TyleR 04-14-2005 06:17 PM

i've almost got vB's PM system figured out..the admin donation reasons are done, but the zip wont be updated til the auto-pm's are figured out...hopefully this will be done either Tomorrow or Saturday (US East Coast time)

a123 04-14-2005 07:39 PM

Nice!!!

thanks a lot. :)

Also can admin edits your transactions or global transactions?

Brandon Sheley 04-16-2005 03:27 AM

thx for the mod Tyler
my users love, and a pm add-on would be fantasic :)

TyleR 04-16-2005 05:23 AM

@a123: No, that's not something this mod can do, sorry.

@Brandon: No prob's ..just trying to work out how im gonna get all these sql queries done after a donation/admin donation, lol. :p

kobescoresagain 04-16-2005 05:49 PM

can this hack have an automatic reason? I have traderratings connected with ucash. I would like it to say in the reason (Trade with x user) Can it be done? Thanks

TyleR 04-16-2005 07:40 PM

@kobescoresagain: I could psossibly do something of the sort :)

kobescoresagain 04-16-2005 08:43 PM

that would be awesome if you could do that.

Hellspire 04-23-2005 02:16 AM

Um one thing in regard to the manner in which you are doing your queries and the way that they said to fix it.

Code:

// rather than
"select * from ".$table." where userid='".$userid."'"
// or
"select * from $table where userid=$userid
// you should do it this way, rembering that this, after all a string, and is parsed as such, before being sent as a query, thus:
"select * from $table where userid='$userid'
// or for something complicated the following:
"select * from $table where specialrow='specialid{$userid}'"

I know that this is really a mute issue, but using variables directly without quotes for a varchar or other entry would have problems if there is a space, or whatever, thus having them encapsulated with single- or escaped double- quotes, would be the proper way to avoid this problem.


Nice hack btw.

a123 04-27-2005 07:51 PM

How to add pm function. thanks. :)

TyleR 04-28-2005 12:27 AM

im half way with the sql queries for the auto-pm..should have it done by midday tomorrow to early evening..:)

The admin donation part is already incorperated into the hack now, so this is all thats left.

a123 05-02-2005 12:17 AM

:) :)

Vevina 05-02-2005 12:53 AM

installed the update for admin donate but its still not showing how much was donated?

Admin Donate 05-01-2005 09:47 PM 0% 0 0.00 Webmaster

kobescoresagain 05-02-2005 03:33 PM

Where can you find the update for the admin donate? Also has teh bug been tweaked yet? If not I will wait til it is to update. Thanks for the hard work Tyler

a123 05-06-2005 01:41 AM

still wait...:)

fly 05-06-2005 06:04 PM

Quote:

Originally Posted by TyleR
im half way with the sql queries for the auto-pm..should have it done by midday tomorrow to early evening..:)

The admin donation part is already incorperated into the hack now, so this is all thats left.

If you're still working on that part, check out the thread I made here. I got a ton of help on it.

https://vborg.vbsupport.ru/showthread.php?t=76576

a123 05-11-2005 11:19 PM

TyleR, hope you can finish the auto-pm of ushop donation soon. I really want this function.

Thanks for your time. :)

mindbuster 05-19-2005 05:50 PM

Quote:

Originally Posted by a123
TyleR, hope you can finish the auto-pm of ushop donation soon. I really want this function.

Thanks for your time. :)

Yes, ill wait with installing this until auto-pm is ready :)

Then ill defineatly click install :)

owner 05-29-2005 11:31 AM

Ok guyz ive got this hack installed but iam getting this annying problem...

In the messege zone .. it says 23 or sum numbers whenever someone posts a msg or at times ... the reciever's name is left empty or for example i was donating to a user and my name pops up ? wierd ... HELP


All times are GMT. The time now is 04:52 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.01257 seconds
  • Memory Usage 1,817KB
  • 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_code_printable
  • (5)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete