Gossamer Forum
Home : Products : Links 2.0 : Customization :

Style Yhaoo home

(Page 1 of 3)
> >
Quote Reply
Style Yhaoo home
Hi

you can help me insert the subcategories in my home page as Yhaoo.
Which pages must I modify?

thanks
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
The code is here:

http://www.gossamer-threads.com/...i?post=234274#234274


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
this ok

# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<font face="Arial, Helvetica, sans-serif" size="-1"><a class="link" href="$url"><b>$category_name</b></a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<img src="http://www.nauticalink.it/new.gif">| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span class="descript"><font face="Arial" size="-1" color="Black">$description</font> </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
if ($#{$subcategories{$subcat}} >= 0) {
$v = 0;
$output .= qq~<BR><SPAN CLASS="xsmall">~;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) {$subcategory_name = &build_clean($1);}
else {$subcategory_name = &build_clean($subcatsub);}
$output .= qq~<A HREF="$suburl">$subcategory_name</A>~ if ($v <= 5);
$output .= qq~<font color="#000000">...</font>~ if ($v eq "5");
$output .= qq~<font color="#000000">, </font>~ if ($v ne $#{$subcategories{$subcat}} && $v <= 5);
$v++;
}
$output .= qq~</SPAN>~;
}
$output .= qq|<dd><span class="descript">$description </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}
}
# Don't forget to end the unordered list.



after thing I must modify and what lines

THANKS
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
Did you re-build (Build All)? The code looks fine...


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
OK Have Of the Problems In Visualizing The LINK See Here http://lnx.nauticalink.it/links /


you see example
http://boatdesign.net/directory/
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it

Last edited by:

blecchi: Nov 14, 2004, 2:14 PM
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
 Are you using CSS? Try this (just paste in place of your code):

# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<font face="Arial, Helvetica, sans-serif" size="-1"><a class="link" href="$url"><b>$category_name</b></a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<img src="http://www.nauticalink.it/new.gif">| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|<span class="descript"><font face="Arial" size="-1" color="Black">$description</font> </span>| if (!($description =~ /^[\s\n]*$/));
if ($#{$subcategories{$subcat}} >= 0) {
$v = 0;
$output .= qq~<BR>~;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) {$subcategory_name = &build_clean($1);}
else {$subcategory_name = &build_clean($subcatsub);}
$output .= qq~<A HREF="$suburl">$subcategory_name</A>~ if ($v <= 5);
$output .= qq~<font color="#000000">...</font>~ if ($v eq "5");
$output .= qq~<font color="#000000">, </font>~ if ($v ne $#{$subcategories{$subcat}} && $v <= 5);
$v++;
}
$output .= qq~<BR>~;
}
$output .= qq|<BR>\n|;
}
}
# Don't forget to end the unordered list.


I have just edited this post, and removed the # from this line:

#$output .= qq|<span class="descript"><font face="Arial" size="-1" color="Black">$description</font> </span>| if (!($description =~ /^[\s\n]*$/));

Go through your categories and remove the descriptions that list what the subcats are, that is not needed now.

Accessori[/b] (12) Vela-Coperta Sotto-Coperta-Ormeggio-Eliche-Sistemi di Guida
Coperta, Ormeggio, Sistemi di Guida, Sotto Coperta, Tappezzeria Navale, Vela...


But, I noticed that some of your descriptions were needed, maybe. I don't read Italian, but...

Scambio Banner[/b] (14) Tutti i siti registrati nel circuito di Scambio Banner dal 8-8-2004


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Nov 14, 2004, 5:00 PM
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
Edit this line to include breaks:

$output .= qq|<br><span class="descript"><font face="Arial" size="-1" color="Black">$description</font> </span><br>| if (!($description =~ /^[\s\n]*$/));


Leonard
aka PerlFlunkie
Post deleted by blecchi In reply to
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
I have inserted this code but and always equal

http://lnx.nauticalink.it/links/



# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<font face="Arial, Helvetica, sans-serif" size="-1"><a class="link" href="$url"><b>$category_name</b></a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<img src="http://www.nauticalink.it/new.gif">| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span class="descript"><font face="Arial" size="-1" color="Black">$description</font> </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
if ($#{$subcategories{$subcat}} >= 0) {
$v = 0;
$output .= qq~<BR><SPAN CLASS="xsmall">~;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) {$subcategory_name = &build_clean($1);}
else {$subcategory_name = &build_clean($subcatsub);}
$output .= qq~<A HREF="$suburl">$subcategory_name</A>~ if ($v <= 5);
$output .= qq~<font color="#000000">...</font>~ if ($v eq "5");
$output .= qq~<font color="#000000">, </font>~ if ($v ne $#{$subcategories{$subcat}} && $v <= 5);
$v++;
}
$output .= qq~</SPAN>~;
}
$output .= qq|<br><span class="descript"><font face="Arial" size="-1" color="Black">$description</font> </span><br>| if (!($description =~ /^[\s\n]*$/));
}
# Don't forget to end the unordered list..
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
Replace your code with the code from post #6 above. It has changes that should fix your problem. Replace everything from...

# Then we print out the name linked, new if it's new, and popular if its popular.

to

# Don't forget to end the unordered list..


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
this problem

http://lnx.nauticalink.it/.../admin/nph-build.cgi


This code online

# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<font face="Arial, Helvetica, sans-serif" size="-1"><a class="link" href="$url"><b>$category_name</b></a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<img src="http://www.nauticalink.it/new.gif">| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|<span class="descript"><font face="Arial" size="-1" color="Black">$description</font> </span>| if (!($description =~ /^[\s\n]*$/));
if ($#{$subcategories{$subcat}} >= 0) {
$v = 0;
$output .= qq~<BR>~;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) {$subcategory_name = &build_clean($1);}
else {$subcategory_name = &build_clean($subcatsub);}
$output .= qq~<A HREF="$suburl">$subcategory_name</A>~ if ($v <= 5);
$output .= qq~<font color="#000000">...</font>~ if ($v eq "5");
$output .= qq~<font color="#000000">, </font>~ if ($v ne $#{$subcategories{$subcat}} && $v <= 5);
$v++;
}
$output .= qq~<BR>~;
}
$output .= qq|<BR>\n|;
}
}
# Don't forget to end the unordered list..
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
The changes go in site_html_templates.pl. Are you getting an error message? If yes, copy it here. Your site still has the </dt><dd> tags, so I can tell that you are not using the code I posted above.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
Staggered (Auto) error

Error including libraries: Unmatched right curly bracket at /web/htdocs/www.nauticalink.it/home/cgi-bin/links/admin/site_html_templates.pl line 378, at end of line
syntax error at /web/htdocs/www.nauticalink.it/home/cgi-bin/links/admin/site_html_templates.pl line 378, near "}"
Compilation failed in require at nph-build.cgi line 33.

Make sure they exist, permissions are set properly, and paths are set correctly
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it

Last edited by:

blecchi: Nov 15, 2004, 11:54 AM
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
In site_html_templates, find the sub at the bottom of the file, named
sub site_html_print_cat. Replace the code that is there with this new code, using the beginning and ending #comments to locate what to replace. Remove the code you now have there, and replace it with this (copy and paste), then re-build:


# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<font face="Arial, Helvetica, sans-serif" size="-1"><a class="link" href="$url"><b>$category_name</b></a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<img src="http://www.nauticalink.it/new.gif">| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|<br><span class="descript"><font face="Arial" size="-1" color="Black">$description</font></span>| if (!($description =~ /^[\s\n]*$/));
$v = 0;
$output .= qq~<BR>~;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) {$subcategory_name = &build_clean($1);}
else {$subcategory_name = &build_clean($subcatsub);}
$output .= qq~<A HREF="$suburl">$subcategory_name</A>~ if ($v <= 5);
$output .= qq~<font color="#000000">...</font>~ if ($v eq "5");
$output .= qq~<font color="#000000">, </font>~ if ($v ne $#{$subcategories{$subcat}} && $v <= 5);
$v++;
}
$output .= qq~<BR>~;
}
$output .= qq|<BR>\n|;
}
# Don't forget to end the unordered list.



- Looks like I may have had an extra } at the end. If you get an error, let me know. If you had already pasted this code, now just remove the red bracket from your file:

}
$output .= qq|<BR>\n|;
}
}
# Don't forget to end the unordered list.



Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Nov 15, 2004, 11:59 AM
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
this code online


sub site_html_print_cat {
# --------------------------------------------------------
# This routine determines how the list of categories will look.
# We now use a table to split the category name up into two columns.
# For each category you can use the following variables:
#
# $url : The URL to go to that category
# $category_name : The category name with _ and / removed.
# $category_descriptions{$subcat}: The category description (if any).
# $numlinks : The number of links inside that category (and subcategories).
# $mod : The newest link inside of that category.
#
my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i);
my ($half) = int (($#subcat+2) / 2);
# Print Header.
$output = qq|<div class="margin"><table width="80%" border="0" cellspacing="0" cellpadding="0"><tr><td class="catlist" valign="top">\n|;
foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];
# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }
$numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];
# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</center></td><td class="catlist" valign="top"></center>\n|;
}
$i++;
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<font face="Arial, Helvetica, sans-serif" size="-1"><a class="link" href="$url"><b>$category_name</b></a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<img src="http://www.nauticalink.it/new.gif">| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|<br><span class="descript"><font face="Arial" size="-1" color="Black">$description</font></span>| if (!($description =~ /^[\s\n]*$/));
$v = 0;
$output .= qq~<BR>~;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) {$subcategory_name = &build_clean($1);}
else {$subcategory_name = &build_clean($subcatsub);}
$output .= qq~<A HREF="$suburl">$subcategory_name</A>~ if ($v <= 5);
$output .= qq~<font color="#000000">...</font>~ if ($v eq "5");
$output .= qq~<font color="#000000">, </font>~ if ($v ne $#{$subcategories{$subcat}} && $v <= 5);
$v++;
}
$output .= qq~<BR>~;
}
$output .= qq|<BR>\n|;
}
# Don't forget to end the unordered list.
$output .= "</td></tr></table>\n";
return $output;
}
sub site_html_topx {
# -------------------------------------------------------- #
This routine will build a topx insert. return &load_template ('topx.html', { topx_sort => &topx_sort, %rec, %globals } ); }

1;
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
If that's the code you're using, then I don't see how your page is showing this:

<small class="numlinks">(6)</small> </dt><dd>

I removed the </dt><dd> tags from the code. Did you rebuild after your last code change?

Another thing to add (oops..), at the top of that sub find this, and add the red:

my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i, $subcatsub);


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
where I must find this I don't succeed in finding it
<small class = numlinks">(6)</small> </dt><dd>
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
I don't know where it is in your Links code, but it shows up in the HTML on your site (view source). If you want to send me to look over your code, send me a Private Message. I will need your username and password for the Links admin, and also for your site FTP.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
ok I send him now to you

give an answer to me
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
...haven't received anything yet...





Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
emeil send
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
email send 2
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
Ok and graces for ' help now

1 - I have a problem like I can do for widening a column with the other because the text and next to the second column.
2 - like I can have the greatness of the text of the subcategories reduced

Thanks


Thanks
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it

Last edited by:

blecchi: Nov 16, 2004, 11:16 AM
Quote Reply
Re: [blecchi] Style Yhaoo home In reply to
Your'e welcome, and your site looks much better!


1. Remove the red, add the green (Change the 80% to 100%):

# Print Header.
$output = qq|<div class="margin"><table width="80100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="catlist" valign="top" width="40%">\n|;
foreach $subcat (sort @subcat) {

...

# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</center></td><td width="20%">&nbsp;</td><td class="catlist" valign="top" width="40%"></center>\n|;
}
$i++;

==========================

2. Remove the red, add the green:

$output .= qq|<br><span class="descript"><font face="Arial" size="-1" color="Black">$description</font></span>| if (!($description =~ /^[\s\n]*$/));
$v = 0;
$output .= qq~<BR>~;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) {$subcategory_name = &build_clean($1);}
else {$subcategory_name = &build_clean($subcatsub);}
$output .= qq~<font face="Arial" size="-1" color="Black"><A HREF="$suburl">$subcategory_name</A>~ if ($v <= 5);
$output .= qq~<font color="#000000">...</font>~ if ($v eq "5");
$output .= qq~<font color="#000000">, </font>~ if ($v ne $#{$subcategories{$subcat}} && $v <= 5);
$v++;
}
$output .= qq~</font><BR>~;
}
$output .= qq|<BR>\n|;
}


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Style Yhaoo home In reply to
problem subcategories home http://lnx.nauticalink.it/links

this code online

# Print Header.
$output = qq|<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="catlist" valign="top"width="40%">\n|;
foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];
# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }
$numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];
# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</td><td width="20%">&nbsp;</td><td class="catlist" valign="top"width="40%">\n|;
}
$i++;
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<font face="Arial, Helvetica, sans-serif" size="-1"><a class="link" href="$url"><b>$category_name</b></a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<img src="http://www.nauticalink.it/new.gif">| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|<br><span class="descript"><font face="Arial" size="-2" color="Black">$description</font> </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq||;if ($#{$subcategories{$subcat}} >= 0) {
$v = 0;
$output .= qq~<BR><SPAN CLASS="xsmall">~;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) {$subcategory_name = &build_clean($1);}
else {$subcategory_name = &build_clean($subcatsub);}
$output .= qq~<font face="Arial" size="-1" color="Black">$subcategory_name</A>~ if ($v <= 5);
$output .= qq~~ if ($v eq "5");
$output .= qq~~ if ($v ne $#{$subcategories{$subcat}} && $v <= 5);
$v++;
}
$output .= qq~</font><br>~;
}

$output .= qq|<br>\n|;
}
# Don't forget to end the unordered list..
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
> >