Log in

View Full Version : i want to get forums only That allowposting on it by Query


omardealo
03-08-2014, 08:54 AM
hello ,

i use this query

$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 1394273222 at 1394273222 ---------------

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
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
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 .

$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....

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

<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>
.....