Advertisement:

Author Topic: public-profile url format  (Read 4493 times)

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 416
Re: public-profile url format
« Reply #15 on: March 25, 2019, 09:07:38 pm »
Or you can create a single route as new entry point of your website and  you've just create a new index controller .
From there you can define  a new url matching  for items categories regions cities and users  and use an external library as your main router.

This is really hard for me to write the code  :-\

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #16 on: March 25, 2019, 09:22:43 pm »
Hmmm you can also hook into
 osc_run_hook( 'init_user_non_secure' );  and (init_user ) hook to get the action  user id .... and redirect to a single user route.

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 416
Re: public-profile url format
« Reply #17 on: March 25, 2019, 09:29:50 pm »
Hmmm you can also hook into
 osc_run_hook( 'init_user_non_secure' );  and (init_user ) hook to get the action  user id .... and redirect to a single user route.
:-[ would you please write the code example!
« Last Edit: March 25, 2019, 09:31:55 pm by Sophia_OS »

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 416
« Last Edit: March 25, 2019, 09:42:25 pm by Sophia_OS »

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #19 on: March 25, 2019, 09:59:15 pm »
Change in the db rewrite_user_profile to users and you ll get
Yoursite /users/messi

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 416
Re: public-profile url format
« Reply #20 on: March 25, 2019, 10:09:59 pm »
Change in the db rewrite_user_profile to users and you ll get
Yoursite /users/messi

Yes your right. That doesn't solve the problem!

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #21 on: March 25, 2019, 10:36:38 pm »
And you will get another problem
How about
Yoursite.com/cristiano-ronaldo/videos
Yoursite.com/cristiano-ronaldo/videos/2
Yoursite.com/cristiano-ronaldo/videos/2/asc
Yoursite.com/cristiano-ronaldo/news ....
Keeping the
https://demo.osclass.org/general/user/profile/cristiano?iPage=2
Is the best options
Because you keep options for further plugins for users
Like
https://demo.osclass.org/general/user/videos/cristiano?iPage=2
https://demo.osclass.org/general/videos/cristiano/Page=2
https://demo.osclass.org/general/user/news/cristiano?iPage=2

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #23 on: March 26, 2019, 12:30:32 am »
You can use the main controller  to display the user profile page
Just  hook into init_main  to see if arguments in $_SERVER['REQUEST_URI'] and  display main page or user profile page if  arguments username ,items per page ,ipage

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 416
Re: public-profile url format
« Reply #24 on: March 26, 2019, 12:51:14 am »
And you will get another problem
How about
Yoursite.com/cristiano-ronaldo/videos
Yoursite.com/cristiano-ronaldo/videos/2
Yoursite.com/cristiano-ronaldo/videos/2/asc
Yoursite.com/cristiano-ronaldo/news ....
Keeping the
https://demo.osclass.org/general/user/profile/cristiano?iPage=2
Is the best options
Because you keep options for further plugins for users
Like
https://demo.osclass.org/general/user/videos/cristiano?iPage=2
https://demo.osclass.org/general/videos/cristiano/Page=2
https://demo.osclass.org/general/user/news/cristiano?iPage=2

I have only one category.
And here for user profile i just put (profile)
Dashboard → Settings → Permalinks → User profile: profile
Now my public-profile format is: mysite.com/profile/user-name
And im trying to remove "profile" from the url to be: mysite.com/user-name

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #25 on: March 26, 2019, 12:53:11 am »
https ://yoursite/?cristiano
https ://yoursite/?cristiano-ronaldo/10/6
Match your needs ?

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 416
Re: public-profile url format
« Reply #26 on: March 26, 2019, 12:53:55 am »

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #27 on: March 26, 2019, 12:56:20 am »
there is no category name its just osclass demo setup https://demo.osclass.org/jobboard/
we are talking about this
https ://yoursite/?cristiano
https ://yoursite/?cristiano-ronaldo/10/6

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 416
Re: public-profile url format
« Reply #28 on: March 26, 2019, 12:56:30 am »
https ://yoursite/?cristiano
https ://yoursite/?cristiano-ronaldo/10/6
Match your needs ?

Would you please remove "?" From the url!

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 416
Re: public-profile url format
« Reply #29 on: March 26, 2019, 12:58:50 am »
there is no category name its just osclass demo setup https://demo.osclass.org/jobboard/
we are talking about this
https ://yoursite/?cristiano
https ://yoursite/?cristiano-ronaldo/10/6

Got you! This is good if you remove "?" from the url!