TheCripZone SMF Themes Site

All Things Public => Theme Support => Topic started by: drvanitus on Feb 04, 11, 11:45:50 PM

Title: small problem, should be easy for pros
Post by: drvanitus on Feb 04, 11, 11:45:50 PM

I installed "another link tree" mod (http://custom.simplemachines.org/mods/index.php?mod=2559 )
After some tweaking and help from the author finally got it to work.

Problem:
Top Navigation Tree (navigation links) are no longer bold and have changed colors.  The one on the bottom still looks as it should. See link below for screenshot.
http://img30.imageshack.us/img30/7375/navlink.jpg

This is the code for the new navigation tree...just need to add new color and make it bold lol.  I'm such a noob.

function anotherlinktree()
{
    global $context, $settings, $options, $txt, $scripturl;
// display the user info panel
echo '

<table>
<tr>';
echo '
<td align="left" valign="middle">';
// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav-tree">';

echo '<img src="' . $settings['default_theme_url'] . '/images/folder_open.gif" alt="+" border="0" />&nbsp;';
// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];
if (($link_num == count($context['linktree']) - 1) && count($context['linktree'])>1)
echo '<br />
<img src="' . $settings['default_theme_url'] . '/images/linktree_side.gif" alt="|-" border="0" />&nbsp;';

// Show the link, including a URL if it should have one.
echo '', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav-tree">' . $tree['name'] . '</a>' : $tree['name'], '';


      // Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
// Don't show a separator for the last one.
if ($link_num < count($context['linktree']) - 2)
                                                                echo '&nbsp;&raquo;&nbsp;';
}
echo '</span>
    </td>

</tr>

</table>';

}


I'm really really tired, I spent good 3 hours trying to change just the color of the links and make it bold, and I give up :(.  The color I want it DarkOrange, like the navigation tree at the bottom of the page.

I've attached index.template.php just in case that's needed.

Thanks.



[attachment deleted by admin]
Title: Re: small problem, should be easy for pros
Post by: Maxx on Feb 05, 11, 12:15:34 PM
Sorry,

But this site is for Crip theme support , not for mod support , if you plan to install mods please visit the Mod site for instruction before to apply any of these things to you site and always back up first!

regards,
maxx
Title: Re: small problem, should be easy for pros
Post by: drvanitus on Feb 05, 11, 01:02:28 PM
really? did you even read the whole thread? :(

Here, i'll repost the thread leaving out the mod part, it has nothing to do with mod at this point
QuoteTop Navigation Tree (navigation links) are no longer bold and have changed colors.  The one on the bottom still looks as it should. See link below for screenshot.
http://img30.imageshack.us/img30/7375/navlink.jpg
Title: Re: small problem, should be easy for pros
Post by: Maxx on Feb 05, 11, 01:40:04 PM
OK,

Looks like some thing in a CSS sheet, did the link tree mod come with it's own CSS file?
If so you will need to add that css to your theme css folder. and then adjust the colors and boldness need with that sheet only. if it did not come with it own css sheet them we'll need to dig deeper into you index.css from the them it's self, but this should have change unless some one did so manually!

I can go in to you theme, with temp admin permission and change things if you like or at least try find out what has happened. if you want you can PM me you temp pass information.

And please note every time the SMF updates these things will change and you may have problems again, this why we do not recommend too many 3rd party mods, hope you understand!

Oh and by the way your site is looking good!!

regards,
Maxx
Title: Re: small problem, should be easy for pros
Post by: drvanitus on Feb 05, 11, 01:52:03 PM
Thanks!!

I just hardcoded the change by adding
style="color:#EA7500; font-size:0.90em; font-weight:bold" to the line below
echo '', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav-tree">' . $tree['name'] . '</a>' : $tree['name'], '';

so it looks like
echo '', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '"style="color:#EA7500; font-size:0.90em; font-weight:bold">' . $tree['name'] . '</a>' : $tree['name'], '';

That info I took from theme's css file as I can't seem to find mod's css (if there is one).  I'm sure I could have used some function to recall that info directly from the theme's css file, I'm just too incompetent to know how to do that for now lol.  Need to find me a CSS FOR DUMMIES book hehe.

And yeah, mods are bitch, once I'm done setting everything up I don't think I'll ever upgrade my SMF unless the sky starts falling.

Cheers man.
Title: Re: small problem, should be easy for pros
Post by: Maxx on Feb 05, 11, 01:57:13 PM
OK I looked at the Mod script and it uses the Theme's CSS, so if you hard code and text color? you will need to remove that... please make a back up copy ( I'm sure you know)!

If you hard code a color in the PHP coding it will conflict with the themes Index.css> so let's start there!

then let me know what happens

So change that back... and then I'll be looking for the css code you need to work with if not corrected by that!

regards,
maxx
Title: Re: small problem, should be easy for pros
Post by: Maxx on Feb 05, 11, 02:07:25 PM
By the way what version of SMF are you using and does match you theme version?

Just double checking things at the bottom of your page it does not have the SMF version?

regards,
Maxx
Title: Re: small problem, should be easy for pros
Post by: drvanitus on Feb 05, 11, 02:14:09 PM
reverted back and sent you a PM with admin login.  And this is SMF 2.0 RC4.

I really really appreciate your help.
Title: Re: small problem, should be easy for pros
Post by: Maxx on Feb 05, 11, 02:31:39 PM
Ok after you remove the color code you placed in the Template file:

You will need to open your index.css file from your CSS folder and or from your Current theme setting in you admin control panel:

U should find some code like this to edit and change thes link tree colors and hover variations:

index.css
/* the linktree */
ul.linktree
{
   clear: both;
   width: 100%;
   list-style: none;
   margin: 0;
   padding: 0em 0.5em 0.5em 0.5em;
   overflow: hidden;
}
ul.linktree li
{
   float: left;
   padding: 0 0.5em 0 0;
   font-size: 0.8em;
}
ul.linktree li a
{
   color: #fff;
}
ul.linktree li a:hover
{
   color: #FFCF3A;
}
ul.linktree li span
{
   font-weight: bold;
}


hope this help, and it may very form one version to the other!

regards,
maxx
Title: Re: small problem, should be easy for pros
Post by: Maxx on Feb 05, 11, 03:05:27 PM
What browser are you using, and I matched the template to the "navigation_section" "class" but I would not recommend bold text will take up too much space, what color do you want the links EA7500??

regards,
Maxx
Title: Re: small problem, should be easy for pros
Post by: drvanitus on Feb 05, 11, 03:18:13 PM
correct
#EA7500 for the color.  I could live w/out the bold part. 

Oh yeah, and I use all browsers, Firefox + IE8 at home, Chrome + IE7 at work lol (at work right now...go doubleshifts...and overtime :P)
Title: Re: small problem, should be easy for pros
Post by: Crip on Feb 05, 11, 03:42:20 PM
firebug it -- screenshot of Bold?
Title: Re: small problem, should be easy for pros
Post by: drvanitus on Feb 05, 11, 03:45:02 PM
This is the screenshot.  Trying to make the upper tree look like the lower tree.

http://img30.imageshack.us/img30/7375/navlink.jpg
Title: Re: small problem, should be easy for pros
Post by: Maxx on Feb 05, 11, 04:06:58 PM
Crip the mod is not calling the style correctly, I will check this out later on my test site! and even tried to add a costume css, but no deal. the trouble is in the mod, i think.

regards,
Maxx
Title: Re: small problem, should be easy for pros
Post by: Crip on Feb 05, 11, 04:55:52 PM
we will check .. which mod?
Title: Re: small problem, should be easy for pros
Post by: Maxx on Feb 05, 11, 05:39:24 PM
Crip,

I'm still working on this with them and I think we getting close....it's seems it can not use the themes css, through it out of order! so I'm doing a work around.

also doing other stuff there to help out... I hope!

regards,
Maxx