NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·decompressing EN-Book-Nuke.tar.tar
·How to allow spaces/gaps/"-" in allowed usernames
·How to Setup PHPNUKE on win2k
·cannot save changes
·voting?
·Nuke forum picture problem
·How to change smtp port on wampserver and windows
·yet another 301 redirect problem
·Image display? - newbie
·php nuke help

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: qwertz
Today: 0
Yesterday: 1
Overall: 15102

Visitation:
Guests: 524
Members: 0
Total: 524


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Download the Best Archiver in the World
Download the Best Archiver in the World

phpNuke Theme Tip
Over the past few months I have been removing as much as possible from the themes to make them load as fast and smooth as possible.

Here is a tip I will leave everyone that I use when building all my site themes that helps save on bandwidth.

Javascript is a great thing when used sparingly and wisely. It definitely has it place when it comes to web development. However one place I fail to see it's use is in the display of the date, that is so popular with all sites, when phpNuke already uses PHP to generate the pages.

Here is what I use in my theme to replace the javascript date method.

File: YourTheme/theme.php

At the start of the theme.php add:

global SITE_DATE;

$SITE_DATE = gmdate("M.d,Y");
// Formated Site Date - M = Short Month - F = Long Month - S = 1st, 2nd, 3rd

Replace the "Array ofmonth Names" Javascript with the global variable $SITE_DATE and you are set.

The php gmdate(); function is very flexible and can easily format your date to anything you like. With a little creative thinking you could code up a small function and easily add language changes.

Some of the more useful characters are recognized in the format string:

Y - year, numeric, 4 digits

y - year, numeric, 2 digits

F - month, textual, long; i.e. "January"

M - month, textual, 3 letters; i.e. "Jan"

m - month, numeric

z - day of the year, numeric; i.e. "299"

d - day of the month, numeric

l (lowercase 'L') - day of the week, textual, long; i.e. "Friday"

D - day of the week, textual, 3 letters; i.e. "Fri"

w - day of the week, numeric, 1 digit

H - hour, numeric, 24 hour format

h - hour, numeric, 12 hour format

i - minutes, numeric

s - seconds, numeric

A - "AM" or "PM"

a - "am" or "pm"

S - English ordinal suffix, textual, 2 characters; i.e. "th", "nd"
Nuke Themes
Posted on Thursday, September 27, 2001 @ 3:33 AM CDT by NukeResources

Multi-Site Search
Google
Web NukeResources.com
NukeFixes.com NukeSecurity.com
 

Sponsor Links
 

 
Related Links
· More about Nuke Themes
· News by NukeResources


Most read story about Nuke Themes:
New Flash Theme for PHP-Nuke 5.4

Article Rating
Average Score: 5
Votes: 2


Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad

Options

 Printer Friendly Page Printer Friendly Page


Re: phpNuke Theme Tip (Score: 1)
by boink on Saturday, September 29, 2001 @ 7:42 PM CDT
(User Info | Send a Message)
good tip, i use date(); but it's all the same


Download the Best Archiver in the World


Best viewed with a Browser
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2001 - 2007 by NukeResources.com
You can syndicate our news using the file .backend.php or ultramode.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.20 Seconds

:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::