vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Creating Custom Datamanagers (https://vborg.vbsupport.ru/showthread.php?t=119376)

Antivirus 06-09-2007 12:31 AM

bump

Guest190829 07-11-2007 06:09 PM

You are correct, as they are both referencing the same db object. I do not know vBulletin is not consistent in your particular example.

If you were to choose one, I would go with

$this->registry->db

As there must always be a valid registry object in the registry.

Antivirus 07-16-2007 05:20 PM

thanks for clarifying Danny :)

Opserty 08-03-2007 09:13 PM

Great article, will come in useful in the future I'm sure! Bookmarked.

kjhkjh 08-10-2007 05:22 PM

Can this help me?? Or anyone here?

I'm in the process of trying to add many forums without the ACP, here's where I'm up to:

I have added forums to the table 'forum'
I have updated the parent ID's, descriptions etc of each of the forums that I've added.
I believe I now have to updates the datastore which is basically a series of records in an serialized form that has information about the forums and its permissions. (this was the advice vb.com gave but I can find no documentation about how to do this - especially how to do it safely)

They also said to look at http://members.vbulletin.com/api. In particular the Datamanager class for Forums but it's difficult to know where to start.

Any help here is much appreciated - I'm trying to save myself over 100 hours of adding and updating forums - please help :)

Antivirus 08-12-2007 04:42 AM

are you trying to create forum swith a datamanager? One doesn't exist ( i dont think) so you'll have to create the DM.

kjhkjh 08-12-2007 04:51 AM

thx for your reply.

I have no idea how to create them or what they are!

But I was tld they could help me duplicate forums or just help me make the process of adding almost 2000 forums easier.

Aparently they are the missing loop to make the forums that I added into the mysql table 'forum' appear by serializing the forums data and adding them to the datastore - I'm just repeating this from earlier advice but still no good because I have no idea.... :(

Really wanted it to work out and had offered throughout the forum to pay someone to help, but no takers!

So I've started adding the forums through the ACP... Just looks like its about 100 hours work (85%+ of the forums are redirects to an active forum) but this whole thing is still taking too much time. I'm about 20 hours into it...

If someone comes up with a solution then I am open eared and open walleted :)

jasharen 08-18-2007 03:21 AM

Any chance someone could give an example of this and cleansing using TYPE_ARRAY_INT or TYPE_ARRAY_STR?

I can get it to work normally but I'm having some trouble with the arrays.

Thanks!

jasharen 08-19-2007 07:20 PM

Figured it out :)


PHP Code:

    $vbulletin->input->clean_array_gpc('p', array(
        
'SELECTFIELD'            => TYPE_ARRAY_INT
    
));

foreach(
$vbulletin->GPC['SELECTFIELD'] as $value)
{
  echo 
$value."\r\n";



DragonBlade 11-28-2008 12:09 AM

Hey, thanks, this was a real help. ^_^

One thing I'd like to ask, by trial and error I found out that I was (stupidly) forgetting to include includes/class_dm.php on my page.

Now, I've got a page, g13.php, and two files I include, includes/class_dm_g13.php and includes/functions_g13.php. Should I include the includes/class_dm.php in my includes/class_dm_g13.php page, or just the main g13.php page? I'm currently doing the latter, but it would work jsut fine doing the former, right?


All times are GMT. The time now is 04:52 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.01918 seconds
  • Memory Usage 1,736KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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