Web Design & Development Blog
This blog covers a lot of technical web development issues, focusing especially on Joomla, Drupal, and other open-source CMSes & platforms. Not all our posts are for web developers; we also make sure to write posts for those who are not technical.
05 December 2012 Generating PDFs and PNGs on Ubuntu
Web Design and Development
Ever needed to generate nicely formatted PDFs and/or PNGs on-the-fly? Check out wkhtmltopdf for PDF conversion using Webkit printing to PDF. From there you can conver the PDF to a PNG using pdftoppm.
Here's a very condensed run-down of the procedure on Ubuntu;
- install GCC C++ compiler if not already installed (sudo apt-get install build-essential). See http://www.shibuvarkala.com/2009/03/how-to-install-gcc-cc-compiler-in.html
- install XLL libraries (sudo apt-get install libx11-dev, sudo apt-get build-dep qt4-qmake).
- install wkhtmltopdf on server See http://blog.tcs.de/install-wkhtmltopdf-on-ubuntu-server/
- install xvfb; sudo apt-get install xvfb
- You can now generate nice HTML/CSS to PDF conversions using this command: xvfb-run --server-args="-screen 0, 1280x768x24" wkhtmltopdf http://www.your-awesome-site.com some-awesome-file.pdf
- Install Imagemagick or poppler-utils. (apt-get install poppler-utils). This is for converting the PDF to a PNG. Imagemagick seems to run faster.
TCPDF is another widely used PDF conversion utility but I have found its layout and formatting options to be incredibly tedious. It makes a lot more sense to me to just print to PDF and let the Webkit browser do the heavy lifting .. with a helping hand from xvfb. You can invoke the xvfb command in PHP as follows:
21 August 2012 At DrupalCon Keynote in Munich!
We write to you today from DrupalCon Munich 2012. Dries Buytaert, Drupal's founder, talked about the plans for the future. Drupal 8 is scheduled for release mid 2013 (August-ish) with a feeature freeze this December and a code freeze in February 2013. He also talked a bit about how he views Acquia vs Drupal. Acquia is his company, which obviously benefits from Drupal, but it also benefits Drupal. He sees a fear of competition in the Drupal community, which he finds unfounded since there is a lack of Drupal developers when it comes to the growing market for Drupal sites. It is not unheard of for Drupal projects to get halted or switched to some other framework due to lack of enough developers. We need more competition, not less!
22 July 2012 SFTP write access when files owned by www-data
Web Design and Development
Ubuntu users will recognize this common issue;
You have a user directory, e.g. /home/someuser, and you can SSH in and use 'sudo -s' to do super-usery things. Now try to SFTP (Dreamweaver, FileZilla, etc), and you can download, but if the files are 'owned' by www-data you probably can't upload anything except maybe new files. Many web applications (Drupal at least) need the files to be writable by the same user/group that Apache uses /... in the case of Ubuntu this is www-data.
You can't use 'sudo -s' within Dreamweaver or FileZilla.. yes, FileZilla has a custom command option, but it doesn't work with 'sudo -s'.
You can "chown someuser:someuser * -R" inside the /home/someuser directory and make them writable by your user that way, but then you would need to chown them back to www-data to keep Drupal running well.
A long-term solution is this:
sudo usermod -a -G www-data someuser
Then ... log that user out of the FTP client and try again. You have to log out for the new permissions to be recognized.
09 June 2012 Geo-targeted blocks based on visitor IP (Drupal 7)
Middle East / North Africa
07 June 2012 Image slideshows with Drupal 7
We are frequently tasked with creating custom image slideshows for Drupal sites.
We work mainly in Drupal 7, and for simple home page sliders we like to use this combination;
- New content type called Slide
- Use Link Image Field and add that as a field in your Slide content type. Allow for unlimited images. This will allow you to link your slides to custom URLs and add titles, rel attributes etc.
- A View (using Views) showing all results for nodes of type "Slide". Use fields display in combination with Nivo or Slideshow.
- Try either Views Nivo Slider or Views Slideshow. We have had more luck with Views Slideshow.
- If using Views Slideshow, also consider Views Slideshow Configurable Controls, which enables next/pause/previous icons instead of just text links.
- Create a new Slide node - let's call it "Home Slides". Add as many pictures as you need, and provide links for them as needed (thanks to Link Image Field). Save.
- Edit your view and add a new display page or block. Add a filter for "nid" and restrict it to only the node ID of the "Home Slides" node you just created. Since we are including multiple images within a single node, we do not need to show multiple nodes. In the image field's settings make sure to NOT have it show multiple field results in a single row. We want them as separate rows so each photo will be separate.
- Add sorting as needed. Nodequeue isn't an option here, but you don't need it since you can drag and drop the images when editing the node.
- Your node is now essentially an image gallery exposed to Views. You could now also theme your Slide nodes to show thumbnail images in a gallery format, but you don't need to display the node. We only need it for Views.
07 June 2012 Headed to DrupalCon Munich!
There are some very interesting sessions lined up. Have a look: http://munich2012.drupal.org/
13 March 2012 Community Builder Phoca Gallery Plugin
Check out our Community Builder plugin for the Phoca Gallery extension.
30 December 2011 Google Checkout is now Google Wallet
Web Design and Development
Google Checkout has ... 'checked out' and change its name to Google Wallet. Google Wallet is essentially Google Checkout, but rebranded and targeted to mobile use as much as for use on regular sites (viewed from a personal computer). We look forward to working with wallet on some upcoming e-commerce projects.
30 December 2011 Keep your site from getting taken hostage
All too frequently we hear from customers who have handed over the login details for their domain registrar (GoDaddy, NameCheap etc) only to have their web designer transfer the domain to another registrar that is outside the customer's control. The end result is of course that the customer then becomes dependent on that web designer and must beg and plead (and sometimes even pay fees reaching into the hundreds of dollars) just to get control of their own domain again. In a similar vein, many web design companies that also offer (or insist) on hosting your site for you will not provide hosting control panel access. This is a red flag, because it makes it impossible to save a backup of your site, again making you dependent on that web designer / webmaster. Please, at all times make sure you maintain control of your domain name(s)!
If you must provide someone with access to your domain name management area, make sure you have a clear idea of what it is they intend to do with that access. If you're using GoDaddy, you can assign someone as an AccountExec, so that they cannot change the account password on you. However, even with AccountExec access they'd be able to transfer the domain to another registrar if you're not careful.
It's your site: make sure you retain full control over it, even if you don't want to manage it on a daily basis!
23 December 2011 Joomla World Conference, San Jose - November 16-18 2012
The Joomla! Project is pleased to announce that the first Joomla World Conference will occur in November 2012. We are very happy that eBay has graciously offered significant support for this event, inviting us to use their facilities in San Jose, California.
Here are the preliminary details for the Joomla! World Conference:
Date: 16th-18th November 2012
eBay Town Hall
2161 North First Street
San Jose, CA 95131
Tickets: Price for a 3-day Ticket is $199 USD
More details will follow next year.
- Free Web Design and SEO Consultation
- Drupal 8 Roadmap
- Get ready for Joomla 2.5!
- Search Engine Optimization Successes
- Drupal 7.10 Released
- Joomla Wins 2011 Packt Award for top CMS
- Multilingual Moodle
- Front Page Slideshow Link Problem
- Vineyard Arts Project Web Award
Page 1 of 5