views

Dealing with MySQL Temp Table algorithm for views

It would be nice if the Temp Table algorithm would be renamed to Unscalable algorithm. Perhaps then it would provide more of a warning to developers when seeing this in a view definition - similarly when it says using temp table in the explain results. Just a tongue-in-cheek request for the most part but really it can be disastrous to t...

Rails view - user enters minutes, we save seconds?

Hi everyone, I have a simple text_field in my form where a user enters a time in minutes, i.e. 60. How can I multiply that number by 60 before saving the form, such that the database stores the number in seconds? Then, how do I reverse that and show the field in minutes on another view? Thank you! ...

Drupal, Views: header doesn't accept PHP..

hi, I'm using Views for some nodes, and I want to display a different View title according to which taxonomy tags are selected in my filter. I already have taxonomy field for each node in my view. But this is not what I need. I basically need to display all the currently filtered tags on the top of my view. I was wondering if I can so...

UINavigationController change position of pushed UIViewController view

I tried to solve this in so many ways but always failed. Basically what I need is a NavigationController with a customized NavigationBar (different height and smaller back Button) which I already achieved. This creats two problems. If I use the default NavigationBar of the NavigationController, I have a smaller NavigationBar but the v...

View changes nvarchars to varchars in SQL Server 2008

I have a view in a SQL Server 2008 db that simply exposes about 20 fields of one table to be consumed via ODBC to a client. When I tried to replicate this view in another database, the client could not consume the data source. Then I noticed some weirdness. The columns in the view are shown, in SQL Server Management Studio, to be varc...

How to Inserting message into View that depends on session value. ASP.NET MVC. Best practice

User have to populate multistep questionnaire web-forms and step messages depend on the option chosen by user at the very beginning. Messages are stored in web.config file. I use asp.net mvc project, strong typed views and keep business logic separated from controller in static class. I don't want to make business logic dependency on web...

Drupal - Break up content with different content (After every 12 products, show an ad?)

Currently I have the homepage of a t-shirt site list a 4 column grid, each cell containing all the shirts on the website (using views). The client would like every few rows to display an ad (perhaps a random view/block item). Is this possible? I'm sure I will end up needing to set the grid display to something else but how could I progra...

Drupal : Custom views filter

Hi, First thing I would say is that I am a Drupal newbie. So, I would appreciate your answer in a detailed step by step process. I am using Drupal 6 and location module. There are two main content types - user profile (using content profile module) and event content type. Both have one field for location. Now, lets suppose in his pro...

Strategies for Mapping Views in NHibernate

It seems that NHibernate needs to have an id tag specified as part of the mapping. This presents a problem for views as most of the time (in my experience) a view will not have an Id. I have mapped views before in nhibernate, but they way I did it seemed to be be messy to me. Here is a contrived example of how I am doing it currentl...

Drupal views slideshow returning only one result

Views slideshow for Dupal is amazing … there are no other words for it. I have used it on a few projects with little to no issues at all. However, the current project that I am working on isn't going as smoothly. When the 'View style' is set to unformatted the preview returns the right amount of nodes but when slideshow is selected the ...

Drupal Views pulling Data Fields

I'm a little new to drupal but have been using things like devel module and theme developer to speed up the learning process. My question, is it possible to theme an entire views BLOCK from a single views tpl.php page OR even a preprocess? When I'm grabbing the $view object I can see results $node->result, it has all of the results, bu...

How do I set up filters in a Drupal view that apply across two different content types?

I have two different content types being loaded into a view. News, and reviews. Each of the content types has a drop-down box to select what category they fall into. ie. a review could be for a dvd, music, etc. and news could be music, cinema, etc. I want to the view to display some categories of news, and some categories of reviews,...

Drupal - Creating alphabetical pager using views

Hi, Thanks guys. This forum is really helpful. Now I have another question for you. I want to create a alphabetical pager for a view, so that when someone clicks on "A", they will see submissions whose title is starting with alphabet A. I have successfully created alpha pager by following http://tedserbinski.com/tags/drupal/creating-al...

Drupal: How to get views argument into header/footer/empty view

I found this code snippet: <?php $view = views_get_current_view(); $arg0 = $view->args[0]; ?> but i don't know where to begin inserting this php code snippet. ...

Drupal module for complex hours of operation / office hours

Background: I am building a website in Drupal that links together a wide variety of social service providers for the purposes of discovery, collaboration, and all that good stuff. The goal is to make a website that is simple to browse for consumers of these services and simple to update for providers of these services. The beta has been...

Is it bad to use a model directly from a view in codeigniter?

I know normally the data is passed thru to the view with the controller. however, currently in my view I load my model ($this->load->model('Db_model');) so i can use it in a loop to retrieve a users profile picture path from a array of IDs that is passed from controller. Will loading the db model in the view to accomplish this make my si...

how can i query a table that got split to 2 smaller tables? Union? view ?

hello friends, I have a very big table (nearly 2,000,000 records) that got split to 2 smaller tables. one table contains only records from last week and the other contains all the rest (which is a lot...) now i got some Stored Procedures / Functions that used to query the big table before it got split. i still need them to query the u...

asp.net mvc2 - two (or more) views using same controller?

Is it possible that two different views use the same controller? I have very complex controller that displays some data. Now I need to display this data (which is retrieved using ajax) in two partial views because I want to place them on different positions in layout. ...

how to access cck checkbox value from views .tpl

Subject for advanced views theming: 1) Create CCK integer field "field_checkbox" - Single on/of checkbox Allowed values 0|No 1|Yes 2) In views row-style .tpl <?php print $fields['field_checkbox_value']->content ?> doesn't print any value, why? Other fields output fine. Thank you in advance! ...

Drupal: Whow to forward argument to block-exposed-filters results?

I have a typical views page displaying nodes, with a taxonomy tid receiveid as an argument through the url: cat/% Now I want to further narow the results with an exposed filter by a cck field. All goes well and for tid=10 (for instance), the filtered page url is cat/10?field_no_people_value=5 Now, when I expose the filter in a block, t...