vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Dice Roller Hack [BBCode] (https://vborg.vbsupport.ru/showthread.php?t=113972)

Eikinskjaldi 04-24-2006 10:00 PM

Dice Roller Hack [BBCode]
 
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

Ahsin1 04-24-2006 11:51 PM

Click Install

Hell? 04-25-2006 12:50 AM

When I test:
Code:

Fatal error: Field dice is not defined in $validfields in class vb_datamanager_post in /includes/class_dm.php on line 485

Eikinskjaldi 04-25-2006 01:03 AM

Are all four plugins installed and turned on? You need to ensure that the valid fields for threads and posts is there and activated or the DM will go crazy.

Eikinskjaldi 04-25-2006 01:22 AM

Ah, I found the issue, I had in my rush placed two plugins in the wrong product. I have reuploaded the product with the correct plugins.

Hell? 04-25-2006 02:50 AM

thanks, I'll remove the old and reimport the new product and test, thanks again for the hack

Hell? 04-25-2006 03:27 AM

new problem, this time is database related

Code:

Database error in vBulletin 3.5.4:

Invalid SQL:
INSERT INTO post
        (showsignature, allowsmilie, username, userid, title, pagetext, iconid, visible, parentid, threadid, dice, dateline, ipaddress, attach)
VALUES
        (1, 1, 'Hell?', 1, 'Re: Extras Rol', 'new test dice roller\r\n\r\n[dice0]', 0, 1, 939, 100, 'a:1:{i:0;a:3:{s:5:\"dices\";s:1:\"2\";s:5:\"faces\";s:2:\"20\";s:4:\"data\";a:2:{i:0;i:20;i:1;i:3;}}}', 1145939053, 'xxx.xxx.xxx.xx', 0);

MySQL Error  : Unknown column 'dice' in 'field list'
Error Number : 1054
Date        : Tuesday, April 25th 2006 @ 12:24:13 AM
Script      : http://www.mysite.net/foros/newreply.php
Referrer    : http://www.mysite.net/foros/showthread.php?p=7444
IP Address  : xxx.xxx.xxx.xx
Username    : Hell?
Classname    : vb_database


username12 04-25-2006 03:42 AM

Same as above.

Rukbat 04-25-2006 04:19 AM

I just downloaded and imported via Product Manager. However a parse error flashes on the screen and then is replaced by the 'installed products' screen. error flashes so fast I can't write it down or remember the whole thing.
I checked the plug-ins, there were 4 installed on the product import/upload/install, and yes all 4 are checked as 'active'.

When I test in a post (and it's a reply NOT a first post) I get the following:
Code:

Database error in vBulletin 3.5.4:

Invalid SQL:
INSERT INTO dswfor_post
        (showsignature, allowsmilie, username, userid, title, pagetext, iconid, visible, parentid, threadid, dice, dateline, ipaddress, attach)
VALUES
        (1, 1, 'Admin', 5, 'Re: Admin\'s dice testing thread', '[dice0]', 0, 1, 11356, 1558, 'a:1:{i:0;a:3:{s:5:\"dices\";s:1:\"1\";s:5:\"faces\";s:1:\"6\";s:4:\"data\";a:1:{i:0;i:4;}}}', 1145942170, '**.***.*.***', 0);

MySQL Error  : Unknown column 'dice' in 'field list'
Error Number : 1054
Date        : Tuesday, April 25th 2006 @ 12:16:11 AM
Script      : http://www.*****.***/forums/newreply.php
Referrer    : http://www.*****.***/forums/showthread.php?t=1558
IP Address  : **.***.*.***
Username    : Admin
Classname    : vb_database


Snake 04-25-2006 12:15 PM

Sick! Thanks for the hack! :)


All times are GMT. The time now is 10:20 PM.

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.01310 seconds
  • Memory Usage 1,745KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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