Gossamer Forum
Home : Products : Links 2.0 : Customization :

Yahoo style subcategories (@)

(Page 1 of 3)
> >
Quote Reply
Yahoo style subcategories (@)
Is there a mod which will allow one to have a subcategory listed under an alternate main category? They appear in Yahoo listings as subcategory (@).

If I have not been clear, see the following URLs for an example of what I mean.

http://www.yahoo.com
http://www.yupi.com
Quote Reply
Re: Yahoo style subcategories (@) In reply to
This what you want?
www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/002561.html,
Quote Reply
Re: Yahoo style subcategories (@) In reply to
No, it's not. That mod simply allows you to display subcategories in a couple of different formats.

What I want is to have a subcategory appear under a category which it doesn't belong to. Such subcategory links appear as subcategory(@) in Yahoo.
Quote Reply
Re: Yahoo style subcategories (@) In reply to
May be this Thread will help you:

http://www.gossamer-threads.com/...um3/HTML/003108.html

Also, have you checked out the Templates in the LINKS section of the Resource Center? There is a Yahoo Template.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Yahoo style subcategories (@) In reply to
First of all, thank you Brad and Eliot for your suggestions. Unfortunately they don't help me. I am not interested in the appearance of my pages, rather the organization of subcategories. I guess I haven't been clear enough, so I will offer a real life example.

These are some categories from Yahoo:

Home:Reference:Libraries:Academic Libraries
Home:Reference:Libraries:National Libraries
Home:Reference:Libraries:School Libraries

On the category page for Home:Reference:Libraries you will see extra subcategories listed, however:

Academic Libraries
Archives@
Education Libraries@
National Libraries
School Libraries

The extra two subcategories belong to a category other than Libraries, yet they appear in the subcategories listing for Libraries.

Archives is not from Home:Reference:Libraries, rather it is Home:Arts:Humanities:History:Archives
The other one is Home:Education:Theory_and_Methods:Libraries

This is a real life example, so you can go to Yahoo to check this out if I haven't been clear.

Thanks in advance to anyone who takes the time to consider my question. Again, I am not interested in APPEARANCE, but CROSS-REFERENCING.

Gratefully,
Daniela Muhling



[This message has been edited by Floristan (edited September 09, 1999).]
Quote Reply
Re: Yahoo style subcategories (@) In reply to
that's easy...

first you have to make the category name allow "@"...

then in nph-build.cgi you do something like

($name =~ /\@$/) and next CAT;

and then uh.. when it goes to site_html_print_cat..

you do something like:

if ($cat =~ /\@$/) {
($description) = @{$category{$description}}[2];
$url = "$build_root_url/" . &urlencode($description) . "/";
}

and of course.. your description has the category it goes to.. like:

Software/Games

get it? maybe someone can use the above and turn the code into something real.. otherwise i will help you tommorrow..

jerry

now... to my 2 essays i should have done on monday..

[This message has been edited by widgetz (edited September 09, 1999).]
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Floristan--the mod I pointed you to is not to change the appearance of the cats, it allows you to have a subcat listing in one category that points to another cat or subcat. For instance, in my links I have:

Star Trek/@RPG

and

RPG/Star Trek

The @RPG subcat in the Star Trek main category contains no data or links. It is just a pointer (or cross-reference if you prefer) to the ST subcat in the RPG main category. This is exactly what Yahoo does. Unless I'm missing something here, I don't see how what you want to do is different.


I don't know why, but the url in my prior post is giving me a 404 for some reason...

http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/002561.html
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Brad is totally right. The Thread that he referred you to is what I think you are after.

Brad, you have a comma at the end of the URL you provided in your first Response. (Thus...404 NOT Found)

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Dear Brad,

Yes! This is exactly what I need. Thank You! I tried to follow your first link and got a 404, and then incorrectly assumed that you were pointing me to the same URL as Eliot had, or to Widgetz's mod which simply lists subcategories.

By the way, I visited your site and was very impressed! I will definitely return to it.

Thanks again!

Daniela
Quote Reply
Re: Yahoo style subcategories (@) In reply to
bad post


[This message has been edited by Bmxer (edited September 09, 1999).]
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Gentlemen I am developing a software a lot similar to yahoo! practically similar with the same search manners and all the characteristics that Yhaoo! he/she/you has, only that doesn't use templates because I am not still familiarized with templates, and nor he/she has an area of friendly administration, because it uses command line to generate the pages, but if somebody wants me to help to get better him, I am the disposition to open his code.
In term of the theme of this line in my site in the categories I use a very simple system:

example:
After the indication of the category I place a symbol of @ and I place the address of the corresponding category:
example:
Internet/Games@Games/Internet
and when my system generates the pages he automatically places a @ in the name of the sub category Games with a link for Internet in /Games. being in the category Internet and sub category Games @.
The system also makes exclusion of words in the search etc... etc...
Quote Reply
Re: Yahoo style subcategories (@) In reply to
good idea janio.. i guess that can be done.. it's really simple.. but i find it as "adding" more not needed code... if you know what i mean.. cause you would need to add things all over the place to make it check if the category is real..

jerry
Quote Reply
Re: Yahoo style subcategories (@) In reply to
See an example of the site that I revised above in http://www.brlink.com.br/DMOZ/ he has all the characteristics principal of Yyahoo!.

Edited by janio@brlink.com.br

------------------
By Jânio
-=-=-=-=-=-=-=
http://www.brlink.com.br
Quote Reply
Re: Yahoo style subcategories (@) In reply to
ok janio..

what is dmoz? i've seen it like everywhere..

i guess i will do it your way.. just i'll make the description do if (!$description) get the other categories so there is actually a description..

jerry
Quote Reply
Re: Yahoo style subcategories (@) In reply to
ok... i finished this mod..

it's actually only a few lines.. 2 and a tiny 3 char addon to a line..

bobsies exclude and you have 1 more Wink

umm... look at:

216.65.106.208/index.html

and go to hardware.. you will see software@..

software@ is using the description of Software...

not ready to give code out yet.. i want to do some more thinking of any other possibilities i need to change..

modded so far..

nph-build.cgi- added 1 line (34 chars)
category.def- added 3 chars
site_html.pl- moved 3 lines.. added 1 line (64 chars)

and of course if you have bobsie's exclude there is above a 20-30 character addon..

it's a really small mod and it does something simple Wink

jerry

[This message has been edited by widgetz (edited September 10, 1999).]
Quote Reply
Re: Yahoo style subcategories (@) In reply to
that is everything that I need in my file build.cgi to generate the pages and the directories with category@


if( $toshow =~ /@/ )
{
( $qwe , $jump ) = split( /@/ , $toshow );
$jumper{$dir} = $jump;
$mostrar{$dir} = $qwe . "@";
$href{$dir} = "$DIR_HTML/$jump";
@dirs = (); @dirs = split( /\// , $dir );
if( -d "$DIR_F_HTML/$dir" && $dir =~ /\// ) { system( "rm -r $DIR_F_HTML/$dir" ); }
if( ! -l "$DIR_F_HTML/$dir" )
{
system( "ln -s $DIR_F_HTML/$jump $DIR_F_HTML/$dir" );
$tema_data{$dir} = $HOJE_dias;
}
$qwe = $dir;
$qwe =~ s/($dirs[$#dirs])//g; chop( $qwe );
$linkup{"$qwe:$dir"} = 1;
$quantidade_d{$qwe}++;
next;
}


and that is an example of my file of categories:



Artes/Artistas/Atores_e_Atrizes/Sandra_Bullock=Sandra Bullock
Artes/Artistas/Cantores_e_Compositores=Cantores e Compositores@Entretenimento/Musica/Cantores_e_Compositores
Artes/Artistas/Pianistas=Pianistas
Artes/Artistas/Poetas=Poetas@Ciencias_Humanas/Literatura/Generos/Poesia/Poetas
Artes/Bonsai=Bonsai
Artes/Centros_Culturais=Centros Culturais@Sociedade_e_Cultura/Centros_Culturais
Artes/Danca=Dança
Artes/Danca/Contemporanea=Danca Contemporanea
Artes/Decoracao=Decoração
Artes/Decoracao/Arquitetos=Arquitetos@Artes/Arquitetura/Arquitetos


and he has more he already comes with support to special characters, for sites non English.


after the symbol of = it comes the name of the category and the @ with the link for the related category.

The only disadvantage of my software is that he doesn't have an interface of friendly admin, but if you want me to help to finish him, we can distribute all him free, I tested he with 32.000 links and him had the same speed as if it was just with 100 links. or be he is very good, and after finishing the part of admin of him I will make a version for MySQL and Oracle, and it will be everything free.

I only need the help of somebody to finish, therefore I have very little time to be devoted to him.





------------------
By Jânio
-=-=-=-=-=-=-=
http://www.brlink.com.br
Quote Reply
Re: Yahoo style subcategories (@) In reply to
mine is actually shorter.. and it does what it needs to do..

i think my site is down right now... not sure why though..

jerry
Quote Reply
Re: Yahoo style subcategories (@) In reply to
ok.. i just intalled it onto my old pdamania site at hypermart cause my new one seems to be down right now.. go to

http://pdamania.hypermart.net/

click hardware.. and then you will see

test@

it uses software's description.. very simple..

jerry
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Very nice, Jerry! Cool mod. If you release, please let us know.

Thanks.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Yahoo style subcategories (@) In reply to
ok.. here we go..

[category.def]

FIND:
Code:
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],

CHANGE TO:
Code:
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+\@?$'],

(this allows the @ sign at the end of categories only.. so you can't put it in the middle [it will give you invalid format] or if you put the \@ inside the [] thing.. it will allow it to have @ in the category name.. but if you wanted to do that.. you wouldn't need to add it to nph-build.cgi too.)

[nph-build.cgi]

FIND (in build_category_pages):
Code:
next CATEGORY if ($cat =~ /^\s*$/); # How'd that get in here? =)

ADD BELOW:
Code:
next CATEGORY if ($cat =~ /\@$/);

(that checks to see if it ends with @.. then it won't build it..)

[site_html.pl or site_html_templates.pl]

FIND (in site_html_print_cat):
Code:
($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); }

CHANGE TO:
Code:
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }
if ($subcat =~ /\@$/) { ($subcat) = @{$category{$subcat}}[2]; }
($description) = @{$category{$subcat}}[2];
$url = "$build_root_url/" . &urlencode($subcat) . "/";

that is all.. if you have Bobsie's Exclude..

[nph-build.cgi]

FIND (in build_category_select_list):
Code:
if ($subcat !~ /^\s*$/) { push (@rootcat, $subcat); }

CHANGE TO:
Code:
if ($subcat !~ /^\s*$/ && $subcat !~ /\@$/) { push (@rootcat, $subcat); }

Pretty much it.. I haven't tested it out much with bobsie's thing.. so shoot the errors at me.. if any.. i bet you there is ONE..

i did a little thinking and i beleive the only thing i left out is something along the lines of the add form.. (when you go to it from the category).. tell me if i'm right..

you might think i'm missing some stuff in site_html.pl [for bobsies thing.. but no.. i'm not.. beleive me.. it comes from nph-build.cgi and then goes to it.. so don't tell me anything about that..]

you also might think i am missing something in build_check_dir.. beleive me.. i'm not.. directories ending with @ won't be built so they don't need to be checked Wink so don't bother me about that either.. hehe

jerry
Quote Reply
Re: Yahoo style subcategories (@) In reply to
DUH.. INSTRUCTIONS! Smile

to use..

add a category/subcategory..

make the category's name end with: @

then in the categories description, put another category that this category will go to.

submit the category.. build pages and it should work..

jerry

[This message has been edited by widgetz (edited September 11, 1999).]
Quote Reply
Re: Yahoo style subcategories (@) In reply to
 
Quote:
what is dmoz?
Are you serious Jerry? Dmoz is the Netscape open directory that is now used by Netscape, Hotbot, Lycos, and soon AOL for their directories. After Yahoo, it is undoubtedly the single most important place to list your site.
Quote Reply
Re: Yahoo style subcategories (@) In reply to
oh....... ok..

i just saw it as a really big directory.. that's all..

anyone tried adding this mod yet? wanna see if it works ok..

jerry
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Hey Widgetz,

I installed your mod with no problems at all, and it all works great!
THANK YOU .... again.. you're the man!

- Jesper
www.cops.dk
Quote Reply
Re: Yahoo style subcategories (@) In reply to
i beleive to do this non-english that site_html.pl/site_html_templates.pl portion should be switching:

Code:
($description) = @{$category{$subcat}}[2];
# ***************************************** nonenglish modification - begin ****************
($nonenglish) = @{$category{$subcat}}[8];
# ***************************************** nonenglish modification - end ******************

# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
# ***************************************** nonenglish modification - begin ****************
# if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }
if ($nonenglish eq "") {
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }
}
else {
$category_name = &build_last_title_mb($nonenglish);
}

with:

Code:
($nonenglish) = @{$category{$subcat}}[8];
if ($nonenglish) { $category_name = &build_last_title_mb($nonenglish); }
elsif ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); }
else { $category_name = &build_clean($subcat); }
if ($subcat =~ /\@$/) { ($subcat) = @{$category{$subcat}}[2]; }
($description) = @{$category{$subcat}}[2];
$url = "$build_root_url/" . &urlencode($subcat) . "/";

jerry
> >