Dfgallery 2.0 installation Configuration

Source: Internet
Author: User

The configuration of dfgallery2.0 has been depressing for the past few days. It was originally intended to be used as an image display program. The configuration of dfgallery2.0 has never been used before, and it is very powerful to run on opencms. Because the image display computer runs on a single machine in many cases, we have considered using.

Today, everything has changed. In the past, foreign programs also had bugs (after all, they invented the bug). Now I want to express the problem and provide convenience for users who use dfgallery2.0.

1. After the program is successfully configured, it cannot be placed in the httpd root directory. You need to configure a virtual directory or put it in a subdirectory. Then modify. htaccess

Original Configuration:

[Html]
<FilesMatch "\. (engine | inc | info | install | module | profile | po | sh |. * SQL | theme | tpl (\. php )? | Xtmpl) $ | ^ (code-style \. pl | Entries. * | Repository | Root | Tag | Template) $ ">
Order allow, deny
</FilesMatch>
 
Options-Indexes
Options + FollowSymLinks
 
ErrorDocument 404/index. php
DirectoryIndex index. php
 
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond % {REQUEST_FILENAME }! -F
RewriteCond % {REQUEST_FILENAME }! -D
RewriteRule ^ (. *) $ index. php/$1 [L]
</IfModule>

Modify Configuration:
[Html]
<FilesMatch "\. (engine | inc | info | install | module | profile | po | sh |. * SQL | theme | tpl (\. php )? | Xtmpl) $ | ^ (code-style \. pl | Entries. * | Repository | Root | Tag | Template) $ ">
Order allow, deny
</FilesMatch>
 
Options-Indexes
Options + FollowSymLinks
 
ErrorDocument 404/index. php
DirectoryIndex index. php
 
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase/gallery
RewriteCond % {REQUEST_FILENAME }! -F
RewriteCond % {REQUEST_FILENAME }! -D
RewriteRule ^ (. *) $ index. php/$1 [L]
</IfModule>
Add configuration: RewriteBase/gallery # rewrite to subdirectory

2. The program does not support Chinese directories and Chinese file names by default.

After checking by the gods, I found that the program is encoded as UTF-8, but the code for the new database is actually EUROPEAN CODE (¥ # % ...... % ¥)

Solve the problem after the script is created


[SQL]
Drop table if exists 'content ';
/*! 40101 SET @ saved_cs_client = @ character_set_client */;
/*! 40101 SET character_set_client = utf8 */;
Create table 'content '(
'Id' int (10) unsigned not null AUTO_INCREMENT,
'Uid' int (10) unsigned not null,
'Pid 'int (10) unsigned default null,
'Type' varchar (32) not null,
'Title' varchar (128) not null,
Primary key ('id '),
KEY 'fk _ pid_id '('pid '),
KEY 'fk _ uid_uid '('uid '),
CONSTRAINT 'fk _ pid_id 'foreign key ('pid') REFERENCES 'content' ('id') on delete cascade,
CONSTRAINT 'fk _ uid_uid 'foreign key ('uid') REFERENCES 'users' ('id') ON DELETE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 4 default charset = utf8;
/*! 40101 SET character_set_client = @ saved_cs_client */;
 
--
-- Dumping data for table 'content'
--
 
Lock tables 'content' WRITE;
/*! 40000 alter table 'content' disable keys */;
Insert into 'content' VALUES (, NULL, 'gallery ', 'aaaaa'), (, 1, 'alipay', 'aaaaa'), (, 1, 1, 1, 'alipay', 'aaaaa ');
/*! 40000 alter table 'content' enable keys */;
Unlock tables;
 
--
-- Table structure for table 'contentprop'
--
 
Drop table if exists 'contentprop ';
/*! 40101 SET @ saved_cs_client = @ character_set_client */;
/*! 40101 SET character_set_client = utf8 */;
Create table 'contentprop '(
'Id' int (10) unsigned not null AUTO_INCREMENT,
'Cid' int (10) unsigned not null,
'Name' varchar (100) not null,
'Value' longtext,
Primary key ('id '),
KEY 'fk _ cid_id '('cid '),
CONSTRAINT 'fk _ cid_id 'foreign key ('cid') REFERENCES 'content' ('id') ON DELETE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 5 default charset = utf8;
/*! 40101 SET character_set_client = @ saved_cs_client */;
 
--
-- Dumping data for table 'contentprop'
--
 
Lock tables 'contentprop' WRITE;
/*! 40000 alter table 'contentprop' disable keys */;
Insert into 'contentprop' VALUES comment'), (, 'album _ type', 'flickr'), (, 'album _ type', 'custom ');
/*! 40000 alter table 'contentprop' enable keys */;
Unlock tables;
 
--
-- Table structure for table 'systemprop'
--
 
Drop table if exists 'systemprop ';
/*! 40101 SET @ saved_cs_client = @ character_set_client */;
/*! 40101 SET character_set_client = utf8 */;
Create table 'systemprop '(
'Name' varchar (100) not null,
'Value' longtext, www.2cto.com
Primary key ('name ')
) ENGINE = InnoDB default charset = utf8;
/*! 40101 SET character_set_client = @ saved_cs_client */;
 
--
-- Dumping data for table 'systemprop'
--
 
Lock tables 'systemprop' WRITE;
/*! 40000 alter table 'systemprop' disable keys */;
Insert into 'systemprop' VALUES ('flickr _ api_key ', 'dc123ae6ab78886c452b7ad44ec171c6 ');
/*! 40000 alter table 'systemprop' enable keys */;
Unlock tables;


Author: xuaa

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.