Support

  1. admin
  2. General
  3. Sunday, December 18 2016, 05:57 PM
Hi, in Easy Profile I added a new field called "Company" (alias: company). Is it possible to have an URL that after /profile/ automatically take the id and the company name?

Example:
http://www.example.com/profile/id-one-example-company (with - and not with .)
http://www.example.com/profile/id-yellow-company
http://www.example.com/profile/id-three-brothers-company
http://www.example.com/profile/id-another-example-company

So if the user change the name of the "Company" automatically changes the url taking the same id (of course). Thank You!
admin Accepted Answer
Admin
Hi,
not natively, to do this you can change routing by customize file /component/com_jsn/router.php.

NOTE:
1. This require PHP and Joomla dev knowledges, router.php is a common component file required by Joomla to create friendly URLs
2. You need to redo changes on each Easy Profile update

FUTURE?
Joomla 3.7 will come with a new routing system (it will be compatible with old router.php). Anyway, I think that customize URLs with custom fields values is a good feature, but due to coming Joomla 3.7 we prefer to wait and study the new routing system before implement something like this.
  1. more than a month ago
  2. General
  3. # 1
admin Accepted Answer
Admin
I have no competence to modify the file router.php

If you can help me, well :), or in any case "inevitably" I have to wait for the Joomla 3.7 release and in any case always ask you how to do this. Thank you ;(
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Hi,
normally we does not do custom works, but this is something of very simple for us.

so, try to replace router.php with attached files (unzip first)

it should works like so:
- if "company" field is filled then link will be something like: http://www.example.com/profile/ID-COMPANYVALUE
- if "company" field is not filled then link will be something like: http://www.example.com/profile/ID-USERNAME

NOTE: ID of user is required into URL because otherwise you can have duplicates.
NOTE 2: When you upgrade Easy Profile then you need to replace again router.php.
NOTE 3: This router.php will works if alias of field is "company"

I hope it works, unfortunately I have not tested much.
Attachments (1)
  1. more than a month ago
  2. General
  3. # 3
admin Accepted Answer
Admin
Thank you, I appreciate it very, very much! I noticed that i a user is login see an clean url, but if an user isn't loged see a url completely different and moreover with a strange part final addition (in bold): http://example.com/component/jsn/id-yellow-company?Itemid=

Is it normal?
  1. more than a month ago
  2. General
  3. # 4
admin Accepted Answer
Admin
Hi,
yes, this is normal.

Probably you have set menu item "profile" access to "Registered", so guest users can't access to links like http://example.com/profile/id-yellow-company

To solve you need to set this menu item access to "Public".

If you do not want to show this menu item in your menu then you can move this menu item in another menu (hidden) and create an alias for "profile" in main menu with Access to Registered:
Example:
- Main Menu
- - Home
- - .....
- - Profile - menu item of type System Links->Menu Item Alias - alias of "profile" menu item - Access: Registered
- - .....

- Hidden Menu
- - Profile (alias: profile) - menu item of type Easy Profile->User Profile
  1. more than a month ago
  2. General
  3. # 5
admin Accepted Answer
Admin
You guys are amazing!!! I will continue to be for years a pro faithful user :D
  1. more than a month ago
  2. General
  3. # 6
admin Accepted Answer
Admin
Salve,

in merito alla sostituzione del file router che MOLTO gentilmente mi avete fornito qualche post su, quando oggi ho provveduto a sostituirlo, in seguito all'aggiornamento della versione: il sito non si avvia (error).

Con l'occasione vorrei chiedere un'info aggiuntiva. In seguito all'aggiornamento del router nativo di Joomla annunciato per la versione (forse) 3.8, ci saranno problemi? In quanto come da voi scritto, per gli utenti è necessario l'ID per evitare problemi con i doppioni (omonimi)?

Grazie
  1. more than a month ago
  2. General
  3. # 7
admin Accepted Answer
Admin
Ciao,
in merito alla sostituzione del file router che MOLTO gentilmente mi avete fornito qualche post su, quando oggi ho provveduto a sostituirlo, in seguito all'aggiornamento della versione: il sito non si avvia (error).
Ti chiedo cortesemente di controllare nel log PHP quale sia l'errore specifico...ho appena provato questo file anche su Joomla 3.8 beta4 e funziona perfettamente.


Con l'occasione vorrei chiedere un'info aggiuntiva. In seguito all'aggiornamento del router nativo di Joomla annunciato per la versione (forse) 3.8, ci saranno problemi? In quanto come da voi scritto, per gli utenti è necessario l'ID per evitare problemi con i doppioni (omonimi)?
Normalmente Easy Profile utilizza gli username (senza ID), quindi per certi versi l'innovazione portata dal nuovo sistema di routing di Joomla 3.8 è un qualcosa che Easy Profile già faceva con le versioni precedenti di Joomla (questo perché comunque il nome utente è sempre univoco).
Ovviamente per motivi di privacy qualche utente ci ha richiesto di utilizzare gli ID al posto degli username, così abbiamo creato questa opzione (Componenti->Easy Profile->Opzioni->SEF); quindi puoi scegliere se utilizzare gli username o gli ID per creare l'URL.
Tuttavia il tuo caso è differente perché avevi la necessità di utilizzare un campo personalizzato ("company" ), quindi ti abbiamo fornito questo file che utilizza gli ID aggiungendo il campo personalizzato o il nome utente. Quando farai l'upgrade a Joomla 3.8 funzionerà nella stessa maniera.
  1. more than a month ago
  2. General
  3. # 8
admin Accepted Answer
Admin
Confermo che funziona. Ho sovrascritto via ftp il file e funziona perfettamente, molto probabilmente la prima volta non si è salvato correttamente; chiedo scusa per l'impegno vs. e per la figura da pirla che non ho provato prima di scrivere...

Ancora una volta non so come ringraziarvi. Quando ho acquistato la prima volta, non avete trovato solo un cliente, ma molto di più.. Grazie!
  1. more than a month ago
  2. General
  3. # 9
fadege Accepted Answer
Content Protected
  1. more than a month ago
  2. General
  3. # 10
admin Accepted Answer
Admin
Ciao,
il link generato dipende dal Routing di Joomla che funziona sulla base della struttura delle voce di menu, dovresti creare una voce di menu del tipo Easy Profile->User Profile (Profilo utente). Se questa voce di menu avrà un alias chiamato "profilo" allora l'URL generato diventerà https://xxxxxxx.it/profilo/username
  1. more than a month ago
  2. General
  3. # 11
fadege Accepted Answer
Fantastico! Grazie
  1. more than a month ago
  2. General
  3. # 12
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Online

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.