Change URL from navbar links
provotector
Joined: 2012-11-13
Posts: 9 |
Posted: Tue, 2012-11-13 01:50 |
I need to change the URL of the navbar links "register, log in and logout" to integrate gallery2 in my jfusion joomla site. ¿Hoy can I do this? I do not need to remove the links, only change the URL. Thanks. |
|
suprsidr
Joined: 2005-04-17
Posts: 8339 |
Posted: Tue, 2012-11-13 16:10 |
jfusion is a hack, use joomlaG2 instead - its a true integration. -s |
|
provotector
Joined: 2012-11-13
Posts: 9 |
Posted: Tue, 2012-11-13 22:16 |
I need to use Jfusion, beacuse I have another integrations in my site (elgg, phpbb3...etc) and the users are using jfusion to register. Not the common joomla registration sistem. How can I change the URLS of the navbar links??? |
|
suprsidr
Joined: 2005-04-17
Posts: 8339 |
Posted: Wed, 2012-11-14 00:23 |
look to /gallery2/modules/core/templates/blocks/local/SystemLinks.tpl <- copy the original here {if $link.text == 'Login'} // your login link here {else if $link.text == 'Register'} // your register link here {else} // regular link here {/if}
-s |
|
provotector
Joined: 2012-11-13
Posts: 9 |
Posted: Thu, 2012-11-15 21:06 |
In what part of Systemlinks.tpl I need to put this code? Tjanks. |
|
suprsidr
Joined: 2005-04-17
Posts: 8339 |
Posted: Thu, 2012-11-15 22:46 |
you'll have to edit the urls in attached -> rename and upload to /gallery2/modules/core/templates/blocks/local/SystemLinks.tpl -s |
|
provotector
Joined: 2012-11-13
Posts: 9 |
Posted: Fri, 2012-11-16 14:23 |
This is my actual Systemlinks.tpl and your trick, doesen't work for me. {* * $Revision: 16235 $ * Read this before changing templates! http://codex.gallery2.org/Gallery2:Editing_Templates *} {assign var="class" value=$class|replace:"SystemLinks":"SystemLink"} {assign var="order" value=$order|default:""|split} {assign var="othersAt" value=$othersAt|default:0} {assign var="othersAt" value=$othersAt-1} {assign var="separator" value=$separator|default:""} {capture name="SystemLinks"} {foreach from=$theme.systemLinks key=linkId item=link} {if !in_array($linkId, $order)} <span class="{$class}"> <a href="{g->url params=$link.params}">{$link.text}</a> </span> {$separator} {/if} {/foreach} {/capture} {foreach from=$order key=index item=linkId} {if $index==$othersAt} {assign var="SystemLinksShown" value=true} {$smarty.capture.SystemLinks} {/if} {if isset($theme.systemLinks[$linkId]) && $linkId != 'core.Login'} <span class="{$class}"> <a href="{g->url params=$theme.systemLinks[$linkId].params}">{$theme.systemLinks[$linkId].text}</a> </span> {$separator} {/if} {/foreach} {if !isset($SystemLinksShown)}{$smarty.capture.SystemLinks}{/if} {If $ link.text == 'Login'} <span class="{$class}"> <a href="http://www.google.es">LinkLog</a> </span> Else if {$ link.text == 'Register'} <span class="{$class}"> <a href="http://www.google.es">LinkReg</a> </span> {Else} <span class="{$class}"> <a href="http://www.google.es">LinkRegular</a> </span> {/ If} I put your code at the bottom of the file. Maybe this isn't the correct place? Thanks! |
|
suprsidr
Joined: 2005-04-17
Posts: 8339 |
Posted: Fri, 2012-11-16 14:32 |
wrong! -s |
|
provotector
Joined: 2012-11-13
Posts: 9 |
Posted: Sat, 2012-11-17 06:04 |
I make the changes and still doesen't work. My site URL is www.viurex.com/graffiti and the login link in the navbar is "iniciar Sesión" but this link is pointing to the default gallery login site, not to my own desired login site. |
|
provotector
Joined: 2012-11-13
Posts: 9 |
Posted: Sat, 2012-11-17 06:08 |
I'm clearing template cache in each edition. But still doesen't work. |
|
suprsidr
Joined: 2005-04-17
Posts: 8339 |
Posted: Sat, 2012-11-17 14:06 |
you would also have to change for your language -s |
|
provotector
Joined: 2012-11-13
Posts: 9 |
Posted: Sat, 2012-11-17 21:50 |
Doesen't work. Still showing the default URL. I tried with: {if $theme.systemLinks[$linkId].text == 'Iniciar Sesión'} Ando also tried with: {if $theme.systemLinks[$linkId].text == 'Iniciar Sesión'} I'm clearing both template and browser cache. How can I do? Please, you help me. You don't give up with me. We can find a solution |
|
suprsidr
Joined: 2005-04-17
Posts: 8339 |
Posted: Sat, 2012-11-17 22:21 |
lets try and make gallery translate for you -s |
|
provotector
Joined: 2012-11-13
Posts: 9 |
Posted: Sun, 2012-11-18 04:40 |
Not working. Maybe another option can be to remove the original "login" link, and add a new link with my own login URL. I checked theme.tpl (im usin gekko) and found this code, maybe helpful: <div id="gsNavBar" class="gcBorder1"> <div class="gbSystemLinks"> {g->block type="core.SystemLinks" order="core.SiteAdmin core.YourAccount core.Login core.Logout" separator="«" othersAt=4} {if !empty($theme.params.extraLink) && !empty($theme.params.extraLinkUrl)} <span class="block-core-SystemLink"> <a href="{$theme.params.extraLinkUrl}">{$theme.params.extraLink}</a> </span> {g->text text="«"} {/if} <span class="block-core-SystemLink"> <a href="javascript: toggleSidebar('sidebar')">{g->text text="Menu"}</a> </span> </div> How can I edit this for my purpose??? Thanks!!! |
|
suprsidr
Joined: 2005-04-17
Posts: 8339 |
Posted: Sun, 2012-11-18 05:08 |
feel free to remove or change what you like. -s |
|
provotector
Joined: 2012-11-13
Posts: 9 |
Posted: Mon, 2012-11-19 00:16 |
Yes, please, tell me the price. I need to change the registration and login/logout URLS. |
|