Mar 07 2017
Mar 07

This weekend’s DrupalCamp London wasn’t my first Drupal event at all, I’ve been to 3 DrupalCon Europe, 4 DrupalCamp Dublin, and a few other DrupalCamps in Ireland and lots of meetups, but in this case I experienced a lot of ‘first times’ that I want to share.

This was the first time I’d attended a Drupal event representing a sponsor organisation, and as a result the way I experienced it was completely different.

Firstly, you focus more on your company’s goals, rather than your personal aims. In this case I was helping Capgemini UK to engage and recruit people for our open positions. This allowed me to socialise more and try to connect with people. We also had T-shirts so it was easier to attract people if you have something free for them. I was also able to have conversations with other sponsors to see why did they sponsor the event, some were also recruiting, but most of them were selling their solutions to prospective clients, Drupal developers and agencies.

The best of this experience was the people I found in other companies and the attendees approaching us for a T-shirt or a job opportunity.

New member of Capgemini UK perspective

As a new joiner in the Capgemini UK Drupal team I attended this event when I wasn’t even a month old in the company, and I am glad I could attend this event at such short notice in my new position, I think this tells a lot about the focus on training and career development Capgemini has and how much they care about Drupal.

As a new employee of the company this event allowed me to meet more colleagues from different departments or teams and meet them in a non-working environment. Again the best of this experience was the people I met and the relations I made.

I joined Capgemini from Ireland, so I was also new to the London Drupal community, and the DrupalCamp gave me the opportunity to connect and create relationships with other members of the Drupal community. Of course they were busy organising this great event, but I was able to contact some of the members, and I have to say they were very friendly when I approached any of the crew or other local members attending the event. I am very happy to have met some friendly people and I am committed to help and volunteer my time in future events, so this was a very good starting point. And again the best were the people I met.

Non-session perspective

As I had other duties I couldn’t attend all sessions. But I was able to attend some sessions and the Keynotes, with special mention to the Saturday keynote from Matt Glaman, it was very motivational and made me think anyone could evolve as a developer if they try and search the resources to get the knowledge. And the closing keynote from Danese Cooper was very inspirational as well about what Open Source is and what should be, and that we, the developers, have the power to make it happen. And we could also enjoy Malcom Young’s presentation about Code Reviews.

Conclusion

Closing this article I would like to come back to the best part of the DrupalCamp for me this year, which was the people. They are always the best part of the social events. I was able to catch up with old friends from Ireland, engage with people considering a position at Capgemini and introduce myself to the London Drupal community, so overall I am very happy with this DrupalCamp London and I will be happy to return next year. In the meantime I will be attending some Drupal meetups and trying to get involve in the community, so don’t hesitate to contact me if you have any question or you need my help.

Dec 01 2015
Dec 01

This week a lot got undone, broken, recovered and then some.

Worked on the product backlog, not quite ready for public consumption yet but getting there, sprint backlog for the week:

  • Shop for VPS
  • Setup VPS 
  • Migrate to VPS
  • Fonts – via CSS
  • Sort out Contact Form (emails not working)
  • Sort our Domain name and DNS stuff (may need an expert’s assistance)
  • Backlog grooming – WIP

Acquia Cloud Professional would be nice, would make life much easier, support would be kick ass (and needed) but is out of my budget! time to count the pennies and find a candy store that fits the budget. Bluehost.com or DigitalOcean.com…. went with DigitalOcean, gives an SSD, quite a bit of computing power on a budget, has no developer tools though, will need to get devops help and learn some devops stuff myself (kind’a and kind’a not looking forward to that) but hey you get what you can afford!

  • Added an SSH key, instructions easy enough to follow
  • Am in as root! (nice!)
  • its an Ubuntu VPS, LAMP stack, phpmyadmin installed
  • explored setting up DNS and nada – haven’t got time for this, my sprint capacity is significantly reduced this week and possibly the next too! can’t wait, time to call in devops help, Asim enlisted to help set up DNS for agileforpeace.com for the VPS and opensocial.agileforpeace.com for my social transformation site (thank you Asif)
  • With not much to do, dived into CSS architecture (for Drupal 8)… 10 mins later… need to find an idiot’s guide to CSS in Drupal!
  • Had good wins today, the fear of the terminal is dissipating.
  • Need to migrate my site from Acquia Cloud to the new VPS environment.
  • Installed backup and migrate, activated it and disaster strikes! backup and migrate broke the site and can not access the extend page to uninstall.

Drupal8-brokenbymigrateDrupal8-brokenbymigrate

  • Looked up uninstall backup_migrate using Drush since I could not access the extend page – nada!
  • But if I go to an invalid URL it seems to work but can’t access anything in the admin menu, insanity!

Drupal8-brokenbymigrate01Drupal8-brokenbymigrate01

  • Tried disabling using Drush (drush dis -y backup_migrate && drush pm-uninstall -y backup_migrate), did not work, tried a bunch of stuff, whatsoever google threw up as candidate solutions.
  • Decided to take the simplest option and restored the site from backup on Acquia insight, easy enough.
  • I’ll take the small win and call it a day!
  • Started day 4 with a nice surprise, my first contribution! wooHoo.. the joy of little things!
  • It was a tough start, forgot my admin password again (blistering barnacles)! and remained locked out for the a good part of the timebox! tried a number of suggested means to recover the admin password using Drush, it was one fail after another! eventually reached out to @Dakku for help and it turns out its a pretty simple process!
  • Attempted migration from the DB back up – something migrated but not quite, need to figure out what went wrong, the theme didnt quite work even though its Bartik straight out of the box, am beginning to have doubts about maintaining a VPS by myself.

Open Social Broken 001Open Social Broken 001

  • Am back in but am out of time, more on day 5.
  • bulbbulb In terminal type: cd /var/www/html/yoursite.dev/docroot/sites/default
  • Once in the directory, type: /usr/local/bin/drush8 uli
  • You will get a return value that looks like: /user/reset/1/1448057351/JY2957SilWctPfNfN1gUQ2bT5lS-NvCwjt3heDqdu5A.
  • Copy everything from “/user/….” onwards and paste it after your domain in the address bar in the browser e.g. http://yourdomain.com/user/reset/1/1448057351/JY2957SilWctPfNfN1gUQ2bT5l...
  • Go to that url, this is a one off password change process, you can reset your admin password.

Decision time! I can spend time building my site in D8 with dev tools to support me (on Acquia Cloud) or I can build without them and pick up needed devops skills to manage my VPS; time being the deciding factor am ditching the VPS route and will continue with Acquia Cloud, as for affordability found out as an Acquian I get an environment as an employee benefit! wooHoo! Though it seems this week was not as productive but got a couple of nice wins and picked up some more Drush (the fear of the terminal is dissipating! BTW DrushCommands.com is a pretty epic resource).
Retro time

      • Shop for VPS
      • Setup VPS –
      • Migrate to VPS (theme isn’t working)
      • Fonts – via CSS
      • Sort out Contact Form (so that it sends out emails)
      • Sort our Domain name and DNS stuff (may need a subject matter expert to assist)
      • Backlog grooming – WIP

Having decided to stay on Acquia Cloud I can focus on the site backlog in week 5, (mental note: need to pick up the MVP backlog items soonish).

One more option to look on her packing at it levitra vardenafil it of course to take not so simply because a form another and there is a wish to hold in hand her not so strongly. You can carry by me on a wide field.

Nov 20 2015
Nov 20

More a log than a guide, but you get the idea! its a lengthy log this week, a lot got undone, done and then some. Backlog for the week:
  • Fonts
  • Contact Form (customise it)
  • Translations (Lingotek)  
  • Take the site online 
  • Toy around with Drush
Not part of the backlog, decided to update core, followed the instructions to the letter, used Drush and broke the site completely! ha! ‘A little learning is a dangerous thing; drink deep, or taste not the Pierian spring’ … and yes did not back it up did see Drush had created a back up but have failed to locate it! was going to take it online anyhow, so decided to rebuild on Acquia CloudSite folder on DT02Site folder on DT02 Would be interesting to see how long it takes to rebuild it! good organisation should make the task a tad bit easier! Revisions made to node/1 were not in the .txt file, extracted them from node_revision_body from the database (a little learning can be a useful thing too) – a small win on a rough day!
  • Logged into Acquia Cloud, spun up a free subscription, installed D8.rc3, and got cracking! 
  • Only downer is can’t add contrib modules without figuring out how to SFTP, or using Drush. For now staying clear of Drush! fear of the terminal is back!
  • Set up path aliases, was a quick and easy introduction and gets rid of the node/n in the address bar, of course good for SEO and all that jazz.
  • I know there is an easier way to justify text alignment via CSS but that’s going to take some time to get to grips with so taking the long but short cut with HTML to <p style=”text-align:justify”>.
  • It was a good day, a forced refresher on getting sh*t done and it took less than 2 hours to get the site back on track a little ahead of the previous version too! wooHoo! 
  • Tested the contact form but it won’t work, a bit of digging around and seems SMTP Authentication Support needs to be installed, am after a quick win today, decided to install and toy with Lingotek instead.
  • Dang it! can not upload to Acquia Dev Cloud, dug around, need SFTP or SSH access, ok set up my SSH Public Key, downloaded FileZilla, followed the instructions and nada! time to put the fear of thescreen-grab-lingotekscreen-grab-lingotek terminal behind me (again) bounced around from page to page but finally got in WooHoo! installed LingoTek in the wrong place Blistering Barnacles!
  • Tried to uninstall LingoTek, could not (commands I’m seeing online don’t work for me), Ok so the next best thing is to install LingoTek in the Dev folder but nothing in the sites folder! Bizarre! or may be not!
  • Anyway reading up on Drush and installing modules on Acquia Cloud and WTF! there is aenable live devenable live dev simpler way to do so! Why is this nugget buried so deep! Evidently all I needs to do is go to my Sites/Cloud and ‘Enable Live Development‘ 
  • That done time to check out LingoTek, copy link address, install, enable, wait, enable dependencies, enable job done! Lingotek Translation itself, lemon squeezy!

LIngo Tek grab 04LIngo Tek grab 04

  • Ending day 2 on a colossal WIN, I have translations for basic pages and articles in Arabic, Bulgarian, French, Hindi, Spanish and Urdu, the main and footer menus are not translated as yet, neither do I have language select buttons/icons enabled, to access the languages I have to go by the language code in the URL and its not perfect I still need our Peace Through Prosperity volunteers to check and edit  multilingual content but they’ll  have less to do. LingoTek kicks ass!
  • Time to take on the font challenge!
  • Noticed whilst on my local environment I was having problems installing modules, kept getting error messages that told me nothing other than it’s an error (FFS!), however haven’t been getting many of those on the Cloud.
  • AnyHoo, for fonts decided on Google Webfont Loader API, comes highly recommended by @Dakku and has a D8 recommended release out too, so what could go wrong. Installed, enabling took ages and it works but… there are only two font added to the library of fonts  (not exactly a library!), all a bit anti-climatic!
  • Not quite what I expected, font attempt five or is it six now is a fail! uninstalled the Google Webfoot Loader API and am going to start exploring the CSS route one of these days. 
  • Its Menu translation day – why hasn’t LingoTek got an automated workflow for menu item translations? got it done but what a pain! suggested improvement for LingoTek: have multiple language translations for a menu item on the same page please! a lot of unnecessary back and forth in the workflow.
  • Decided to spend time on CSS so that I need not rely on modules to change fonts and to get the menu translations in place between day 4 and 5, SMTP set up and the contact form will have to wait its seems a bit complicated and will need help on this in the know, as a starter have bookmarked CSS architecture (for Drupal 8) and Drupal 8 Theming Fundamentals to my reading list.
Its a big day, the WIP site gets opened up for demo on the blog!  Retro time!
  • Fonts – tackled again, failed, avoided (need dragon glass to tackle this one)
  • Contact Form (customise it)
  • Translations (Lingotek)
  • Take the site online
  • Toy around with Drush
  • Backlog grooming
..and disaster strikes! somehow managed to lock myself out! can’t recall the password! dang it! it was such an awesome run! need help on this, tried SSH, can SSH but getting access denied for getting DB backups and hesitant to do too much using Drush, remember day 1’s lesson well. Added @Dakku to the Site ’Team’ on Acquia Cloud and its all good.  Week three has been an epic adventure! am clearly trying to run before I can walk but am finding the platform is coaxing me to do so! what little surface I have scratched has opened up a whole bunch of stuff to add to the open social backlog and am getting pretty confident quite a bit of it could be handled by myself! yes humility is a must have EM trait!. Week four will start with an upgrade to Drupal 8.0.0 WooHoo…! in the mean time feast on this…..in seven languages! Open Social Transformation PTP03Open Social Transformation PTP03

One more option to look on her packing at it levitra vardenafil it of course to take not so simply because a form another and there is a wish to hold in hand her not so strongly. You can carry by me on a wide field.

Nov 12 2015
Nov 12

More a log than a guide, but you get the idea! Day 1’s timebox went on user stories and sprint goals (1 week sprints btw); this sprint’s goals are;
  • main menu,
  • footer menu,
  • social (Twitter) feed
  • static content for pages
  • font face
  • Favicon
The allocated time b/w days 2 and 5 are 3 hours in total, so lets see how I fare this week. Started with aesthetics in the hope they’d be the easy wins. 
  • Changing font face – fail: Googled and it appears all I need to do is change the font type in a style.css filesite building D8 font issuesite building D8 font issue , first fail was there is no style.css in the Bartik components folder, did find font types in the elements.css file, edited it, added Arial and nada!
    Went on a module hunt, found font-your-face – installed, did not work, looked up the documentation and does not show up under admin/config/settings/user interface. packing in on the should’ve been an easy win and moving to the next item on my backlog.
  • Favicon success – downloaded Favicon, installed and it has a configure link under extends, first module I’ve come across that links its settings/config page from the module description link from the Extends page (good UX, thank you dave-reid). Initially the .ico file upload didn’t work, thought it might be a cache issue, cleared cache (mysite/admin/config/development/performance) did not work, decided to try renaming the file name and wooHoo! it works. Decided to call it a day with a small win.
Bartik Block RegionsBartik Block Regions

Newbie tip bulbbulb

I took a screen grab of ‘Bartik’s block regions demonstration’, printed it and pinned it to the wall and added it to desktop 2 as a wallpaper – am sure over time I’ll know whats where but for the time being its proving to be a good idea.

WooHoo, its a Saturday and though still working on a project (not really a weekend) am going to take some out for this.
  • Twitter feeds turned out lemon squeesy, with a work around, Twitter widget in a block instead of waiting for maintainers to sort their D8 modules out, thanks Dakku. Five mins into it and job’s done, there is a now a Twitter feed widget on the site! WooHoo! got carried away added a Twitter search box on #peacebuilding and #entrepreneurship, two big wins in less than 10 mins, am on a roll!
  • Next up was Social sharing, searched selected Easy Social, downloaded, installed, read the documentation, fail…. another 10 minutes invested into it… fail fail! should have quit on a win but anyhow failed fast enough to have some time to spare on other backlog items. 
  • So over to Footer menu it is. Added a bunch of menu links but not quite what I had in mind: 
Footer 001Footer 001 Got undone on finding any attributes to the menu setup that allows for external links to be opened in a new window, dug around and found its not possible without a module to manage menu attributes, It took a little bit of time, found one that is D8 ready, and guess what… does not work! fail! Went through the Readme file nothing under admin/configurations tried getting to the  setting using /admin/config/user-interface/extlink and nada! blistering barnacles! Back on the footer menu fumbled around and wooHoo that’s more like it, now to split them out: Footer 0020Footer 0020 Am wondering if I am going about searching for modules the wrong way round for it seems like an awful waste of time trawling through different contrib modules trying to see if they are D-8 ready or not, thought there is this site that lists the status of the top 100 contrib modules it doesn’t cover all of them and when using Google the ones that do turn up are those on D.O and there is just so much noise there! All the contrib modules I have installed and all of the ones that tell me in their Readme file that I will find config links under Admin/configurations –  none have turned up on that page, and when I have tried getting to the  setting using /admin/config/modulename/settings have had no joy either! this pattern suggests something is going wrong with my install! maybe!?” cleared cache too and still nada! more blistering barnacles!! I had a partial win with Footer Menu blocks, am going to take that and come back to this another day.

Its day 4, its shorter, need to stay focused on getting a win.. need it today.

  • Decided to go with the contact form, was easy enough apart from the fact that I could not figure out how to edit the tables for the default form, that’s a ‘nice to have’ so stuck to the ‘must have’ scope and extended the default form as required with custom fields. It was simple, took a bit of toying around but did not need to reach out or Google any how to’s. its a good win, was quick enough so decided to take on a couple of one more task.
  • #OpCleanup; decided am going to clean up all these modules that don’t work, err no uninstall button, its Google to the rescue, a little strange that to uninstall the modules I have to go here: /admin/modules/uninstall and there is no link to it from the extend page! may be I am missing something here. With another win and on a roll decided to look into this unexpected error I’ve been getting intermittently when installing contrib modules:
  • Found a page on D.O on the issue and responded to by a colleague! hello Eric! but the details’way too technical for my current knowhow or lack of! am going to wait till 19th Nov, assuming Dev Desktop will see an update the same day and reinstall Drupal 8 and see if that changes anything, failing that will be badgering some of my TA colleagues.
Was a washout! not enough hours in the day to fit everything! quick retro;
  • main menu,
  • footer menu,
  • social (Twitter) feed,
  • static content for pages,
  • font face
  • Favicon

Did not get to put in anymore than 2 hours over the week, got to >80% of my backlog, broke through last week’s blocker, got stuck on something allegedly trivial, that’s a good week! Looking forward to week 3, I’ll be jumping in font first! 

Peace Through Prosperity Open Transformation ProjectPeace Through Prosperity Open Transformation Project

End of week 2 this is where I am at, not bad!

One more option to look on her packing at it levitra vardenafil it of course to take not so simply because a form another and there is a wish to hold in hand her not so strongly. You can carry by me on a wide field.

Nov 05 2015
Nov 05

More a log than a guide, but you get the idea! Many a weeks before Day 1! started putting a backlog together, the site is for an Open Social Transformation project, its open sourcing the materials designed and developed for Peace Through Prosperity’s social transformation programs that have had epic results so far. The aim is to make the materials and processes available under a creative commons license for communities across the third rock to use and transform for the better, from the ground up.
  • Theme-Library-D8-Theme-install-failTheme-Library-D8-Theme-install-fail 25th Oct 2015 installed Acquia Dev Desktop and got cracking, first impressions; intuitive, a bit like WordPress thats a plus! the learning curve wont be as steep as I had suspected it might be.
  • Bartik looks dull and boring, decided to go on a Theme hunt.
  • Downloaded Zircon – installed, set as default, does not work,
  • Downloaded Adaptive – installed, needs something called AT Core, searched, and installed, set as default, does not work,
  • Back to google, found MAYO, looks nice, installed, does not work,
  • Am 30 mins into my hunt for a theme that looks good and works and am nearing to an OFT moment.
  • Another 5 mins and reached OFT moment.
  • Decided to go with Bartik, into settings and am determined to make this look nice, wasn’t that hard actually! 
  • But need to clean up my Theme library! this is what it looks like after 35 mins.
Drupal-8-engagement-manager-suite-building-guide-001Drupal-8-engagement-manager-suite-building-guide-001 Five minutes of fiddling about in Bartik’s settings and moving the Login Box to Footer 5 (not disabling it for now) this is what my home page looks like! Not bad for a newbie to Drupal… the fruits of less than an hour’s labour and it is responsive out of the box with zero effort!  OK that’s too much excitement for the day, going to quit while I am ahead and get back to it in a few days. A few days later… Decided to hit the deep end before creating my pages and static content, time to add some fancy Blocks, getting the @bringptp Twitter feed on the home page would be epic! The search began for a Twitter module for D8, two choices, Alex Finnarn’s Drupal-twitter-feed and the Twitter Module off D.O – hit a glitch with both, with the Finnarn’s Drupal-twitter-feed module off GIT the challenge became lack of documentation, once set up, had no way to figure out what to do with it as a newbie. With the Twitter Module installing the Entity API became a pain, first things first Entity API is part of D8 Core WTF! kept getting “entity-8.x-1.x-dev.tar.gz does not contain any .info.yml files error”,  looked into the error and got lost in the conversations about it on D.O! whoosh over my head! It was time to call in the big guns, time to reach out to Dakku for help figuring this out. As for the rest of today’s timebox will be getting the pages and content in shape to give the site some semblance of a site prior to diving into the Lingotek module. On reflection today was less frustrating, packed up when I hit a blocker, started finishing and stopped starting, am practising what I preach.  Met up with Dakku and made use of the lunch hour to get some help with the Twitter modules I installed and failed to get them working, turns out its the modules and not my lack of perseverance! Alex Finnarn’s Drupal-twitter-feed module doesn’t show up on the configurations page as the limited documentation suggests it should, so ditched that and moved to the Twitter Module. Got introduced to the issues queue for modules and how to find answers to issues I am having that others have faced, reported and found solutions to, turns out there is an issue with the module as reported on the issues queue, the module has a dependency on Entity API stated in the twitter.info.yml which shouldn’t be there, this dependency prevents the module being installed. Anyway decided I’ll get to Twitter feeds in a Block at a later date once its been patched – which by the way is under way. Dakku on it, submitted a patch that is pending review. With Twitter feeds out for the time being I got a short introduction to Drush and how to install modules using it, haven’t quite got my head around it yet but the fear of the Terminal is slowly giving way to possibilities of being able to use the command line to get sh*t done. Drupal-8-engagement-manager-suite-building-guide-003Drupal-8-engagement-manager-suite-building-guide-003 Back to building up my site, first things first the ‘read more’ link on the home page is getting real annoying, I need the entire content of my page displayed and not a snippet of it, late night IMing for help Dakku pointed me to ‘admin/config/system/site-information’ should have seen that! (mental note to explore more).  Menu links added, with the home page taking shape keen to get some play time with Blocks, a bit of toing and froing got to grips with creating custom blocks and wooHoo! rusty HTML knowledge’s coming back and is handy too. Added two custom blocks: Gofundme and a Vimeo widget blocks and it looks Epic! Still have some time to spare, decided to go social, and got pointed to the Social Media Links module by Dakku, looks awesome but came undone after installation! opened up the modules folder, had a look at the Readme file but when I go to ‘/admin/structure/block/manage/social_media_links/social-media-links/configure’ there is ‘no page found’ dang it! so close so close! must pack it in and get back to this in a couple of day.  Even if I say so my self am chuffed with what has been possible over 3-4 hours spread over a week, next up getting the Social Media Links module to work and then to Lingotek before I start exploring Organic Groups, which will have to be de-prioritised since Organic Groups Module is not ported to Drupal 8 as yet.

One more option to look on her packing at it levitra vardenafil it of course to take not so simply because a form another and there is a wish to hold in hand her not so strongly. You can carry by me on a wide field.

May 31 2010
May 31

After being alerted to Google Fonts, the Google Font API, and the Google Fonts Module in a recent Drupal Planet post (http://acquia.com/blog/robert/google-fonts-api-time-drupal-market-one-day), I dropped my lunch and said, "Rad!" Then I rolled up the sleeves and dropped a few fonts into my blog as easy as the dog drops logs on the lawn. What follow is usage notes and examples on getting this all going for yourself:

References right up front:

and then a walkthrough:

  1. Download the Google Fonts Module from http://drupal.org/project/Google_fonts
  2. Enable your new modules (admin/build/modules/list). Make sure you enable both Google Fonts and Google Fonts Ui.

  3. Enable your desired fonts on the Google Fonts admin page (admin/settings/Google_fonts). Here you will find a list of all the available Google Fonts with a checkbox to select desired font. For my example I am enabling Droid Sans Mono and Lobster. When you have made your choices click 'Save configuration'.

  4. Add the font to an element via CSS in two different ways:
    • • use the font directly in your stylesheet (.node h2{ font-family: "Droid Sans Mono"; }) I have not tried this because, this next way is easier
    • • or add a rule via the 'Add rules' tab (admin/settings/Google_fonts/rules). Here you will find textareas for each font that you previously selected. Enter your CSS selectors here to get going. In my example I am selecting for the dateline and the custom made tag marquee view at the bottom of my page.

Now check out my handy work in the dateline on all posts, and at the bottom of the page using the funky Lobster font on my Tag Marquee.

May 07 2010
May 07

I frequently use a 3rd party designer to help with the tedious task of going from PSD to final theme. If you haven't realized it yet, but alot of designers have problems setting up a local MAMP install w/ drupal in which to fuck with css. To deal with this without giving the designer any command-line access, my shop uses what we call CZI on all drupal installs. This stands for CSS Injector, Zen theme, IMCE, and allows a designer to upload images and apply css rules to a development site they have been given permissions for on the theme, Zen, that provides all the classes and ids anyone would need.

After my shop, the designer, and the client are satisfied, CSS Injector and it's external files become a weight and need to be removed. Below I detail the process of using Zenophile (http://drupal.org/project/zenophile) to create a zen subtheme in which to wrap up all your CSS Injector files:

Create a subtheme using Zenophile

  1. Enable module Zenophile
  2. create a new zen subtheme (site building > themes > create zen subtheme)
    • name appropriately according to site url
    • set site directory to installs folder unless you want it available to other installs
    • create a fresh css file
    • Submit (you may need to chown the target directory to have appropriate permissions)
  3. disable module zenophile
  4. manage blocks for new theme (site building > blocks > list > newtheme)
    • save each block individually to have titles set appropriately
  5. Duplicate theme settings (site building > themes > configure > zen & newtheme)
    • make sure your newtheme has the exact same settings as zen
    • pay special attention to logo and favicon paths
    • save theme settings

pack up and move css injector files

  1. merge all css injector files ( site configuration > css injector )
    • copy all css injector files into single file
    • delete originals, leaving you with one merged file
  2. copy content of merged file into newtheme-fresh.css
    • search and replace any filepaths in css code

switch themes

  1. set newtheme as primary (site building > themes)
  2. remove last css_injector file (site configuration > css injector)
  3. test site

cleanup

  1. disable module css_injector
  2. uninstall modules zenophile and css_injector

Peace out and remember to get a good lunch.

Dec 10 2009
Dec 10

If you want to make any sort of terms and conditions applicable to becoming a member of your Drupal site, I would suggest using the Legal module. It provides for a text agreement that a user must agree to to get an account on the site. The agreement is signified via a single checkbox or multiple custom checkboxes. Additionally, the terms can be updated which requires users to agree to the agreement during their next site visit, a text box also provides for notes on changes. Here is a quick rundown of setup of the Legal Module:

  1. Download Modules

    Legal depends on the Checkbox Validate module to work. Make sure that you get the latest versions of these modules:

    Legal - http://drupal.org/project/legal
    Checkbox Validate - http://drupal.org/project/checkbox_validate

    Once you have downloaded the modules, move them to the appropriate modules folder for your install and extract them in place.

  2. Enable Modules

    From the Modules page (Administer > Site building > Modules), enable Legal, and Checkbox Validate.

  3. Configure Legal Module

    Configure the Legal module (Administer > Site configuration > Legal) to fill in the terms of the site, site a display style, and create any additional checkboxes to be agreed to. The default checkbox reads: 'Accept Terms & Conditions of Use'. The display style has the following choices of: Scroll Box, Scroll Box (CSS), HTML Text, Page Link. Other settings can be ignored for now.

  4. Configure Permissions

    The following permissions can be assigned to certain roles on your site:

    administer Terms and Conditions
    view Terms and Conditions

    Due to the legal complications that a damaged Terms and Conditions could leave you in, it would be wise to leave the administration of terms and conditions to high level admins.

  5. Review the Terms and Conditions

    The next time a users visits the site or a new user joins they will have to agree to the terms and conditions.

    Additionally a page will be auto-generated at path ./legal with entitled Terms and Conditions that simplies displays the current terms of the site.

  6. Administer the Legal Module

    Administer the Legal module (Administer > Site configuration > Legal) on the same page where you originally filled out the terms and conditions. This page also shows the current reiteration number of your terms and conditions. When the terms are updated, there is a place to give a brief description of changes made to terms and conditions, which the user will be shown and asked to agree to next time they visit the site.

The module works great. My only critiscim that I have is that I doubt it still needs the Checkbox Vidate module to function properly.

Good job everyone. Now who is interested in lunch?

Dec 03 2009
Dec 03

The Node Reference module defines a field type for use by the Content Creation Kit (CCK) to reference one node from another. It works very good and allows you to add a greater amount of complexity to your site. The only problem with the Node Reference module is that the default display options for the referenced node field are very limited. But thanks to the Node Reference Views module, you can use all the formatting power of the Views module to display your referenced node field.

An often used example of when to use this module is for creating a music library listing using CCK: Content types are created for the albums and the songs, then Node Reference is used to relate the songs to their respective albums. For this example we will have a content type called Album with text fields for title, year, artist and a content type called Song with a simple text title and a node refernce field to relate the song to the Album called field_album_reference. From here, I will give quick setup instructions to get you going with the Node Reference Views module:

  1. Prerequisites

    Before you begin, you should have the following modules installed:

    Content - http://drupal.org/project/cck
    Node Reference - included with the Content module
    Option Widget - included with the Content module
    Text - included with the Content module
    Views - http://drupal.org/project/views
    Views UI - included with the Views module

    Additionally, you should setup the above described songs and albums content types or have a set of content types connected by a node reference field.

  2. Download and Install Node Reference Views Module

    Node Reference Views - http://drupal.org/project/nodereference_views

    Once you have downloaded the module, move it to the appropriate modules folder for your install and extract it in place. From the Modules page (Administer > Site building > Modules), enable the Node Reference Views module.

  3. Clone and Re-Name Preinstalled View

    From the views administration page (Administer > Site building > Views) enable the view entitled field_noderef_example after reading the brief description/instructions. Now on this newly enabled view choose clone. The most important thing to rember with this setup is to rename this cloned view to have the exact same name as your node reference field, in our eample this is field_album_reference. Fill in the view description and the view tag with something that will help you remember what this view is, and then choose next.

    Modify the view by choosing additional fields from the referenced node to be displayed as well as modifying most of the rest of the view settings to suit your needs. Do not change the arguments field. Finally, Save the view.

  4. Disable Preinstalled View

    From the views administration page (Administer > Site building > Views) disable the previously enabled the view entitled field_noderef_example.

  5. Edit the Display of your Node Reference Field

    Edit your content type (Administer > Content management > Content types) that contains your node reference field. From the tabs choose Display Fields. Choose view from pulldown on your node reference field, in our example it would be the Album field.

    Now when you view your song nodes, the Album field will appear as the view you previously described. Nice. It can be styled like any other view can be.

Nov 11 2009
Nov 11

Having built two fairly robust and strongly interlinked taxonomies to aid in categorization, SEO and navigability of my site, I decided I wanted one of those (old school) tag clouds to display my lexicon. After waiting for the enormous drupal modules page to load, I decided the best route to follow would be to use Tagadelic, though it appears that I may have to use helper modules to get the fully customizable effect I am looking for.

According to the module description found on the module page of your site: Tagadelic makes weighted tag clouds from your taxonomy terms.

For this tutorial I will be running through the installation, setup and general access to the Tagadelic module (version 6.x-1.2). I am assuming that you have the Core - optional module Taxonomy installed and that you have at least one multi-word taxonomy in place and that it has been used to tag a handful of nodes.

Here we go:

  1. Check your Status Report

    You should have a clear status report (Administer > Reports > Status report) before continuing with these installation instructions.

  2. Download the Module

    Make sure that you download the latest version of the Tagadelic module for your distribution: Tagadelic - http://drupal.org/project/tagadelic

    Once you have downloaded the module, move it to the appropriate modules folder for your install and extract it in place.

  3. Read the README

    Tagadelic is a small module, without any databases, or configuration, that generates pages with weighted tags. Tagadelic is both an out of the box, ready to use module, if you want simple weighted tag clouds. With, or without some small CSS moderations this will probably suit most cases. But tagadelic is an API system too. You can pass your queries to the APIs and get weighted clouds of virtually anything: clouds by amout of views, clouds for a certain user, etceteras. The module does not do all this, but you can make it do that, with quite little coding.

  4. Enable the Module

    From the Modules page (Administer > Site building > Modules), enable the tagadelic module. As a site administrator, run update.php.

  5. Configure Tagadelic Module

    Configure the Tagadelic module (Administer > Site configuration > Tagadelic configuration) to set defaults for the tagadelic views. The following values can be set:

    Tagadelic sort order: This will be the sort order used in all Tagadelic displays. The options are as follows: 'by weight, ascending'; 'by weight, descending'; 'by title, ascending'; 'by title, descending'; and 'random'. The default value for this setting is 'by title, ascending'.

    Amount of tags on the pages: The amount of tags that will show up in a cloud on the Tagadelic page. Amount of tags in blocks must be configured in the block settings of the various cloud blocks. The default value for this setting is 60 tags.

    Number of levels: The number of levels between the least popular tags and the most popular ones. Different levels will be assigned a different class to be themed in tagadelic.css. The default value for this setting is 6 levels.

    Choose to 'Save the configuration' or 'Reset to defaults' if mistakes have been made.

  6. Review Pages and Blocks

    After installation and configuration, you can review the results of your labors which is a page and two blocks that approach the idea of a tag cloud.

    Pages: First off is to go to the Tagadelic page found at yoursite/tagadelic (http://baxwrds.com/tagadelic/). This page lists all the tags in all of your vocabularies. Through the use of URL arguments you can also list the tags only in single vocabulary (http://baxwrds.com/tagadelic/chunk/1) or from multiple vocabularies (http://baxwrds.com/tagadelic/chunk/2,1) additionally vocabularies can be listed in groups (http://baxwrds.com/tagadelic/2,1).

    Blocks: Two types of blocks are created by the Tagadelic module. Firstly a block is created for each of your vocabularies and will be named: Tags in vocab name. Inside the block configuration you can choose the amount of tags to show. If not all tags in the vocabulary are visible a more link will also be present to take the user to the main tagadelic page. An example of these blocks can be seen on the right. The second type of block is 'Tags in the current post' and lists the tags of the current post. Due to the horrible formatting of this block I have chosen not to display it.

There you have it, examples and all. It is a descent module and does what it says, but it does lack documentation. Two resources I found useful were: http://www.webschuur.com/modules/tagadelic and http://drupal.org/handbook/modules/Tagadelic. Peace.

Jul 08 2009
Jul 08

Most data dealing with times and dates is stored as a as a standard Unix timestamp in Drupal. Examples of this are the node creation and revision dates, or the user creation, login, and access dates. If you access this data directly from the database you will retrieve this highly illegible timestamp. Good thing that Drupal provides a function for formatting dates: format_date().

format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL)

This function will return a formatted date string of the passed timestamp. The type parameter accepts the following strings: small, medium, large, and custom. The first three type parameters can be defined by the user on the Date and Time settings page. If custom is chosen then the format parameter must also be filled in. The format parameter accepts a PHP date format string, possible values follow:

d - Day of the month, 2 digits with leading zeros
D - A textual representation of a day, three letters
j - Day of the month without leading zeros
l - A full textual representation of the day of the week
N - ISO-8601 numeric representation of the day of the week (added in PHP 5.1.0)
S - English ordinal suffix for the day of the month, 2 characters
w - Numeric representation of the day of the week
z - The day of the year (starting from 0)
W - ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)
F - A full textual representation of a month, such as January or March
m - Numeric representation of a month, with leading zeros
M - A short textual representation of a month, three letters
n - Numeric representation of a month, without leading zeros
t - Number of days in the given month
L - Whether it's a leap year
Y - A full numeric representation of a year, 4 digits
y - A two digit representation of a year
a - Lowercase Ante meridiem and Post meridiem
A - Uppercase Ante meridiem and Post meridiem
B - Swatch Internet time
g - 12-hour format of an hour without leading zeros
G - 24-hour format of an hour without leading zeros
h - 12-hour format of an hour with leading zeros
H - 24-hour format of an hour with leading zeros
i - Minutes with leading zeros
s - Seconds, with leading zeros
u - Microseconds (added in PHP 5.2.2)
e - Timezone identifier (added in PHP 5.1.0)
I - Whether or not the date is in daylight saving time
O - Difference to Greenwich time (GMT) in hours
P - Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3)
T - Timezone abbreviation
Z - Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive.

Examples of custom date strings follow all using current time from the time() function for the timestamp:

F j, Y, g:i a March 14, 2017, 10:50 am m.d.y 03.14.17 j, n, Y 14, 3, 2017 Ymd 20170314 \i\t \i\s \t\h\e jS \d\a\y. it is the 14th day. D M j G:i:s T Y Tue Mar 14 10:50:06 GMT 2017 H:i:s 10:50:06 Additional Resources:

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web