Gossamer Forum
Home : Products : Links 2.0 : Customization :

Use the same Link ID again

Quote Reply
Use the same Link ID again
Hello,

I used Links 2.0 for a little Site for Winning Games. These Games changed very often and then I delete this
record in Links 2.0. Each new record become a new Link ID and buil a new static Site.

So it is possible that Links 2.0 takes a ID which has be used before ??

Example:

I have this record ...../html/123.html

The latest Link ID is the 500

Now I delete the record with the 123 Link ID

When a new record appear, then Links 2.0 give this record the Link ID 501

I want that Links 2.0 looks first if there is an before used Link ID and take this for the new record.


I think it's better for the search engine.

Thanx,
qix
Quote Reply
Re: [qix] Use the same Link ID again In reply to
Hi,

Nope, you can't do this.

The simple answer being, that the /admin/data/linksid.txt file holds the last LinkID that was added (so when a new one is added, it will just take that number - and add 1)

The ONLY way you could do what you are asking - is by manually editing the /admin/data/links.db file, which I wouldn't recommend Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Use the same Link ID again In reply to
Thanks Andy,

is there a way in Links SQL ??

qix
Quote Reply
Re: [Andy] Use the same Link ID again In reply to
Well, I expect it can be done, but would require writing a few new routines. Would be a practical thing to do, actually. Unimpressed

Have the script look through the first field (ID) for the first available (lowest) number that is not in use (if seen), and use it.

Another way would be to have deleted IDs added to a text file, and have the script pull new (lowest) ID numbers from there first, before adding a new one.

But, I'm not up t o doing this right now...

Or, to do it manually, you don't have to edit the file, you can put the ID number in the field in the admin, just be sure not to use duplicates.


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Mar 6, 2008, 11:53 AM
Quote Reply
Re: [PerlFlunkie] Use the same Link ID again In reply to
PerlFlunkie wrote:
Well, I expect it can be done, but would require writing a few new routines. Would be a practical thing to do, actually. Unimpressed

Have the script look through the first field (ID) for the first available (lowest) number that is not in use (if seen), and use it.

Another way would be to have deleted IDs added to a text file, and have the script pull new (lowest) ID numbers from there first, before adding a new one.

But, I'm not up t o doing this right now...

Or, to do it manually, you don't have to edit the file, you can put the ID number in the field in the admin, just be sure not to use duplicates.

I do it manually for a long time, but now with more and more new entries I am looking for a better way Crazy
I think to add the deleted ID's in a text file is a good way to to this. But I can't do this Unsure So I have to wait Shocked

Thanks for your Ideas.

qix
Quote Reply
Re: [qix] Use the same Link ID again In reply to
qix wrote:
PerlFlunkie wrote:
I think to add the deleted ID's in a text file is a good way to to this. But I can't do this Unsure So I have to wait Shocked

qix

I posted over on the custom-mods forum that adding a write to a file would be the easiest way. I don't have the code, but right after the successful delete, open a text file, write the ID to it, close it.

Before an add, where the new ID would be obtained from the high-number, check the file above first, if there is an entry, remove it, rewrite the file, and move on. If it's empty, go through the normal channel.

This is why the SQL version is so popular :) The plugin system, the use of tables not files, etc.

And, you could use the dynamic-look pages so you wouldn't have to write out a static site, but the site would look static.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.