Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Problem with Yahoo Subcat plugin and spacing...

Quote Reply
Problem with Yahoo Subcat plugin and spacing...
The Yahoo Subcat plugin installed perfectly, but I am having a problem with category spacing.

Instead of Category_one, category_2, category_3, it lists as Category_one,category_2,category_3 and makes things too wide normal monitors.

Any ideas?

Thanks!!!

David

Quote Reply
Re: Problem with Yahoo Subcat plugin and spacing... In reply to
You can edit the plug-in. You'll see the line where the ',' is added, and you can edit that to what you like.

Check what I did with the FAQ to change the layout.

PUGDOG«
PUGDOG« Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Quote Reply
Re: Problem with Yahoo Subcat plugin and spacing.. In reply to
Looks great. I don't see where you edit it though. Do I have to go in with a text editor and reinstall or can it be done via the "edit" screen in the admin area?

Quote Reply
Re: Problem with Yahoo Subcat plugin and spacing.. In reply to
First you must UN-install the plugin, then in the Plugin Manager, click edit across from YahooSubcats.

Then you must edit the YahooSubcats.pm file, or something like that. Smile

Robert Blackstone
Webmaster of Scato Search
http://www.scato.com
Quote Reply
Re: Problem with Yahoo Subcat plugin and spacing.. In reply to
Works great. Thanks!!

Quote Reply
Re: Problem with Yahoo Subcat plugin and spacing.. In reply to
Unless you are running under mod_perl or speedycgi, you can just edit the plugin_name.pm file directly.

Just remember to KEEP AN OFF LINE COPY, since uninstalling/reinstalling will overwrite the modifed version.

Or, you can uninstall the plugin, edit the YahooSubcats.pm file from the pulgin-manager window, UPDATE it, then re-install it. That will update the .tar file. Make sure to keep a copy of that .tar file, as downloading the file again from GT will overwrite it.

GT needs to have some version control added, to prevent that.

PUGDOG«
PUGDOG« Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Quote Reply
Re: Problem with Yahoo Subcat plugin and spacing... In reply to
I had to tweak this plug in again to get rid of the extra "BR" if the category had no subcategories in it.

Code:
if ($description){
if ($cat_r->{Description}=~/.SUB[01]/s) {
$description="< br >".$description;
}
if ($cat_r->{Description}=~/SUB[01]./s) {
$description.="< br >";
}
}
Notice the extra 'if' that tests $description before doing anything to it.

I'm still working on a tag to remove the SUB1 or SUB0 from the rest of the site if you display your descriptions on the category pages, but it might be easier just to come up with a new field for the plug-in actually.

The plug-in adds itself to the <%description%> tag, but what if the plug-in used a new field in the category table "SubCatFormat". That could be either NULL/Empty, or SUB0, SUB1 .... etc. The rest of the site ignored this, but the plug-in would use it to add the subcategory listing to the description before display?

That way you have some extra control over the "subcats" and "description" formatting.

That might be a better way to go.

PUGDOG«
PUGDOG« Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Quote Reply
Re: [pugdog] Problem with Yahoo Subcat plugin and spacing... In reply to
Yahoo sub cats

At the moment it has my sub cats laid out as

Computers and Internet

subcat1, subcat2...

Is there a way to get subcat1 to line up directly under the C in computer rather than tabed as it is layed out?

Thanks.
Webmaster
http://www.e-bannerx.com
Quote Reply
Re: [fulcan] Problem with Yahoo Subcat plugin and spacing... In reply to
In the YahooSubcats.pm file you'd want to get rid of the:

&nbsp;&nbsp;&nbsp;

That indents each subcat 3 spaces. (or you could increase that, or make it a <LI>, etc)

The other indentations would be in the subcategory.html


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Problem with Yahoo Subcat plugin and spacing... In reply to
UnsurePugdog thanks for the reply. I went and edited the script but in the current version (1.3 but is says 1.2 in the plugin manager) there is no &nbsp. I think it must have changed with the newer version maybe.

Any other ideas?

Many thanks.
Webmaster
http://www.e-bannerx.com