Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Building sub-categories in home.html

Quote Reply
Building sub-categories in home.html
This is a question which will probably have a quick answer - I have looked at other threads discussing category spacing, but all the proposed solutions do not seem to have worked:

I have Links SQL 2.0.5 installed with Mel's Yahoo Subcats Plugin.

In the home page, the category / subcategory html is built as follows:

<td>
<b><a class="category_links" href="http://www.askweddings.co.uk/directory/Bridalwear___Accessories/index.shtml">Bridalwear & Accessories</a></b> <small><i>(0)</i></small><br>

<br><p>SUB1</p>

</td>

(Note: I disable the plugin hook 'site_html_print_cat (PRE)' to identify which code was creating the strange spacing)

What I want to do is remove the <br>, <p> and </p> html tags from SUB1.

How do I do this? Is it something in YahooSubcats.pm?

Thanks in advance!

Wink
Quote Reply
Re: [valiant] Building sub-categories in home.html In reply to
I quickly checked YahooSubcats.pm, \Links\SiteHTML.pm, \templates\default\home.html, and \templates\default\subcategory.html.

I found that in the original codes of LSQL v2.1 and of YahooSubcats there is only <br> added. No any <p> and/or </p> tags found.
I may missed something, but I did not find "p" tags anywhere in YahooSubcats.pm and SiteHTML.pm (sub site_html_print_cat).

I suppose you have the <p> tags right within the descriptions...

And disabling site_html_print_cat (PRE) option in YahooSubcats plugin you disable the plugin itself.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Building sub-categories in home.html In reply to
Thanks for replying quickly webmaster...

So this seems to indicate that it is not the plugin generating the tags or Links SQL(?) - the mystery deepens!

As with most things, it is probably very simple and staring me in the face, but I can't see it Unsure

Any other ideas? Could it be something to do with css?

Thanks
Quote Reply
Re: [valiant] Building sub-categories in home.html In reply to
Hmm - just tried removing the css from home.html and rebuilding / refreshing - no change. The sodding gap is still there - aaarrrrggghhh!

Have also tried uninstalling and reinstalling Yahoo Subcats - the <br><p>- subcat info here - </p> tags are still there - it must be something in Links SQL.

Any ideas or solutions much appreciated - I would prefer not to have to do this by hand each time I rebuild!

Cheers.
Quote Reply
Re: [valiant] Building sub-categories in home.html In reply to
Did you modify anything in LSQL codes, and in category database?

I wrote:
Quote:
I suppose you have the <p> tags right within the descriptions...

Check the descriptions in the database.
No other ideas currently (if you did not modify the original codes).

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Building sub-categories in home.html In reply to
The code is intact - it is a default installation, with only the Yahoo and Adcycle plugins at present.

I did check the database after you mentioned it earlier - nothing untoward there I am afraid. Thanks anyway.

I've been ripping my hair out on this one....I know what is causing the spacing problem - I just don't know how to remove it on the build!
Quote Reply
Re: [valiant] Building sub-categories in home.html In reply to
Take a Windows Commander, go to the lsql directory, then search for </p> string (check Find text option).
You will have to find the place where it is.
No more idea.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Building sub-categories in home.html In reply to
I still can't see anything obvious.

The gap is appearing between the Category Name (i.e. Bridalwear & Accessories) and the Description field (i.e. SUB1 here - used by the plugin to insert the subcategories of the root).

ID 1 Name Bridalwear & Accessories Subcategory of Root Description SUB1



Alex - any explanation for the additional <br><p> and </p> tags around SUB1? The plugin is disabled at present until I can resolve this issue.

Please feel free to look at the html code - it is uncompressed at present:

http://www.askweddings.co.uk/directory/index.shtml

Help solve some sleepness nights! There is only so much caffeine the body can take!

Thanks in advance.

Valiant
Quote Reply
Re: [valiant] Building sub-categories in home.html In reply to
Sorted now! Was hidden in subcategory.html - the answer had been staring me straight in the face!

<%if Description%><br><p><%Description%></p><%endif%>

Amazing what a good night's sleep and a fresh look at things can do for you Blush
Quote Reply
Re: [valiant] Building sub-categories in home.html In reply to
Quote:
The code is intact - it is a default installation, with only the Yahoo and Adcycle plugins at present.
At least it was almost untouched Laugh. Except the <p> tags Wink.
I asked if you modified the original codes...

Many users reports problems and ask for help, in problems what they caused by modifying original codes or templates. Usually they don't know if they modified accidentally something, and what was the modification. This increases forum activity unnecessarily.

Alex, the solution would be to recommend the free personal version of Componentsoftware RCS for Windows to be used by novice users, but it is also useful for professional programmers, too. The keyword is the usefullness.
Advantages of Componentsoftware RCS (CSRCS):
- the files, where changes was done in the code, can be easily found
- when checking a modified file, the changes are highlighted, so the user can see what was modified in compare to the original version.
- the modifications which works fine, can be saved.
- this way anybody can save his own version history,
- problem solving, error checking is much easier, using the this version controlling system (CSRCS).

Alex, I think we should promote this free Windows based version controlling utility, so the novice users would use it when starting to use Gossamer scripts, especially the Links scripts (CSRCS is free for personal use).
It would only need a short "How to install & use CSRCS", then users could start using it.

Waiting opinions.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Building sub-categories in home.html In reply to
Sounds like a good idea to me:

When you are changing so many templates, it is difficult to keep track of what you have changed, but more importantly, WHERE you have made the change.

I've downloaded the recommended software - should help me to implement some change management procedures! Thanks for the advice and your time webmaster33. Much appreciated!