Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
CherryGirl69 Posted October 19, 2016 Posted October 19, 2016 I have added an item to the menu called "My Profile" I used the URL;- http://www.mysite.com/index.php?/profile/ to try to direct to it but it does not work. When I go to my own profile page I see my name after this URL but obviously I cannot use that for a menu members can use as I want them to go to their own profiles. What do I need to put at the end of the URL please?
Janyour Posted January 29, 2017 Posted January 29, 2017 hi, did you find a direct URL for profiles ? i am looking for the same thing.
Adriano Faria Posted January 29, 2017 Posted January 29, 2017 You can create a .php page (or something via Pages) and redirect to \IPS\Member::loggedIn()->url(). This will redirect to the profile of who clicked in the link. Of course you need to check if it isn't a guest.
Janyour Posted January 29, 2017 Posted January 29, 2017 Thanks Adriano, we have pages, can you epxlian more please ? Thats should be a native option in IP forums dont think so ?
Adriano Faria Posted January 29, 2017 Posted January 29, 2017 I'm on a mobile phone right now. Will try something later when I reach my PC.
Adriano Faria Posted January 29, 2017 Posted January 29, 2017 Using a page made on Pages app: Add a new page: Manual HTML In Page Filename use userprofile or any other name, except profile. It won't allow because profile already exists. Use in CONTENT: {{if \IPS\Member::loggedIn()->member_id}} {{$url = \IPS\Member::loggedIn()->url();}} {{\IPS\Output::i()->redirect( $url );}} {{endif}} In the Menu tab, enable Add to front navigation menu. Remove GUESTS from the page Permissions. My server is TOO slow, so don't bother. See it working: https://www.screencast.com/t/6BTKeG2p0
Janyour Posted January 29, 2017 Posted January 29, 2017 awesome, i'll test it on my website and tell you
CherryGirl69 Posted January 29, 2017 Author Posted January 29, 2017 I am still unsure how to add it to the menu, what is the URL please?
Adriano Faria Posted January 29, 2017 Posted January 29, 2017 If you do as I said, you don't have to add it to the menu because Pages will add it for you: Quote In the Menu tab, enable Add to front navigation menu. Anyway, the URL will be http://www.yourdomain.com/index.php?/userprofile/
CherryGirl69 Posted January 29, 2017 Author Posted January 29, 2017 Thank you, I could not see the Menu Tab, Add to front navigation menu. I added the URL in the Add New Menu Item. Thank you again
CherryGirl69 Posted January 30, 2017 Author Posted January 30, 2017 I was just playing with the Pages and did Add New Page again and this time there was the Menu Tab. It was not there when I made the Profile page before.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.