Advertisement:

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

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #75 on: April 10, 2019, 12:02:07 am »
@Web-Media Thank you very much!

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #76 on: April 12, 2019, 12:44:02 am »
@Web-Media
Please help me to remove the "user-"
Thanks
« Last Edit: April 12, 2019, 01:01:33 am by Sophia_OS »

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #77 on: April 12, 2019, 10:47:52 am »
@Web-Media,

how can i check the public-profile without user- ?
« Last Edit: April 13, 2019, 02:16:47 am by Sophia_OS »

Web-Media

  • Sr. Member
  • ****
  • Posts: 450
  • Web
Re: public-profile url format
« Reply #78 on: April 12, 2019, 12:56:01 pm »
Don't alter the code i've sent you .
You are trying to achieve big things with simple logic and code lines .
This doesnt work like that .
Without 'user-' there is a different code logic begining with user registration ,user edit and so on .
You have to implement a complete strategy of url rewrite for all posible links
Yoursite/barcelona -> means barcelona is a region or a static page or a user
Yoursite/barcelona/barcelona -> region city
Yoursite/london -> possible user called london
If user is  your main interest other links cannot be used
You cannot rewrite all osclass code with a simple question like can you help me ?
First draw the big picture for your website and try to achieve it with simple steps taking into consideration the other steps you have to make .
In programming it is called DRY. Don't repeat yourself .
So building a plugin for urlrewrite yoursite/cristiano have to be script wide and to take into consideration all links combination for your website.
Y'll build this but takes time . Be patient.

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #79 on: April 12, 2019, 09:11:09 pm »
@Web-Media
But if you remember i had asked you yoursite.com/username and if its possible put $var as an option not as requirement.
Please put an option on plugin to remove (user-) or tell me how to do it!
Thank you!
« Last Edit: April 12, 2019, 09:15:47 pm by Sophia_OS »

Web-Media

  • Sr. Member
  • ****
  • Posts: 450
  • Web
Re: public-profile url format
« Reply #80 on: April 12, 2019, 11:03:05 pm »
Short answer .. yes you can by adding routes . But that depends on the number of users .  More users harder  and slower to match . Www.yoursite/london  it is a user called london a category called london  ot a city called london ?  You have to make sure that your user names do not match either cities in your database or category name . Thats the short version . The long version will take some hours to write the answer and weeks to think and  implement a new router inside  some routes
   that i've said 2 week ago .
 Do it yourself .  On user registration and user edit check that do not match region,city,category or page or any existent routes . Add routes with usernames

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #81 on: April 12, 2019, 11:55:16 pm »
@Web-Media
Yes i can check on username registration that checks all pages and locations before giving the username! Thanks you!
Now please explain more about adding routes with username! How can i start?

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #82 on: April 15, 2019, 09:03:42 pm »
@Web_media
on localhost it works very good,
but on server it doesn't work, why? it successfully redirects to Yoursite.com/user-cris but shows the content of 404 page! why?

Web-Media

  • Sr. Member
  • ****
  • Posts: 450
  • Web
Re: public-profile url format
« Reply #83 on: April 15, 2019, 09:09:29 pm »
Any errors on debug log ?
I'll check in my server setup

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #84 on: April 15, 2019, 09:39:54 pm »
Any errors on debug log ?
I'll check in my server setup

i put this code in config file, but did not see any error!
define('OSC_DEBUG', true) ;
« Last Edit: April 16, 2019, 03:04:59 am by Sophia_OS »

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #85 on: April 16, 2019, 06:45:50 am »
Did you find the issue?

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #86 on: April 17, 2019, 01:49:05 am »
@Web_media
Did you check it?

Web-Media

  • Sr. Member
  • ****
  • Posts: 450
  • Web
Re: public-profile url format
« Reply #87 on: April 17, 2019, 10:51:01 pm »
Did you change the variable from admin setings ?

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #88 on: April 17, 2019, 10:58:15 pm »
Did you change the variable from admin setings ?

Yes i changed it!
« Last Edit: April 17, 2019, 11:26:45 pm by Sophia_OS »

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 404
Re: public-profile url format
« Reply #89 on: April 17, 2019, 11:26:11 pm »
i changed it to "user", but still not working!
« Last Edit: April 17, 2019, 11:27:51 pm by Sophia_OS »