Gossamer Forum
Home : Products : Links 2.0 : Customization :

Yahoo style subcategories (@)

(Page 2 of 3)
> > > >
Quote Reply
Re: Yahoo style subcategories (@) In reply to
another little fix...

in db_utils.pl

in sub category_list

under:

Code:
@fields = &split_decode ($_);

add:

Code:
next if ($fields[$db_main_category] =~ m,\@$,);

this gets rid of all the aliases from the add form.. and the admin form.. but you can mod delete them still..

jerry
Quote Reply
Re: Yahoo style subcategories (@) In reply to
this mod doesn't conflict with loopy's mod at all..

his mod is in build_stats and mine is pretty much in build_category_pages..

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

I installed the mod you posted in this thread, and I'm really happy with it. It conflicts, though, with another mod I installed earlier: Loopy's multiple category mod. With both mods in place I have serious problems. I would hate to have to choose between them. Do you think you could take a look at his mod and suggest a way to use both? The problem lies in the changes to nph_build.cgi.

http://www.online-sweepstakes.com/links-mods/


Thank you in advance.

[This message has been edited by Floristan (edited October 30, 1999).]
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Take out the (). The point of the @Category Mod is not to place the number of links in that category. LIKE YAHOO has it. If you look at the @link, it does not have numbers next to it, and the point is that it links to that special category.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Yahoo style subcategories (@) In reply to
Well, then, the new image must be different, because my link categories show my new graphic if the category they link to has a new link.
Quote Reply
Re: Yahoo style subcategories (@) In reply to
The mod to put @ is working great. Only problem I am having is that it puts () after it. It doesn't seem to put the number of links. Right now I think my category has 0, but all the regular subcategories show 0 or appropriate numbers, just not the @'s

Any idea what I could look for?
Thanks!
Adam
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Eliot,

When you say take out () do you mean in this line?

$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;

Replace with:
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">$numlinks</small> |;

But then wouldn't all of my categories end up with no () and only a number?

Or is there some way I can specify only if it ends with @ to take it out.

Thanks!
Adam
Quote Reply
Re: Yahoo style subcategories (@) In reply to
you don't need to take it out..

make sure..

Code:
$numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];

is BELOW

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) . "/";

jerry
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Thanks Jerry,

You got me to look at it one more time in a different way.

Somehow my description where I listed the category it was supposed to go to was missing. I know I put it in because it was working right earlier when I first installed the mod, but somewhere I must have accidently deleted it.

Anyway, There's a clue for anyone else that experiencies this:

Category ()

You are missing the category it is supposed to be going to in the description field!

Adam
Quote Reply
Re: Yahoo style subcategories (@) In reply to
As an alternative to the traditional "Mod," if you only want to try subcategories at the top level, you might consider what I tried. I actually added the HTML code within the "description" field of the first category. For example, I have a career section on my site, and I added:

<span style="color:#FF0000"><font color="#FF0000" size=-2><a href="/Careers/Employment_Sites/"><font color="#FF0000">Sites</font></a>, </font>
<font color="#FF0000" size=-2><a href="/Careers/Employment_Tools/"><font color="#FF0000">Tools</font></a>, </font><font color="#FF0000" size=-2><a href="/Careers/Salary_Information/"><font color="#FF0000">Salary Info</font></a>...</font></SPAN>

This allowed the same effect.
However, links will not allow this "size" of description on default. You will have to increase the size allowed for description (I think it is within the category.def file).

Hope this helps

SPH


[This message has been edited by SPH (edited December 27, 1999).]
Quote Reply
Re: Yahoo style subcategories (@) In reply to
SPN..

go to the top.. click "search"..

search for SUBCATEGORIES LIKE YAHOO v2

find the main one.. that mod does what you just did for you... in this style..

(Sites)Tools|Salary_Information)1

plus.. this mod listed above does the categories that are aliased to another category.. nothing to do with your example..

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

Yea...The effect is similar, however, since you have manually put the links in the Description field in the Category, you will have to manually delete the sub-categories that you delete.

Widgetz's Mod automates the process!

Go to www.widgetz.com/links_mods and use the Sub-Categories Mod there.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Yahoo style subcategories (@) In reply to
don't go to the url eliot gave you.. search the forum.. version 2 allows you to specify which subcategories to display.. version one is really lame.. Smile

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

I just installed your '@' category mod and the mod itself works fine, but I have a problem with the 'look' of it.

Here's the example I've been playing with:

I have a catgeory called Manufacturers in the directory "/aw/Manufacturers" and within it I want to add Heavy Trucks@ that points to the following directory "/aw/Heavy_Trucks/Manufacturers"

When I add a category as follows:

Name: Manufacturers/Heavy_Trucks@
Desc: Heavy_Trucks/Manufacturers

The subcategories in Manufacturers look like this:

Quote:
Electric Vehicles (0)
Manufacturers (2) New <<-- I thought this would display as Heavy Trucks@
Recreational Vehicles (0)
etc...

Any advice anyone ?

------------------
Shaun Hague
Webmaster - Qango.com
http://www.qango.com/central/
Quote Reply
Re: Yahoo style subcategories (@) In reply to
make sure there is only one of these:

Code:
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }

it goes above the modded code.. not below..

------------------
Jerry Su
Links SQL Licensed
------------------

Quote Reply
Re: Yahoo style subcategories (@) In reply to
Jerry,

This is the extract from my site_html.pl file:

Quote:
# $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~<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">\n~;

foreach $subcat (sort @subcat) {
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) . "/";
$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).

I thought I'd followed the instructions to the letter, is there something wrong here?

All the best
Shaun

------------------
Shaun Hague
Webmaster - Qango.com
http://www.qango.com/central/
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Jerry,

In addition to getting the 'jump to' name to display properly (which it doesn't), I'd also like site_html_print_cat to know the difference between a 'jump' subcategory (one with the @ at the end) and a 'regular' one, i.e. not to add the NEW and ($numlinks) to a 'jump to' subcategory name.

As this is the final mod I'm planning on implementing for a while I wondered if there was a solution?

BTW: Let me know if you need more info

All the best
Shaun

------------------
Shaun Hague
Webmaster - Qango.com
http://www.qango.com/central/
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Jerry:

I installed your mod and it work almost perfect, the only thing that it doesn't seem to do is to link the "@ subcategory" with the normal one at the Search Results.

Any suggestions ?

Thanks
Luis Fernando
Quote Reply
Re: Yahoo style subcategories (@) In reply to
I am having the following problem with Widgetz 'Yahoo Style Subcategories (@)' mod.:

The crossrefering/'jump' subcategories are supposed to show 'Subcategory @' but mine are showing 'Subcategory @()'.

Has anyone managed to solve this problem? I am using the non-english mod.

Sincerely,
Erik Ziesler

---
ziesler@online.no

[This message has been edited by ziesler (edited March 06, 2000).]
Quote Reply
Re: Yahoo style subcategories (@) In reply to
I have Bobsie's Cat Select Mod, non-english mod, yahoo 2.1 template and widgets sub cat mod. Everythings working together ok, and now decided to add this "yahoo style subcats with @"

I have managed to make half of it work but there seems to be a small problem.

I have a Category named as "News_Media" and another category named as "Referance". "Referance" has a sub category as "Referance/Books" I want to see this "Referance/Books" subcat under "News_Media" also. To do this first I have created "Referance/Books" than I have created "News_Media/Books@" and wrote "Referance/Books" in the description field of "News_Media/Books@", and rebuild my pages. The out come was like this; my main index.html page had the category "News & Media" and underneath it had a sub cat named as "Books@" which points to "News_Media/Books@" directory that doesnot exist.. but if I click on "News & Media" I get the " Books" sub cat shown there pointing to the right address at "Referance/Books" but without the "@" attached to it and still shown the number of links in brackets.. so I guess something is in the wrong place here but cant figure out what... any help would be great... thanks..

also, nothing to do with the above, but I have one more slight problem, when I click at "Home", Whats New" or "Whats Cool" links on my pages I dont goto the index.html file in the necessary directory, am I missing something, I can manualy alter the files to make them point to Cool/index.html and etc, but should it not do this by itself..

[This message has been edited by Ugur (edited March 21, 2000).]

[This message has been edited by Ugur (edited March 22, 2000).]
Quote Reply
Re: Yahoo style subcategories (@) In reply to
while looking at the forum saw another thread where it was stating that adding a line in my site_html.template.pl would get rid of the subcat problem on my front index.html page. so I have added the line

next if ($subcatsub=~ "@");

in the

sub site_html_print_cat

part of my site_html.template.pl and now what this does is just hiding the sub-cat on my front page but what I would prefer is shown the cat but with the right link..

waiting for some help...
Quote Reply
Re: Yahoo style subcategories (@) In reply to
Can we get the final release of this mod all in one post? That would be real nice! Smile

Thanks
Chris Miller
http://www.extremeforums.com
Quote Reply
Re: Yahoo style subcategories (@) In reply to
I had the self same problem as Ughr - the @ isn't displaying properly and the categories are not names as I imagined they would be.

------------------
Shaun Hague
Webmaster - Qango.com
http://www.qango.com/central/
Quote Reply
Re: Yahoo style subcategories (@) In reply to
widgetz,

Still cannot solve the problem of

Category @ ()

Can you help me? Thanks.

For your reference, my code in site_html_templates.pl and site_html.pl is listed as follow: (I use non-english mode)

($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) . "/";
$numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];


--- Oceansky
Quote Reply
Re: Yahoo style subcategories (@) In reply to
I'm having the same problem as qango and Ugur. I get:

Category
Subcat@

with the subcat pointing to Category/Subcat@ (that doesn't exist) rather than the subcategory that it's supposed to be pointing at.

I use Bobsie's Exclude mod. Does anyone have an idea what might be wrong?

Thanks.

> > > >