Gossamer Forum
Home : Products : Links 2.0 : Customization :

SUBCATEGORIES LIKE YAHOO v2.1 Help

Quote Reply
SUBCATEGORIES LIKE YAHOO v2.1 Help
I've just installed the SUBCATEGORIES LIKE YAHOO v2.1 mod but it keeps coming up with the following error

Error including libraries: Unmatched right bracket at /www/devbite/cgi-bin/links/admin/site_html_templates.pl line 676, at end of line
syntax error at /www/devbite/cgi-bin/links/admin/site_html_templates.pl line 676, near "}"

Make sure they exist, permissions are set properly, and paths are set correctly.


Has anyone got any ideas why this error is coming up?


Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
'cause according to your error message there is a missing left bracket or too many right brackets. Look for it. It should be in site_html_print_cat. If you can't find it, post site_html_templates.pl as a .txt somewhere at your site so one of us can look at it.

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Hi, my site_html_templates.pl file can be seen at the following location.

http://www.devbite.com/testfiles/site_html_templates.pl.txt

Thanks for all the help...
James

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
You have some old codes to remove near the bottom. notice that these codes are duplicated in other parts of the subroutine:

replace
Code:
else { }}

# Don't forget to end the table..
$output .= "</td></tr></table></div>\n";
return $output;
}

$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<small><sup class="new">new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span class="descript">$description </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}

# Don't forget to end the unordered list..
$output .= "</td></tr></table></div>\n";
return $output;
}
with
Code:
else {
}

# Don't forget to end the table..
$output .= "</td></tr></table></div>\n";
return $output;
}
}
--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Hi,
I've tried what you said, but its coming up with this error now:

Error including libraries: syntax error at /www/devbite/cgi-bin/links/admin/site_html_templates.pl line 404, near "else"
Missing right bracket at /www/devbite/cgi-bin/links/admin/site_html_templates.pl line 406, at end of line

Make sure they exist, permissions are set properly, and paths are set correctly.


Any ideas?

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Hi

You would need to open your site_html_templates.pl file and have a look at the two lines mentioned it would appear that you have a miising bracket.

However because there is two lines mentioned it is possible that the error is running from the first line, you would really need to study this part of the code.

If you have copied and pasted the section from a mod directions sheet, reopen the directions, and comapre the two that way you should find the error, or simply re-copy and paste that section.

If you are unable to resolve in this manner copy your file to a public folder on your site and rename it something.txt, post the address here and I will have a look at it

Good Luck

DavyC

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Try this one: http://ucmd.virtualave.net/links_mods/yahoo.txt

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Drew

I have tested it in a version of links that I use for experiments, no errors showing but it is not creating sub directories like yahoo.

Have you any other mods installed, in this file?

DavyC

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Hi,
I've just installed the site_html_templates that Drew sorted out for me, everything works fine, but the categories are not showing. Does anyone know what is causing this?

You can take a look at http://www.devbite.com/links/pages/





Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Okay...see we're doing this is parts, so I can see what's supposed to be there and what's not, and to find what's messed up. I'm also trying to install this mod on my local copy of Links.

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
I got it working. Download the file from the URL above. Other than the old codes that needed to be removed, the following line:
Code:
($subcatstyle) = @{$category{$subcat}}[8];
should have been:
Code:
($subcatstyle) = @{$category{$subcat}}[7];
Although "SubCatStyle" is the eigth field, it has an index of 7, because index values start at 0, not 1.

<update>
just realised it was only 7 for me because I put the (ALL)2 stuff in the wrong field. you'll have to change it back to 8.
</update>

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
I've installed the site_html_templates file that Drew sorted out, and it working, but the subcategories are not showing underneath. Any ideas?
you can see what I mean at: http://www.devbite.com/links/pages/

I'd also like to thank Drew for all the help he has given me in installing this mod...

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
did you change the 7 back to 8? I got it working by accident -- I forgot to add the delimiter to the database and placed the subcatstyle stuff in the wrong field. I know for a FACT that the site_html_print_cat part DOES work as I copied it strait out of an old post from Eliot, deleted some of his codes, and placed it into a fresh copy of site_html_templates.pl. It worked (because his subcatstyle is his eight field, and the index was set to 7), so I placed it into your site_html_templates.pl and re-uploaded it.

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Hi, Drew sorry to be such a pain but the subcategories are sill not showing. I've done what you said but its still not working... Do you have any ideas why?

Don't worry if you have had enough, because I nearly have.

Anyway thanks again for the help.

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Yeah...I'm about to call it quits. I know it worked for me so I haven't got the slightest clue why it isn't working for you.

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Hi Drew,
I would just like to thankyou for all the help you given me. You have given up your time to help me, and for that I'd just like to say thanks...

Finally is it possible to post the files that you made the changes to, just so I can compare them to mine just to make sure I haven't missed anything, before I call it a day.

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Actually...I'm a bit unemployed at the moment so I didn't waste too much of my spare time Smile. Tell you what, let me see your categories.def and categories.db and I'll give it another shot. Meanwhile, I'll get a working copy of the yahoo mod in a fresh site_html_templates.pl and post it for you.

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Hi Drew the files are at the following location:

http://www.devbite.com/testfiles/category.def.txt
http://www.devbite.com/testfiles/categories.db.txt
http://www.devbite.com/testfiles/site_html_templates.pl.txt

Thanks again.

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Just looked at your category.db file. You don't have a subcatstyle specified in the subcatstyle field. The default value you set in category.def is only appended to new entries.

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
I've tried adding new categories and subcategories and I also reinstalled my links data files, but the subcats are still not showing. Although I now get (ALL)1 tag at the end of each record in my categories.db file.

You can see it at http://www.devbite.com/testfiles/categories.db.txt

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
a working copy of the yahoo mod on a clean file
http://ucmd.virtualave.net/links-mods/yahoo-w.txt

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
Hi Drew,

I tried to get the file you uploaded, but is coming up with file not found error. Is the URL correct?

Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
the dash in links-mods should be an underscrore.

--Drew
Quote Reply
Re: SUBCATEGORIES LIKE YAHOO v2.1 Help In reply to
I've got it working!!!

Thanks Drew for all the help you have given me in installing this mod...