Gossamer Forum
Home : Products : Links 2.0 : Customization :

SUBCATEGORIES LIKE YAHOO v2

(Page 2 of 2)
> >
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
I am posting the text of my problem child at: http://stand318.com/site_html_templates.txt
if someone wants to take a gander at what I have done wrong...
muchas gracias amigos,

Allen
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
 
Quote:
most likely you typed the name wrong.. change it to (ALL)1 and see if it display anything..

I am now getting 2 dots where the subcategories should be displayed on the front page.

Quote:
second reason may be cause you didn't add the subcat_length to links.cfg

that part I did

Quote:
make sure you type the name of the subcategory right.. not the WHOLE thing.. just the name.. like

Test

NOT

/Cat/Sub/That/This/Test

I am not sure I follow you on this simple request. The help file for links says to type:
"maincategory/subcategory" in the name field.
You are saying to just type:
"subcategory" in the name field.
When I do this, it makes "subcategory" into a main category...

any help would be appreciated...
the url again is:
http://www.stand318.com/links/pages/

Sincerely,

Allen


Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
ok.. the error will only occur in TWO things.. i am sure.. ok? cause i did make the mod.. heh


anyways.. the first is something i don't think anyone would missout.. but JUST TO MAKE SURE..

Code:
$subcat_length = 40;

into links.cfg.. AND UPLOAD (of course Wink)

then the second could be a common mistake.. but i haven't heard of it..

the script checks to see if the subcategory you type in exists..

so when you put

Code:
(Sub1|Sub2|Sub4|Sub3)1

into the DESCRIPTION field of the category.. in this case let's say the category is called CAT..

so basically you are saying that

CAT/Sub1
CAT/Sub2
CAT/Sub4
and
CAT/Sub3

are valid categories.. you can't type

Code:
(CAT/Sub1|CAT/Sub2|CAT/Sub4|CAT/Sub3)1

it will think you are looking for

CAT/CAT/Sub1 etc..

ok.. i just reread your post and the first answer you gave me tells me everything..

you didn't edit your links.cfg.. you've got to add the $subcat_length=40; in.. or it will print 0 characters and then the .. (the .. only comes in if there are more subcategories than printed)

so since the ".." came in.. that means you must have at least one subcategory.. telling me that it just completely stopped printing cause you have subcat_length set to 0 or didn't upload it..

jerry
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
 
Firstly... I want to thank Jerry for taking the time to respond to my posts.
In the links.cfg file I had:
$subcat_length = '40';
I am not sure where the extra ''s came from, but I fixed those and am still getting the same results. When I click on "build all", it does recognize that the category "music" does have 3 subcategories in record_labels, artists, and radio_stations... but for some reason it still gives me only the '..' under the main category on the front page.
I am not sure where I am making the mistake... as I am sure others are getting the mod to work, so the problem must be something where *I* am not doing something right.
I have what my categories and subcategories look like posted here if someone has time to look and see if I am entering them wrong...
http://www.stand318.com/admin1.htm

merci bien, mon ami,

Allen
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
yea! Smile

that's the best piece of info i could get to help you.

you don't put "1" behind each subcategory...

Smile

only outside of the ()1 <--

jerry
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
Mui bueno...:-) that fixed it...

Thanks again for your help Jerry... very appreciated...

Allen
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
Hey everyone.
I had categories without subcats, but was planning to add them later. When I entered the (ALL)1 in the descript field, it would actuall print (ALL)1 as the description where the subcats would be listed. I understand this was intended as a feature, but since I don't intend on describing the cats ever i removed this line.

Code:
else { $output .= qq~$description~ if (!($description =~ /^[\s\n]*$/)); }

problem fixed.

------------------
[URL=http://bartour.hypermart.net]BarTourOnline.com[/url]
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
Hey, that mod to the mod of the mod is a great mod.

I have some categories that didnt have SubCategories, and removing that else statement did tha trick.

Drop tha chalupa!

- Mr. Undies
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
Hi guys. I just been trying to install Yahoo look-like sub categories to my links2, And I had no luck. I tried three times with different scripts bud its not working, and don’t understand why. Usually I’m getting scripts right pretty ease, but not this time.
I tried Jerry’s version 1 and 2 but i got no luck. First of all how do you add subcategory to category from admin panel I’m not using Yahoo templates, i’m using Slick Links Template , is there any difference getting subcategories right ?
Please can you give me the scrip and some detailed decryption how to that.
Thank you for you help.

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
if you don't know how to add subcategories.. then this script won't output anything..

at the bottom of the main admin page there is something that tells you how to add a subcategory..

jerry
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
Any of the following codes should be changed if I'm using non-english mode?
Need Help ......


Qoute:....

hmm.. ok

find..

code:


$output .= qq~<dd><span class="descript">$description </span></dd>~ if (!($description =~ /^[\s\n]*$/));



in site_html.pl.. or if you use templates.. it's the same except the ~'s are |'s

and then replace it with:

code:


if ($description =~ m,^\(([^\)]+)\)(\d)$, && $#{$subcategories{$subcat}} >= 0) {
($description, $style) = ($1, $2);
$s = 0;
@subcatsub = split (/\|/, $description);
foreach $category_name (@subcatsub) {
foreach (sort @{$subcategories{$subcat}}) {
($description eq "ALL" && $#subcatsub == 0) ?
($_ =~ m,.*/([^/]+)$, and $category_name = &build_clean($1)) :
($_ eq "$subcat/$category_name" or next);
if ($style eq "1") {
$length += length($category_name);
($length > $subcat_length) and last;
}
if ($s > 0) {
$output .= qq~, ~ and $length += 2 if ($style eq "1");
$output .= qq~<BR>~ if ($style eq "2");
}
$url = "$build_root_url/" . &urlencode($_) . "/";
$output .= qq~ ~ if ($style eq "2");
$output .= qq~<A href="$url">$category_name</A>~;
$s++;
last if ($description ne "ALL" && $#subcatsub > 0);
}
}
undef $length;
if ($s < $#{$subcategories{$subcat}}) {
$output .= qq~..~ if ($style eq "1");
}
}
else { $output .= qq~$description~ if (!($description =~ /^[\s\n]*$/)); }

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
In widgetz' instructions, he mentions:

Quote:
(Games|Utilities|Hacks)1

lists:

Games, Utilities, Hacks

and ".." if there are more than 3 subcategories in that category..

I have a category, Fishing, with 4 subs. When I set up (Tackle|Boats)1, the output is:

Fishing (X)
Tackle, Boats..

However, when I set up (Tackle|Boats|Guides)1, the output is:

Fishing (X)
Tackle, Boats, Guides

There are no dots - ".." - even though there are more than 3 subs.

Would anyone have any ideas? The code that I'm using is not modified except to change the ~ to |

Thanks for any help. Smile
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
It probably is related to the $subcat_length variable configuration.

Try using a higher value like 55.

So, it should look like:

Code:
$subcat_length = 55;

Regards.

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
Thanks for your suggestion, AnthroRules. I bumped it up to 55, but no go. I'll keep hacking. Has anyone else run into this?

BTW, AnthroRules, how did you get the subcats on your category pages to have different spacing than the categories on your links home page?

I like the single spacing and different font on the category page for the subs. If you get a chance, I'd love to know how to do it. Thanks.

DT

[This message has been edited by DogTags (edited April 28, 2000).]
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2 In reply to
Jerry You Wrote
**********
into the DESCRIPTION field of the category....

****************

Please Oh Please Tell me more about this area of interest.
and give examples...

This just may be my problem....

Q- I need to type into the discription field when making a category??
I don't recall reading this any where...

~~~~~~
This is where I'm at... with More Questions

The Links2 codes work great and I went step by step on Yahoo SubCat Mod Ver2.

So I located the problem in last step of Yahoo SubCat MOD
which is the last step in instrutions...

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

If I add this last change in code I lose categorys only (link amount is visble)

Q- What could it/I be missing??

If I use the codes you listed...
http://gossamer-threads.com/scripts/resources/Attach/1072-MyMod.txt

I get an error about a missing bracket and/or unmatch right bracket = } at whatever line..

I take it out and codes work fine just no Sublisting on Home page...

Q- b /b where is it placed...
`Before and after on each line?
`b at top line and /b at bottom?
`or is b /b on a line by them selves?

Q- if so which line?

Q- Top of list or bottom?



PS...
Thanks for freely contributing...

Peace
2Dum2no






Quote Reply
Re: [2Dum2no] SUBCATEGORIES LIKE YAHOO v2 In reply to
Where exactly do I add $subcat_length = 55;?
And how come when I put the (Sub1|Sub2|Sub4|Sub3)1, that's how it shows up on the page?
> >