How can i change the color of the login link, i found some stuff in the forum but i didnt work. I'm using the color pack plugin, maybe it can be set there?
You will need to edit the css of the theme you are using. You will not be able to just edit the word "Login" as other bits of text have the same class.
You will have to edit a core file to change just the 'login" text.
But do i really need to install some tools? Isnt it just a bit of code to change?
floridave
Joined: 2003-12-22
Posts: 23886
Posted: Tue, 2008-01-08 22:45
Sure edit the css of the theme you are using. Use the tool to find what class you want to edit.
You are familiar with CSS right? If not the tool will be very very helpfull.
That is the easy way. I gave 2 options and you still have not told be what way you want to go.
Since you only want to change the code instead of learning how things are done,
save the below code as:
/gallery2/modules/core/templates/blocks/local/SystemLinks.tpl
changes made in bold for emphasizing what is changed.
{*
* $Revision: 15342 $
* If you want to customize this file, do not edit it directly since future upgrades
* may overwrite it. Instead, copy it into a new directory called "local" and edit that
* version. Gallery will look for that file first and use it if it exists.
*}
{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])}
<span class="{$class}">
{if $theme.systemLinks[$linkId].text == "Login"}<span class="bigfont">{/if}
<a href="{g->url
params=$theme.systemLinks[$linkId].params}">{$theme.systemLinks[$linkId].text}</a>
{if $theme.systemLinks[$linkId].text == "Login"}</span>{/if}
</span>
{$separator}
{/if}
{/foreach}
{if !isset($SystemLinksShown)}{$smarty.capture.SystemLinks}{/if}
{literal}
<style>
.bigfont a {
font-size: 25px;
color: red!important;
}
</style>
{/literal}
URL?
If you don't want to give out the url then send it in a PM.
Dave
schrecklich
Joined: 2008-01-03
Posts: 57
Posted: Tue, 2008-01-08 23:30
You are right, my error, since i renamed "Login" it couldnt work, just remembered and adjusted that. Fontsize works, but color doesnt..still the blue bottle.
schrecklich
Joined: 2008-01-03
Posts: 57
Posted: Tue, 2008-01-08 23:38
Color works too, its the color pack wich overwrites the settings from the systemlinks.tpl (just disabled it for testing). So i have to find a way to edit the color theme in a way only one item has a diffrent color. Maybe this code could work there too?
floridave
Joined: 2003-12-22
Posts: 23886
Posted: Tue, 2008-01-08 23:46
Add
.bigfont a {
font-size: 25px;
color: red!important;
}
to the bottom the the colorpack css. I suspect that the system links color is changed in the colorpack. If it is lower is _should_ override.
Posts: 23886
http://files.jnewland.com/firebug.mov
You will need to edit the css of the theme you are using. You will not be able to just edit the word "Login" as other bits of text have the same class.
You will have to edit a core file to change just the 'login" text.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 57
Wich one and how?
Posts: 23886
Which what? File or css deceleration? Use the tool that that suggested.
URL?
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 57
Whcih core file? And what tool are you talking abour?
Posts: 23886
@tool: firbug and firefox webbrowser.
@core file: gallery2/modules/core/templates/blocks/SystemLinks.tpl
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 57
But do i really need to install some tools? Isnt it just a bit of code to change?
Posts: 23886
Sure edit the css of the theme you are using. Use the tool to find what class you want to edit.
You are familiar with CSS right? If not the tool will be very very helpfull.
That is the easy way. I gave 2 options and you still have not told be what way you want to go.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 23886
Since you only want to change the code instead of learning how things are done,
save the below code as:
/gallery2/modules/core/templates/blocks/local/SystemLinks.tpl
changes made in bold for emphasizing what is changed.
{* * $Revision: 15342 $ * If you want to customize this file, do not edit it directly since future upgrades * may overwrite it. Instead, copy it into a new directory called "local" and edit that * version. Gallery will look for that file first and use it if it exists. *} {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])} <span class="{$class}"> {if $theme.systemLinks[$linkId].text == "Login"}<span class="bigfont">{/if} <a href="{g->url params=$theme.systemLinks[$linkId].params}">{$theme.systemLinks[$linkId].text}</a> {if $theme.systemLinks[$linkId].text == "Login"}</span>{/if} </span> {$separator} {/if} {/foreach} {if !isset($SystemLinksShown)}{$smarty.capture.SystemLinks}{/if} {literal} <style> .bigfont a { font-size: 25px; color: red!important; } </style> {/literal}Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 57
Seems not to work. Could the theme and colorpack settings overwrite the core stuff?
Posts: 23886
Works for me:
http://langleycom.com/gallery2/main.php
URL?
If you don't want to give out the url then send it in a PM.
Dave
Posts: 57
You are right, my error, since i renamed "Login" it couldnt work, just remembered and adjusted that. Fontsize works, but color doesnt..still the blue bottle.
Posts: 57
Color works too, its the color pack wich overwrites the settings from the systemlinks.tpl (just disabled it for testing). So i have to find a way to edit the color theme in a way only one item has a diffrent color. Maybe this code could work there too?
Posts: 23886
Add
.bigfont a { font-size: 25px; color: red!important; }to the bottom the the colorpack css. I suspect that the system links color is changed in the colorpack. If it is lower is _should_ override.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 57
No its not working, maybe its not possible if colorpacks are used.
Posts: 23886
url?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 57
Well i just got rid of the colorpack plugin, so this works fine, thank you very much.