Jump to content
Larry Ullman's Book Forums

scribbly

Members
  • Posts

    5
  • Joined

  • Last visited

scribbly's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. You may have guessed that I'm just up to Views in your book, and working up to use bootstrap thumbnails... but I can't help thinking ahead and thinking about database structure. Your one table option could be achieved using a view? I've not got into yii using views, but I'm hoping that it'd be basically the same as using a table? My thoughts on a separate view is that each module_has_tags table can also be used individually when displaying the module, and the view over the whole application. With my db hat on... the view would add the module_type. I was thinking that the tags would only be added to the record when in edit mode, but I'm not sure that's reasonable or not? The other thing was how it gets implemented... I had a look at a tagging plugin and it used behaviours. I'm guessing that when viewing the result, that it's collected using a query (WHERE tag_id = this_tag_id)?
  2. Hi Larry: I'm happily working through your book, but not implementing it as such, more translating it into my current project. What I'm wanting to do is to have the ability for users to use #tags. I don't think it's an issue if it was just one model involved, but what I want to do is have all the models tag-able... using the book's set-up: users can tag them selves, pages can be tagged and files can be tagged -- all using the same tbl_tag. What I want to be able to do is implement a search and/or tag cloud so that selecting the one tag will return records from each table (if they are correctly tagged). If I had my database hat on I'd say you'd do something like: tbl_user_has_tags tbl_page_has_tags tbl_file_has_tags and use a view to union them all together. But I'm not sure how that works with yii... can you give me a direction to start in? Thanks,
  3. What I might do then is continues with v1 and develop the application, then you (and I) may be in a better position to convert it to v2? I'm presuming that there would be no dramas using the same database...
  4. Hey Larry: I'm wondering if you're taking questions about Yii2? I'm working through your book and got well into it with version 1 but thought I'd try 2... but it's got me stumped
  5. Thanks matthuisman... I had that problem in Chapter 5 too. Found docs helpful: http://www.yiiframework.com/doc/api/1.1/CExistValidator Though, I'm confused if the source code works, why isn't my code working? Larry??
×
×
  • Create New...