Changing the ExpressionEngine Forum URL

I created a forum on ExpressionEngine and configured the URL as I need a specific forum path.

To do this, I went to Modules> Discussion forum> Forum settings and to the forum URL placed in my desired URL. Let me call him http://www.mywebsite.com/students/forum/

My homepage displays the last 5 forum posts. It all works, except for URLs that don't go to that URL, and instead point to http://www.mywebsite.com/forums/viewthread/xxx

Is there an extra step that I'm missing here? Why is the forum URL not updating automatically when I save it?

0
source share
1 answer

Installing ExpressionEngine by default assumes that the forum will always be located at the URL:

http://example.com/index.php/forums

Although you can freely change the forum URL, the discussion forum module assumes that the forum will be the first URL segmentation variable , {segment_1} URI.

This information is not as widely documented as it should be, and gives a lot of confusion for people who want to run their forum on a different URL or subdomain .

To allow the discussion forum to work as a different URL; on the second segment {segment_2} - you need to configure EE to start the forum using regular templates *.

In your example, you need:

  • Create a new template group: students
  • In this template group, create a new template: forum
  • In the forum template, enter the following code: {exp:forum}
  • From the control panel, go to add-ons> Modules> Discussion forum> Default settings
  • Configure your Forum forum settings for the following:

Bulletin Board: Student Forum
Forum Forum Board Short name: forum
Forum URL: http://example.com/index.php/students/forum
User-run word: <empty>

ExpressionEngine Forum Module Board Preferences

At this point, your forum will launch inside the regular EE modeling engine. Then the forum opens through any template that you created above β€” the name of the template is used instead of the word β€œtrigger” mentioned earlier:

http://example.com/index.php/students/forum


The downside of this approach is that it adds extra processing overhead, so it is not recommended if users do not need this feature. Since the forum cannot be cached, on very busy sites this can create some unwanted load on the server.

Do not cache the template created for the forum. If you do this, your forum will not behave dynamically.

0
source

Source: https://habr.com/ru/post/1383853/


All Articles