×
Kunena 5.1.18 Released (30 Jun 2020)

The Kunena team has announce the arrival of Kunena 5.1.18 [K 5.1.18] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1.

× This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.

The topics in this category are for historical interest only. Owing to the structural changes that occurred in K 2.0, many of the ideas in these topics will not work with later versions and, for that reason, the topics are locked.

Question Custom list of topics; how to generate the URL links for each topic?

More
7 years 8 months ago - 7 years 8 months ago #1 by derekf
I've got a requirement to generate lists of URL links for topics in a category and am getting some strange results so wanted to check if I'm doing something wrong.

What I'm doing is reading the kunena_topics table to get the id for the topics I'm interested in based on the subject using the following:

SELECT * FROM j17_kunena_topics
WHERE SUBJECT LIKE 'whatIwant' AND hold = 0 and posts > 0
ORDER BY SUBJECT

I then generate the IRL to look as follows:
https://www.mysite.com/index.php?option=com_kunena&func=view&catid=xx&id=yyyyy

Where xx is the category is and yyyyy is the topic id.

This works for a lot of links, but not all and I'm a bit confused.

Could anybody let me know what I'm doing wrong and how best I can achieve this?
Last edit: 7 years 8 months ago by derekf.

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago - 7 years 8 months ago #2 by Shynx
you could try sef links:
SELECT topics.id, topics.subject, cats.alias
FROM j17_kunena_topics AS topics
JOIN j17_kunena_categories AS cats ON (topics.category_id=cats.id)
WHERE topics.subject LIKE 'whatIwant' AND topics.hold = 0 and topics.posts > 0
ORDER BY topics.subject
 
$url = $result->alias."/".$result->id."-".JFilterOutput::stringURLSafe($result->subject)
Last edit: 7 years 8 months ago by Shynx.

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.077 seconds