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)

Eq4bits 06-18-2006 07:10 PM

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.

soravok 06-19-2006 01:59 AM

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.

soravok 06-19-2006 02:13 AM

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?

Eq4bits 06-19-2006 03:15 AM

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

soravok 06-19-2006 02:11 PM

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.

Eq4bits 06-19-2006 02:20 PM

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.

soravok 06-20-2006 05:57 PM

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?

Eq4bits 06-20-2006 06:13 PM

no it shouldn't be fixed... keeps a player from ummmm 'cheating' by editing the roll if they don't like the result ;)

soravok 06-20-2006 06:50 PM

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.

WNxWakko 06-20-2006 09:05 PM

This mod totally crashed my server.

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


All times are GMT. The time now is 05:07 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.02401 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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