| java.lang.Object net.jforum.view.forum.common.BannerCommon
BannerCommon | public class BannerCommon (Code) | | author: Samuel Yung version: $Id: BannerCommon.java,v 1.9 2007/08/01 22:30:05 rafaelsteil Exp $ |
Method Summary | |
public boolean | canBannerDisplay(int bannerId) Check whether the banner will be displayed based on user rights and
banner filter settings. | public Banner | getBanner() Retrieves the correct banner based on weight. | public boolean | isActiveBannerExist(int placement) Test whether any active banner exist at the placement indicated. |
BannerCommon | public BannerCommon()(Code) | | |
canBannerDisplay | public boolean canBannerDisplay(int bannerId)(Code) | | Check whether the banner will be displayed based on user rights and
banner filter settings.
boolean Parameters: bannerId - int |
getBanner | public Banner getBanner()(Code) | | Retrieves the correct banner based on weight. Before calling this
function the isBannerExist(int placement) must be called. The total
weight for all the same position banners should be equal to 99. If
the total weight is smaller than 99 and the random number is larger
than the total weight of all the same position banners, the highest
weight's banner will be chosen. After a correct banner is found, its
views variable will be incremented by 1.
Banner |
isActiveBannerExist | public boolean isActiveBannerExist(int placement)(Code) | | Test whether any active banner exist at the placement indicated.
Parameters: placement - int boolean |
|
|