How to disable picture button after click? I'm new at Drupal CMS and programming at all, but I'm trying to find my way to solve this problem.Unfortunately unsuccesful for now.
I've installed Drupal 7.5 and Multipurpose theme which has social icons to redirect to facebook,twitter and etc.In theme settings there is an option to paste link with profile.I wanted to tweak their function a bit but I'm stuck with the code int the page.tpl.php file.
What I'm trying to do is basicly to check if the user is logged in, and if he is and a link was given in the setting of the theme to redirect to the social profile.The problem occurs when the user presses the button twice or more because the link copies over and over instead of refresh...for example: 1 click: https://www.facebook.com/user and on the 2 click becomes: https://www.facebook.com/user/user and so on.
The code:

 &lt;?php if (!$logged_in) : ?&gt;
      &lt;?php if ($twitter_url): ?&gt;&lt;li&gt;
        &lt;a title="&lt;?php print $site_name; ?&gt; in Twitter" href="&lt;?php print $twitter_url; ?&gt;"&gt;&lt;img alt="Twitter" src="&lt;?php print base_path() . drupal_get_path('theme', 'multipurpose') . '/images/social/twitter.png'; ?&gt;"&gt; &lt;/a&gt; &lt;?php endif; ?&gt;
      &lt;/li&gt;&lt;?php endif; ?&gt;


So the question is how can I disable the button(become inactive not hidden) after one click or is there any other approach to solve this problem?
Thank you!
The link needs a slash in front of it:

/user/login

instead of:

user/login

Logout would be:

/user/logout

You need to use relative paths or you will continue encountering this behavior. A better way would be to send the variables to your template(s) via the appropriate preprocess function, and use the l() function to create links.