vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Add-On Releases - vBookie for vBulletin 4 (https://vborg.vbsupport.ru/showthread.php?t=233473)

DragonBlade 02-02-2010 02:20 PM

dartho,

I'm trying out your modification and am in the process of installing it, but I have a question for ya...

Rather than having us make a template modification above {vb:raw threadmanagement}, as it says in the instructions, could you not add that bit as an extra template and add it to $threadmanagement in the newthread_form_complete hook location?


Like...


TEMPLATE (vbookie_threadmanagement):
HTML Code:

                <vb:if condition="$show['vbookieevent']">
                        <div class="blockrow">
                                <p class="label">Post a {vb:rawphrase vbookie} Event</p>
                                <dl class="group dep_group">
                                        <dt>
                                                <label for="cb_postvbookieevent">
                                                        <input type="checkbox" name="postvbookieevent" value="yes" id="cb_postvbookieevent" tabindex="1" {vb:raw checked.postvbookieevent} class="dep_ctrl" /> {vb:rawphrase yes_post_a_vbookieevent_thread}
                                                </label>
                                        </dt>
                                </dl>
                        </div>
                </vb:if>

PLUGIN (newthread_form_complete):
PHP Code:

$templater vB_Template::create('vbookie_threadmanagement');
  
$templater->register('show'$show);
  
$templater->register('vbookie'$vbookie);
  
$templater->register('checked'$checked);
  
$templater->register('yes_post_a_vbookieevent_thread'$yes_post_a_vbookieevent_thread);
$threadmanagement $templater->render() . $threadmanagement;
$show['additional_options'] = ($show['misc_options'] OR !empty($attachmentoption) OR $show['member'] OR $show['poll'] OR !empty($threadmanagement)); 





I'm sorry if it seems like I'm butting in, or if the above code wouldn't work, but it just makes sense to me to have as few template edits as possible, and wouldn't that reduce your template edits to zero? :3

DragonBlade 02-02-2010 02:57 PM

----------

Also, a question on Custom "cash".

I've been working on my own modest "cash" system, and the field which handles said cash is called "han" (short for "Hansatsu"; don't ask XD), and I'd like to try and integrate vBookie with it. It seems straightforward enough, but I want to make sure before I go destroying things.

Basically, in each plugin that has it, in vbookie.php, and in includes/functions_vbookie.php, replacing vbookie_cash with my custom field han would be the correct way to go, correct?

ldma 02-02-2010 06:44 PM

I'm having trouble getting it working. All permissions are set up correctly, I can set up events, but even as Admin I can't place bets.

dartho 02-02-2010 08:59 PM

Quote:

Originally Posted by DragonBlade (Post 1973080)
dartho,
I'm sorry if it seems like I'm butting in, or if the above code wouldn't work, but it just makes sense to me to have as few template edits as possible, and wouldn't that reduce your template edits to zero? :3

I was thinking of doing this once I was happy everything was working, but then decided to keep it a manual edit. The new temlate engine would probably happily merge those manual changes into any future updates.

If you release a cash system, I could modify the vbookie code to work with it out out of the box.

Otherwise, vbookie has hooks where you can write plugins to handle other cash - no need to edit source files.

vbookie_do_charity
vbookie_get_richest
vbookie_get_user_cash
vbookie_give_user_cash
vbookie_take_user_cash

Have a look at the functions_vbookie.php file for sample code for putting in these hook locations

dartho 02-02-2010 09:05 PM

Quote:

Originally Posted by ldma (Post 1973295)
I'm having trouble getting it working. All permissions are set up correctly, I can set up events, but even as Admin I can't place bets.

was this a fresh install, or an upgrade from a previous version of vBookie?

Bluefin221 02-03-2010 09:21 AM

Ok, I uninstalled supercharged and tried a fresh install of 4.0.6 of vbookie.

I still get a database error on the stats page.

I have rebuilt bitfields, I have checked the permissions which are all fine, I made my first bookie event as a test. Funnily enough now that I've made the event no one appears to be able to make an actual bet.

dartho 02-03-2010 09:41 AM

what is your site - if you PM me deatils, I'll be happy to have a look. I may need admin details to dig deeper if you woudl like me to...

Bluefin221 02-03-2010 10:57 AM

Quote:

Originally Posted by dartho (Post 1973802)
what is your site - if you PM me deatils, I'll be happy to have a look. I may need admin details to dig deeper if you woudl like me to...

I know what the problem is, when you initially go into vbookie options you don't have the full list of options, when I rebuilt bitfields for some reason I had a whole heap of options, once I went through these setting them up for my site everything is working as it should. Strange though that the options wouldn't show properly at first though.

DragonBlade 02-03-2010 11:04 AM

Quote:

Originally Posted by dartho (Post 1973398)
I was thinking of doing this once I was happy everything was working, but then decided to keep it a manual edit. The new temlate engine would probably happily merge those manual changes into any future updates.

If you release a cash system, I could modify the vbookie code to work with it out out of the box.

Otherwise, vbookie has hooks where you can write plugins to handle other cash - no need to edit source files.

vbookie_do_charity
vbookie_get_richest
vbookie_get_user_cash
vbookie_give_user_cash
vbookie_take_user_cash

Have a look at the functions_vbookie.php file for sample code for putting in these hook locations

Thanks, Dartho. And ha, amg, now that I actually read your functions_vbookie.php without sleep deprivation, I can easily see the aformentioned hooks. XD Thanks for putting something in there for us to be able to customize so easily! I probably would have never thought of that. XP

As for releasing my cash system, well, it's very unprofessional. See, I started it over a year ago when I was first learning about vBulletin coding, so at first I was directly editing the database and didn't even KNOW about templates--I was passing the HTML just as a PHP literal. XP I've been modifying it a bit here and a bit there, but it's still far from what I'd burden the vBulletin community with. XD I'll certainly release it when it's complete, and when I make the plugins you mention to change the cash field to "han," I'll include those. :3

ldma 02-05-2010 10:34 PM

Quote:

was this a fresh install, or an upgrade from a previous version of vBookie?
I did have it installed previously but uninstalled it before i upgraded to vb4, then installed Vbookie again.

Quote:

I have rebuilt bitfields, I have checked the permissions which are all fine, I made my first bookie event as a test. Funnily enough now that I've made the event no one appears to be able to make an actual bet.
Same here.


All times are GMT. The time now is 09:09 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.01503 seconds
  • Memory Usage 1,766KB
  • 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
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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