Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Text file field names drag and drop between windows

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
janm
Smarty Rookie


Joined: 23 Sep 2004
Posts: 12
Location: New Zealand

PostPosted: Thu Sep 23, 2004 5:20 am    Post subject: Text file field names drag and drop between windows Reply with quote

I want to update a mysql database with text file information arranged in CSV or tab-delimited format using Smarty templates.
As the text files can vary in format - Is it possible to display two windows side by side with a list of field names from an input text file in a left-hand window and a list of pre-ordained field names from a 'bucket' database table in the right-hand window.
The intention is to drag selected field names on the left window to match field names in the right-hand window.
I can then execute the appropriate scripts to update the database from the selected fields.
I have seen this operate in other database systems. Can I do it with Smarty?
Back to top
View user's profile Send private message Visit poster's website
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Thu Sep 23, 2004 6:22 am    Post subject: Re: Text file field names drag and drop between windows Reply with quote

janm wrote:
I want to update a mysql database with text file information arranged in CSV or tab-delimited format using Smarty templates.
As the text files can vary in format - Is it possible to display two windows side by side with a list of field names from an input text file in a left-hand window and a list of pre-ordained field names from a 'bucket' database table in the right-hand window.
The intention is to drag selected field names on the left window to match field names in the right-hand window.
I can then execute the appropriate scripts to update the database from the selected fields.
I have seen this operate in other database systems. Can I do it with Smarty?


Smarty is no database system.
You have to do all your proposals in PHP
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Sep 23, 2004 7:03 am    Post subject: Reply with quote

well...I'd say its doable (to some degree depending on how much cross-browser support you need and how much javascript you are willing to write) but I don't know of any prebuilt solutions that you can use out-of-the-box. Since you will need forms and layout control, putting those elements into a template seems natural.

Monte wrote a nice plugin library to help deal with forms which includes field pickers, etc. You might be able to adapt some of his work and add drag/drop functionality to get your desired effect (or perhaps it will give you ideas on how to approach your problem). It would make sense, of course, to deal with all of the processing and data loading in a PHP script.

So basically, this is probably more of a javascript project and if you go the Smarty route, I'd think you would want to be automating the insertion of the appropriate javascript/html functionality using plugins and generic templates.

Monte's library is called SmartyFormtool and he announced it here: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=2982
Back to top
View user's profile Send private message
janm
Smarty Rookie


Joined: 23 Sep 2004
Posts: 12
Location: New Zealand

PostPosted: Thu Sep 23, 2004 7:15 am    Post subject: Reply with quote

Thank Boots - I'll give it a go. Naturally I read and process the file in php - updating the database as I go. I have developed scripts that can do that - but your 'field-picker' suggestion sounds like a good start for a re-useable interface - in my favourite tool - Smarty
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP