• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] permalinks

Started by ronyhage,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ronyhageTopic starter

Hi,

I changed this: (/profile/:name/:id/:section)
to
this: (/:name)

I want the user to have their direct link for example: www.website.com/mir-hia (this will be easier to share with their people)

so when I changed the above. the link worked, but the page is 404 error (check attached)

How can I fix the 404 error keeping just /:name?
  •  

PHPVibe A.

The permalinks don't work without an id.

ronyhageTopic starter

Quote from: Alexander on
The permalinks don't work without an id.

sorry for asking, but what do you mean by an ID? how do I create an ID for each user?
  •  

TigerClaw

id is the number associated with the user inside the phpvibe database. Permalink without an user id will not work as said by Alexander. You will always need to include the id in the url.
  •  

vlmal

:name is associated to the `name` column in the database table `users`, :id is associated to `id` in the same table.

Users can change their name but not their id, which is why an id is required in the url -- it prevents duplicate names, whereas each user has their own unique id so no problem with duplicates.

However, there is also a `username` column in the `users` table, which is a lowercase version of the `name` and cannot be changed.

e.g. if a user signs up with the name "Katies channel" for the name, it will convert to "katies-channel" in the username column.
This means that there is possibly a way to get usernames as url's.

The first step would be to enable a new permalink phrase ":username".

I can help do this as I too would like this option made available.

If any of the admins can point me in the right direction I'll start.
  •  

Similar topics (7)