Popular Posts

Monday, January 27, 2014

[How to] Get thumbnail preview for Raw format photos in Ubuntu

Step 1 : Install UFRaw by using below command

sudo apt-get install ufraw 

Step 2 : Create a thumbanailer file using below command

sudo gedit /usr/share/thumbnailers/ufraw.thumbnailer

Step 3 : By default, the file contains no data. But if there is anything inside, please delete it.

 Step 4 : Copy the following code into it and save.

[Thumbnailer Entry] Exec=/usr/bin/ufraw-batch --embedded-image --out-type=png --size=%s %u --overwrite --silent --output=%o MimeType=image/x-3fr;image/x-adobe-dng;image/x-arw;image/x-bay;image/x-canon-cr2;image/x-canon-crw;image/x-cap;image/x-cr2;image/x-crw;image/x-dcr;image/x-dcraw;image/x-dcs;image/x-dng;image/x-drf;image/x-eip;image/x-erf;image/x-fff;image/x-fuji-raf;image/x-iiq;image/x-k25;image/x-kdc;image/x-mef;image/x-minolta-mrw;image/x-mos;image/x-mrw;image/x-nef;image/x-nikon-nef;image/x-nrw;image/x-olympus-orf;image/x-orf;image/x-panasonic-raw;image/x-pef;image/x-pentax-pef;image/x-ptx;image/x-pxn;image/x-r3d;image/x-raf;image/x-raw;image/x-rw2;image/x-rwl;image/x-rwz;image/x-sigma-x3f;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-sr2;image/x-srf;image/x-x3f;

Note : You will get thumbnail previews automatically. If you didn't see just refresh nautilus :)

If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Sunday, November 17, 2013

Ubuntu freezes and unity disappears

I tried to install some icon theme packs using synaptic manager and this error came to me. Unity, synaptic, gnome-tweak tool etc were uninstalled. I tried many. But nothing seems to be working fine. Atlast, this worked for me

Fix broken packages first and try the below commands.

sudo apt-get install unity-2d
sudo apt-get install ubuntu-desktop
sudo apt-get install ubuntu-desktop-2d
sudo apt-get install compizconfig-settings-manager
sudo apt-get install xserver-xgl
sudo apt-get install emerald
sudo apt-get install compiz-fusion-plugins-extra
sudo apt-get install git compiz-plugins-extra
sudo apt-get install compiz-plugins-extra
sudo apt-get install unity

If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

[How to] Disable overlay Scrollbars in Ubuntu

If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Monday, November 11, 2013

[How to] Remove Default Profile Fields in phpBB integrated with Drupal

  1. FTP into the web server holding the phpBB forum that you want to modify. If you have access to the server directly, you don't need to use an FTP program. Log in with your administrator name and password.
  2. Navigate to the root folder of your phpbb installation. Change to the following directory (no quotes):
  3. Download the following file to your computer:
    ucp_profile_profile_info.html ( 
    Make a back up of it before editing )
  4. Open the file "ucp_profile_profile_info.html" with a text or HTML editor. If you are accessing the directory on the server, you don't need to download the file and can open it directly with a text editor or HTML editor.
  5. Scroll down the page until you see the the HTML code for the input fields on the User Control Panel. This can be identified by a series of "<label>" and "<input>" tags.
  6. For example, the code for a user to label his/her ICQ number looks like this:

    <dt><label for="icq">{ICQ}:</label></dt>
    <dd><input type="text" name="icq" id="icq" maxlength="255" value="{ICQ}" class="inputbox" /></dd>

  7. Delete the code for the profile field between the "<dl>" tags by selecting it with your cursor
  8. Save the text file as "ucp_profile_profile_info.html".
  9. Reload the file to your web server using your FTP program.

  1. Go to Dashboard --> Configuration --> Account Settings
  2. Click on Manage fields tab near top right corner of the page.
  3. Delete the fields which you have removed from the PhpBB using above steps.

If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged !

Sunday, November 10, 2013

[How to] Install PhpBB in Drupal

In this module, I'll explain how to Integrate PhpBB in Drupal. I checked a lot over Internet and the results seems to confusing than problem solving. Somehow, I found the solution by reading documentations (Read me files) at PhpBB website and Drupal website.

PREREQUISITE : The module requires php5 to run.
  1. Back up your Drupal and Phpbb3 folders.
  2. Install PhpBB by following instructions from this post. While copying the decompressed files, copy them to the Drupal folder.
  3. In order to integrate, we need to use phpbbdrupalbridge module in PhpBB3 and Phpbbforum module in Drupal. By using these two, we can create a link between them.
  4. First lets go with bridge. Download the phpbbdrupalbridge-3.0.10.zip MOD from http://phpbb.drupalbridge.org/download
  5. Unpack the phpbbdrupalbridge-3.0.10.zip archive directory.
  6. Open root folder in the phpdrupalbridge directory.
  7. Copy the contents in folders includes/ & styles/ to /phpBB3/  folder.
    Example 1 : phpdrupalbridge-3.0.10/root/includes/phpdrupalbridge/phpbb_api.php to /phpBB3/includes/phpdrupalbridge/phpbb_api.php
    Example 2 : phpdrupalbridge-3.0.10/root/styles/prosilver-embed to /phpBB3/styles/prosilver-embed
  8. If any files are asking for overwriting, click yes and overwrite them.
  9. Copy ../root/images directory to Drupal images directory.
  10. Do not forget to add a line " Disallow: /images/ " (without quotes) to your robots.txt file (I'm not sure about this line. I didn't do this. If something goes wrong, perform this step and try)
  11. Goto PhpBB installed location in your browser
  12. Login using admin credentials
  13. Goto ACP (Administrative Control Panel) (Most probably Link is available at the bottom of your webpage)
  14. Go to General tab --> Server settings 

     Note : These are Example settings. Let's say I hosted XYZ website in subfolder of abc.com. Even though I have xyz.com as my domain, I should point to base domain only in this case. That is the meaning of base url below )

    • Domain namewww.abc.com/xyz$base_url = 'www.abc.com/xyz';

    • Domain nameabc.com/xyz$base_url = 'http://abc.com/xyz';

      Look for " 
      $base_url " in the file /sites/default/settings.php and change that to match the address to your drupal installation. You shouldn't put trailing slash. Drupal will add it for you dynamically.
    • Script path/xyz/phpBB3
      If you have drupal and phpBB3 installed in subdirectory you must enter
      Script path/subdirectory/phpBB3
      NOTE : I have phpBB3 installed in subfolder of my drupal. Drupal is installed in abc/xyz folder. phpBB is installed in abc/xyz/phpBB3/
    • Force server URL settings(*) Yes  () No.
  15. Go to General tab --> Cookie settings

    Cookie domain: .xyz.com
    Cookie name: [any random name of your choice]

    My Example.. Cookie namephpbb3_1f2g9
    Cookie path: /

    ( Note: your domain name .example.com with leading dot. )
  16. Go to General tab --> User registration settings
    • Account activation: () Disable () None (*) By User[Email-verification] () By
    • AdminUsername length: 3 - 30
    • Password length: 6 - 30
  17. Go to General tab --> Security settings
    • Check IP against DNS Blackhole List: () Yes (*) No
    • This can be enabled if security attacks are increasing
    • Check e-mail domain for valid MX record: () Yes (*) No
    • If enabled, the e-mail domain provided on registration and profile changes is checked for a valid MX record.
  18. Go to General tab --> Load settings
      • Session length: 22100Sessions will expire after this time, in seconds. So, set this value according your needs.
    1. Go to ACP --> Styles tab 
        • prosilver-embed --> Install
          • subsilver2-embed --> Install

            In the Install style make sure that the style is active. Do not make it default.
        1. Clear phpBB cache. To do this,

          Go to General tab -->  In the middle of the page (vertically) you can find, 
        2. By default, the phpbbdrupalbridge MOD installs phpbbdrupalbridge API files into the ../phpBB3/includes/phpbbdrupalbridge/ directory.
        3. Move it to the sites/all/modules/phpbbforum/includes/ directory.
          Example : Move /phpBB3/includes/phpbbdrupalbridge/phpbb_api.php to sites/all/modules/phpbbforum/includes/phpbbdrupalbridge/phpbb_api.php 
          ( Note : You should use only one copy of /phpbbdrupalbridge directory )
        4. Now we have to install to Phpbbforum module in Drupal. To do this, Download the phpBBforum module from http://drupal.org/project/phpbbforum
        5. Unpack the archive.
        6. Copy all the contents to sites/all/modules/phpbbforum/

          : Downloaded phpbbforum/css/phpbbforum.css to server sites/all/modules/phpbbforum/css/phpbbforum.css
        7. Remember that we didn't test our http://xyz.com/PhpBB3   after installing the bridge and module. We need to check now. To test how you will be authenticated, login to your phpBB forum as admin.
        8. Next step is to go back to Drupal admin dashboard. Login to Drupal site as admin
        9. Go to Modules tab.
        10. Enable the phpBBforum module.
        11. In order to run phpBB inside of drupal page correctly, clean URLs must be enabled.
        12. To do this, go to Dashboard >> Configuration >> Clean URLs --> Enable and save.
        13. Go to Dashboard >> Configuration >> phpBBforum settings.
        14. You can see the erroneous phpBBforum status. 
        15. Even if you fill correct settings here, it throws you an error.
        16. This is because of bug in bridge/module.
        17. So replace the ../phpbb3/includes/functions_user.php with this file.
        18. Now go to Dashboard >> Configuration >> phpBBforumsettings.
        19. To see the success message, fill the settings as below
          • phpBB forum root path : /home/ .. /public_html/ .. /phpBB3/
          • Path to phpBB api file  :  /home/../public_html/../sites/all/modules/phpbbforum/includes/phpbbdrupalbridge/
          • phpBB api file name : phpbb_api.php 

            Note : If you ignore trailing slashes or if you don't give full path here, Drupal won't read PhpBB database )
        20. If you didn't move the folders, as mentioned in steps 21 & 22 above, above gives you error again. 
        21. In the same page, scroll down for the section phpBB page settings. Fill the following.
          phpBB display wayIn the Drupal page
        22. Scroll to Profile fields mapping section.
        23. You can see field names like field_gender  over there. These fields are nothing but attributes of a user in the website.
        24. These field names should match with the Drupal user registration form field names. By default, these fields doesn't exist in a Drupal fresh install. So we need to create them. To create fields, leave the webpage like that and open a new browser tab, go to Dashboard --> Configuration --> Account Settings --> Manage fields tab (On top right corner)
        25. Create fields that match with the name i.e same name as in previous phpBBforumsettings page.
          Example : field_gender
        26. After creating all those fields, save them
        27. Now come back to phpBBforumsettings tab make sure that you checked Drupal master for Select master registration system in phpBB/Drupal settings. If this is in phpBB master, users will get Access Denied error when users try to click on Create New Account in Drupal homepage. 
        28. Set other settings if you want and Save configuration.
        29. After above steps, the phpBBstatus field which showed error before, displaya success message.
        30. Navigate to Dashboard --> Structure --> Blocks
        31. Enable phpBBforum: Hidden authentication block.
        32. Configure its settings as below.
          Show block on specific pages :  * Show on every page except the listed pages.Pages:    " user/reset/* " Hit Enter
              " user/password " ( without quotes )
        33. If you want advanced synchronization, do not disable it in the future even. Enable the phpBBforum blocks you want to use (optional).
        34. Check whether the link http://xyz.com/phpbbforum  is working fine in your browser.
        35. If page phpbbforum is not found, Go to Dashboard >> Configuration >> Performance -->  Clear cached data
        36. To setup a link to phpbbforum page, go to Dashboard >> Structure >> Menus >> Navigation
        37. See Menu item with blank title in state (Disabled)
        38. You may enable it if you do want phpbbforum in Navigation menu too. Note that Menu link title is mandatory.

          ( Note : To remove this in future, you need to remove the page title )
        39. Go to Dashboard >> Structure >> Menus >> Add links -->  Enter Menu item as phpbbforum.
        40. The name that appears in URLs for PhpBB forums is phpbbforum
        41. To change this name you should add URL aliases. For URL aliasing, go to Dashboard --> Configuration --> URL Aliases     
        42. Let us say, we want to use the term 'forums' instead of phpbbforum in URLS.
        43. Click Add Alias. Add each alias as below.
          1.     phpbbforum -> forums
          2.     phpbbforum/index.php -> forums/index.php
          3.     phpbbforum/viewtopic.php -> forums/viewtopic.php
          4.     phpbbforum/viewforum.php -> forums/viewforum.php
          5.     phpbbforum/viewonline.php -> forums/viewonline.php
          6.     phpbbforum/memberlist.php -> forums/memberlist.php  
          7.     phpbbforum/posting.php -> forums/posting.php
          8.     phpbbforum/search.php -> forums/search.php
          9.     phpbbforum/ucp.php -> forums/ucp.php
          10.     phpbbforum/mcp.php -> forums/mcp.php
          11.     phpbbforum/faq.php -> forums/faq.php
          12.     phpbbforum/report.php -> forums/report.php
          13.     phpbbforum/adm/index.php -> forums/adm/index.php
        44. If existing path is : http://xyz.com/phpbbforum , it comes as http://xyz.com/forums( Note :  Use a relative path and don't add a trailing slash or the URL alias won't work. )
        45. To setup content submission to phpBB forum go to Dashboard --> Structure --> Content types   --> Add content type
        46. Give name as phpBBforum. 
        47. Go to phpbbforum submission settings ( left bottom of same page )
          Drupal to phpBB submission: (*) Enabled
          This requires Drupal to phpBB node submission : enabled in phpBB topic submission settings in phpBBforum settings in Dashboard --> Configuration
        48. Download my patch files from here
        49. Copy all those to your /PhpBB3 folder on server in. If asked, click yes to override
        50. You're done with integration. Have a coffee. :)

          NOTE : PhpBB forum links in menus and navigation appears only after login as authenticated user

        If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

        [How to] clear PhpBB cache

        In PhpBB3,

          1. Login to phpBB using admin credentials
          2. Goto ACP (Administrative Control Panel) (Most probably Link is available at the bottom of your webpage)
          3. Go to General tab -->  In the middle of the page (vertically) you can find, 

          If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

          Error in PhpBB3 | Solution

          I've encountered the following error after patching my PhpBB3 installation.

          Fatal error: Call to undefined function phpbb_version_compare() in /home/ someusername /public_html/ subfolder /phpBB3/includes/acp/acp_main.php on line 419

          This error is displayed when I click on General tab in ACP (Administrative Control Panel)

          Solution : Error is misguiding. Just replace ../phpBB3/includes/functions.php with original version you've backed up.

          If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

          Twitter Delicious Facebook Digg Stumbleupon Favorites More