Jump to content

[4.0] forums_forums.name gone?

Featured Replies

Posted

Hi everyone,

I updated our community forums yesterday and we also have a custom written "Portal" that is using some data from the forums database. We have a self-updating box that is showing the latest threads on that portal.

Since the update, the box is not showing the forums name anymore because the "name" field in forums_forums is gone.

Do you have an idea where this bit of information is stored now and how can I read it? preferrably within the database query but I guess it's not possible anymore.

thx in advance for your answers :) 

Yes, on IPS4 they are tied to language system. Do something like that:

{{$name= \IPS\Member::loggedIn()->language()->get('forums_forum_' . $forum['id']);}}

Then you print:

{$name}

 

  • Author

awesome, thanks for that hint.

I worked around the IPS internal languagesystem and used a DB query only, I think this should be safe too:

 

SELECT
	topics.tid as topic_id,
	topics.title,
	topics.title_seo as url,
	topics.last_poster_id as author_id,
	topics.last_poster_name as author_name,
	topics.forum_id,
	topics.last_post as time,
	lang.word_default as forum_name
FROM 
	forum.forums_topics topics
LEFT JOIN 
	forum.core_sys_lang_words lang
ON 
	lang.lang_id = 1 AND lang.word_key = CONCAT("forums_forum_", topics.forum_id)
ORDER BY last_post DESC
LIMIT 0,5

 

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.