![]() |
forums problems please help
im tring to get other conditions to forums and i got little problem
i copied part of code from forum.php (admincp dir) any way i have tried to do something like : PHP Code:
PHP Code:
on forum.php this query works fine so what might be the problem ? please help... |
Well, $forum in forum.php is not initialized using fetch_foruminfo().
Better use PHP Code:
|
line 86 :
PHP Code:
only from other script then f.php so any other idea ? |
You are right that forum.php does use fetch_foruminfo(), but array $forum in the handler for do=update consists only of certain keys of this array (defined by the forum constructed in the handler for do=add/edit).
And that's the point: If you use the array returned by fetch_foruminfo() directly it will contain keys that do not exist as columns in table forum, which causes problems in fetch_query_sql() as it will just use all keys in the given array to construct the query. |
Quote:
i want to do=edit its will give me alll forumid=3 options and i will change what i want and $_Post['do'] = update same forum.php is doing only from another script thats why i used fetch_foruminfo() to get the info same as forum.php does got my point ? |
Yes, I do understand what you want.
But you can't use the array returned by fetch_foruminfo() as input for fetch_query_sql() directly, as it does contain additional keys :) What exactly do you want to change? |
so how would i get allowbbcode and allowhtml and other ++++ that forum info contains ?
i want to be able to edit this options and to update them but not from forum.php...? |
hmm ok, ill try to explain some more
as part of my next version to my team hack i want every team to have a privte forum so i add teamid to forum table deafult is 0 if teamid = 0 means that forum is regular forum if teamid !=0 means its privte forum that belong to some team, now i allredy did most of file edits so on forum edit via forum.php you wont see forums that their teamid!=0 now im making a script that will make same options to all of forums that their teamid !=0 so if ill do allow html its will edit all forums that their teamid !=0 so i made a while loop for update the only problem atm is to update the info.. same as forum.php does i copied most of the code from their (the code that used in edit) also readed it few times and i still cant find the problem. why its not get updated so i decided to first make a static forum - with out the while loop (forumid : 3) but on forum i cant update the info... thats why im tring only to read the info and update it to the rest i can take care... |
*** Untested ***
PHP Code:
Quote:
Don't forget to call build_forum_permissions() afterwards. |
hmm
few qustion : 1. what the function array_intersect_key() should do ? 2. why to use PHP Code:
3. why did you added 256 to options on db ? btw thank you very much for helping me out |
All times are GMT. The time now is 12:17 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|