• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

XenAMS

Status
Not open for further replies.

Lawrence

Well-known member
Link to the discussion thread for the new Ad Manager: http://xenforo.com/community/threads/xenfx-ad-manager.17343/#post-226872

This is the first release of XenAMS Alpha. Back-up your Database before installing. No guaranties or warranties given, so use at your own risk.

If you already have a copy installed, you will need to uninstall it to install this version. Future releases will not need to be uninstalled.

Xen Ads Management System will give Admins control over how and where a sponsor's ad(s) will display.

Main Features

- includes up to 7 ad locations: logo block, above top of breadcrumb, sidebar, footer, after 1st post, and left and right of the page
- supports all standard banner sizes
- each ad location can be set to random or sequential
- each ad location can be set to track displayed time and views
- time to keep an ad displayed, before a new one is fetched, can be set for each location
- Logo block, Left & Right Page locations have an auto adjust feature (see the AutoAdjust Screen Shots below this list)
- the Super Admin can give or deny the permission to access XenAMS in the Admin Panel
- maximum Width and Height of banners for each location can be set
- each ad can over-ride a locations time setting to be displayed for X minutes
- expiry time for each ad can be set from 1 day to 365 days
- each ad can appear in multiple ad locations
- each ad can be made exclusive to a specific Node and Child Nodes
- completely phrased

AutoAdjustOff.webp AutoAdjustOn.webp

Limitations

- as XenAMS is created for sponsor's ads, ads are shown for all group members. It does not support Google Ads, though a future version may allow for this depending on Google's TOS
- grouping of ads are not supported in this version
- Ad Tools is not implemented in this version
- Flash ads are not supported, but may be if enough members request it
- although 7 locations are included, it is not recommended to use all 7 locations at the same time.
- unless your style is specifically designed to use both Tower locations (Left and Right side), it is recommended to use only 1.

Queries

XenAMS will add a minimum of 2 queries, and a maximum of X queries. X is depended on how you set each location and how many locations you have set to active.

Installation Process

- adds 5 tables to your XenForo Database
- inserts a new data_key in the data_registry
- creates a new folder in the data directory
- adds 90 new phrases, and 14 new templates

Uninstallation Process

- removes all data during the Installation process, with the exception of the xenams folder created in the data directory

Installation (in this order)

- download the zip file to your PC, and extract.
- upload the contents of the library folder to: yourxenforo/library/
- log in to your Admin Control Panel
- Admin -> Add-ons -> Install Addon. Click the Install from upload file button, and browse to the location you unzipped this Addon in, and click the addon_xenAms xml file. Once you selected the file, click the Install Add-on button.

Template Edits

As of this version, template edits are required. You only need to complete the edits for the locations you will only be using. I recommend completing the edits for each location.

As of XenForo Beta 5, Xen AMS will require a minor edit of up to four XenForo templates for each style your members can select: logo_block, message, PAGE_CONTAINER, and EXTRA.css. The Sidebar location is done through a Hook, but the CSS container ID is found in EXTRA.css. These template edits apply to the default style, if you are using a custom style, there may be differences.

AdminCP -> Appearance -> Templates -> logo_block

Find <span class="helper"></span>

Directly underneath add:
Code:
            <xen:if is="{$adData.logo}">

                <xen:include template="xenams_logo" />

            </xen:if>
Press Save and Exit button.

AdminCP -> Appearance -> Templates -> message

Scroll to the very bottom, and after </li>, add:
Code:
<xen:if is="!{$post.position} AND {$adData.post}">

    <xen:if is="!{$message.conversation_id}">

        <xen:include template="xenams_post" />

    </xen:if>

</xen:if>
Press Save and Exit button.

AdminCP -> Appearance -> Templates -> PAGE_CONTAINER

Find <!-- top breadcrumb, top ctrl -->

and directly below, add:
Code:
                            <xen:if is="{$adData.breadcrumb}">

                                <xen:include template="xenams_breadcrumb" />

                            </xen:if>

Find <div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>

Directly below, add:

Code:
    <xen:if is="{$adData.footer}">

        <xen:include template="xenams_footer" />

    </xen:if>

Find these 2 lines:
<div id="content" class="{$contentTemplate}">
<div class="pageWidth">

And insert this between them:
Code:
    <xen:if is="{$adData.leftside}">
    <div id="leftside">
        <xen:include template="xenams_leftside" />
    </div>
    </xen:if>

    <xen:if is="{$adData.rightside}">
    <div id="rightside">
        <xen:include template="xenams_rightside" />
    </div>
    </xen:if>

Note: if your style is already designed for tower ads, remove the id="leftside" and id="rightside" divs, place the appropriate <xen:include template="xenams_xxxxx" /> in your styles tower ad location. Also leave auto adjust setting for left and right towers off.

AdminCP -> Appearance -> Templates -> EXTRA.css
Paste in:
Code:
.xenams_sidebar {
    padding-top: 4px;
    padding-bottom: 1px;
    text-align: center;
}

.xenams_sidebar img {
    padding: 0px;
}

#content {
    position: relative;
}

#leftside {
    left: 10px;
    width: 120px;
    height: 500px;
    background: @primaryDarker;
    position: absolute;
    top: 10px;
}

#rightside {
    right: 10px;
    width: 120px;
    height: 500px;
    background: @primaryDarker;
    position: absolute;
    top: 10px;
}
Press Save and Exit button.

Each included templated listed above has an associated CSS file, consisting of a location specific container ID. You can fine tune the position of a sponsors banner to suit your style, or add in additional CSS that will be applied to that location's div.

TIP

Not planning to use the Logo block for banners? Upload your sites logo(s) to the xenams directory. Then use it to rotate your sites logo, or logo block image. Set it to load a new image every X hours. As an URL is required, set the URL to your site, and if desired remove the a href from the image in the xenams_logo template.

TowerAd.webp ManageSingleLocation.webp ManageSingleAd.webp ManageAds.webp ManageAdLocations.webp AdLocationsBasedOnHeight.webp AddRemove.webp
 

Attachments

AdminCP -> Users -> Administrators

To set an Administrators permission to use XenAMS: click on an Admin's name. You should see a list of checkboxes, check, or un-check: Can Manage Xen Ads.


Options

AdminCp -> Xen Ads Management -> Add/Remove Banners

Here is where you will upload a banner, add it to the database, remove it from the database, or delete it from the file system. If you FTP'd a number of banners to yourxenforo/data/xenams/ you can select the Add All Banners button to add them all to the database at one time, or add them individually.

Note: if a banner you uploaded is not shown here, then it is not an image file. A check is in place to ensure a .jpg (for example), is an actual picture. Also if a banner is over x height a Click Me to Display link is in place of the banner itself (only applies to the AdminCP).


AdminCp -> Xen Ads Management -> Manage Ad Locations

This screen lists the 7 locations and displays some relevant data for each location. Click the name of the location you want to make changes to. The available options are:

Location Active: Yes/No. If you are not going to use this location, select No.

Ads here are: Random/Sequential. Sequential will add one additional query, but guarantees a different banner will be fetched when the appropriate time runs out. Random will randomly select a banner from those associated with this location. Leave this as Random if you only have one banner for this location.

Cache Life: Length in seconds an ad will be displayed. Setting this to 0 will fetch a new ad every page load. Depending on the number of locations you plan on using, you may want to stagger this value with other locations. For testing, I used 6 seconds for the breadcrumb, 15 seconds for the Sidebar, and 24 seconds for the Footer (the footer IMO gets noticed less often, so keep an ad there longer). If you only have one Ad for this location, set this to a higher value.

Grouped ads: Not implemented yet.

Maximum Width: The maximum width of a banner in pixels for this location. Set to 0 to ignore this check. If set, a banner width must be less than the size set here for the location to be available for the ad. This check is only to ensure you do not break your style if you accidentally placed, for example, a leader board ad in the sidebar.

Maximum Height. Same as Maximum Width, but checks for the height of the banner.

Auto Adjust Location? Only available to the Logo Block and Left and Right tower locations. Check this if your style is not specifically designed to display an ad in the logo block or left and right sides. This setting will attempt to adjust the logo block height, and the left and right tower locations width to fit the appropriate ad size.

Track: Views. Selecting Views adds one additional query for this location. The views are not updated for the ads until a cron job runs. AdminCP -> Tools -> Cron Entries -> Xen Ams Ad Views. It is default to run every 30 mins. Change to suit your needs.

Track: Display Time. Will add one additional query in Random mode only. Tacking the display time keeps track of how long an ad has been displayed by adding up the cache life (or Ad display time) value. I found this way the most accurate overall for busy and not so busy forums. The original method was to add the actual time the ad was displayed, but this was pretty misleading for forums that had little traffic, and page loads were not that often. I'll be changing this in the near future to utilize both methods for better accuracy. If you have only one or two ads that will be displayed in a given location, leave this off as you really do not need it.


AdminCp -> Xen Ads Management -> Manage Ads

Lists all banners you made available to the database. The banners that are active are displayed first, followed by those that are inactive. Days to expire, views, and display time is also displayed here for quick reference. Display time is rounded in minutes here.

Click Manage Ad for the Ad you want to make changes to.

The available options are:

Title: The name of your Sponsor or banner that will be displayed when you hover over the ad.

Site URL: The URL a member/visitor is taken to when they click the ad.

Active: Check to make this Ad active, or uncheck to temporarily disable it.

Days to Remain active: A number in days before this Ad goes inactive. You need to put a value other than 0 here. If your sponsors pay you every 60 days, then set this to 60 days. This counts down to show you how many days are left before it expires. Maximum value is 365 days.

Display Time (Minutes): Any value other than 0 over-ride the ad Locations Cache Life setting. You can use this setting to ensure a major sponsors banner is display X times longer than another sponsor, or if a sponsor has multiple ads he wants to cycle through and have each displayed for a different but specific period of time.

Ad Location: Select each available location you want this ad to show. If no locations are shown be sure the location is active and verify the locations maximum height and width settings.

Node Priority: If you have a sponsor for one particular forum or category, select the corresponding name of the forum, category, or page you want the ad to display in. The ad will also display in child nodes (unless another ad is selected to display in one of the child nodes).

Exclusive to this Node and Child Nodes: If checked, this ad will not be available globally. It will only display when a visitor/member is in the selected Node above.


AdminCp -> Xen Ads Management -> Ad Tools

Not implemented yet. Here is where you will be able to generate reports, list all ads about to expire in x days, and keep track of other data.
 
I have asked Lawrence to make this an option. He said he would look into it as soon as he finished doing the ad groupings.

Thanks,
Itworx4me

I did, didn't I?
eek.png


How do you want it handled? A text block for each location that you can paste the code in?
 
WOW, nice work Lawrence, very nice! You cant help but love this xenforo more and more everyday! Cant wait to see the rest when finished. Cheers to you! :)
 
Thanks all for your comments.

I am re-working my wife's site (installed her own XenForo, :) ), and because her site is to support the real-estate office she is employed, she wants agents business cards rotated through her site's sidebar, so.... another use of this thingy, :)
I hope I will have a future wife who will be a webmaster also.. hard to find wife's that are webmasters :P My gf dosent know anything about forums.
 
Status
Not open for further replies.
Top Bottom