Support Forum

Get topic permalink by ID

JG Jose Roberto Gomes
Jose Roberto Gomes
Member

Is it possible to get the topic permalink using the topic id?

I have imported into Simplepress a home-made forum system, I kept the IDs in both, now i want to make rewrite page and the information I have to find the topic permalink in Simplepress is the ID.

Thanks

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

The permalinks are going to need a topic title. The ID is not actually used for this. Do you have a topic title? And forum titles as well.
And – do you have many forums and topics?
And – can you use php functions?

JG Jose Roberto Gomes
Jose Roberto Gomes
Member

Yellow Swordfish said
The permalinks are going to need a topic title. The ID is not actually used for this. Do you have a topic title? And forum titles as well.

The forum slug, I have. The old forum permalink was something like /forum_slug/forum_id/topic_id

And – do you have many forums and topics?
And – can you use php functions?

Probably, I will make a intermediate page that grabs this old permalink, check it against simple press and make a 301 redirect

Thanks for you attention

YS Yellow Swordfish
Yellow Swordfish
Member

Well remember that you have a column for topic_slug in sftopics and forum_slug in sfforums, These need to be populated. They follow the same format as WP posts. In other words the slug is formed from the title – all lower case and with hyphens in place of the spaces.

Can you arrange for that?

Then – depending on what other data you have incorporated into the tables you will need to reindex each forum which can be done from the forum admin > Toolbox > Housekeeping.