PDA

View Full Version : Major Additions - Adoptables hack for vBulletin 3.6


antialiasis
06-11-2006, 10:00 PM
(For screenshots, please view this thread for vBulletin 3.5 (https://vborg.vbsupport.ru/showthread.php?t=117376).)

Note that if you already have this installed for vBulletin 3.5 and then upgrade to 3.6, it should not be necessary to upgrade this hack; however, if something is wrong, by all means try the new product. No changes have been made to the hack files since the 3.5 version.

----------------------------

This hack adds a little adoption center to your forum where your users can adopt lovely little adoptables which will be 'upgraded' as the user gains the posts needed for the next stage. (Thus, an adoptable can be originally adopted as an egg, ten posts later the egg has cracks in it, twenty posts after that it hatches into a baby [insert something cute and loveable here], still fifty posts after that it has grown a little, and 100 posts later it's an adult - or something in that direction.)

2 template edits
4 files to upload
1 product to install


FEATURES

Admin features
- Specify which usergroups can view adoptables, which can adopt, which can create adoptables and which can edit/delete others' adoptables
- Specify whether all users can view the full adoptable list or only those who can administer adoptables
- Specify a maximum number of adopted adoptables per user for each user group
- Specify whether users can adopt adoptables that they created themselves
- Specify whether to use a "general description" for each adoptable, a description for each stage for an adoptable, or both

Adoptable creation features
- Create adoptables with up to five "stages", each with its own image, minimum posts to adopt it, user-specified posts needed to get from the previous stage to this one, and a custom description (if stage descriptions are enabled)
- View list of all your created adoptables
- Edit the adoptables that you have already created if you slipped up
- Only the first stage can be seen by a potential owner - surprise them with what their adoptable grows into

Adoptable management features
- Easily view a list of all adoptables (adopted and available)
- Edit or delete any adoptable easily from the list

Adopter features
- View a list of all available adoptables, only a button-click away from being yours, or of your own adoptables
- Disown an adoptable if you change your mind
- Release adoptables that are at their final stage to the wild so you can adopt new ones without leaving them for somebody else to pick up
- Show your own adoptables off in your profile


INSTALLATION

1. Download the zip file attached to this post and unzip it.
2. Upload all the files from the upload folder to the appropriate folder in your forum directory.
3. Import product-adoptables.xml through the Admin CP.
4. Two template edits:

###########################################
###########################################

In template MEMBERINFO

FIND

$footer

ABOVE it add

$useradoptables

############################################
############################################

In template navbar

WHERE YOU WANT THE ADOPTION CENTER LINK, add

<if condition="$permissions['adoptpermissions'] & $vbulletin->bf_ugp_adoptpermissions['canview']"><td class="vbmenu_control"><a href="adopt.php$session[sessionurl_q]">$vbphrase[adoption_center]</a></td></if>

############################################
############################################


5. Modify the adoptable permissions for all your usergroups and the adoptable options under vBulletin options as you want them.
6. You're done! Go notify your users. And if you like it, click Install.


UNINSTALLATION

1. Undo the two template edits above.
2. Uninstall the Adoptables product.
3. Remove adopt.php, includes/functions_adopt.php, includes/xml/bitfield_adoptables.xml and includes/cron/updateadoptables.php from your forum directory.


SUPPORT

Just ask in this thread and I'll do the best I can to help.

theArchitect
06-13-2006, 06:52 AM
Nice. But is there any chance of a screen shot or a working demo?

Or have you posted those and I just missed them?

Pathor
06-13-2006, 09:48 AM
(For screenshots, please view this thread for vBulletin 3.5 (https://vborg.vbsupport.ru/showthread.php?t=117376).)

;)..

Yukino_AE
06-14-2006, 04:46 PM
this is almost like p3tz lite.

antialiasis
06-14-2006, 05:38 PM
Not really. The fundamental difference is that the adoptables don't actually do anything; they're just there. They don't get hungry, need care or anything.

cooldude714
08-05-2006, 05:03 PM
I get this MySQL error when I try to edit user group permissions to use it and try to uninstall it as a product.
Database error in vBulletin 3.6.0:

Invalid SQL:
UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
`title` = 'Administrators',
`description` = '',
`usertitle` = '',
`opentag` = '<font color=\"red\"><b>',
`closetag` = '</b></font>',
`passwordexpires` = '180',
`passwordhistory` = '360',
`forumpermissions` = '1048575',
`genericpermissions` = '1073741759',
`attachlimit` = '0',
`pmquota` = '50',
`pmpermissions` = '7',
`pmsendmax` = '5',
`calendarpermissions` = '63',
`wolpermissions` = '31',
`adminpermissions` = '3',
`genericoptions` = '55',
`profilepicmaxwidth` = '100',
`profilepicmaxheight` = '100',
`profilepicmaxsize` = '65535',
`avatarmaxwidth` = '80',
`avatarmaxheight` = '80',
`avatarmaxsize` = '20000',
`signaturepermissions` = '245759',
`sigpicmaxwidth` = '500',
`sigpicmaxheight` = '100',
`sigpicmaxsize` = '2000',
`sigmaxrawchars` = '0',
`sigmaxchars` = '0',
`sigmaxlines` = '0',
`sigmaxsizebbcode` = '7',
`sigmaximages` = '0',
`adoptpermissions` = '15',
`maxadopted` = '50',
`hkc_competition_permissions` = '3',
`vbppermissions` = '65529',
`vbp_discountrate` = '5.00000',
`vbp_paycheckamount` = '500.00000',
`vbp_secondarycost` = '0.00000',
`vbp_primarycost` = '0.00000'
WHERE usergroupid=6;

MySQL Error : Unknown column 'adoptpermissions' in 'field list'
Error Number : 1054
Date : Saturday, August 5th 2006 @ 07:01:50 PM
Script : http://www.limeo.co.uk/community/admincp/usergroup.php?do=update
Referrer : http://www.limeo.co.uk/community/admincp/usergroup.php?do=edit&usergroupid=6
IP Address : 84.68.246.195
Username : Squashter
Classname : vb_database
Can someone help?

ssslippy
08-10-2006, 03:57 AM
Fails to work for me, cant edit the usergroup settings and also gives error for uninstall.

mighty_warrior
08-10-2006, 03:48 PM
looks good.thanks

antialiasis
08-14-2006, 09:31 PM
Eep... I've been on vacation, but now I return to find a major problem with my hack. @_@

Okay, those were two related problems, both of which have been fixed now. Since the fix edited only the install and uninstall codes, I don't think it's necessary to make this into a separate version. I think you should be okay with just reinstalling the product, but if you get a database error, then run this SQL query:

ALTER TABLE usergroup DROP maxadopted

and then you should definitely be fine when you run through the install process again. Sorry about that; I'm not sure how I managed to miss it when originally testing the hack.

Spookysalem
08-15-2006, 12:55 PM
Love it thanks.

Just need to find some adoptables now

Hoffi
08-16-2006, 07:14 AM
Is it possible to integrate this with vbBux?
So that you can chosse in Admin CP:
Adoptions cost one Time Money,
Adoptions cost daily Money (or other returning issues)
If you Adopt, yo get Money.

Ninth Dimension
08-24-2006, 10:30 PM
This looks like a great hack, just the sort of thing that would work very well on my site... but without any pets included, I can't use it.

I was wondering, has anyone here created any images for this hack, and if so, are they willing to share?

barny11
08-25-2006, 09:53 PM
installed today and been running some tests before giving it to our members but have come across a problem.

for some reason its not moving onto the next stage when your post count reaches the minimum posts required to advance.

have double and triple checked the install and all seems ok

any ideas ?

Spookysalem
08-27-2006, 02:20 PM
I have noticed this too.....

antialiasis
08-28-2006, 10:17 PM
It moves on to the next stage via a scheduled task which runs every hour - it won't happen immediately, and not at all if there is no traffic on the forum to run the cron.

Spookysalem
09-03-2006, 04:03 PM
what is the scheduled task that needs to run..?

antialiasis
09-04-2006, 12:23 AM
I think I called it something like "Update adoptable stage", and it should have been included with the product as per the 3.6 features that make everything easier. (The cron file was included in the zip package.)

EDIT: Hmm. Oddly, the scheduled task doesn't appear to be part of the product XML, even though the phrases from the task are in the product. Well, I'm putting in the right XML now, and to fix that if you've already installed it, you should just add a new scheduled task, give it the varname "updateadotables", leave all the time settings at the default * except that the first "Minutes" should be 0, set Active to Yes, Log Entries to No, Filename to ./includes/cron/updateadoptables.php, the Product to the Adoptables hack and vBulletin Default to Yes.

Spookysalem
09-04-2006, 06:31 AM
I think I called it something like "Update adoptable stage", and it should have been included with the product as per the 3.6 features that make everything easier. (The cron file was included in the zip package.)

EDIT: Hmm. Oddly, the scheduled task doesn't appear to be part of the product XML, even though the phrases from the task are in the product. Well, I'm putting in the right XML now, and to fix that if you've already installed it, you should just add a new scheduled task, give it the varname "updateadotables", leave all the time settings at the default * except that the first "Minutes" should be 0, set Active to Yes, Log Entries to No, Filename to .includes/cron/updateadoptables.php, the Product to the Adoptables hack and vBulletin Default to Yes.

The part highlighted in your post i could not see where i set it up.

When i run it...it get this error

Warning: main(/home/xxx/xxx/.includes/cron/updateadoptables.php) [function.main]: failed to open stream: No such file or directory in /admincp/cronadmin.php on line 108

Warning: main() [function.include]: Failed opening '/home/xxx/xxx/.includes/cron/updateadoptables.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /admincp/cronadmin.php on line 108

and now nothing works at all to do with the adoptables.

antialiasis
09-04-2006, 04:09 PM
Bleh, that was just a typo... there should be a slash after the . in the file path, of course.

And the vBulletin Default? setting should be at the bottom of the page for creating a new scheduled task in 3.6.

Spookysalem
09-04-2006, 04:55 PM
Found the default setting thanks.

However for some reason the adoption tables have gone...is there any way to get them replaced..

thanks

antialiasis
09-05-2006, 07:46 PM
You didn't uninstall the product, did you?

If you didn't, I don't know any possible explanation for that...

Spookysalem
09-06-2006, 07:56 AM
I didn't but i have now. Could not get anything to work.

Zelos
10-04-2006, 07:40 PM
wow, this looks like an awesome hack. I'll try installing this later...

eNforce
10-04-2006, 10:31 PM
Thanks :D

This is a very cool mod, installation was smooth.

About 15 minute after I introduced Adoptables 5 of my members had already created an Adoptable. Just shows how popular this can be. As another bonus it encourages members to post!

I had to modify my memberinfo quite differently however but the outcome was great.
http://www.areyouserios.com/member.php?u=68

haytham
12-05-2006, 04:34 PM
i ran ALTER TABLE usergroup DROP maxadoptedand lost my registered users group..any way to get them back?

Detomah
02-04-2007, 05:40 PM
I've clicked install, but haven't actually installed it yet as egg designing isn't really one of my strong points, so i'm going to have to wait at the mercy of some kind person to actually design a few initial eggs to get me going.

WhyDoesItMatter
02-05-2007, 01:18 AM
Me too Detomah. I tried, and it went bad lol

Berethorn
05-06-2007, 03:43 AM
This is a great idea - has anyone created adoptables? :)

talenak
05-22-2007, 09:23 PM
Is there a way to show the adopted thingies in the postbit?

edit to add: I just went to the p3tz site to check it out. They won't even let you buy a license unless you subscribe to their site first. I've never seen such a sneaky underhanded method for milking a person's wallet!!! Perfect way for them to ensure I stuck with this mod.

talenak
05-28-2007, 08:17 PM
Is this hack still supported? I even PM'd the guy on the off chance he'd get email notice the thread begged attention. He's been online since but no answer to PM or this thread.

bigaldizzler
08-07-2007, 06:02 PM
This is a very interesting mod...I have a few questions though can this mod be used with vbcredits so someone needs some points atleast to buy a adoptable? and also can the admin of the forum create adoptables that relate to what the forum is about? I will give this a try soon :)

shiny_jen
08-09-2007, 03:35 PM
Is there a way to show the adopted thingies in the postbit?

edit to add: I just went to the p3tz site to check it out. They won't even let you buy a license unless you subscribe to their site first. I've never seen such a sneaky underhanded method for milking a person's wallet!!! Perfect way for them to ensure I stuck with this mod.

you don't have to subscribe to their site, just register, which is free.

PinkDaisy
08-13-2007, 12:29 AM
I'd like to get the adoptables images in the postbit too. It works great otherwise but I haven't showed it to members yet cause I want it in the postbits. :)

Thanks!

LauraM
10-14-2007, 04:11 AM
I created a new profile field, then edited the post_bit legacy and now once that field is filled out by a member, it will show up in the area under the avatar. So now my members can fill in that field and that lets everyone that they have adopted something. People then know to view that profile to see what that person has adopted. I made the field big enough to have a bit of a description of what they have adopted (what stage it's in, etc.)

If anyone is interested, I can give you the code to do this. :)

tillcat5
03-29-2008, 03:04 PM
thast great.. but the prob i had it it wont let me create and add the characters. nto sure why?

CowboyJMB
08-25-2008, 04:13 PM
Is this hack compatible with 3.7? Or is there going to be a 3.7 version made?

Thanks

LauraM
04-10-2009, 12:33 AM
I've updated vBulletin, and this hack is no longer working. :( My members are TOTALLY bummed!

Will you be updating this hack??