Home

 

Delete discussion forum topics

As administrator, you can monitor the content of community discussion forums and remove unwanted or inappropriate topics if necessary.


To use administrative commands, use wsadmin. See Start wsadmin for details.


When you remove a topic from a community's discussion forum, the topic is soft-deleted. To remove the topic from the databasecompletely, you need to purge the discussion forum trash. For more information about purging the trash, see Purging forum trash.

To remove a topic from a community's discussion forum...

  1. Start wsadmin so that you can access the Communities configuration files.

    1. Access the Communities configuration files:

      If you are asked to select a server, you can select any server.

  2. Use the following command to import the Java™ Hashtable object for using later:

    from java.util import Hashtable

  3. Before you run the discussion forum administration commands that require an input of Hashtable community, you need to use the CommunitiesService commands to fetch some communities.

    For example:

      commHashMap=CommunitiesService.fetchCommByName("<community-name>")
         commHashtable=Hashtable(commHashMap.get(0))
         CommForumTopicsService.fetchTopics(commHashtable)
      

    The sample commands above fetch the community with the specified name, with the output results in the form of a vector of hashmaps. You can store those results as a variable, such as commHashMap. Next, you need to extract the community that you're working with from that vector of hashmaps and save that to a hashtable variable (commHashtable). You use that variable (commHashtable) as the input to the commands that require the Hashtable community.

  4. To remove an unwanted or inappropriate discussion forum topic...

    CommForumTopicsService.deleteTopics(Hashtable community, Vector topics)

    where:

    • community is the commHashtable variable saved in the previous step.

    • topics is a vector of hash tables.


Administer discussion forums

 

Related tasks

Purge forum trash


+

Search Tips   |   Advanced Search