Gossamer Forum
Home : Products : Links 2.0 : Customization :

Multiple Categories Mod for Links v2

(Page 2 of 4)
> > > >
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Logan T,

I have the mod running at http://www.online-sweepstakes.com/


Masque,

You need to either manually add the field to an existing database or write a script to do it for you. You can find a similar script at www.ten-tenths.com/links/mods/multicat/convert.txt , but you'll have to modify it a bit. I plan on writing a generic one when I get time.


rajani,

I would think anyone with 5,000 categories or a 7mb category.db file would be stretching the limits of Links and would be much better suited using something other than Links, probably custom stuff done in c. It goes beyond what Links is capable of and what it was written for.

I don't think you understand how the multiple categories mod works. I get the impression that you think Links makes a seperate entry in the database for each category a single link is listed under. No matter how many categories one link is placed under, there is only one record in the database for each link. The alternate categories are listed side by side in the AltCategories field for each link. Each alternate category is not placed in it's own field.

Brent

[This message has been edited by loopy (edited February 25, 1999).]
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Hello Loopy !

Yes I see the misunderstanding clearly. Also this is a result of checking the Megalinks + Alt_Cat function one user of links v2.0 made.

I checked the links.db and saw that it writes two lines for two submissions!! I now beleive that some thing there was fishy! Well,.....

Here is an example that could explain me and also to many others how the Multi_Cat will look like in the Links.db

If the user submits a link in three categories at the same time or afterwards.

America/AZ/Companies(CategoryID=777)

After the first submission his entry is already there in the URL.db. So he submits, no new ID is created, the entry gets in to the AltCategories field. Then he submits again. Question, where does the Categoriy|Alt

Games/America/AZ(CategoryID=888)
Computers/America/AZ(CategoryID=999)

Then how will this entry look like?


100|Title|http:/www.URL.com|31-Feb-2999|777|...888...999...|Description|ContactName|ContactEmail@ContactEmail.com|1000|Yes|Yes|2000|3000


Therefore I beleive one should create one more field to hold the two new entries of the submission categories. Also,ofcourse the respective changes must be made to the programing as you suggested beautifully on your mods page.

What I do not understand is ......if a new field is created...

You defined AltCategories, Alt_Cat, unique_categories...
----------------------
$db_alt = XXX
-----------------------
my (@values, $category, $cat, @alt_categories, @categorylist, $depth, $i, $cat, %unique_categories);
my $staggered_mode = shift | | undef;
----------------------
# We have to caluclate the affect of the link on each alt category as well as the main.
%unique_categories = "";
-------------------
# and also marks any above categories new, if this link is new.
for $i (0 .. $depth) {
if (! defined ($unique_categories{$cat})) {
$unique_categories{$cat} += 1;
$stats{$cat}[0]++;
}
----------------------
# Go through a little hoops to only load category list when absolutely neccessary.
if ($in{'db'} eq 'links') {
exists $db_select_fields{$db_cols[$db_category]}
or ($db_select_fields{$db_cols[$db_category]} = join (",", &category_list));
($db_select_fields{$db_cols[$db_alt]} = $db_select_fields{'Mult-AltCategories'} = join (",", &category_list));
}
else {
$db_select_fields{'Related'} or
($db_select_fields{'Related'} = $db_select_fields{'Mult-Related'} = join ",", &category_list);
}
foreach $field (@db_cols) {
--------------------------


------------------
rajani













[This message has been edited by rajani (edited February 25, 1999).]
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Loopy,
I made your changes as stated and I am receiving this error:
: fatal error: syntax error at /www/gcnet/forms/search2/admin/links.def line 37, near ")"

I checked and triple-checked to make sure everything was lined up correctly and such; any ideas?

BTW, THANK YOU for posting this mod for everyone, it was very selfless of you and you're not receiving enough gratitude for the hard work you're doing helping us work out our individual errors.
You're a saint! 8)

Raven
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
hye,

i've implemented the mod to my links, all would work togehter - BUT:

the links wouldn't be shwon in the alternate categories.... :-(

what could be wrong?
*i'm using Links 2b4 and couldn't change to another version*

please help, thnx

------------------
www.ford-network.at



Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
ELMS:
you could take a look to the code of LLinks at www.ford-network.at/LLinks

there i've added this feature, may be if you take a look you'll find out how to do.

cu

------------------
www.ford-network.at



Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
loopy,

Do you know how to let users add alt category in the add form. I do not know what to add in db_utils.pl and site_html.pl. If I know what code it is for site_html.pl, then I think I can transfer it for template users...

Thanks in advance,
elms

------------------
www.webmerch.com
links@webmerch.com

[This message has been edited by elms (edited March 14, 1999).]
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
To allow users of your site to add links in multiple categories the alternate category field needs to be added to add.cgi.

Had you looked at that, loopy?

Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
For those who have added Loopys great Multiple Categories mod to an existing database this may help. The old links.db in the admin/data file needs to have values inserted for the new field: AltCategories.
You need to manually add the AltCategorie name to an existing database by inserting it after the Categorie name in links.db
For categories with no multiple category simply paste |0| between category and description field.

------------------
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
I'm having the same problem as Bogus, can
My links wont show up in the assigned alternate categories.

anyone please help?
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Comment about HJ's Post:

Or you could use the upgrade.pl file to add new fields into your links.db. You can create a null default value of "" in the upgrade.pl file. This automatically puts an extra delimiter after the main categories field in the links.db file. Then you can add the new "sub-categories" or alternative categories via the Modify Links option in the Admin Console.

The upgrade.pl file is located somewhere in the forum. I don't know where off hand...But you can search for "upgrade.pl" and you should find it.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

Note from Bobsie: It is located at http://www.gossamer-threads.com/...um3/HTML/001090.html

[This message has been edited by Bobsie (edited August 26, 1999).]
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
+++++++++++++++++++++++
RE:hye,
i've implemented the mod to my links, all would work togehter - BUT:

the links wouldn't be shwon in the alternate categories.... :-(

what could be wrong?
*i'm using Links 2b4 and couldn't change to another version*

please help,

I'm having the same problem as Bogus, can
My links wont show up in the assigned alternate categories.
anyone please help?
++++++++++++++++++++++++++++

Has anyone fixed this?



------------------
1010100101010010001
http://www.gqfitness.com
http://www.digitalskyline.com
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
I can't find how to do this, but how do you have the user select multiple categories? What code do you insert in the add form? Does anyone know this for non-templates? Thanks.
-Greg
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
I to am having problems getting to display properlly in the user add form.

This is the code in in my site_template_html.pl

my $altcategories = &build_select_field
("AltCategories","$in{'AltCategories'}","AltCategories","MULTIPLE Size=3
");

And the error message I am getting is

:error building select field: no select fields specified in config for field 'AltCategories'!



------------------
-------------------------
luke@thetravelhelper.com
Visit www.thetravelhelper.com
-------------------------
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Hi,

as much as I know and experienced, you can't select AltCategories from add.html.

The only way is to do it from admin panel...

A very good mod anyway!

Hope it helps Wink

Kodak
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Ok everybody, the multi-category mod works just fine by itself, if you want to add the additional categories throught the admin.

However if you want users to add to it you need to follow this link :

http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/000960.html

There you will find the code to add it to you add.cgi and everything else. If you installed the multi-category mod exactly then install this one exactly everything will work fine.

If you use the exclude mod from bobsie, then you will have to use my join mod to make both mods work.

that is at http://www.concepts2000.com/Mods/join.html

NOTE: my site will be down for about 72 hours, waiting for internic to finish making a change to my domain name.

I have used the multi-category mod for about 4 months now with no problems, and I have used the exclude mod with the join mod for about 3 months with no problems.

Remember, there is no way to use the multi-cateory and exclude mods together without the join mod.

Joker
DN Jacobsen
Concepts 2000
http://www.concepts2000.com
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Hello, how did you get the multiple categories listed on your site Loopy? I think thats what Ranjini was looking for..ie.
You have:entry frequency and then the links for that subject, then you have:prize(s)and the links for that subject..and so on, is that what your mod can do? It is exactly what I was looking for. To have 2 sections on the main page, Category and City...like prizes, and entry frequency.

Cam
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
I only see one bad thing about this mod. Let's say I'm shifty shadey love to spam sites submitter and I wanna promote my new gizmo get rich scheme. I'd cross post this link to every possible alt category. Soon you have a spamful rich database with a bunch of get rich buy this links in every single category...even the unrelated ones. :-)

------------------
www.webgotcha.com
[b]admin@webgotcha.com[/b]
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
No, the multiple categories mod doesn't have anything to do with the display of the categories. All I did was make a unique subroutine for each category that I wanted to be displayed differently.

For example, the category subroutine in nph-build.cgi gathers all the data for each category and sends it to a subroutine in site-html.pl to add the html. Instead of sending every categories' info to the same sub, I created a couple of different ones for each format that I wanted. And voila, you can format each category page anyway you want.

BTW, my site has been running off of Links SQL for a couple of weeks now and with the exception of a few minor bugs, it works perfectly. I highly recommend it to anyone considering making the jump.


Denver,
Yes, that's a very real possibility - if you allowed visitors to select multiple categories via the add url form, but the mod doesn't do that for that very reason. Only the admin can select the multiple categories.


Brent
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Very confusing!!! I have been reading the threads regarding Loopy's Mod but I can not get the idea somehow!!! probably due to the many topics and sub-issues that are discussed about this MOD. I would really appreciate your help if someone can tell me where to start and what do I really need to do the followings:

1)- Allow my visitor to submit his/her site using ADD URL or MODIFY URL form to one or two categories at ones. So I should have two CATEGORY fields to choose from on the ADD URL and MODIFY URL forms.

2)- To be easy to validate and insert the suggusted site into the suggusted categories in my site (using ADMIN.CGI - Means to have the same ID maybe...not sure.

3)- If someone searches for this link, only one link will appear in the search results (or maybe both form the two diffrent categories that the link is listed under).

I realy do not know what do I need. I thank you in advance in directing me ...

Regards..
Mark..
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
 The following thread helps to place the tags on add.html, modify.html, etc.

www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/000960.html

[This message has been edited by DogTags (edited February 12, 2000).]
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Thank you for the link. I've added Loopy's Multi-Category Mod and Comments Mod (also from Loopy). Also, I followed http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/000960.html step by step. every thing seems to work fine except that category or subcategory pages get massed up. Means, the look of the tables inside these templates look massy. What could be the problem to fix the category and sub category pages knowing that I have not touch the template files when I installed these modules.
One more thing, should I implement this MOD http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/002377.html to make the alt-category works proberly as it suggusts. If so, could you please tell me what is the database file name that is used by links? is it db.pl? or is it something else.

I thank you in advance for your help and regards..
Mark Eiad
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Hi there,

Be careful about putting the mod in from the above thread as this replaces the ~~ with a <br> tag and stops the admin script adding to all selected catagories.

If anyone knows a way round this please let me know



------------------
Regards
MDJ
http://www.isee-multimedia.co.uk
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
To all who will be using the multiple category mod.....be careful. I just added the mod to my site (using templates) and luckily I only had 3 links so far in my database.
When you add the AltCategories to your site, the data for already submitted links gets shifted in the links manager. IE: the contact email will be listed in the "Contact name" etc. Everything gets shifted up one, but then again it depends on where you add the AltCategories entry within your files. Regardless, it will mess up previous entries. Your best to add this mod before having people submit their sites (either that or you fix the entries themselves)
Other than that it is a great mod that is easy to apply. (im still waiting for someone to choose multiple categories to see if it definately works Smile
Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Uh...skotty, you have to use the upgrade.pl file written by Bobsie to add the field in your links.db file! (AS stated in this Thread!)

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Multiple Categories Mod for Links v2 In reply to
Sorry about that Eliot, this thread is so long that it is quite easy to forget some details along the way. Smile
At least I do take the time and SEARCH for help on the message board before asking a question unlike some people. Smile

I do have two issues after installing the mod though. Hopefully you or someone else can help me.
A couple of posts above, mdj1 says "Be careful about putting the mod in from the above thread as this replaces the ~~ with a <br> tag and stops the admin script adding to all selected catagories."
At first I didn't understand what he meant, but now I do. After modifying a category and selecting multiple "related" categories, the modification to the entry in the categories.db file gets written wrong. ~~ gets replaced by <br>

IE: 73|Discussion/Chat&#0124; &#0124;Discussion<br>Discussion/Message_Boards<br>Discussion/Newsgroups&#0124; &#0124;&#0124; &#0124;

What could be causing this and how do you fix it?

Also, since installing the mod I have noticed that if I go to an appropriate category, then choose add link, the add form's category field is no longer chosen for the user, instead it is now a drop down box, so the user can reselect the main category again. Before it was chosen and would not allow u to change it.
Is this normal after installing the mod?

Thanks for any answers people. Smile

skotty

> > > >