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

Reply
 
Thread Tools
Diceroller Details »»
Diceroller
Version: 1.002, by PntSingularity PntSingularity is offline
Developer Last Online: Oct 2008 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.6.8 Rating:
Released: 08-04-2008 Last Update: 08-08-2008 Installs: 10
DB Changes Uses Plugins Auto-Templates
Re-useable Code Translations Is in Beta Stage  
No support by the author.

Diceroller by PointSingularity, originally written for 2d4.org
Version 1.002


This feature adds the functionality to post dice rolls. The rolls are associated with posts but cannot be edited even if the post can.

No longer supported.

WARNING!!
It has been brought to my attention that a bug causes a MySQL error when using the pm system!

To fix this, edit the plugin that's connected to the postbit display complete hook and add at the very top:
Code:
if (!empty($post['postid'])) {
then add at the very bottom:
Code:
}

CHANGELOG

1.002
*Moved the dice roller itself into a more discreet area. Now works well with either postbit or postbit_legacy!
*Added user option in the user cp for appearance (forum default, full, compatibility mode). Appearance can be enforced in the settings, disabling the user cp options and overriding any personal settings already set.
*Added settings variable for main width.
*Changed the font-size in a few places to make it look a bit more discreet.
*Made the separate rolls lists collapsable.
*Removed the nevershowfulllist function since it was completely pointless due to the newly collapsable lists.
*Fixed bug that would claim description title was too long even if it wasn't when certain characters were entered.
*Design fixes and reorganizing. The border now looks like the rest of the postbit's.
*Added "roll" button.
*Added code for clearing up memory after database queries.
*Dice are now sorted by result (rolls are still sorted by id).
*Connected to template hooks to further simplify the installation process.
*Moved all of diceroller.php into the main plugin.

1.001
*Fixed counter error when dice list is in tooltip mode.
*Added complete vBulletin Language/Phrase support.
*Added low-profile mode. This will display entries as plain text, which is excellent if you want an uber-lite look or want better browser support since this turns off the java features.
*Sorting sorted out. ;p Lists now sort with the newest entry on top in vertical lists and the newest at the end in horizontal (tooltips and low-profile mode).
*Reorganized data and simplified installation process.
--Notes: If upgrading, remove everything except the database and reinstall, following the new installation process.



UPGRADE INSTRUCTIONS
From v1.001
Upgrade within vBulletin using the new product-diceroller.xml. Be sure to check "allow overwrite" or upgrade won't work. Then upload the roll.gif image into the /buttons directory. Finally revert your template changes you made for the last version (they are no longer needed) and delete diceroller.php (it's not needed anymore either).

From v1.0
Do NOT upgrade from v1.0. Instead delete the old templates, uninstall the plugins, etc. manually! You can keep the database if you'd like as that has not been changed.
Version 1.001 comes with a proper installer and is upgradable.


INSTALLATION INSTRUCTIONS
1. Upload and put roll.gif to your theme's "button" folder on the webserver (or make your own button ).
2. Import the product file product-diceroller.xml.
DONE!


CHANGE SETTINGS:
There's no addition to the admin cp, instead you can edit the settings by adjusting the values in the plugin called "Diceroller Settings". Be careful though!

ALSO IMPORTANT: Be sure to have plugins enabled in vBulletin or this won't work.


KNOWN ISSUES

v1.002
*Quote-box gets dropped down, leaving the title where it should be, if the dice roller is in the way.

Show Your Support

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

Comments
  #12  
Old 08-26-2008, 04:40 PM
PntSingularity's Avatar
PntSingularity PntSingularity is offline
 
Join Date: Feb 2007
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have added a note regarding the issue and will have it fixed asap. I'll see about adding those security tokens as well. Oh and there will be quite a few other improvements in the next update as well.

EDIT
Nevermind, I had left the "improved" code too effed up. Pardon the French.
I haven't been working on it for a while due to that I've reinstalled my webserver from scratch (on which I run my test installation that I develope on).

This means I won't be able to fix this due to that I simply haven't got the time anymore (well, for now anyways. never say never).
Instead I'm posting a manual fix you will have to apply to get it working properly.

I'm sorry to do this but I'll also have to discontinue the support for this product. I will still answer any questions and try to help as time allows me, but can't promise anything.


Quote:
Originally Posted by koxito View Post
This works fine in 3.7, but you'll need to add the security token, to all the inputs, i did this very easy.

whatever, i have problems with my PM's Now, i got a database error while viewing my recived..

This is the error:

HTML Code:
Database error in vBulletin 3.7.0:

Invalid SQL:
SELECT * FROM iaroll WHERE postid =  ORDER BY rollid DESC;

MySQL Error   : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY rollid DESC' at line 1
Error Number  : 1064
Request Date  : Monday, August 25th 2008 @ 08:00:16 PM
Error Date    : Monday, August 25th 2008 @ 08:00:17 PM
Script        : http://www.ia-family.com/foro/private.php?do=showpm&pmid=32282
Referrer      : http://www.ia-family.com/foro/private.php?
IP Address    : 189.202.19.200
Username      : LuMa-Kun
Classname     : vB_Database
MySQL Version : 5.0.41-community-log
Reply With Quote
  #13  
Old 08-26-2008, 06:33 PM
koxito koxito is offline
 
Join Date: Jan 2006
Location: Merida Yucatan
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you so much, with this i can make it work!. if you want to, i can post the places in the templates where the security tokken must be placed, so anyone can run this in Vb3.7!!!

¿In what plugin i must add the improvement?

Thank you very much
Reply With Quote
  #14  
Old 08-27-2008, 02:21 AM
PntSingularity's Avatar
PntSingularity PntSingularity is offline
 
Join Date: Feb 2007
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by koxito View Post
Thank you so much, with this i can make it work!. if you want to, i can post the places in the templates where the security tokken must be placed, so anyone can run this in Vb3.7!!!
Feel free to do so. Thanks.
Quote:
?In what plugin i must add the improvement?

Thank you very much
Like I said, the one that's connected to the Postbit Display Complete hook.
The plugin is simply called "Diceroller". I'm attaching a picture as well.
Reply With Quote
  #15  
Old 08-27-2008, 03:24 PM
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, is this compatible with 3.7.3? Or is there a security token issue?
Reply With Quote
  #16  
Old 08-27-2008, 03:43 PM
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just confirmed this. This mod does NOT work with 3.7.xx. It caused a Security Token error when rolling the dice.

It is too bad. Ths mod looked promising. Can this be fixed?

Additional Suggested Features:
  • ACP control. Not just editing the plugin, but actual menu driven options.
  • Usergroup permissions - I only want my RPG Moderators to be able to use the dice
  • Forum permissions - I only want the dice to show up in the gaming forums.
This is defiantly an awesome mod with great potential. I would be willing to pay for it, if these things were done.
Reply With Quote
  #17  
Old 08-28-2008, 03:21 AM
PntSingularity's Avatar
PntSingularity PntSingularity is offline
 
Join Date: Feb 2007
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PGAmerica View Post
I just confirmed this. This mod does NOT work with 3.7.xx. It caused a Security Token error when rolling the dice.

It is too bad. Ths mod looked promising. Can this be fixed?

Additional Suggested Features:

ACP control. Not just editing the plugin, but actual menu driven options.
I feel the config-plugin is easy enough to configure, do you really need it more graphical?
Quote:
Usergroup permissions - I only want my RPG Moderators to be able to use the dice
Forum permissions - I only want the dice to show up in the gaming forums.[/LIST]This is defiantly an awesome mod with great potential. I would be willing to pay for it, if these things were done.
The last suggestions I feel are great ideas however.

My spare-time is very limited at the moment, and that's why I made this unsupported. But I'll put those things (even the admin options if you really want them) on my to-do list for when I get the time. What I won't do however is charge anyone money for it.
Reply With Quote
  #18  
Old 08-28-2008, 04:35 AM
DL_Ashe DL_Ashe is offline
 
Join Date: Aug 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PGAmerica View Post
I just confirmed this. This mod does NOT work with 3.7.xx. It caused a Security Token error when rolling the dice.
Actually it does, and rather well, might I add. All you need to do is:
(1) Follow PntSingularity's concise instructions at the top to install the product
(2) Apply the minor code change to the postbit display hook
(3) Apply the security token code changes as per this thread: https://vborg.vbsupport.ru/showthread.php?t=177013

Now I'm brand new to administering a vBulletin (only been doing it for a few weeks), and I could work all of this out easily, so you should breeze through it PGAmerica.

PntSingularity: I want to commend you for this mod. It's excellent and works seamlessly for the gamers on the PbP subforum of my forums. In my opinion, this is honestly the best dice roller for vBulletin that I've seen and in the day since I've added, I've had rave reviews from my members, all of whom I've directed back to this thread and yourself, since you deserve all due praise for your work.

Whilst a minor point only, at some point if you ever have time (and granted you only stated above that your free time is practically zilch), if you could add a modifier to the roller? I'm no coder... hell I barely even know what I'm doing with administering my forum at times!

So that when someone clicks on Roll, the page displays:
Description:
Dice: xx d: xx m: xx (ie. +5)

It's a minor point and something I wish I could work out myself... but like I said I'm very new to this.
Reply With Quote
  #19  
Old 08-28-2008, 03:33 PM
PntSingularity's Avatar
PntSingularity PntSingularity is offline
 
Join Date: Feb 2007
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.


Regarding the modifier. I've actually already implemented modifiers into 1.003. I just haven't gotten around to actually finishing that version due to lack of time (I just started a course at a university).

I've also been working on another version of the dice roller (the one I'm using on my site) which supports rolls such as "1d6+3*(5-2)*2d8-1d5" in one click!
However this is far from perfected and I never really wrote that version for the general public, which means it lacks in customizability both for the user and admin.
Another thing that I improved with this other version is that the separate dice are stored in a single column rather than on separate rows in their on table within the MySQL database, which should improve performance if the database gets very large.

So, I might attempt to perfect the improved version I run on my site while implementing the customizability from this version and at the same time adding the extra features requested.
Though this WILL take time. I've got to read The Nicomachean Ethics this weekend and it's 300+ pages...


Btw, it's funny that my mod seems to get so much more attention now that I have less time to work with it...

Quote:
Originally Posted by DL_Ashe View Post
Actually it does, and rather well, might I add. All you need to do is:
(1) Follow PntSingularity's concise instructions at the top to install the product
(2) Apply the minor code change to the postbit display hook
(3) Apply the security token code changes as per this thread: https://vborg.vbsupport.ru/showthread.php?t=177013

Now I'm brand new to administering a vBulletin (only been doing it for a few weeks), and I could work all of this out easily, so you should breeze through it PGAmerica.

PntSingularity: I want to commend you for this mod. It's excellent and works seamlessly for the gamers on the PbP subforum of my forums. In my opinion, this is honestly the best dice roller for vBulletin that I've seen and in the day since I've added, I've had rave reviews from my members, all of whom I've directed back to this thread and yourself, since you deserve all due praise for your work.

Whilst a minor point only, at some point if you ever have time (and granted you only stated above that your free time is practically zilch), if you could add a modifier to the roller? I'm no coder... hell I barely even know what I'm doing with administering my forum at times!

So that when someone clicks on Roll, the page displays:
Description:
Dice: xx d: xx m: xx (ie. +5)

It's a minor point and something I wish I could work out myself... but like I said I'm very new to this.
Reply With Quote
  #20  
Old 08-28-2008, 09:46 PM
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DL_Ashe View Post
(3) Apply the security token code changes as per this thread: https://vborg.vbsupport.ru/showthread.php?t=177013
OK, I did all the rest, but I am lost on the security token thing. There is no file to edit, unless you mean the xml file. Is it a template edit? Which template or plugin code and where do I add this?

Quote:
Originally Posted by DL_Ashe View Post
Now I'm brand new to administering a vBulletin (only been doing it for a few weeks), and I could work all of this out easily, so you should breeze through it PGAmerica.
I have been running a vbulletin for years as well, but I am no programmer. I can follow instructions, but am lost when it comes to figuring this out on my own.

Any help would be appreciated.
Reply With Quote
  #21  
Old 08-28-2008, 10:20 PM
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nevermind, I figured it out.

Edit the "roll_addform" template and add
Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
Just after

Code:
<form action="editpost.php?do=rolldice&amp;p=$drthispost" method="post">
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 03:45 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.04484 seconds
  • Memory Usage 2,340KB
  • 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
  • (4)bbcode_code
  • (1)bbcode_html
  • (9)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