How to call specific data in ads in Phpcms v9

Source: Internet
Author: User

Phpcms V9 's advertising module has a lot of flexibility, using the default templates have been able to get some very useful advertising results, but if it is a self-made similar to the jquery switch ads and other situations, the system comes with the call method can not meet the requirements, Then you need to invoke the specific data in the ad, such as: Call the image address and link directly in the picture list. In fact, the method is very simple, when the ad data table is the default, the calling code:

{pc:get sql= "select setting from V9_poster WHERE Spaceid = + type= ' images ' and disabled=0 ORDER by Listorder ASC" num = "5"}

{Loop $data $r}

<?php

Eval ("$narry = $r [setting];");

?>

<a href= "{$narry [1][linkurl]}" target= "_blank" ></a>"

{/loop}

{/PC}

In the above calling code, the key parameters are: Spaceid = 12, type= ' images ', {$narry [1][specific data name]} three kinds.

After analyzing the data, the circular data names of different ad types are different, and the following are listed in turn:

There are three types of ads: text, image, Flash, rectangle banner, fixed position, floating mobile, couplet ads, image rotation ads, picture list ads, text ads, and code ads. These 8 categories of ads have different types.

There are several data $narry can call in the loop data:

{$narry [1][paddleft]},

{$narry [1][paddtop]},

{$narry [1][linkurl]},

{$narry [1][imageurl]},

{$narry [1][alt]},

{$narry [1][flashurl]},

{$narry [1][code]}

Note: If it is a couplet ad there will be {$narry [2][linkurl]}, {$narry [2][imageurl]}, {$narry [2][alt]}.

Understanding the above method of invocation and the name of the circular data, I believe you can certainly be based on these to do some specific applications: such as custom phpcms V9 banner switch ads, use phpcms V9 advertising bit to create online QQ customer service, use Phpcms V9 ad bit to do data list display, Use phpcms V9 advertising bit to do friendship connection and so on, as long as you can think of, certainly can do!

How to call specific data in ads in Phpcms v9

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.