To Add Content, just create file home.ctp in app/views/page directory
To Add Layout, just create file default.ctp in app/views/layout directory
Monday, January 31, 2011
Sunday, January 30, 2011
Mode Rewrite
The first thing to do with this module is making it on.
Type this code in .htaccess file:
RewriteEngine on
Example 1:
To make a practice, please make a two file in the directory that same as .htaccess file (one.php and two.php). Then write in your .htaccess file:
RewriteEngine on
RewriteRule ^one\.php$ two.php
Then try to browse http://localhost/one.php
Whay you really get is the content of two.php file, not one.php file.
Example 2:
Create a index.php file
<?php
$name = $_GET['name'];
$name = !empty($name) ? $name : "No Name";
?>
<h1>Your Name: <?php echo $name; ?></h1>
Then create an .htaccess file:
RewriteEngine on
RewriteRule ^([a-z])+$ index.php?name=$1
Browse http://localhost/luna
To make a match of three arguments - name, gender and city - use:
RewriteRule ^([a-zA-Z]+)\/([a-zA-Z]+)\/([a-zA-Z]+)$
index.php?name=$1&gender=$2&city=$3
RewriteRule ^([a-zA-Z\s]*)$ index.php?name=$1 // space
Removing Login Form At Front
To remove the login form block, just remove the block to disable region in the block structure administration. And you can login again to access to your account through: http://your-drupal-site.com/user
Tuesday, January 25, 2011
Module System - Hooks
Drupal module system based on hook. Hook is a function that name hook_lol(), for example. The hook, in the example, lies in lol module. So anyone who want to implement the hook must do this - me_lol(), if my module is me.
In real life, see menu module and help module in module directory. Try to open menu.module file. There you will see a function menu_help($path, $arg). Then open help.api.php file in module/help directory, and you will see hook_help($path, $arg) function
In real life, see menu module and help module in module directory. Try to open menu.module file. There you will see a function menu_help($path, $arg). Then open help.api.php file in module/help directory, and you will see hook_help($path, $arg) function
Monday, January 24, 2011
Include Files
httpd/include (29)
- httpd.h
- mpm_common.h
- scoreboard.h
- ap_compat.h
- ap_config.h
- ap_listen.h
- ap_mmn.h
- ap_mpm.h
- ap_provider.h
- ap_regex.h
- ap_regkey.h
- ap_release.h
- http_config.h
- http_connection.h
- http_core.h
- http_log.h
- http_main.h
- http_protocol.h
- http_request.h
- http_vhost.h
- util_cfgtree.h
- util_charset.h
- util_abcdic.h
- util_filter.h
- util_ldap.h
- util_md5.h
- util_script.h
- util_time.h
- util_xml.h
Drupal Includes Files
ROOT/includes/
- action.inc -> action engine for executing stored actions
- ajax.inc -> function for use with drupal ajax fw
- archiver.inc -> classes and interfaces for archiver system
- authorize.inc -> helper function n form handler for authorize.php
- batch.inc -> running process for multiple http request
- batch.queue.inc -> queue handlers used by batch API
- bootstrap.inc -> functions load in every drupal request
- cache.inc -> get cache objects for cache bin
- cache-install.inc -> stub cache used during installation
- commons.inc -> many drupal modules reference to this
- date.inc -> list of date format and their locals
- entity.inc -> interface and entity class
- errors.inc -> error handling
- file.inc -> handling file upload and server file management
- file.mimetypes.inc -> mapping mime type with extension
- form.inc -> abstract representation of forms
- graph.inc -> directed acyclic graph function
- image.inc -> image manipulation
- install.core.inc -> installing drupal
- install.inc ->
- iso.inc -> iso for country and language list
- language.inc -> multiple language handling
- locale.inc -> for locale.module
- lock.inc -> database locking mechanism
- mail.inc -> processing and sending mail
- menu.inc -> drupal menu system
- module.inc -> process and load module
- pager.inc -> represent database result as page
- password.inc -> password hash function for authentication
- path.inc -> handling path
- registry.inc -> code registry parser engine
- session.inc -> handling user session
- stream_wrappers.inc -> handling PHP stream function for file
- tablesort.inc -> creation of sortable table
- theme.inc -> theme system. control output of drupal
- theme.maintenance.inc -> for maintenance page
- token.inc -> placeholder/token replacement system
- unicode.entities.inc -> HTML entities
- unicode.inc ->
- update.inc -> datebase update
- updater.inc ->
- utility.inc ->
- xmlrpc.inc ->
- xmlrpcs.inc -> defining and handling xml-rpc request
- date.inc -> list of date format and their locals
- entity.inc -> interface and entity class
- errors.inc -> error handling
- file.inc -> handling file upload and server file management
- file.mimetypes.inc -> mapping mime type with extension
- form.inc -> abstract representation of forms
- graph.inc -> directed acyclic graph function
- image.inc -> image manipulation
- install.core.inc -> installing drupal
- install.inc ->
- iso.inc -> iso for country and language list
- language.inc -> multiple language handling
- locale.inc -> for locale.module
- lock.inc -> database locking mechanism
- mail.inc -> processing and sending mail
- menu.inc -> drupal menu system
- module.inc -> process and load module
- pager.inc -> represent database result as page
- password.inc -> password hash function for authentication
- path.inc -> handling path
- registry.inc -> code registry parser engine
- session.inc -> handling user session
- stream_wrappers.inc -> handling PHP stream function for file
- tablesort.inc -> creation of sortable table
- theme.inc -> theme system. control output of drupal
- theme.maintenance.inc -> for maintenance page
- token.inc -> placeholder/token replacement system
- unicode.entities.inc -> HTML entities
- unicode.inc ->
- update.inc -> datebase update
- updater.inc ->
- utility.inc ->
- xmlrpc.inc ->
- xmlrpcs.inc -> defining and handling xml-rpc request
Drupal Folder Structures
drupal-7.0
- includes/
- misc
- modules
- profiles
- scripts
- themes
- web.config -> xml file config like .htaccess
- .htaccess -> server setting for this folder
- uthorized.php -> authorize file access
- cron.php
- index.php -> direct to ROOT/includes/bootstrap.inc
- install.php -> direct to ROOT/includes/install.core.inc
- update.php -> update to another version
- xmlrpc.php -> handling xml-rpc request from clients
- CHANGELOG.txt -> new features in each version
- COPYRIGHT.txt -> copyright info
- INSTALL.mysql.txt -> config mysql for installation
- INSTALL.pgsql.txt -> config postgreSql for installation
- INSTALL.sqlite.txt -> config sqlite for installation
- INSTALL.txt -> guide how to install drupal
- LICENSE.txt -> license doc
- MAINTAINERS.txt -> developer team
- README.txt -> general insight
- robots.txt -> search engine crawling config
- UPGRADE.txt -> upgrade instruction guide
Win32 Classes
1. Computer System Hardware Classes
2. Operating System Classes
3. Installed Application Classes
4. WMI Service Management Classes
5. Performance Counter Classes
6. Security Descriptor Classes
2. Operating System Classes
3. Installed Application Classes
4. WMI Service Management Classes
5. Performance Counter Classes
6. Security Descriptor Classes
Sunday, January 23, 2011
jQuery Source Files
jquery/
- src/
- ajax.js
- attributes.js
- core.js
- css.js
- data.js
- dimensions.js
- effects.js
- event.js
- intro.js
- manipulation.js
- offset.js
- outro.js
- queue.js
- sizzle-jquery.js
- support.js
- traversing.js
- ajax/
- jsonp.js
- script.js
- xhr.js
JQuery Git
jquery/
- build/
- speed/
- src/
- test/
- .gitattributes
- .gitignore
- GPL-LICENSE.txt
- MIT-LICENCE.txt
- Makefile
- README.md
- version.txt
Tiny C File Children
header files:
tcc
- coff.h
- elf.h
- i386-asm.h
- il-opcodes.h
- libtcc.h
- stab.h
- tcc.h
- tcctok.h
c files:
- arm-gen.c
- c67-gen.c
- i386-asm.c
- i386-gen.c
- il-gen.c
- libtcc.c
- tcc.c // application files
- tccasm.c
- tcccoff.c
- tccelf.c
- tccgen.c
- tccpe.c
- tccpp.c
- x86_64-gen.c
- .cvsegnore
- stab.def
- Changelog
- configure
- COPYING
- Makefile
- README
- TODO
- VERSION
- tcc-doc.html
- texi2pol.pl
- tcc-doc.texit
Subscribe to:
Posts (Atom)