How to link a PHP variable to an image? (to create a Profile button)
5 posters
Page 1 of 1
How to link a PHP variable to an image? (to create a Profile button)
I'm currently working on a navbar... and what really bugs me is the fact that the 'Profile' link on the default navbar, actually links to the 'Edit Profile' page... and in the edit profile page, we have an option to see our profiles
If anything, the link has to be to our profiles, and in our profiles pages, there should be a link to edit the profile xP
Anyways, I realized the PHP variable USERLINK gives each user a direct link to their actual profile... but there are a couple of problems in adding this to the navbar...
1. Some templates don't accept this PHP variable.. apparently
2. My navbar is made of images and i truthfully have no idea how to link this variable to an image to create a button xD
Wondering if anyone has any ideas on the matter..
Thank you in advance
If anything, the link has to be to our profiles, and in our profiles pages, there should be a link to edit the profile xP
Anyways, I realized the PHP variable USERLINK gives each user a direct link to their actual profile... but there are a couple of problems in adding this to the navbar...
1. Some templates don't accept this PHP variable.. apparently
2. My navbar is made of images and i truthfully have no idea how to link this variable to an image to create a button xD
Wondering if anyone has any ideas on the matter..
Thank you in advance
Re: How to link a PHP variable to an image? (to create a Profile button)
I don't know what you mean, but this is what I did because it doesn't redirect to the profile, I made a button with the writing User CP (User Control Panel), and made that the image. So when users click it, they expect to be at a edit profile page XD
mgt98- Forumember
- Posts : 344
Reputation : 45
Language : English
Re: How to link a PHP variable to an image? (to create a Profile button)
Thanks Dion... I think I understand... but it's still not working... xP
Anything wrong with the code I'm using?
I'm using it in the profile_add_body template for profiles....
Also if I were to apply an image, where does the img tags go?
Thank you again
(Awesome site btw)
Anything wrong with the code I'm using?
- Code:
<span id=unl>{USERLINK}</span><script src="http://yourjavascript.com/82932161441/userlink.js" type="text/javascript"></script>
I'm using it in the profile_add_body template for profiles....
Also if I were to apply an image, where does the img tags go?
Thank you again
(Awesome site btw)
Re: How to link a PHP variable to an image? (to create a Profile button)
here is what i do,
1) Go to Display>Headers & Navigation
2) Make a customized menu
3) Put the title as Profile2 or whatever,insert your Picture for the profile,insert the text,and insert the url you want to go to e.g. /forum
4) Create it
5) Push the up arrow until its below Profile
6) Go to Display>Pics management
7) Clear the field for Edit your profile and save
Now when you go to your forum you will have that custom link that says profile and it will direct you to your profile
1) Go to Display>Headers & Navigation
2) Make a customized menu
3) Put the title as Profile2 or whatever,insert your Picture for the profile,insert the text,and insert the url you want to go to e.g. /forum
4) Create it
5) Push the up arrow until its below Profile
6) Go to Display>Pics management
7) Clear the field for Edit your profile and save
Now when you go to your forum you will have that custom link that says profile and it will direct you to your profile
Re: How to link a PHP variable to an image? (to create a Profile button)
So, what did you put as the link?
mgt98- Forumember
- Posts : 344
Reputation : 45
Language : English
Re: How to link a PHP variable to an image? (to create a Profile button)
SC__Programmer wrote:here is what i do,
1) Go to Display>Headers & Navigation
2) Make a customized menu
3) Put the title as Profile2 or whatever,insert your Picture for the profile,insert the text,and insert the url you want to go to e.g. /forum
4) Create it
5) Push the up arrow until its below Profile
6) Go to Display>Pics management
7) Clear the field for Edit your profile and save
Now when you go to your forum you will have that custom link that says profile and it will direct you to your profile
Thanks a bunch
Although I've already tried that xD
And like mgt98 said, what did you put as the link? There's a different link for every profile... only a PHP variable would work... I think
Thanks for the help anyways ^^
Re: How to link a PHP variable to an image? (to create a Profile button)
http://diondesigns.forumotion.com/t440-
The second code there should work...
You can easily create a custom element, and append it to your navigation...
Something like this:
The second code there should work...
You can easily create a custom element, and append it to your navigation...
Something like this:
- Code:
$(function() {
var uid = document.getElementById('uid').innerHTML;
if (uid !=-1) {
var x = $('a.mainmenu[href*="/profile?mode=editprofile"]')[0];
x.href = '/u'+ uid;
x.innerHTML = 'My profile';
}
});
Saxaca- Forumember
- Posts : 539
Reputation : 26
Language : Markup.
Re: How to link a PHP variable to an image? (to create a Profile button)
I hate making nav. bars. I always mess up.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum