If and foreach in drupal templates

Examples of using if and foreach in drupal or general php templates:

<?php if($test == 1): ?>
<div>do something</div>
<?php endif; ?>
 
<?php if($test == 1): ?>
<div>do something</div>
<?php else: ?>
<div>do something else</div>
<?php endif; ?>
 
<?php foreach($items as $item): ?>
<?php echo $item->getTitle(); ?>
<?php endforeach; ?>

Secure your site

How hard would it be to secure a drupal site? Not that hard really, all you need is to make sure your hosting has SSL setup and working, then redirect all traffic from HTTP to HTTPS. But is redirecting all the traffic to https the most efficient way? What if you only want the login form or admin section secured? Thankfully there is a module out there to help you out. Let me present to you: Securepages Module.

Continue reading “Secure your site”

ScreenCast Using FCKeditor

This screencast will show you how to integrate FCKeditor into any drupal site.

Requirements:
Drupal 5.1 (http://drupal.org/drupal-5.1)
FCKeditor Module 5.x-1.x-dev (http://drupal.org/project/fckeditor)
FCKeditor (http://www.fckeditor.net/download) Required

Part 1
Start Screencast (Opens in new browser)

Part 2
Start Screencast (Opens in new browser)

Part 3
Start Screencast (Opens in new browser)