Recipe 22: Reviewing Default Views code
Note
Ingredients
Fieldsets table from the beginning of this chapter
Views Worksheet from Recipe 10
Host access to the views_statistics.inc file
popular_recent view, loaded in the browser
Statistics module, enabled
Optional: MySQL access
In this recipe we'll pull back the curtain and examine the code behind the default views. We will not make any edits, we're just looking.
Open the existing popular_recent view at:
http://YOURSITE.com/admin/build/views/popular_recent/edit
Recall from Recipes 14 and 15 that the statistics module must be enabled for this view to appear.
Log in to your server, and open the
views_statistics.inc
file found in the<DRUPALROOT>/sites/all/modules/views/modules
directory. (Depending on your site configuration, it may also be found in<DRUPALROOT>/sites/default/modules/views/modules
.<DRUPALROOT>
is shorthand for your Drupal install location, which may be a path such as/home/yourname/public_html
.)Find the
statistics_views_default_views...