Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Adoptables hack Details »»
Adoptables hack
Version: 1.2, by antialiasis antialiasis is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 06-01-2006 Last Update: 10-21-2006 Installs: 23
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

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 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

Code:
$footer
ABOVE it add

Code:
$useradoptables
-------------------

In template navbar

WHERE YOU WANT THE ADOPTION CENTER LINK, add

Code:
		<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 "I have installed this hack".


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 server directory.


Support

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


Version history

1.2: Added feature to allow or disallow normal users to view full adoptable list. To upgrade: Download the new zip file, reinstall the product with Allow Overwrite definitely set to ON, and reupload adopt.php.
1.1: Fixed missing templates and custom Who's Online status bug. To upgrade: Download the zip file again and reinstall the product, making sure that Allow Overwrite is set to ON. Nothing else has been changed.
1.0: Initial release.

Show Your Support

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

Comments
  #12  
Old 06-02-2006, 03:44 AM
Oddjob Oddjob is offline
 
Join Date: Jan 2006
Location: Long Island, NY
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="Lime">Installed</font> fine.....looking forward to playing w/ this.
Reply With Quote
  #13  
Old 06-02-2006, 04:07 AM
Ziki's Avatar
Ziki Ziki is offline
 
Join Date: Nov 2005
Posts: 2,704
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So this is similar to Petz I guess.....Nice work though.Must have been hard
Reply With Quote
  #14  
Old 06-02-2006, 09:09 AM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
is this almost like a pets sorta thing? but based on posting?
Well, they don't actually do anything except sit in your profile and look cute (or grotesque, if either somebody was fooling around when they made it or you have that sort of taste) and then occasionally turn into an older version of themselves - they don't need care, get hungry, battle each other or anything. (That is in fact the reason I didn't want to refer to it as a pets hack, since it could make users expect something more than it is.)

Quote:
and at some point can you make them die so they have to adopt a new one?
At the moment at least, there is no such feature, but I think most people would end up getting bored of having an adoptable staying completely static in their profiles after growing to its final stage. They're bound to end up releasing it and adopting something new sooner or later...

Quote:
what do they look like once they hatch?
They look like whatever the adoptable's creator has specified - when you make one, you have to enter an image URL for each stage. There are no adoptables that actually come with it, so you'll just need those with creation permissions to go wild.

Quote:
I tried installing it but had trouble, so I will try again in the morning

Also, can you recommend a place to put the Adoption Link, I tried placing it in several different spots within my navbar template and none worked. Thanks!
What trouble are you having exactly? I have a bit of a history of managing to mess something up with either the installation instructions or the product XML, so the problem might be on my end. (I did install it on a test forum using the files I attached and following the steps I put in the post and it seemed to work fine, but just in case.)

Well, in the navbar template, you can find this:

Code:
		<if condition="$show['member']">
			<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
		</if>
That's the link to the User CP. If you want the adoption center link right after that, just put the code right below that bit. However, what should be already below the user CP link is this:

Code:
		<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]">$vbphrase[faq]</a></td>
And that's obviously the FAQ link, so if you want the adoption center link after that, then put it below there. You should be able to figure out the other locations from that...

Quote:
So this is similar to Petz I guess.....Nice work though.Must have been hard
Heh, thanks. It wasn't as hard as I thought it would be, actually - everything turned out to be surprisingly straightforward even for me as a fairly inexperienced coder. But it was a lot of code just to type. I think I was working on this thing pretty much for two or three days straight with eating/sleeping breaks but not much else... I really have too much time on my hands.
Reply With Quote
  #15  
Old 06-02-2006, 09:25 AM
projectego's Avatar
projectego projectego is offline
 
Join Date: Feb 2006
Location: UK
Posts: 724
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks awesome, thanks!
Reply With Quote
  #16  
Old 06-02-2006, 05:55 PM
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
Location: Michigan
Posts: 1,698
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just an idea.. If there were seveal pets or live things to choose from for example

a baby to adult male/female
a tatpole to from
a fish egg to fish

and so on
Reply With Quote
  #17  
Old 06-02-2006, 08:23 PM
PabloAM PabloAM is offline
 
Join Date: Jan 2006
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please, I need a "gif?s" of creatures
Reply With Quote
  #18  
Old 06-02-2006, 08:32 PM
dt~ dt~ is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the $useradoptables code isn't working. Please assist.
Reply With Quote
  #19  
Old 06-02-2006, 08:40 PM
Krahl Krahl is offline
 
Join Date: Aug 2005
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cute.

How difficult would it be to change the "growth" to be dependant on something other than post count? For example, Reputation or cash or something entirely new?

I'll have other questions, but that's the primary one for the moment.

Thanks for creating it.

Krahl
Reply With Quote
  #20  
Old 06-02-2006, 11:42 PM
theodonnells's Avatar
theodonnells theodonnells is offline
 
Join Date: Oct 2005
Location: scotland
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dt~
the $useradoptables code isn't working. Please assist.
Same here have run the cron and still nothing showing..
Attached are 5 small images for members to test with!!!An egg that turns into a smiley!!
Attachment 48792
Also getting this error in who's online
Code:
Parse error: parse error, unexpected T_STRING in public_html/forum/includes/functions_online.php(765) : eval()'d code on line 234
Error goes away if adoptable product disabled....
Reply With Quote
  #21  
Old 06-03-2006, 12:36 AM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bada_bing, as I said, no adoptables actually come with the hack - you or some of your users will have to make them yourselves. The hack allows you to make tadpoles > frogs or whatever you want, as long as you supply the images.

Both the $useradoptables and Who's Online glitch should be fixed now - to upgrade, just download the zip file again and reinstall the product with Allow Overwrite set to On.

Changing the number the growth is dependent on should be very easy - you'd just need to change a few phrases and find all the instances of $vbulletin->userinfo['posts'] in the templates, adopt.php, includes/cron/updateadoptables.php and the Get Member's Adoptables plugin. Then just replace them with something like $vbulletin->userinfo['reputation'] for reputation, etc.
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 06:07 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.07592 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_code
  • (6)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete