FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » new forums created via api are not visibile
Show: Today's Messages :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Remove from bookmarks 
Switch to threaded view of this topic Create a new topic Submit Reply
new forums created via api are not visibile [message #187960] Wed, 28 October 2020 06:07 Go to next message
atrebbi is currently offline  atrebbi   United States
Messages: 11
Registered: June 2020
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
If I create a new forum via API, i.e with the following code, the forum seems ok in administration panel but is not visibile in frontend

If I change category to the forum, the problem get fixed ;
am I missing anything in forum creation ? I noticed there's some sort of synch command (for groups, that are created together with forum, do they need synch?)


==================================================
$f = new fud_forum;

$f->cat_id = 8;

$f->name = $newsgroup;


$areadescr = $echoareadesc[strtoupper($newsgroup)];
if (!$areadescr)
$areadescr = "New Echomail Area ".$newsgroup;

$f->descr = $areadescr;
$f->max_file_attachments = 0;
$f->max_attach_size = 2048;
$f->forum_opt = 10;

$fid = $f->add('LAST');
Re: new forums created via api are not visibile [message #187995 is a reply to message #187960] Sun, 20 December 2020 03:16 Go to previous message
fennecfox is currently offline  fennecfox
Messages: 2
Registered: April 2017
Karma: 0
Junior Member
remove from buddy list
ignore all messages by this user
If you append a call to rebuild_forum_cat_order(), the forum index will show the newly-created forum. The rebuild_forum_cat_orders() function is in include/cat.inc.

I am guessing that FUDforum caches the forum index info because database calls take time and forums don't get added or deleted that often. So one has to update that cache. I didn't find a way to do that via the API.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: backup via script
Next Topic: login with facebook
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Oct 15 09:56:54 EDT 2024

Total time taken to generate the page: 0.06250 seconds