vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Foruminfo array (https://vborg.vbsupport.ru/showthread.php?t=162914)

asandhanam 11-16-2007 11:43 PM

Foruminfo array
 
How does this foruminfo array get populated. I added a new table to the forum table. But $foruminfo[categoryid] doesn't return anything. Do i have to edit the select sql stmt that populates this array. If so which file should i look for, to populate my new field in to this array.?

Opserty 11-17-2007 02:38 PM

You added a new table? or do you mean field?

You will need to use some PHP code to enable you to customise the data in this field.

Possibly using plugins with the "forumadmin_edit_form" and "forumadmin_update_save" hooks.

TheRed 11-18-2007 06:37 AM

You meant a new column in the forum table.

Well, the $foruminfo array is populated in the /global.php file which calls the fetch_foruminfo function (located in the /includes/functions.php) to execute the sql query below, so i believe there shouldn't be a problem loading the new custom columns.

global.php is called at the very beginning of almost each file that has an output.

PHP Code:

$vbulletin->forumcache["$forumid"] = $vbulletin->db->query_first_slave("
    SELECT forum.*, NOT ISNULL(podcast.forumid) AS podcast
    FROM " 
TABLE_PREFIX "forum AS forum
    LEFT JOIN " 
TABLE_PREFIX "podcast AS podcast ON (forum.forumid = podcast.forumid AND podcast.enabled = 1)
    WHERE forum.forumid = 
$forumid
"
); 

May someone correct me if im wrong.

GabFe 10-09-2016 12:49 PM

It's something about cache, because if you put $cache var to true in the function fetch_foruminfo (functions.php) works fine.

Lynne 10-10-2016 03:33 PM

Do you realize you replied to a 9 year old thread?


All times are GMT. The time now is 06:36 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.01593 seconds
  • Memory Usage 1,714KB
  • 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)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete