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
Dice Roller Hack [BBCode] Details »»
Dice Roller Hack [BBCode]
Version: 1.00, by Eikinskjaldi Eikinskjaldi is offline
Developer Last Online: Jul 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-24-2006 Last Update: 05-29-2006 Installs: 51
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Dice Roller Hack [BBCode]
RPG Dice is currently a updated version
Another updated version

Note: Updated package includes only the correct XML.

This hack is a port of: Dice Roll for vB3 and permissions was given to port by the following statement.

Quote:
Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission.
This hack rolls a Graphic based dice roll in your post and features multiple dice rolls per post. The images are fully editable by those who know how and I must agree that I very much think they need an overhaul, so go for it.

The basic bbcode format is:
[dice=X]Y[/dice]

X - The number of dice to roll, This cannot be larger then 5 currently, this may change later with demand.
Y - The number of sides on the dice.

so [dice=1]6[/dice] Roll's 1, 6 sided dice.

The only limit that I have noticed so far is that dice will not apear correctly when rolled from the create thread editor. I am unsure as to why this is still and am working on this issue. However aside from this it is working as need be. This hack is mainly useful to Game websites that require dice rollers for gambling or roleplaying games. It can add an element of fun to a forum and is adapatable to most dice require situations.

If enough demand is displayed I will work on removing the 5 roll limit or making it larger. The current maximum sides one can roll is 30.

If you enjoy this hack or have it installed, then please click the install button so that you can remain informed when updates occur.

As the original author said, You do not need to ask permission to update or do anything to this hack and can redistribute it if you feel you have made a great contribution to it.

If someone does make new dice images and wishes to have them as part of the package then either post here or PM me and I will get them in there with full rights going to the sender for the images.

Updates:
  • 04/29/06
    • Added new dice images which where provided by Rukbat.

This hack was requested from: https://vborg.vbsupport.ru/showthread.php?t=97775

-Eikinskjaldi-

Original Screenshots:
https://vborg.vbsupport.ru/attachmen...3&d=1078098688
https://vborg.vbsupport.ru/attachmen...4&d=1078098702

Show Your Support

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

Comments
  #142  
Old 06-18-2006, 07:10 PM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The admincp I'm talking about is the same place you go to edit your webpages, where you see all the vbulletin files ... where they are located...

When you installed vbulletin you had to add the name of the d/b for your forum(s) in the config.php... whatever that value is you could use to set a direct path to your d/b in the xml file for this product.
so wherever you saved the xml file on your computer, go to where it's listed, right click, open with>notepad (or whatever editor you use) then
look for
Code:
<installcode>

		$db->hide_errors();
		$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "post` ADD `dice` MEDIUMTEXT NOT NULL ;");
		$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "thread` ADD `dice` MEDIUMTEXT NOT NULL ;");
		$db->show_errors();
		
</installcode>
-
	<uninstallcode>

		$db->hide_errors();
		$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "post` DROP `dice` ");
		$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "thread` DROP `dice` ");
		$db->show_errors();
		
</uninstallcode>
THEN change it as follows... Making the asterisks the prefix you used for all your other tables (that you found in your config.php file)
Code:
<installcode>

		$db->hide_errors();
		$db->query_write("ALTER TABLE `****_ post` ADD `dice` MEDIUMTEXT NOT NULL ;");
		$db->query_write("ALTER TABLE `****_thread` ADD `dice` MEDIUMTEXT NOT NULL ;");
		$db->show_errors();
		
</installcode>
-
	<uninstallcode>

		$db->hide_errors();
		$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "post` DROP `dice` ");
		$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "thread` DROP `dice` ");
		$db->show_errors();
		
</uninstallcode>
Hopefully THAT will work.
Reply With Quote
  #143  
Old 06-19-2006, 01:59 AM
soravok soravok is offline
 
Join Date: Dec 2005
Location: Vancouver, BC, Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay I'll give that a shot, but not everyone runs thier web server through a control panel interface. Mines attached to my ~/ on my box's user account.
Reply With Quote
  #144  
Old 06-19-2006, 02:13 AM
soravok soravok is offline
 
Join Date: Dec 2005
Location: Vancouver, BC, Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay thanks that did fix the problem, but it still won't let me post a roll on the first post of the forum. Any idea when / if that will be fixed?
Reply With Quote
  #145  
Old 06-19-2006, 03:15 AM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the roll in first post of new thread is fixed if you used the xml file provided on page 5 of this thread, post #69
Reply With Quote
  #146  
Old 06-19-2006, 02:11 PM
soravok soravok is offline
 
Join Date: Dec 2005
Location: Vancouver, BC, Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Database error in vBulletin 3.5.4:

Invalid SQL:
INSERT INTO vbthread
(postusername, postuserid, title, iconid, visible, forumid, dice, dateline, open, attach, lastpost, lastposter, replycount, hiddencount)
VALUES
('aaron', 1, 'Dice roller testing', 0, 1, 8, 'a:1:{i:0;a:3:{s:5:\"dices\";s:1:\"4\";s:5:\"faces \";s:1:\"5\";s:4:\"data\";a:4:{i:0;i:4;i:1;i:1;i:2 ;i:1;i:3;i:1;}}}', 1150725773, 1, 0, 1150725773, 'aaron', 0, 0);

MySQL Error : Unknown column 'dice' in 'field list'
Error Number : 1054
Date : Monday, June 19th 2006 @ 10:02:53 AM
Script : http://mouldyskull.com/newthread.php
Referrer : http://mouldyskull.com/newthread.php?do=newthread&f=8
IP Address : 207.6.57.62
Username : aaron
Classname : vb_database
I made the appropriate changes listed above to the new XML file provided in post #69 and I get this error when I try to roll on the first post of a thread.
Reply With Quote
  #147  
Old 06-19-2006, 02:20 PM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It still looks like the 'dice' field has NOT been added into your _thread table... Are all your tables vbtablename? usually from my experience the tables are preceeded with ****_tablename

Are you able to run a MySQL query to add the fields yourself?

Unless you have some way of accessing your vbulletin database and adding the 'dice' field yourself, or running the sql query, I'm not really sure what else to advise.

I must admit, I'm still trying to get used to the product and plug-in process since switching to vB from phpbb2 (where EVERYTHING was a find/copy/paste-before/after/replace and adding tables/fields/etc was 'done by hand') While I'm glad for that learning experience the products and plug-ins are such a time saving convenience.
Reply With Quote
  #148  
Old 06-20-2006, 05:57 PM
soravok soravok is offline
 
Join Date: Dec 2005
Location: Vancouver, BC, Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Couple of bugs I noticed, if you preview a roll it deletes your roll syntax & if you edit a previous post with a roll it deletes your roll syntax. Any thoughts on if this is going to be fixed?
Reply With Quote
  #149  
Old 06-20-2006, 06:13 PM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no it shouldn't be fixed... keeps a player from ummmm 'cheating' by editing the roll if they don't like the result
Reply With Quote
  #150  
Old 06-20-2006, 06:50 PM
soravok soravok is offline
 
Join Date: Dec 2005
Location: Vancouver, BC, Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not make it retain the syntax but reroll the values everytime the forum is edited or previewed then have the post say "Values were edited @ such and such time" and just have the preview values be rolled seperately from the submitted values. Makes sense to me that way you can't cheat.
Reply With Quote
  #151  
Old 06-20-2006, 09:05 PM
WNxWakko's Avatar
WNxWakko WNxWakko is offline
 
Join Date: Apr 2003
Location: Paradise, Texas
Posts: 309
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This mod totally crashed my server.

I strongly advise against this mod until he cleans up all the bad code.
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 02:03 AM.


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.05211 seconds
  • Memory Usage 2,316KB
  • 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
  • (2)bbcode_code
  • (2)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
  • (1)pagenav_pagelinkrel
  • (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