Jump to content


New Members
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About ScottLacey

  • Rank
  1. So I am currently working on a website that is a business directory. These listings are grouped by regions and categories. My problem is that this website is going to be multilingual. The regions and categories are stored in a database and I need to easily be able to both modify and access the language items based on the user's selected language. I would prefer to store these names in CI's language files. I've thought about creating a column in each table called "language index" so that would make it easy to call the items from the language file... for example foreach($query_categories->result_array() as $cat) { $title = $this->language->item($cat['language_index']); } But the bigger issue is editing the file if a category is modified or deleted(I can just add a new line to the end of the file if one is created). What do you guys think would be the best way to store and modify names for different languages for each of these regions and categories?
  2. Yeah I agree with you about alerting the user. Seems like it would be more of an annoyance than anything else. I was thinking about this more and realized it would be better to perform the search as the user types. However, instead of a timer, do you think performing the search after every three or four types of a key would be more prudent?
  3. Okay, so I'm pretty new to jQuery but I am pretty experienced with PHP. I am about to begin coding a script written mostly in jQuery. It will use AJAX to verify that an article tag a user provides exists in a database. When a user goes to write an article on my website, my form will ask them to add keyword tags which will be used in searches. Basically only admins will be allowed to create new tags, so this is why I check the tags first. And also to prevent duplicates and similar tag entries in the database. The form will have a single input that the user will use to search for a tag. Once the user hits the enter key, it will search the database for tags that already exist. Once the ajax is complete, a list of related tags will pop up and the user will be able to select their desired tag by either clicking the tag link in the list or by pressing enter. This is a very crude demonstration of what my idea is. This is my flow chart. Am I missing any steps? Have any suggestions that would make this better?
  4. I have a file upload script that will eventually process a ton of files. I would like to upload them into sub-directories according to what year, month, and day they are uploaded. A typical tree should look like this: attachments/ --/2014 -----/January --------/01 --------/02 --------/03 , etc. -----/February --------/01 --------/04 --------/09 --------/18 --------/20, etc -----/March, etc --/2015, etc. So a file called image.jpg uploaded on 10/31/2014 would have a URL of attachments/2014/October/31/image.jpg. I understand that every time a file is uploaded, the script would have to detect through FTP whether or not folders for the year, month, and day exist, and if they don't create them. My problem is that I have no idea what the logic of this script would be. What order should I do things in? Is there a way to use maybe foreach to detect/create the folders? Any input would be appreciated.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.