Tag: reclaimyourcity

RYC is back!!!

After a 5-year sabbatical, we finally relaunched reclaimyourcity.net with a brand new website! The relaunch is the result of the last couple of months of setting up and extending Drupal, refining the old content and photo database, and creating lots of exciting photo specials and articles about street art. Hopefully, the site will get its full momentum again soon!    

Posted in code Tagged with: , , , , , , ,

Drupal: Check and render image fields

At reclaimyourcity, we have picture and artist nodes and relate them via a node reference. Now some of the artists may have a little profile comprising a picture and a description. When viewing the artist profile and there is no profile picture yet, we want to show the latest submitted picture of the particular artist instead. For this, we first need to check the value of the profile picture field and if it is not set, we need to get and render the latest picture of the artist. The first question is where to perform this check. Fortunately, Drupal offers

Posted in code Tagged with: , , , , , , ,

Drupal: Group and sort by taxonomy term

For the reclaimyourcity relaunch, we added different categories (via taxonomy) for our picture specials. Now, a view was needed that displayed all special titles grouped by the particular category. And the categories should be sorted by the term’s weight since the category other should be displayed last. The following steps delivered the desired result: 1. First select the required fields of the picture specials, namely Content: Title and Content: special_type which refers to the terms of the corresponding vocabulary. 2. Exclude the special_type from display and in the grid layout settings, set the grouping field to special_type. Now, the picture specials are already

Posted in code Tagged with: , , , , ,

Street art alleys in the Mission

While strolling through the Mission district in San Francisco, I visited the famous street art and graffiti alleys – and just in time to see the following new beautiful mural in the making. Seeing so many different styles and artists in one place is pretty impressive. The mixture of surreal and funny characters, political statements, and old school graffiti, tags, and stencils makes you easily wander around for hours. There is also a great book about the murals and their history in the district: Mission Street Art San Francisco: Mission Muralismo. They also have many more pictures of the murals

Posted in see Tagged with: , , , , , ,

Drupal: Tweaking block visibility for content types and URLs

For the relaunch of reclaimyourcity.net, I recently developed a custom pager module that provides a block with links to the previous and next picture according to the particular gallery. The visibility settings for the block are restricted to the content type of the street art pictures. However, the pager also tries to show up on the node add/edit pages which is not very useful there. Based on the posts in this thread about block visibility at drupal.org, adding the following PHP validation prevents the block from showing on the node create/edit pages. <?php $show = TRUE; $url = request_uri(); $hide_on_pages

Posted in code Tagged with: , , , , , ,