Go to Post ... Better to treat everything like it's about to explode and be wrong than the other way round. - Bongle [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > CD Forum Support
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 21-02-2008, 18:08
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: CD-Media tagging: Commas versus spaces

Actually, how about (this will require a bit of AJAX coding) an auto-complete tagging field, like on Facebook. You start typing the tag, and it'll start narrowing down the choices. When the PHP script goes and keeps fetching the tags, you can do a str_replace() to remove spaces and invalid characters as they are entered, so typing frc 228 will show up as frc228.

Then they either click on the tag in the AJAX-dropdown box, or they can hit the enter button on the keyboard. If there was at least one related tag result, enter will add the top rated result. Otherwise if there are no new results, it will add whatever the user typed in as a tag. And if the user wants to add a tag that is the same as an existing tag but shorter, in the dropdown box add in an extra spot for the currently typed tag that does not count in the results.

Here's a screenshot of this exact same principle in action in the CMS I wrote for Team 228's website last year:




Going into details, the data for all the tags are you see with the "remove" boxes are stored in a single, space-deliminated hidden text area. When the user has a tag they want to enter, either by clicking on the tag or hitting the enter key, it calls a Javascript function with the tag to add. It reads the text area, explodes the string into an array, adds in the new tag into the array, then puts an imploded string back into the text field. At this time, it also goes through the array in a for loop, and rebuilds a <div> element using .innerHTML to show the tags as <span>'s floated left.

It took me like four or five hours to fully implement this tagging feature, and I'm a lot more of a mechanical guy than a CS guy.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Build/Meeting Spaces manderson5192 Team Organization 8 23-02-2008 12:37
CD-Media tagging standards for FLL/FTC teams? Billfred CD Forum Support 1 15-11-2007 09:27
paper: Basic Tagging Guide to CD-Media (Pictures) Michelle Celio Extra Discussion 9 23-07-2006 16:40
CD Media Tagging - Championships or Nationals Adam Richards General Forum 13 07-04-2006 07:07
Regional Remaining Spaces - Location Listings archiver 2000 0 24-06-2002 00:06


All times are GMT -5. The time now is 08:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi