1

Topic: Login and Signup code

Im trying to understand the code below and mod it to replace with a login and signup button please guide me.


code:

<ul>
<li>{anchor:url1="account/login/",url2="index.php?m=account_login",name="core|menu_login",pre="<span>",pro="</span>"} </li>
<li>{anchor:url1="account/register/",url2="index.php?m=account_register",name="core|menu_register" ,pre="<span>",pro="</span>"}</li>
</ul>

where do i add the img src code at above?

thanks..

2

Re: Login and Signup code

well thats the code for the signup and login page links
if you want to use an image try something like this:

<a href="index.php?m=account_login"><img src="myimage"></a>

That will go to the signup page when the image is clicked

3

Re: Login and Signup code

thanks misulicus

but i beleive the code do more then that.

wonder whats this code represent?

1. name="core|menu_login"

2. pre="<span>",pro="</span>

why span is inside the {} ,

thanks

4

Re: Login and Signup code

"core|menu_login" tells the system which text to display.

the 'core' part means /includes/languages/-your_language-/lang.core.php

'menu_login' tells the system where in lang.core.php to look.

This is useful if your page offers more than one language.

5

Re: Login and Signup code

the entire code is a call to an extension called : ext.anchor.php
and all those vars are just parameters it passes to the extension

1. Means inside lang.core.php, the value for: menu_login will be shown
2. it means the anchor text (in this case the contents of name) will be put between <span> and </span>

Its a fancier way of saying:

<a href="http://www.site.com/index.php?m=account_login" title="Login"><span>Login</span></a>
if you dont have friendly URL enabled, or

<a href="http://www.site.com/account/login/" title="Login"><span>Login</span></a>
if you do

6

Re: Login and Signup code

ok.. let me share what happen when we use this code

<a href="index.php?m=account_login"><img src="myimage"></a>


yes. we get LOGIN with a image BUT its not SEO url...

thanks for sharing.

7

Re: Login and Signup code

Back to original question... so how do i add the image to below code with seo url

<ul>
<li>{anchor:url1="account/login/",url2="index.php?m=account_login",name="core|menu_login",pre="<span>",pro="</span>"} </li>
<li>{anchor:url1="account/register/",url2="index.php?m=account_register",name="core|menu_register" ,pre="<span>",pro="</span>"}</li>
</ul>

thanks.!

its a css job i guess. maybe ill try all method i know of.. covering with a DIV or Class for the LI

8

Re: Login and Signup code

ok try this:

<a href="{virtual_path}{ifelse:settings.fancy_urls,"1","account/login/","index.php?m=account_login"}" title="{lang:"core","menu_login"}"><img src="YOURIMAGE" border="0"</a>