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
  #22  
Old 06-03-2006, 05:11 AM
dt~ dt~ is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Request for a adoption hack 1.2 :

1. "view all adoptables" section so that users who can not edit adoptables can see all adoptables and who is owning them.

2. In postbit, if users has an adoptable, an icon will be shown and we can click on it to see adoption info and description.

I can only request because I don't know how to code. Looking forward for your kind approval.
Reply With Quote
  #23  
Old 06-03-2006, 02:13 PM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Both of those should be fairly easy to add - I think I'd make them options in the Admin CP.
Reply With Quote
  #24  
Old 06-03-2006, 05:41 PM
Shelly Shelly is offline
 
Join Date: Feb 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im new at this, just helping someone out, and this is the first product that i had any issues with. when i tried to upgrade your code i keep getting a table already created error:

Database error in vBulletin 3.5.4:

Invalid SQL:

CREATE TABLE adopt (
adoptableid INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(20) NOT NULL,
img1url VARCHAR(255) NOT NULL,
img2url VARCHAR(255) NOT NULL,
img3url VARCHAR(255) NOT NULL,
img4url VARCHAR(255) NOT NULL,
img5url VARCHAR(255) NOT NULL,
generaldesc TEXT,
desc1 TEXT,
desc2 TEXT,
desc3 TEXT,
desc4 TEXT,
desc5 TEXT,
minposts MEDIUMINT UNSIGNED DEFAULT 0,
stage2posts SMALLINT UNSIGNED,
stage3posts SMALLINT UNSIGNED,
stage4posts SMALLINT UNSIGNED,
stage5posts SMALLINT UNSIGNED,
creatorid INT UNSIGNED NOT NULL,
ownerid INT UNSIGNED NOT NULL DEFAULT 0,
currentstage TINYINT UNSIGNED NOT NULL DEFAULT 1,
startposts INT UNSIGNED,
gender ENUM('Male','Female')
);

MySQL Error : Table 'adopt' already exists
Error Number : 1050
Date : Saturday, June 3rd 2006 @ 06:35:56 PM

i had alow overwrite set to yes

any ideas?
Reply With Quote
  #25  
Old 06-03-2006, 06:09 PM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, right, looks like I forgot to include IF NOT EXISTS. Try the product in the new zip file.
Reply With Quote
  #26  
Old 06-03-2006, 07:03 PM
Shelly Shelly is offline
 
Join Date: Feb 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the quick reply, that fixed it, now there is a new problem:

Database error in vBulletin 3.5.4:

Invalid SQL:

ALTER TABLE usergroup ADD adoptpermissions INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL, ADD maxadopted INT( 10 ) DEFAULT '5' NOT NULL;

MySQL Error : Duplicate column name 'adoptpermissions'
Error Number : 1060
Date : Saturday, June 3rd 2006 @ 08:02:23 PM
Reply With Quote
  #27  
Old 06-04-2006, 12:46 AM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try again now...
Reply With Quote
  #28  
Old 06-04-2006, 04:53 AM
dt~ dt~ is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by antialiasis
Both of those should be fairly easy to add - I think I'd make them options in the Admin CP.
Waited for 3 days. Are you thinking or making?
Reply With Quote
  #29  
Old 06-04-2006, 01:02 PM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have a bit of patience... You're not paying me for this, after all, so I can work in my time.
Reply With Quote
  #30  
Old 06-04-2006, 07:55 PM
Shelly Shelly is offline
 
Join Date: Feb 2006
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that cleared my problem, thanks
Reply With Quote
  #31  
Old 06-05-2006, 03:49 AM
dt~ dt~ is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uninstalled.
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:25 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.05104 seconds
  • Memory Usage 2,312KB
  • 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
  • (3)bbcode_code
  • (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
  • (4)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