The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to make a url based on Username?
QUESTION: How can I code a link to an external file such as a pdf where the member's username becomes part of the url so each link is unique to that user based on who is logged in. So when a user clicks the link they can download their file based on their username. When a different member is logged in they are taken to their file because the url will reflect their username instead...
Example: www.mydomain.com/files/username.pdf So the username portion of the url would be pulled from vbulletin. |
#2
|
|||
|
|||
The variable you want is $bbuserinfo[username]
Put this into the template where you want the link to appear: HTML Code:
<a href=" www.mydomain.com/files/$bbuserinfo[username].pdf">Get File</a> |
Благодарность от: | ||
tbworld |
#3
|
||||
|
||||
You can go one further
$vboptions[bburl]/files/$bbuserinfo[username].pdf In the future, should your url change, you wont have to update this again. |
#4
|
||||
|
||||
Okay I will try to work this out. I need to link a graphic with this kind of url...
Thanks for the help so far! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|