Trent Wyman


PHP Script $_SERVER["REQUEST_URI"] to Check for a Particular URL Path

The following PHP script checks to see if a url argument is TRUE:

<?php
if($_SERVER["REQUEST_URI"] == '/contact'){
print 'Contact';
}else{
print '';
}
?>


Drupal 6 Page Variables

Here is a list of available variables within page.tpl for Drupal 6:

General utility variables:
$base_path: The base URL path of the Drupal installation. At the very least, this will always default to /.
$css: An array of CSS files for the current page.
$directory: The directory the theme is located in, e.g. themes/garland or themes/garland/minelli.
$is_front: TRUE if the current page is the front page. Used to toggle the mission statement.
$logged_in: TRUE if the user is registered and signed in.


Drupal if($is_front) PHP Condition

The following PHP script can be used to check if the Drupal home page is TRUE:

<?php
if($is_front){
print 'This is the front page';
else{
print 'This is an interior page';
}
?>


Drupal 6 - Declaring Custom Regions and Style Sheets in the Theme's .info File

Here is an example theme.info file to reference formatting for declaring page regions and style sheets custom to that theme.
------------------------------------------------------------------------------------------

; $Id: theme-name-here.info,v 1.0 2009/mn/dy 02:30:57 Exp $
name = theme-name-here
description = Custom theme for web site
version = VERSION
core = 6.x
engine = phptemplate

; Information added by drupal.org packaging script on 2009-09-16
version = "6.14"
project = "drupal"
datestamp = "1253130027"

; Declare custom page regions
regions[header] = Header


Drupal 6 - Increase PHP Max Memory Limit and File Upload Limit

To increase the default php memory limit and max file upload size in Drupal 6, the following methods can be performed:

If you have access to your php.ini file add this script (recommended):

In your php.ini file:
memory_limit = 96M to your php.ini file
post_max_size = 100000000000
upload_max_filesize = 100000000000

*** A custom php.ini file can also be created adding only the script shown above.
--------------------------------------------------------------------------------------------------------------------


Drupalcamp Atlanta - Theming Drupal Menus Session

On Saturday, September 19th 2009 at Kennesaw State University (Room #SO3031), Trent Wyman will be presenting a Drupalcamp session titled: "Theming Drupal Menus".

The "Theming Drupal Menus" session is intended for Drupal beginners and will cover various techniques for theming primary, secondary, and tertiary level links into collapsible & expandable menus.

---------------------------------------------------------------
Topics covered will include:

1) Static Links v/s Drupal Menu Links


PHP Date/Time

Basic PHP date() script:

<?php print date('Y'); ?>

--------------------------------------------------------

Simple copyright statement using year ('Y') date format:

<?php echo "© ".date('Y')." Trent Wyman. All rights reserved."; ?>

or ...

<?php echo "Copyright ".date('Y')." Trent Wyman. All rights reserved."; ?>

--------------------------------------------------------

DRUPAL AUTHOR/DATE DISPLAY


How to display HTML script as text on a web page

In order to display HTML code on a web page as text, the "<" & ">" opening & closing characters need to be converted to:

< = &lt
> = &gt

Example:

&lt;a href=http://www.wy-designs.net&gt;Wy-Designs&lt;/a&gt;

The above line when displayed by the browser it will display this:

Wy-Designs

---------------------------------------------------------

Online Tool:


How to insert Bullets using Adobe Illustrator

To insert bullets into text within an Adobe Illustrator file do the following:

WINDOWS = Place the text cursor where you want the bullet to appear. Then, hold down the alt key and press 0149 on the numeric keyboard (not the numbers), when you release the alt key, a bullet will appear in the text.

MAC = Place the text cursor where you want the bullet to appear. Then, select option + 8 to insert the bullet.


Embed Flash into web page using SWF Object

Below are the scripts I use to embed a Flash file into a web page or Drupal node tpl file using SWF Object. Examples include using JW Player for rtmp & flv streaming. Also a basic SWF Object script to load single .swf or .flv file into a web page.
-----------------------------------------------------

Example 1: Load Streaming Video into SWF Object (using JW Player)


Announcements

Drupalcamp Atlanta Attendee

Drupalcamp 2010 Presentation

Oct. 2nd, 2010 @ Georgia Tech Research Institute
This year at Drupalcamp Atlanta, I plan to give a lecture on setting up a "Multi-Language site for Non-Programmers" using Drupal.
Learn more...


Press Release:
Michael C. Carlos Museum

Read the press release announcing the Drupal redesign of Emory University's Michael C. Carlos Museum.
View Press Release


Current weather

GA - Marietta / Dobbins Air Force Base

Broken clouds
  • Broken clouds
  • Temperature: 71.6 °F
  • Wind: Calm
  • Rel. Humidity: 88 %
  • Sunrise: 06:16
  • Sunset: 18:55
Reported on:
Thu, 09/09/2010 - 06:56
Syndicate content