Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Dice Roll for vB3 Details »»
Dice Roll for vB3
Version: 1.00, by Kentaurus Kentaurus is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-28-2004 Last Update: Never Installs: 21
 
No support by the author.

Tested in 3.0.7

Update:
The hack has been updated with new instructions, to allow more than one roll per post. If you are updating Please undo the file edits from the previous version before applying the new one. If you are installing this for the first time you're ok.


This hack is most useful to roleplaying communities, but you can also
have fun with it in any forum. It implements a new code, [dice] with which
you can do a dice roll. You can roll as much as 3 dices of 30 faces and as
less as 1 dice of 2 faces.

Once you roll the dice it is stored in the post so you cannot roll again even
if you edit the post or whatever.

Please keep in mind the [img] tag should be disabled in the forum where the dice tag is going to be used. It is not mandatory and the hack will work even with the [img] tag enabled but to prevent cheating I would recommend it.

How to use it:

[dice={dices}]{faces}[/dice]

Example:

[dice=2]25[/dice]
This will roll two dices of 25 faces each one
[dice=1]6[/dice]
This will roll one dice of 6 faces

I am attaching a zip with some sample images.. they are not the best ones but they are dices and show the numbers. If someone could make a new set of dices "prettier" than the ones I got I would be grateful


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
Some portions of the code are (c) Jelsoft Enterprises Ltd.

Show Your Support

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

Comments
  #32  
Old 05-17-2004, 03:16 AM
Fluous Fluous is offline
 
Join Date: Apr 2004
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got it. What I don't like is that users can't roll dice more then once per thread. I mean if we're gunna relax and chat. It should be allowed that they can do it. But I must say that it would be easy if you could edit post. But not edit posts that have rolled dice. Like if it wouldn't give you anything to delete. And even if they went and edited the message and deleted everything there. It would still show.
Reply With Quote
  #33  
Old 05-17-2004, 04:09 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They can roll more than once per thread, it is once per post

They can edit their post, but they cannot edit the dice roll, once rolled it is stored there and the are not able to edit it.
Reply With Quote
  #34  
Old 05-21-2004, 03:39 AM
dndog dndog is offline
 
Join Date: Apr 2004
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I allow users to roll multiple times per post? Think about it - for a few simple dice rolls, members have to post like 3 or 4 times in a thread.
Reply With Quote
  #35  
Old 05-21-2004, 07:48 PM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dndog
How can I allow users to roll multiple times per post? Think about it - for a few simple dice rolls, members have to post like 3 or 4 times in a thread.
Yeah, that would be really nice indeedy.
Reply With Quote
  #36  
Old 06-02-2004, 09:19 PM
Matrixgl Matrixgl is offline
 
Join Date: Sep 2002
Location: Canada
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working on vB 3.0.1

I installed it, everything went smooth, but when I post a reply, the pictures doesnt show up, instead I get the actual code that I put in when I posted.

Like if I post [dice=5]6[/dice], it shows up as [dice=5]6[/dice] in the thread instead of showing the pictures.
Reply With Quote
  #37  
Old 06-03-2004, 01:32 AM
Anub1s Anub1s is offline
 
Join Date: Jan 2004
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i also use 3.0.1. and works great!

maybe you wont create all the templates or miss a line code

Gracias kentaurus =D
Reply With Quote
  #38  
Old 06-16-2004, 10:30 AM
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Matrixgl
not working on vB 3.0.1

I installed it, everything went smooth, but when I post a reply, the pictures doesnt show up, instead I get the actual code that I put in when I posted.

Like if I post [dice=5]6[/dice], it shows up as [dice=5]6[/dice] in the thread instead of showing the pictures.
It works great in vB3.01 - maybe you did not chnage the Code. In the original Code only 3 Dice are allowed. If you enter incorrect Code the BB-Code will still in the Post. After Edit the Post the Dice-BB-Code won't changed.
Reply With Quote
  #39  
Old 07-15-2004, 06:34 PM
dndog dndog is offline
 
Join Date: Apr 2004
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyway I can reproduce this hack to roll more dice by means of creating 10 sets of the dice bbcode ([dice1][/dice1], [dice2][/dice2], etc.)? I think thats a perfect solution to the "one roll per post" problem.
Reply With Quote
  #40  
Old 02-09-2005, 04:11 AM
Kali Kali is offline
 
Join Date: Mar 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm trying to install this on 3.0.6. but the code seems to have changed on functions_newpost.php. I'm not handy enough with php to know what to change or how, so if someone can help I'd appreciate it.

Here's the code in the instructions:

PHP Code:
// ### POST NEW POST ###
        
$DB_site->query("
            INSERT INTO " 
TABLE_PREFIX "post
                (threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
                 showsignature, ipaddress, iconid, visible, attach)
            VALUES
                (
$threadinfo[threadid]$parentid, '" addslashes($post['title']) . "',
                 '" 
addslashes($post['postusername']) . "', $bbuserinfo[userid], " TIMENOW ",
                 '" 
addslashes($post['message']) . "', $post[enablesmilies]$post[signature],
                 '" 
addslashes($post['ipaddress']) . "', $post[iconid]$post[visible]$totalattachments)
        "
); 

and here's what I'm looking at on my functions_newpost.php file....

PHP Code:
// ### POST NEW POST ###
        
$DB_site->query("
            INSERT INTO " 
TABLE_PREFIX "post
                (threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
                 showsignature, ipaddress, iconid, visible, attach)
            VALUES
                (
$threadinfo[threadid]$parentid, '" addslashes($post['title']) . "',
                 '" 
addslashes($post['postusername']) . "', $bbuserinfo[userid], " TIMENOW ",
                 '" 
addslashes($post['message']) . "', $post[enablesmilies]$post[signature],
                 '" 
addslashes($post['ipaddress']) . "', $post[iconid]$post[visible]$totalattachments)
        "
);
        
$post['postid'] = $DB_site->insert_id();

        if (
$type == 'thread')
        {
            
$DB_site->query("
                UPDATE " 
TABLE_PREFIX "thread
                SET firstpostid = 
$post[postid]
                WHERE threadid = 
$threadinfo[threadid]
            "
);
            
$post['visible'] = $threadinfo['visible'];
        }

        
// now update the attachments .. if we have any visible OR not, otherwise the hourly cleanup will wipe them out
        
if ($totalattachments)
        { 
Any ideas how I can work around this? I'm trying to plan an rpg and really need this feature if possible. :ermm:
Reply With Quote
  #41  
Old 03-30-2005, 08:33 PM
Lizard King Lizard King is offline
 
Join Date: Jan 2005
Location: Mersin
Posts: 907
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way that we can get this working in 3.0.7 ?
Reply With Quote
Reply

Thread Tools

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 05:10 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.08168 seconds
  • Memory Usage 2,330KB
  • 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_php
  • (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
  • (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