When the child was a child

十二月 9, 2008

http://lmkbiz.blogspot.com/

PHP Developer channel

十二月 5, 2008

PHP 程式下載

http://www.phpdc.com/php-script/6/

paFileDB

十二月 5, 2008

paFileDB is designed to allow webmasters have a database of files for download on their site. To add a download, all you do is upload the file using FTP or whatever method you use, log into paFileDB’s admin center, and fill out a form to add a file. paFileDB lets you edit and delete the files too. No more messing with a bunch of HTML pages for a file database on your site! Using speedy MySQL for storing data, and powerful PHP for processing everything, paFileDB is one of the best and easiest ways to manage files

http://www.phparena.net/scripts.php?script=pafiledb

Improve download functionality with pafiledb

十二月 5, 2008

Original article: http://dayson.thewomo.com/2007/10/28/integrating-pafiledb-into-drupal/

Intro: It was quite disappointing to realize that an amazing CMS like Drupal failed to have a rich download system. I was expecting a rich downloads section with categories, download counts, rating, etc. The script that answered it all was “pafiledb”. This article explains how to integrate pafiledb into Drupal as if it were a drupal module in a very easy manner. View a demo of pafiledb. So lets get about installing & setting up pafiledb (I used v3.6) on your Drupal website.

Installing pafiledb:

Unzip the file you downloaded from the paFileDB homepage.
Open the “upload” folder, then open “includes” and then open the file “config.php”. You will need to edit that file to reflect your MySQL server information. You will need to edit the server, username, password and the database name.
Make a folder in your drupal root directory called “downloads”.
Open up the “upload” folder from the file you just unzipped. Copy everything, except for the “upgrade” folder from this folder into the “downloads” folder you just created.
Navigate to the “downloads/install/index.php” folder using your web browser and setup pafiledb with any settings you want.
Once you’ve done so, you will be prompted to delete the install folder and then you can easily view your pafiledb by browsing to your /downloads/index.php folder.
pafiledb has been successfully setup. For now, do not modify much. Just login to your pafiledb admin panel and create two categories and add a file.
Now we need to modify pafiledb a bit in order to work with drupal. The template style needs to be changed to removed the headers & unwanted content. I’ve created a custom template which you could install:

Download the modded template of pafiledb by clicking here.
Extract the downloaded file and copy all the files from the extracted “templates” folder into the “downloads/skins/default/templates” folder. Make sure this replaces the files in the templates folder.
Now we need to mod drupal to implement pafiledb into it.

Create a static page say “Downloads” by using the Create Content >>> Page option in drupal.
Set the input format of the page to “PHP code”
Paste the code below in the Body of the new page

<!–p
if ( isset($_GET["fileid"]) )
{
$pafile_params = “?act=view&id=” . $_GET["fileid"];
}
elseif( isset($_GET["admin"]) )
{
$pafile_params = “?act=login”;
}
?>

 

Save the page & view it.
You will realize that pafiledb appears embedded within an iframe in the page you created. Read on to learn how to make your download system more powerful & integrated.

Q1) How to link to a file’s download page directly so that the user doesn’t have to go through the trouble of browsing through categories.
- Go to the download page for the file. (e.g /downloads/index.php?act=view&id=1 ) As you can see the “id” of the file is 1 in the url. Therefore, in the drupal page which displays the pafiledb, you can pass on the same id as a paramater using &fileid=1 at the end of the url. This will directly display the download page of the file in the iframe.

Q2) How do I make sure my visitors are not able to access the download page (/download/index.php) outside the drupal interface.
- To make sure, your downloads page is always inside your drupal theme as an iframe, we need to make the following changes:-

Open the file “downloads/index.php” in your text editor.
Paste the code below at the top of the file.

Make sure to edit the “top.location.href” in the code above to the path of your drupal page which the user should be always directed to access the downloads page.
Q3) How to administer my pafiledb? (This addition was made lately so please update the code in your static page before trying this out)
- To administer your pafiledb, visit yoursite/index.php?q=downloads&admin to login. After logging in, if you want a full page view of your admin panel, visit yoursite/downloads/admin.php

reference

http://dayson.thewomo.com

Original article link: http://dayson.thewomo.com/2007/10/28/integrating-pafiledb-into-drupal/

Introduce how to set LDAP at PHP

十二月 5, 2008

Lightweight Directory Access Protocol

LDAP is the Lightweight Directory Access Protocol, and is a protocol used to access “Directory Servers”. The Directory is a special kind of database that holds information in a tree structure.

The concept is similar to your hard disk directory structure, except that in this context, the root directory is “The world” and the first level subdirectories are “countries”. Lower levels of the directory structure contain entries for companies, organisations or places, while yet lower still we find directory entries for people, and perhaps equipment or documents.

Reference

PHP Advanced Transfer Manager – PHPATM

十二月 5, 2008

The ultimate PHP upload & download manager

http://phpatm.org

Change PHP settings limit the maximum file size per upload to 4 MB

十二月 5, 2008

# Don’t show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.

php_value post_max_size 100M 0
php_value upload_max_filesize 100M 0
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# PHP 4, Apache 2.

php_value post_max_size 100M 0
php_value upload_max_filesize 100M 0
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# PHP 5, Apache 1 and 2.

php_value post_max_size 100M 0
php_value upload_max_filesize 100M 0
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# Requires mod_expires to be enabled.

# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1

# Various rewrite rules.

RewriteEngine on

# If your site can be accessed both with and without the prefix www. you
# can use one of the following settings to force user to use only one option:
#
# If you want the site to be accessed WITH the www. only, adapt and
# uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule .* http://www.example.com/ [L,R=301]
#
# If you want the site to be accessed only WITHOUT the www. prefix, adapt
# and uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule .* http://example.com/ [L,R=301]

# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
#RewriteBase /drupal

# Rewrite old-style URLs of the form ‘node.php?id=x’.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]

# Rewrite old-style URLs of the form ‘module.php?mod=x’.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]

# Rewrite current-style URLs of the form ‘index.php?q=x’.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

refer to here

Drupal Video Tutorial

十二月 5, 2008

http://www.seoecom.com/cms

Drupal 教學

十二月 5, 2008
為了更有系統的整理的各種基於Drupal 的技巧, 教學, 範例

http://www.joetsuihk.com/drupal

http://xtnd.us/dreamweaver

十二月 5, 2008

Extensions and magic for products like Adobe Dreamweaver, Drupal, jQuery, Fireworks, Prototype, Flex, and other software you use

http://xtnd.us/dreamweaver


Follow

Get every new post delivered to your Inbox.