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
  #152  
Old 06-21-2006, 04:25 AM
soravok soravok is offline
 
Join Date: Dec 2005
Location: Vancouver, BC, Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WNxWakko
This mod totally crashed my server.

I strongly advise against this mod until he cleans up all the bad code.

Odd, it works perfectly for me.
Reply With Quote
  #153  
Old 06-21-2006, 11:27 PM
soravok soravok is offline
 
Join Date: Dec 2005
Location: Vancouver, BC, Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the total amount of dice to be rolled still limited to 5? If not does anyone know what the max is? Also is there a way to disable the images? If say I just wanted it to have numerical outputs?
Reply With Quote
  #154  
Old 06-22-2006, 05:50 AM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for disabling images just change the template to your suiting, may require some php skill for variables.

Iv been on vacation and it has sucked and is still sucking but thats the state of things, As for this code crashing a server, nothing iv seen has done so and no where iv set this up has it crashed.

As for multiple dice fix, someone posted it earlier, page 1 or 2.
Reply With Quote
  #155  
Old 06-24-2006, 01:33 AM
Campbell Campbell is offline
 
Join Date: Oct 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello all -

I have installed this mod from the source files in the lead post. What I receive when I roll dice from the postbit with any editor (quick, new thread, reply, etc) is the code [dice0] in text in the postbit. This is obviously not the die image, but everything else in the postbit works. (Controls etc.)

Can someone validate or post a reply with the latest code and the latest instructions? There are so many files flying through the topic in replies that I can't tell what is current and what isn't.

Alternatively if anyone has seen the error I mention, help a brother out as this functionality would make my life much easier as a RPG site admin.

Best regards,
A

note that my beta board is at http://www.sovereignrpg.com/community head to the Ona's workshop forum to see the test failures.
Reply With Quote
  #156  
Old 06-24-2006, 08:45 PM
soravok soravok is offline
 
Join Date: Dec 2005
Location: Vancouver, BC, Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Supposedly it's a feature so that you can't cheat, but it would make more sense to have the rolls marked "fixed" if you've edited the post and have the preview button generate a different set of values everytime you press it. So that the previewed rolls and the posted rolls are different.
Reply With Quote
  #157  
Old 06-24-2006, 11:06 PM
Campbell Campbell is offline
 
Join Date: Oct 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update -

It seems as if everything works on my forum with the exception of rendering the die images. Very strange. It's not a matter of custom image forum paths due to my skin as the same behavior happens with default skin. Is there any reason why png files wouldn't render on a VB installation using php?

yes I have enabled php in my bbcode area. Thought of that.

note this is on a 3.5.4 clean install

Best,
A


Quote:
Originally Posted by Campbell
Hello all -

I have installed this mod from the source files in the lead post. What I receive when I roll dice from the postbit with any editor (quick, new thread, reply, etc) is the code [dice0] in text in the postbit. This is obviously not the die image, but everything else in the postbit works. (Controls etc.)

Can someone validate or post a reply with the latest code and the latest instructions? There are so many files flying through the topic in replies that I can't tell what is current and what isn't.

Alternatively if anyone has seen the error I mention, help a brother out as this functionality would make my life much easier as a RPG site admin.

Best regards,
A

note that my beta board is at http://www.sovereignrpg.com/community head to the Ona's workshop forum to see the test failures.
Reply With Quote
  #158  
Old 06-25-2006, 01:12 AM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you physically upload the images to your forum(s)/images/dice folder?
I know that sounds like a silly question but some have been under the impression that installing the product puts the images where they are supposed to go..... but you have to ftp/upload the images separately to a dice folder in your vb images file on your server/host server....

I know the png images show up for all my users/members running IE, firefox and mozilla.

As to the limitations of number of dice for the 'original' hack being 5....
The only limit I've personally had is for over 9 dice. To change from 5 limit to 9 limit:
open the xml file in an editor and
FIND
Code:
preg_match_all("/\[dice=([1-5])\]([0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult);
CHANGE TO
Code:
preg_match_all("/\[dice=([1-9])\]([0-9]?[0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult);
before installing/reinstalling/overwriting.
Reply With Quote
  #159  
Old 06-25-2006, 01:34 AM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The dice images in the Dice zip file only go up to 30, therefore if you are using 'faces' higher than 30 the image will not show up.

A blank blue gif is included in the 'blue' folder (after extracting the dice zip file) and a blank white gif is included in the 'white' folder, depending on which you use, for making numbers higher than 30 for faces 31-100.

OR use this attached zip file for blue octagonal dice numbered 1-100 (originally attached to my post as Rukbat on page 3 or 4 of this thread...) they are in gif format

hope this helps
Reply With Quote
  #160  
Old 06-25-2006, 01:48 AM
Campbell Campbell is offline
 
Join Date: Oct 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To answer your question Eq, yes I've uploaded the images.

This is complicated by the fact that I'm on the mac platform, though I've tested using Safari and Firefox and end up with the same end result. I see the php call, but no images.

I opted to use RPG dice due to the dice panel. When I tested the original roller in this thread it worked fine. However, when that roller didn't display images I was able to pull the source path from the broken link and find where my issue was.

With RPG dice, all I get is [dice0] or [dice1] and with no path I have nothing to go on.

Any assistance would be greatly appreciated.

Best regards,
A
Reply With Quote
  #161  
Old 06-25-2006, 01:52 AM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm, no clue, I haven't used the RPG dice thingy. I *did* go to your dice test thread at your site and the images show up in the last few posts on my puter (Windows XP/Mozilla 1.7.13) *but* they are the funky original dice NOT the RPG dice cclaerhout did in the png format.
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:20 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.08327 seconds
  • Memory Usage 2,320KB
  • 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
  • (3)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