vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   i want to get forums only That allowposting on it by Query (https://vborg.vbsupport.ru/showthread.php?t=309301)

omardealo 03-08-2014 08:54 AM

i want to get forums only That allowposting on it by Query
 
hello ,

i use this query

Code:

$getforum = $db->query_read("SELECT forumid, title_clean FROM " . TABLE_PREFIX . " forum where ".$vbulletin->bf_misc_forumoptions['allowposting']." = '1'  ");
it not working , i want to get forums only That allowposting , and i don't know where i found forum permission on database .
thnx ...

--------------- Added [DATE]1394273222[/DATE] at [TIME]1394273222[/TIME] ---------------

forum permission for allowposting on options field , but how i use it ?

Simon Lloyd 03-09-2014 11:15 AM

You would need to look at the forumpermission table and the find which bit of the permissions shows allowed posting, you'd need to join the query with one looking at the forum table in order to get the forum name, it's a lot more complicated than you think.

omardealo 03-11-2014 02:39 PM

Quote:

Originally Posted by Simon Lloyd (Post 2486026)
You would need to look at the forumpermission table and the find which bit of the permissions shows allowed posting, you'd need to join the query with one looking at the forum table in order to get the forum name, it's a lot more complicated than you think.


i look at forumpermission table already , and it's empty .. no data on it
sorry , but i think what you talk about is wrong
allowposting permission on options field -> Table: forum

thnx brother ,

ozzy47 03-11-2014 10:41 PM

What is it exactly you are trying to do, perhaps post the code and explain what it is you want.

omardealo 03-12-2014 03:57 PM

Quote:

Originally Posted by ozzy47 (Post 2486550)
What is it exactly you are trying to do, perhaps post the code and explain what it is you want.

i want make a dropdown list for only category that allowposting ...
i make it by another way , by product seeting i put all categorys and i can Chose the categorys that i want to exclude from appearing .

Code:

$forumbits_mod_forums = explode(",",  $vbulletin->options['forumbits_mod_forums']); 
$getforum = $db->query_read("SELECT forumid, title_clean FROM " . TABLE_PREFIX . " forum where forumid NOT IN ('" . implode("','",$forumbits_mod_forums) . "') order by displayorder ASC ");

but i want to know if there easy way to get only categorys (by query) that users can put on it new threads and exclude the others .

thnx ...

Lynne 03-12-2014 05:56 PM

Perhaps....

PHP Code:

$getforum $db->query_read("SELECT forumid, title_clean FROM " TABLE_PREFIX "forum WHERE (options & 2) 

Code:

            <group name="forumoptions">
                <bitfield name="active">1</bitfield>
                <bitfield name="allowposting">2</bitfield>
                <bitfield name="cancontainthreads">4</bitfield>
                <bitfield name="moderatenewpost">8</bitfield>
                <bitfield name="moderatenewthread">16</bitfield>
                <bitfield name="moderateattach">32</bitfield>
.....



All times are GMT. The time now is 04:46 AM.

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.02873 seconds
  • Memory Usage 1,727KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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