The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Links profile

3 posters

Go down

Links profile Empty Links profile

Post by sun1994 October 2nd 2012, 9:53 am

Hai

I need the url from the view your profile link and the edit character sheet link.
I can't just put standard links in the href, because it's different for every member. :/
sun1994
sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Links profile Empty Re: Links profile

Post by Arrow October 2nd 2012, 11:58 am

The Edit Profile link is like this:

Code:
http://your sites url/profile?mode=editprofile

I can't remember the exact link for view profile but you can do something along the lines of a userlink. to do that all you need to is put this where you need it.

{"USERLINK"}

without the quote marks, this will then display the username who is logged on but it is also a link to their view profile page...I will try and remember the exact link and post it when I do.


Just remembered the link and tested it on my site.

Code:
HTTP:/Your Sites URL//profile?mode=viewprofile&u={*USERNAME}

just remove the * before username.
Arrow
Arrow
Forumember

Male Posts : 121
Reputation : 4
Language : English

http://www.lastworldrpg.com

Back to top Go down

Links profile Empty Re: Links profile

Post by sun1994 October 2nd 2012, 4:53 pm

Thanks for your help! I putted the link in the template, but when I click on it it says:
'sorry, but that user doesn't exists.'

This is the code I used:
Code:
<a href="/profile?mode=viewprofile&u=Using php in posts is called being a smart [Language]... Stop it">Profile</a>

Is there something I did wrong? Or don't the templates support the username variable?
sun1994
sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Links profile Empty Re: Links profile

Post by Arrow October 2nd 2012, 5:32 pm

From what I can tell you've done the correct thing, but sadly I do not use templates so I can not tell you if it supports it or not. What you can do is use a widget and that should show the links fine and test it to see if it is just the templates!
Arrow
Arrow
Forumember

Male Posts : 121
Reputation : 4
Language : English

http://www.lastworldrpg.com

Back to top Go down

Links profile Empty Re: Links profile

Post by sun1994 October 12th 2012, 5:55 pm

Thanks for the link, but when I put this in the code:
Code:
<a href="/profile?mode=viewprofile&u=<span class="USERNAME"></span>">Profile</a>

it obviously doesn't work. xD
sun1994
sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Links profile Empty Re: Links profile

Post by sun1994 October 14th 2012, 10:00 am

yes ^^
sun1994
sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Links profile Empty Re: Links profile

Post by LGforum October 16th 2012, 11:35 am

Well it won't work in the templates even using that...
A span element can't be put inside the href attribute of a link...

The {USERLINK*} variable leads to the user profile... so just use that using the tutorial.
Follow the tutorial and put <span class="USERLINK"></span> in the template.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Links profile Empty Re: Links profile

Post by sun1994 October 17th 2012, 1:56 pm

It worked, thanks. Very Happy
And can you also help me with a link for the character sheet?
sun1994
sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Links profile Empty Re: Links profile

Post by sun1994 November 2nd 2012, 10:06 pm

/rpg_sheet_edit?u=1
sun1994
sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Links profile Empty Re: Links profile

Post by LGforum November 3rd 2012, 12:13 am

That one would require a lot more work in order to retrieve the user ID. It would be much easier to display it in an announcement or widget or somewhere, than a HTML page.

Would that be okay?
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Links profile Empty Re: Links profile

Post by sun1994 November 5th 2012, 9:16 pm

I'm afraid not. You see, the link is placed in an navigation bar I made in the overall_header template. So I can't put it in a widget or something. :/

But.. if it's too much work to explain I think I can left it out.
sun1994
sun1994
Forumember

Posts : 81
Reputation : 1
Language : dutch

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum