• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Can we customize the url pattern?

Mike

XenForo developer
Staff member
#21
It's not so hard to keep the ids the same..
Yes it is. Already existing data that conflicts prevents it. Not to mention that the structure of some systems may just be plain different. You may get the same IDs, but it's not guaranteed and wouldn't be.
 

cedivad

Active member
#22
Ok, maybe i'm wrong but:

option 1)
in the board before converting:
foreach(topic ids (1 to last topic id used) as bit)
{
if ! thread_exist(topic_id)
{
topic_creat (array(id => topic_id, title => 'DELETE_ME'));
}
}

than once that the board is imported delete every topic where title = 'delete_me'

option 2)
in the import script, do something so that the local topic_id is = to the old topic_id. for example, add a temp collumm in the database "temp_id" to be the default id.
Than in the import sql instead of writing stuff like
INSERT INTO topics (title, replyes), ('my title', 'my repluyes');
use something like
INSERT INTO topics (topic_id, title, replyes), ('old_topic_id', 'my title', 'my repluyes');

than delete the 'temp_id' and change the primary columm to topic_id
 

Mike

XenForo developer
Staff member
#23
Maintaining IDs is not a goal of an importer. 301s are a much better approach in general. If you require the IDs to be maintained, you'll need to modify the scripts (as you'd need to be modifying them to get the URLs to be the same anyway).
 

Umit

Active member
#24
Can we customize in the admin cp?
can we do something like this: /forum/thread-123.html , forum/thread-123-page2.html
 

Enigma

Well-known member
#25
All the URLs go through functions, though the approach is for the URLs that we have. You could certainly change them by modifying the "routes" (both building and parsing).
A few years ago when I used Wordpress, they had an admin interface to define the URL structure, and I think XenForo should have the same. You can read how Wordpress does it here.

Threads for example-- the default would be:
Code:
/threads/{threadname}.{threadid}/
Which would produce this:
/threads/can-we-customize-the-url-pattern.1534/
The admin interface should let you move the URL parts around as wanted, for example, any of the following would work:
Code:
/discussione/{threadid}.{threadname}/
/t-{threadid}/
/thread-{threadname}-{threadid}/
Which would produce:
/discussione/1534.can-we-customize-the-url-pattern/
/t-1534/
/thread-can-we-customize-the-url-pattern-1534/
etc.

Maintaining IDs is not a goal of an importer. 301s are a much better approach in general. If you require the IDs to be maintained, you'll need to modify the scripts (as you'd need to be modifying them to get the URLs to be the same anyway).
Agreed. No need at all to attempt to maintain the same IDs. Search engines do just fine with 301 redirects.
 

cedivad

Active member
#26
Agreed. No need at all to attempt to maintain the same IDs. Search engines do just fine with 301 redirects.
However, and not less important, have the same url structure (and ids) for many YEARS is a really strong seo point.

Anyway, i think what you proposed is what they did =)
 
F

Floris

Guest
#28
Another great reason to move to xenforo is so I can stop being a vbseo customer. This week alone (and despite my settings to not email me) I have received yet again unsolicited commercialized emails. I am glad "pretty urls" are in xenforo, I can't wait to convert.
 

Reeve of Shinra

Well-known member
#29
I like the way wordpress does it, having that kind of flexibility would be nice. Although, I do think it would be more complicated given the extra options a forum has over wordpress in some ways. vbseo does a good job at that imho.
 

Shamil

Well-known member
#30
Another great reason to move to xenforo is so I can stop being a vbseo customer. This week alone (and despite my settings to not email me) I have received yet again unsolicited commercialized emails. I am glad "pretty urls" are in xenforo, I can't wait to convert.
Really? I haven't :eek: