PHPCMS Web site management system is currently the latest version of Phpcms V9, as one of the main domestic CMS system, currently has tens of thousands of of Web site application scale. So how does its own collection module function, come to see it.
Article collection
Phpcms v9 Default built-in articles, images, download 3 content models, first look at the most common article collection. To collect Sina Internet channel, domestic rolling news column for example http://roll.tech.sina.com.cn/internet_chinalist/index_1.shtml
1, into the background, content-content release Management-Collection management-add acquisition points. (Unlike previous versions of PHPCMS, capture management is within the module menu)
2. Website rules. Collect the project name to fill, collect the page encoding default GBK, the specific collection of pages when you can view their web page source code.
URL collection, no major features, by viewing the page to collect the URL rules to fill. The analysis target page is the sequence URL, and the URL to get the content is between the <!--list, and <!--list End--and two tags. There are no other interfering links, so there is no need to define the characters that must be included and not included in the URL. If the target site is configured with base, then it should be configured as well.
URL acquisition configuration is finished, but if the target Site list page with JS to achieve the next page, or to obtain a URL depth of more than 2 levels, with this acquisition is difficult to achieve.
3, Content rules. Phpcms is the use of "[content]" as a wildcard character, and then set to start the end of the characters, and then filter the code to achieve the acquisition of content. The title tag of the analysis target page is more regular and can be set directly.
Filter format as "content to filter [|] Replace value ", if it is deleted, leave the replacement value blank. Filter rule is to support regular expression, the system comes with a few more common label filtering regular, to be more flexible filter is a bit difficult for beginners, so novice need to familiarize themselves with the regular expression.
Author rules, source rules, time rules to obtain according to rules. I tried it a little bit. Fixed value discovery cannot be achieved, that is, to set a tag as a fixed value, such as the "source" is set to http://www.sina.com.cn, but the source tag of the collection result is empty.
Content rules, fill in the start and end tags, we test the target page is relatively clean, so just filter out the inside of the hyperlinks and some useless tags.
Content paging rules, if the content page must be filled out, the article here is not paginated, the small series will be in the back of the image collection to introduce the label.
4, custom rules, in addition to the system default of several tags, you can also customize the various labels, the rules are the same, just one thing to note: The rule English name must be filled out, otherwise the custom label can not be saved.
5, Advanced configuration, this time can be set to download pictures, image watermark, content paging and import order. Note that if you need a watermark remember to modify the watermark image of your site, Watermark storage path: Statics/images/water
6, the rules set up, submitted back to the collection management home, you can first pass the test to see whether the labels are accurate.
7. Publish content. If all is accurate, first click Collect URL, will automatically collect the article address, and filter duplicate URL. Then the message will pop up to collect the URL, click on the "Collect article content"
The collection is automated and displays the progress of the acquisition.
After the collection is finished, it automatically returns to the collection management homepage, clicks on the content release, enters the collected articles list, tick the articles to be published, or directly click on all the imports at the bottom.
Go to the Release Plan selection interface, new release plan, select a release column, this test is the article module of the column "domestic", in the new page of the scheme can be set to automatically extract the summary, automatically extract thumbnails, import article status, label and database corresponding relationship. Among them, the import article state only a "release", if the webmaster needs to be audited, to modify the corresponding column of the workflow as a first-level audit.
Label and database correspondence, the acquisition tag and database field one by one corresponding, if there is no custom label to find the corresponding field, you need to modify the Model add field, and then by modifying the template to display, the technical requirements are relatively high, not suitable for beginners. In addition, the system comes with several processing functions, also quite practical.
Publish the scenario settings, automatically start to import the article you just selected, and the next time you import no longer need to build a plan, directly select the built solution.
The article collects, publishes completes. Look at the effect:
Background Content Management page
Content page
Now let's take a look at the picture collection
Image Collection
Phpcms V9 with the picture model, the picture processing also has a set of patterns, convenient for some webmaster to do picture site or setting up a picture display way. Below to experience the use of their own acquisition program to collect pictures, to capture the image of the http://www.4493.com/mingxingxiezhen/page as an example:
Website access rules and content acquisition rules and the same as the article collection, the most important point, phpcms v9 image collection can not only capture the image address, but should collect the entire tag, so as to deal with the photos. As in this example: the content label is set to
That's what the collection should be.
There is also a paging problem, the target station paging:
The page code is:
So simply select the all listing mode at the content Pagination rule, then fill in the start and end characters of the Paging tab, and the system will automatically collect the contents of the page.
After you set up the rules, collect URLs, collect content, and publish content. Release plan to note that the small series of attempts to realize, to implement the group model, must be the Content field and the Group field should be used on the "process as a group" function. But this will not be able to get the content of the image thumbnail, so it is better to customize a thumbnail tag, directly get a content map address to do thumbnails.
Set up after publishing. See Collection effect:
Section page
Content page
Summary: carefully experience down, Phpcms V9 from the collection function is relatively comprehensive, to meet the basic articles and picture collection. But not flexible enough for some of the high requirements of the webmaster is also clearly insufficient, and the threshold is higher, the official description of the collection module and help documents are very limited, not conducive to novice beginners.
Original URL: http://www.3lian.com/edu/2012/03-18/23229_3.html
Phpcms Collection Tutorial