Kantholy Posted September 9, 2015 Share Posted September 9, 2015 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 Link to comment Share on other sites More sharing options...
Adriano Faria Posted September 9, 2015 Share Posted September 9, 2015 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} Link to comment Share on other sites More sharing options...
Kantholy Posted September 9, 2015 Author Share Posted September 9, 2015 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.