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)
-   -   Gold Hack (currency hack) (https://vborg.vbsupport.ru/showthread.php?t=42752)

[D]Vincent 08-26-2002 07:53 AM

Right well I made an easy add-on for this. Okay what this add-on does is makes it to where you can set a different ammount for new threads than the ammount for replys, because we me I like to give the members more for threads. Anyways do the following:
First run this query:

ALTER TABLE forum ADD goldppt int(5) NOT NULL

Next open admin/forum.php and find:

makeinputcode("Gold recieved for posting? (forum gold must be enabled)","goldpp",0);

Replace that with:

makeinputcode("Gold recieved for posting a reply? (forum gold must be enabled)","goldpp",0);
makeinputcode("Gold recieved for posting a thread? (forum gold must be enabled)","goldppt",0);

Next find:

$DB_site->query("INSERT INTO forum
(forumid,styleid,title,description,active,displayo rder,parentid,
parentlist,allowposting,cancontainthreads,daysprun e,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allo wsmilies,allowicons,
styleoverride,allowratings,countposts,moderateatta ch,countgold,goldpp)
VALUES
(NULL,'$styleset','".addslashes($title)."','".adds lashes($description)."','$isac tive','$displayorder','$parentid',
'','$allowposting','$cancontainthreads','$daysprun e','".addslashes($newpostemail )."','".addslashes($newthreademail)."',
'$moderatenew','$aallowhtmlcode','$aallowbbcode',' $aallowimgcode','$aallowsmilie s','$aallowicons',
'$styleoverride','$allowratings','$countposts','$m oderateattach','$countgold','$ goldpp')");

Replace that with:

$DB_site->query("INSERT INTO forum
(forumid,styleid,title,description,active,displayo rder,parentid,
parentlist,allowposting,cancontainthreads,daysprun e,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allo wsmilies,allowicons,
styleoverride,allowratings,countposts,moderateatta ch,countgold,goldpp,goldppt)
VALUES
(NULL,'$styleset','".addslashes($title)."','".adds lashes($description)."','$isac tive','$displayorder','$parentid',
'','$allowposting','$cancontainthreads','$daysprun e','".addslashes($newpostemail )."','".addslashes($newthreademail)."',
'$moderatenew','$aallowhtmlcode','$aallowbbcode',' $aallowimgcode','$aallowsmilie s','$aallowicons',
'$styleoverride','$allowratings','$countposts','$m oderateattach','$countgold','$ goldpp','$goldppt')");

Next find:

makeinputcode("Gold recieved for posting? (forum gold must be enabled)","goldpp",$forum[goldpp]);

Replace that with:

makeinputcode("Gold recieved for posting a reply? (forum gold must be enabled)","goldpp",$forum[goldpp]);
makeinputcode("Gold recieved for posting a thread? (forum gold must be enabled)","goldppt",$forum[goldppt]);

Next find:

styleoverride='$styleoverride', allowratings='$allowratings', countposts='$countposts',
moderateattach='$moderateattach', countgold='$countgold', goldpp='$goldpp'
WHERE forumid='$forumid'");

Replace that with:

styleoverride='$styleoverride', allowratings='$allowratings', countposts='$countposts',
moderateattach='$moderateattach', countgold='$countgold', goldpp='$goldpp', goldppt='$goldppt'
WHERE forumid='$forumid'");

open newthread.php and find:

// +++++++ Gold Hack g-force2k2 +++++++
$DB_site->query("UPDATE user SET
".iif ($foruminfo[countposts],"posts=posts+1,","")."
$dotitle"."lastpost='".time()."' ".iif($foruminfo[countgold],",gold=gold+$foruminfo[goldpp]","")." WHERE userid='$bbuserinfo[userid]'");
}
// +++++++ Gold Hack g-force2k2 +++++++

Replace that with:

// +++++++ Gold Hack g-force2k2 +++++++
$DB_site->query("UPDATE user SET
".iif ($foruminfo[countposts],"posts=posts+1,","")."
$dotitle"."lastpost='".time()."' ".iif($foruminfo[countgold],",gold=gold+$foruminfo[goldppt]","")." WHERE userid='$bbuserinfo[userid]'");
}
// +++++++ Gold Hack g-force2k2 +++++++

And you're done I believe. Haven't tested it out yet though =\ I'm not actually installing this hack until tomorrow because I'm letting my memebrs write down how much gold they have(lol I use gold on FFL also).

BTW if you want to set a defualt one run this query:

UPDATE forum SET goldppt='[ Default Value Here ]' WHERE forumid != 0

and replace [ Default Value Here ] with the number.

FFMania 08-26-2002 08:55 AM

Can I replace the current Lesane Store hack money system with this? And am I able to keep the current gil counts too? ;)

[D]Vincent 08-26-2002 10:19 AM

I think to replace the Store one would take more coding and If you write them down you can.

[D]Vincent 08-26-2002 11:01 AM

Vincent][high]* [D]Vincent cough
[/high]

Okay well I went ahead and made two of the features for the points hack for this and I DO NOT TAKE CREDIT FOR ANYTHING IN THIS FOLLOWING ZIP, I repeat, I DO NOT TAKE CREDIT FOR ANYTHING IN THIS FOLLOWING ZIP.

Anyways what I did was made the donation hack and made the thing with admins/mods can give them gold from postbit work with this hack. All instructions are included in the zip, everything is tested and works. For a demo go to: http://www.fflounge.com not that it will really show out any. Anyways enjoy these add-ons. If you find any errors then just report them too many.


And once again, I DO NOT TAKE CREDIT FOR ANYTHING IN THE FOLLOWING ZIP!!!!!!
ALL CREDIT FOR THE DONATE ADD-ON GOES TO GameZilla!!!!
ALL CREDIT FOR THE ADMINS/SMS CAN GIVE MEMBERS POINTS FROM POSTBIT GOES TO Palmer of the Turks!!!!
ALL CREDIT FOR THE DIFFERENT AMOUNT RECIEVED FOR POSTING A NEW THREAD GOES TO g-force2k2!!!!

Ninth Dimension 08-26-2002 12:15 PM

I like the idea of this hack, I've just removed the itemshop from my forum because of the extra queries it was generating.

Now i'm looking for a points system for my forum, I was going to go for the Karma hack, but I think I prefer this one because I can provide more points for my games based forums.

The only problem I've got is, what will the users we working towards? I can understand that gaining more points that other forum members in itself is an achievement, but I'd still prefer to be able to offer a reward for it.

Can anyone offer any suggestions? (PS, i'm not interested in installing the store hack, I don't feel that it would really fit in with my site)

g-force2k2 08-26-2002 12:43 PM

Ninth Dimension just use the store hack... [D]Vincent its is very compatible with the store hack... just where it says in the changes for newreply and newthread... just change:

PHP Code:

gold=gold

to:

PHP Code:

storep=storep

in both the newreply.php and newthread.php... its that configurable ;) easy enough :)

g-force2k2

[D]Vincent 08-26-2002 03:05 PM

Vincent]lol sorry I haven't used the store hack so I didn't know how easy it would be lol anyways do you think you can make it to where admins can edit the ammount of gold they have in admin cp? If I don't figure it out myself before you post that is since I've done that with the past things lmao.

-Edit-
I got figured it out myself lmao.


Anyways I have another request, do you think you could make it to where admins can subtract gold from a user like it has the add gold? Like instead of having the link of gold take you to giving them gold it could take you too a selection between giving them gold or removing gold from them. That would make things much easier ^^
-edit 2-
I'm on a roll I figured that last one out myself also :D very simple though lmao.

N9ne 08-26-2002 03:24 PM

I really like this hack because it's so simple! I'm going to install it on my test board once I request these things:

Right now there's a feature where you need a certain amount of posts for getting a Custom Avatar and/or Custom Title.

Can this be integrated with that so you need a certain amount of gold AND/OR posts [boolean] are required for either/both?

Also, can there be a system not unlike Lesane's Lottery Hack just for this? So users can buy a lottery ticket from somewhere, preferably on forumhome, where you could have:

Lottery: Buy your ticket now by clicking here!<br>
Current Jackpot: 3000 Points [or whatever you set as your currency]

Hope i'm not asking too much :(

g-force2k2 08-26-2002 03:31 PM

Tha Rock the store hack is compatible with this hack if you search the thread you will see the simple mod edit to this...

btw [D]Vincent can't you just use the store donation on the admincp? (that is if you're using the store hack) if not i can code something fast for you if you like?

regards...

g-force2k2

N9ne 08-26-2002 03:35 PM

Quote:

Originally posted by g-force2k2
Tha Rock the store hack is compatible with this hack if you search the thread you will see the simple mod edit to this...

btw [D]Vincent can't you just use the store donation on the admincp? (that is if you're using the store hack) if not i can code something fast for you if you like?

regards...

g-force2k2

Well I dont want to use the store hack but would I be able to make the lottery hack work with this?


All times are GMT. The time now is 08:02 AM.

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.01311 seconds
  • Memory Usage 1,762KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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