Linux basic configurations blogs http://basicconfig.com/blog en Drupal 7: Displaying authored content in user profile using Views http://basicconfig.com/content/drupal-7-displaying-authored-content-user-profile-using-views <!-- google_ad_section_start --><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>There are several ways on how to allow visitors to view all post by a certain user in Drupal 7. Here is a step by step guide on how to display authored content in user profile using Views module.</p> <p>Step 1 - Allow visitors to view user profile. Go to "People -&gt; Permission" (admin/people - PERMISSIONS tab). Scroll down to <strong>User</strong> section and select <strong>View user profiles</strong> for ANONYMOUS USER.</p> <p>Step 2 - Assuming that you already had Views module with associated modules installed, now create a new view: Structure -&gt; Views -&gt; Add new view (url:admin/structure/views/add).</p> <p>Step 3 - Fill in "View name" and description. Show <strong>Content</strong> (default select from dropdown list) of type and choose your preferred content type from dropdown list. Untick "Create a page" instead tick "Create a block". Enter "Block title" and choose "Display format" from dropdown list. You can change this to your like later if you want. Edit anything that you want and click "Continue &amp; Edit" button.</p> <p>Step 4 - FIELDS - Add your content fields, title, picture and whatever you want.</p> <p>Step 5 - FILTER CRITERIA - Add filter Type, Publish and however you want. </p> <p>Step 6 - BLOCK SETTINGS - Access: Permission | View publish content.</p> <p>Step 7 - Click <strong>Advanced</strong> link (column on the right) and add CONTEXTUAL FILTERS. Choose <strong>Content: Author uid</strong>. Apply. On "When the filter value is NOT available", choose <strong>Provide default value</strong> and in "Type" dropdown list, choose <strong>User ID from URL</strong>. Click Apply.</p> <p>Step 8 - Now go to Structure -&gt; Block (url: admin/structure/block) and scroll down to "Disabled" block. Locate the block that you just created (the block name start with View: Name). Click <strong>configure</strong> and on "Show block on specific pages", choose "Only the listed pages". In the text box type <strong>users/*</strong> and Save block. Place it in the "Content" region or whatever region you want. Save block.</p> <p>That's it.</p> <p>Now, to verify, open a new tab in your browser and type <strong>your-website/users/username</strong> in the url.</p> </div></div></div><div class="field field-name-field-tag field-type-taxonomy-term-reference field-label-above"><div class="field-label">Tag:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/taxonomy/term/10" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">drupal</a></div></div></div><!-- google_ad_section_end --> Thu, 09 Oct 2014 03:58:22 +0000 jinlusuh 356 at http://basicconfig.com http://basicconfig.com/content/drupal-7-displaying-authored-content-user-profile-using-views#comments Drupal 7 subdomain clean url in Godaddy http://basicconfig.com/content/drupal-7-subdomain-clean-url-godaddy <!-- google_ad_section_start --><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>This is a guide on how to install Drupal 7 in a subdomain. Here is the situation to avoid misunderstanding.</p> <p>You already have Drupal 7 website installed in the webroot. The clean url is working fine. Now you want to install a second Drupal 7 website in a subdomain.</p> <p>So here is a guide on how to install a Drupal website in a subdomain (specifically in Godaddy shared hosting).</p> <p>Step 1 - Create a new subdomain using Godaddy tool (Hosting Control Center - More - Hosted Domains). Click "Manage" Subdomains and create a new subdomain. For Example here, we named it "drupal2". So your subdomain url will be "drupal2.yourdomain.com".</p> <p>Step 2 - Create a new database for the second Drupal website (Hosting Control Center - Databases - MySQL).</p> <p>Step 3 - Extract latest Drupal core in the subdomain and do a fresh install. </p> <p>Step 4 - After finished installation, go to Administration Page. Click Configuration and choose Clean URLs under SEARCH AND METADATA. Try run and check Clean URL. If it failed, then open File Manager and edit ".htaccess" file from the FIRST DRUPAL WEBSITE in the "webroot" directory. Add the line below:</p> <p># Add this lines<br /> RewriteCond %{REQUEST_FILENAME} !-f<br /> RewriteCond %{REQUEST_FILENAME} !-d<br /> RewriteCond %{REQUEST_URI} ^/drupal2/<br /> RewriteRule ^ /drupal2/index.php [L]</p> <p># Existing rewrite rules<br /> RewriteCond %{REQUEST_FILENAME} !-f<br /> RewriteCond %{REQUEST_FILENAME} !-d<br /> RewriteCond %{REQUEST_URI} !=/favicon.ico<br /> RewriteRule ^ index.php [L]</p> <p>before the existing rewrite rules.</p> <p>Step 5 - Enable RewriteBase / in the same file (.htaccess in webroot)</p> <p> # If your site is running in a VirtualDocumentRoot at <a href="http://example.com/">http://example.com/</a>,<br /> # uncomment the following line:<br /> # RewriteBase /<br /> RewriteBase /</p> <p>Step 6 - Save ".htaccess" file. Now, manually change the URL from:</p> <p>drupal2.yourdomain.com/?q=admin/config/search/clean-urls</p> <p>to:</p> <p>drupal2.yourdomain.com/admin/config/search/clean-urls</p> <p>and see if it displays the "Enable Clean URLs" checkbox. If it does, select it and Save Configuration.</p> <p>This is how we help configure a friend website. We don't change a thing from ".htaccess" file of the subdomain Drupal website. It work for us and we blog it here for our reference and maybe help other people too.</p> <p>We did change "settings.php" file from Drupal2 subdomain though. Here are things we change/add:</p> <p># $base_url = '<a href="http://www.example.com">http://www.example.com</a>'; // NO trailing slash!<br /> $base_url = '<a href="http://drupal2.yourdomain.com">http://drupal2.yourdomain.com</a>';</p> <p>and</p> <p># $cookie_domain = '.example.com';<br /> $cookie_domain = '.yourdomain.com';</p> <p>That's it.</p> </div></div></div><div class="field field-name-field-tag field-type-taxonomy-term-reference field-label-above"><div class="field-label">Tag:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/taxonomy/term/10" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">drupal</a></div></div></div><!-- google_ad_section_end --> Thu, 02 Oct 2014 19:06:17 +0000 jinlusuh 355 at http://basicconfig.com http://basicconfig.com/content/drupal-7-subdomain-clean-url-godaddy#comments Sort file content in Linux http://basicconfig.com/content/sort-file-content-linux <!-- google_ad_section_start --><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Sometimes when we are working with files in Linux, there is a certain time that we need to sort content of files. There is a situation when we are copying or append a new file containing domains that we want to block in Squid block domain file, for example. Normally we would do that using 'cat new-block-domain-file &gt;&gt; /etc/squid/blockeddomains.acl' command. Suddenly, we got error when restarting the Squid daemon saying there's a duplicate domain in the blocked domains file. The way to solve this duplicate content in file is to sort and remove using Linux sort command and uniq command.</p> <p>Here are solution command to sort and delete duplicate entry in the content of file in Linux using sort and uniq command:</p> <table><tr><td><code>sort filename | uniq -u &gt; newfile</code></td> </tr></table><p>In the example above:</p> <ul><li>filename = file to be sort</li> <li>newfile = new file name</li> </ul><p>We need to save output to a new file because the sort command just print the output to the screen. If we want to permanently delete the duplicate entry in our file, delete the file with duplicate content and replace it with the new file that we just created with the command above.</p> <p>That's it. Hope it helps some new Linux users out there.</p> <p>If you want to read more about Squid cache proxy server, here is the link: <a href="/linuxnetwork/install-squid-in-slackware64-13.37">Install and configure Squid in Slackware</a></p> </div></div></div><!-- google_ad_section_end --> Thu, 09 Jan 2014 07:03:02 +0000 jinlusuh 354 at http://basicconfig.com http://basicconfig.com/content/sort-file-content-linux#comments Install Drupal 6 in Ubuntu 11.10 brief http://basicconfig.com/blog/install-drupal6-ubuntu-11-brief <!-- google_ad_section_start --><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Here is the direct and brief version on how to install Drupal 6.22 in Ubuntu Desktop 11.10.</p> <p>1) Install LAMP server</p> <p>i) Open command line terminal.<br /> ii) Type: sudo su<br /> iii) Provide password.<br /> iv) Type: tasksel<br /> v) Choose 'lamp server' to install.<br /> vi) Start apache server: service apache2 reload<br /> vii) Add virtual site: cp /etc/apache2/sites-available/default /etc/apache2/sites-available/website-name-directory<br /> viii) Enable new website:<br /> - cd /etc/apache2/sites-available/<br /> - a2ensite website-name-directory</p> <p>2) Drupal installation.</p> <p>i) Create database for drupal (in mysql).<br /> ii) Download drupal and extract it.<br /> iii) Copy to /var/www/your-website-directory<br /> iv) Open web browser and begin drupal installation.<br /> v) All should be well accept 'cron' and 'GD library'.</p> <p>3) Install GD library. Type: apt-get install php5-gd</p> <p>4) Restart web server. Type: service apache2 reload</p> <p>5) For cron, just 'run cron manually' or use poormanscron module.</p> <p>6) Reload drupal 'status report' page to confirm.</p> <p>7) Enable clean URL:</p> <p>i)Check rewrite_module: apache2ctl -M</p> <p>ii) Enable rewrite_module: a2enmod rewrite</p> <p>iii) Restart web server: service apache2 reload</p> <p>iv) Set directory permission: vim sites-enabled/website-name-directory</p> <p> Options Indexes FollowSymLinks MultiViews<br /> AllowOverride All<br /> Order allow,deny<br /> allow from all</p> <p> Options Indexes FollowSymLinks MultiViews<br /> AllowOverride All<br /> Order allow,deny<br /> allow from all</p> <p> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/</p> <p> AllowOverride All<br /> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br /> Order allow,deny<br /> Allow from all</p> <p>v) Set directory permission: vim sites-enabled/000-default</p> <p> Options Indexes FollowSymLinks MultiViews<br /> AllowOverride All<br /> Order allow,deny<br /> allow from all</p> <p> Options Indexes FollowSymLinks MultiViews<br /> AllowOverride All<br /> Order allow,deny<br /> allow from all</p> <p> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/</p> <p> AllowOverride All<br /> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br /> Order allow,deny<br /> Allow from all</p> <p>9) Restart apache again:<br /> service apache2 reload</p> <p>10) Troubleshooting</p> <p>1) Included in .htaccess:</p> <p> RewriteEngine on<br /> RewriteBase /<br /> RewriteCond %{REQUEST_FILENAME} !-f<br /> RewriteCond %{REQUEST_FILENAME} !-d<br /> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]</p> <p># Note:<br /> # Change 'RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]' to 'RewriteRule ^(.*)$ website-directory-name/index.php?q=$1 [L,QSA]' sometimes work on some system depends on configuration.<br /> # Change 'RewriteBase /' to 'RewriteBase /website-name-directory' depends on configuration.</p> <p>2) Check RewriteBase in /etc/apache2/sites-enabled/website-name-directory and .htacess:</p> <p># RewriteBase website-name-directory</p> <p>or</p> <p># RewriteBase /</p> <p>Remove comment (#) based on your configuration.</p> </div></div></div><!-- google_ad_section_end --> Tue, 15 Nov 2011 04:38:33 +0000 jinlusuh 24 at http://basicconfig.com http://basicconfig.com/blog/install-drupal6-ubuntu-11-brief#comments Must have Ubuntu applications http://basicconfig.com/blog/must-have-ubuntu-applications <!-- google_ad_section_start --><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I just got back to Ubuntu Desktop from Salix OS. Install the latest version of Ubuntu desktop, which is version 11.10. The installation of this version of Ubuntu is quite different from the older version i used (8.04 I think). For the installation, I'd say it is much easier. The manually partition hard disk steps are simpler. But Ubuntu automatic updates of applications during installation is annoying. It took hours to finish the installation.</p> <p>When all done, I am surprise of this new Ubuntu Desktop environment. It's totally different from Salix OS or Ubuntu Desktop I am familiar with. It took me a while to get used to the environment and I am not going to say anything about it here. Not now.</p> <h3>Filezilla ftp client</h3> <p>Now that I have it works, the first application I installed is 'Filezilla' ftp client. Filezilla is a popular ftp client. The rank in Ubuntu Software Center is 5 stars (out of 5). This is a must have application because I do lots of file transfer in my job. Other ftp client is GFTP ftp client, which is quite popular, with 4.5 stars.</p> <p>Here is how to install Filezilla ftp client. At Sidebar Menu (On the left of desktop screen), choose Ubuntu Software Center. Type 'Filezilla' in the search box and click Filezilla from the result to download and install. You need to provide your Ubuntu password before the installation begin.</p> <h3>GIMP Image Editor</h3> <p>The second application I installed is GIMP Image Editor. GIMP Image Editor is like Adobe Photoshop in Windows. It has everything I need to edit images, create banner, etc for my job. GIMP Image Editor also has 5 stars ranking in Ubuntu Software Center. I never try any other open source image editor other than GIMP.</p> <p>The installation step is similar to the Filezilla installation step above.</p> <h3>Bluefish Editor</h3> <p>Bluefish Editor is a GTK + HTML Editor. This is an important Linux software if you are a web developer. It's like Adobe Dreamweaver in Windows, although not as good but Bluefish Editor is what you need in Ubuntu. I also like Quanta Plus, which is a similar editor when I am working with Slackware. </p> <p>That's my <b>must have Ubuntu Applications</b> up until now (2 weeks after installation). What about you? What does your 'must have Ubuntu applications' list looks like?</p> </div></div></div><!-- google_ad_section_end --> Tue, 25 Oct 2011 03:21:31 +0000 jinlusuh 23 at http://basicconfig.com http://basicconfig.com/blog/must-have-ubuntu-applications#comments How to check dns ip address used in my Linux computer? http://basicconfig.com/blog/howto-check-dns-ip-address-used-in-my-linux-computer <!-- google_ad_section_start --><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>My friend asked me yesterday on how to view dns ip address in Linux. She used Linux ifconfig command but there is no dns information in the result. I told her to google because I felt kind of annoying. I know there must be something serious in her head that makes she forgot things. Otherwise how can she forgot a simple thing as viewing /etc/resolve.conf file?</p> </div></div></div><!-- google_ad_section_end --> Thu, 29 Sep 2011 00:45:44 +0000 jinlusuh 22 at http://basicconfig.com http://basicconfig.com/blog/howto-check-dns-ip-address-used-in-my-linux-computer#comments Is Joomla the right platform for you? http://basicconfig.com/blog/is-joomla-the-right-platform-for-you <!-- google_ad_section_start --><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Joomla is popular open source content management system. In other words, you can create a website, a blog or a portal with Joomla. I've known about Joomla existence several years ago. In fact, I've been using Joomla cms as a platform for my employer's website. I just want to share my thought about Joomla, my experience as a user. Perhaps it can help someone make a decision whether to use it or not.</p> <p>My first impression several years ago when I tried Joomla was, Joomla is not as easy as people say it is. Yes, without proper Joomla training, I just can't figure out where to start. There were also not many tutorials about Joomla at that time. I had to create proper 'Standard Operating Procedure' about everything so that I won't forget how to do things in Joomla. I managed to create Joomla menu and link it to an article. I've managed to survive managing Joomla website for 2 years without fully understand how it works(as end user).</p> <p>There are several reasons that contribute to the above situation. I have no proper training about Joomla and I don't have enough time to explore. Also, it's hard to find a basic guide on how to use Joomla for a first time user in the Internet. There are several tutorials that supposed to explain everything about Joomla but reading it just make you more confused.</p> <p>Those reasons seems like an excuse, isn't it? I know. Perhaps the real reason that make me hesitate to learn Joomla is because of security threats. There are so many exploits about Joomla and they were released every week. I feel like wasting my time learning something that I am not interested in. Other real factor maybe because Joomla failed w3c validation (Joomla 1.0.x at that time).</p> <p>Now, after a year I work for a different employer, I start learning Joomla again. This time, with Joomla 1.5.x, it really feels different. Joomla is much easier to use, the administrator menu is much simpler, and everything seems organised. I really enjoy using Joomla. I decided to try the old Joomla 1.0.x version again, and it's not that bad like I used to feel. Time does changed people's thought! </p> <p>Now the conclusion, if you ask me, do I recommend Joomla for a beginner? I would say, definitely, yes. If you ask me again, what about the security threats? My answer would be, as long as you consistently update the security patches, you will be fine.</p> <p>My advice, if you have no experience of using content management system before, get a proper training if you can. If not, take your time reading books or articles from the Internet. There are many excellent tutorials nowadays. Learning Joomla won't be hard any more.</p> </div></div></div><!-- google_ad_section_end --> Mon, 02 Nov 2009 13:49:38 +0000 jinlusuh 20 at http://basicconfig.com http://basicconfig.com/blog/is-joomla-the-right-platform-for-you#comments