Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

New/Updated mods -- anyone?

Quote Reply
New/Updated mods -- anyone?
I took a look at the code, and at first glance it looked like it would be easy, then I started to hit some questions about how to add the new/updated buttons in.

Most of the internals seem to be there. LinkSQL has a mod_date field, and it's set up to use that where appropriate, and the add_date field for other checks.

It seems we need to add 2 fields to the 'link' record when we take it from the database:
1) new_graphic -- a comparason of add_date to $today
2) updated_graphic -- a comparason of add_date to mod_date if "isNew" is true

These need to be passed to the templates, so should be added to the %globals array.

Next, the part that really confuses me, is how to do this for categories, and traverse the category tree -- since if we have 3 levels of subcategories, and the new link is added at the third level, all 3 levels of category names need to marked. And, if one third level is 'new1' and one is 'new3' the 'new1' takes priority and propagates up, but not laterally.

Much of the logic, and bug pitfalls can be seen in the original 3-level mod, what is confusing to me is how to integrate the code to the categories.

Alex -- where are you in the next release? And what is planned -- I'd hate to start adding or taking this apart if your 'official' release is going to incorporate these and other changes?



Quote Reply
Re: New/Updated mods -- anyone? In reply to
Hello Mr. Pataki!


Quote:
Much of the logic, and bug pitfalls can be seen in the original 3-level mod, what is confusing to me is how to integrate the code to the categories.
I do not know it there exists a new mod other than Category Alternates (So called a puedo-name of Multi Category mod). If yes then did you develop it or is it from Alex? He said somewhere that he would include it in the email, which I requested in that thread, and I have never received. Thats why I was just curious.

Quote:
Next, the part that really confuses me, is how to do this for categories, and traverse the category tree...

I am also terribly confused in this category question. It has been said that it is for large directories. If one has 1,00,000 - 5,00,000 Links then if I divide, just for a discussion, an average of 1000 categories falling about 100 Links on every category creating 5 pages each having 20 links.

Now to have 1000 categories is no problem in the database but in the submission form just to see 1000 categories is a nightmare. Moreover, if the categories are to be submitted in Multiple categories with different themes like subject and geographic then is more difficult.

It is here probably your and my problem comes in common. What if a sub routine is developed that searches for a pre-defined set of values in a perticular table? This means you can than have many tables sorted out first which contains a matrix of different set of data and then use them from different tables. When for e.g. where there is written

Something similar to

SELECT FROM Category.Alternates one can say

$Selection1 = Table (level New);
SELECT FROM Category.$Selection1

I do not know if such a selection from a table can work in a mysql command with in there. I am not a programmer and this is just an idea a little bit off the topic but though of puting down here as I thought it may be good to exchange.

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











Quote Reply
Re: New/Updated mods -- anyone? In reply to
I can see what you are getting at, but I don't think there is any really good answer using CGI. To download a list of 1000' category names, just for someone to upload a single link, is somewhat overkill no matter how it's done.

I think the solution to your question is to force people to upload links to the appropriate area of the site.

They can only upload/add to the section they are in, and the category name is passed for them.

The alternative solution is to ask them to select the link location before presenting them with the 'add' form. This is really just a variation of the first solution.

In an admin situation, if there are 1000's of categories, a java applet might be the way to go. Make it a small search-list applet, and let people find/select the area they want. This applet would just feed the results to the submit form as another hidden variable. I'm sure there are applets out there that could be modified (or might even exist) for that. I'm not a big fan of Java, but I also don't see my site growing to 1000's of categories any time soon.

By the time it does, there will be either java applets to do what I want, or there will be some other dynamic technology Smile

Quote Reply
Re: New/Updated mods -- anyone? In reply to
Hello Mr. Pataki!


Quote:
To download a list of 1000' category names, just for someone to upload a single link, is somewhat overkill no matter how it's done.
Thats a point but the worst is in the admin area. If I would like to edit 20 links then loading 1000 categories for each link would take away so much of the telephone bill!!! In Germany here the telephone bill of connecting to a local provider is more or less the same as an international call to the USA!!! Calling USA from germany is cheaper than national call.

Regarding such a phone bill discussion I am wondering if someone ever thought how one can reduce phone bills + energy to work with the Links program? Links SQL in the admin area would definately give a lot of phonebills. However let me not take oofff the topic.
Quote:
...to ask them to select the link location before presenting them with the 'add' form
Thats what I wanted to ask you or tell you. For your graphic problem. Instead of java thing if one can chose from a table then the listing of categories in the admin area for each link is presented directly from the table itself cutting down the unnecessary categories to be listed in the pop-up menu. There one requires a selection method of geting data out of rows for a particular link.

Alex, do you think this would be possible at all what I am discussing here? May be there is a solution.


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











Quote Reply
Re: New/Updated mods -- anyone? In reply to
 
Quote:
Thats a point but the worst is in the admin area. If I would like to edit 20 links then loading 1000 categories for each link would take away so much of the telephone bill!!!

There is an option in Links.pm which lets you turn off the drop down list. You will then have to enter in the category id of the category you want. It's a little more difficult as you might need to look up the id first, but theres always going to be a tradeoff.

As for the next version, I'm working on a separate editor program which will allow web based importing/exporting of data and web based table modifications (allowing you to add a new field through the admin section without editing mysql tables or the .def files). I've also looked at the three level of new code and am working on including that, so you might want to hold off on it.

I hope to have it done by Friday.

Cheers,

Alex
Quote Reply
Re: New/Updated mods -- anyone? In reply to
Sounds good Alex! I can't wait. I've been holding off officially deploying the SQL site until I have a secure way of going backwards in it. I can migrate Links 2.0 to SQL, but going the other direction is still problematic.

I did find that the PHP Admin program will generate a script of all the data in all the tables in the database, and probably could be used to backup/restore the system.

I have to actually try it though Smile

But Alex, because of the small size of the SQL user group -- at least visibly -- it's important to know what you are doing/planning because if we do modifications we need to know we can carry them through the next upgrades. Along this line, keeping what would be a version-control system for which subroutines you altered would be a big help.
If you release a new version, like the upgraded search features, it might only affect search.cgi and require very small changes in the other files -- other files that might have been modified for our sites.

If your new releases were both 'new installs' for new customers, and true upgrade/code-patches for the rest of us, it would make us feel much better.

Do you have the ability to set up private forums here? So that registered users would not be giving away your code secrets in discussing modifications to parts of the code?






------------------
Robert S. Pataki, MD
President, PUGDOG Enterprises, Inc.
http://www.postcards.com
Quote Reply
Re: New/Updated mods -- anyone? In reply to
Hello Alex!

The admin I use one can find it on

www.phpwizard.net

I am EXTREMELY satisfied with it. It offers much more and is extra-ordinary.

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











Quote Reply
Re: New/Updated mods -- anyone? In reply to
Have you try this one?
http://www.icaap.org/software/kiosk/
this one seems to have more features.
Quote Reply
Re: New/Updated mods -- anyone? In reply to
 
Quote:
Do you have the ability to set up private forums here? So that registered users would not be giving away your code secrets in discussing modifications to parts of the code?

I did think about setting this up as a private forum, or creating a second private forum, but decided against it.

Most code snippets won't be useful without the underlying modules. (i.e. without the guts of the DBSQL module).

Cheers,

Alex