Home >Backend Development >PHP Tutorial >destoon implements the method of placing advertisements for designated members or member groups in member stores, destoon places advertisements_PHP tutorial
The example in this article describes destoon’s method of implementing advertisements for designated members or member groups in member stores, which is of great practical value for destoon development. Share it with everyone for your reference. The specific method is as follows:
1. Specify member attributes to place ads
If you want to display ads in the same location, you can add:
to the side.htm file under the template folder templatedefaulthomepage.{if $COM[vip]} {else} 显示的AD(可以调用网站广告管理里的调用方式) {/if}
Detailed explanation: The meaning of the above code is that VIP does not display ads, but other members do. It can well reflect the advantages of VIP and is worth applying.
2. Designate member groups to place ads
The implementation code is as follows:
{if $COM[groupid]==x} {else} 显示的AD(可以调用网站广告管理里的调用方式) {/if}
I hope the method described in this article will be helpful to everyone in destoon development.
I have implemented different member groups to display different icons. Demo site: Jiangxi Nankang Online Furniture City. In the tag folder under the template folder, find list-company.htm and list-com.htm, and modify the corresponding code. The code is as follows :{if $t[groupid] == "7"}9f553ab048d3ff765d12e0e73ebddd42{/if}{if $t[groupid] = = "8"}cc14cae79075d823e37d22b319c6549d{/if}{if $t[groupid] == "9"}66c4a2c0b7eb83f8f2225785e78c3097{/if}
If the name "Exhibitor" is fixed here, then you can just write "Exhibitor" directly. . .