Gossamer Forum
Quote Reply
How to duplicate a link.
Hi all,
i have a lot of Links that have to be repeated every month.
(Example: We have every month one or two parties, all i must change are the pics and the date, but i want to let stay the old dates in the db.)
So i need a way to duplicate a link. I dont talk about the "copy-function" in the browser menu,
excatly it ads only another cat.
I need a way to make a complete new link, but with the same data, so i have to change only the needed fields.

BTW: This could be another idea:
Somewhere we define values for the add-form, then call it while passing a value for this template.
Yes, an easy way could be with another add-forms or two, but i dont want to work first outside, then inside the admin. Hmm. Think, that comes on two ways.
1. With a new table, with all the needed fields in Links-Table.
Every col there stands for a set of defaults. Then i must add aroutine in admin, that reads the default row and name, pass a new field to the input form in admin. When pass the form this new value must go with, the admin.cgi takes it and befor passing the add-form, it has to fill in the values from the default.
Think this is practible.

Any better idea to do it?

An easier way should be an SQL-Statement, take the data and fill in manually with phpMyAdmin.
Hmm. Ok, got it i will write another small php, that takes an id, fetch the data from Links and CatLinks and insert a new row in both tables.

Seems, i should slowly think about putting all the small phps together ;-)