Bannerads
Use our Forums to find examples and answers to your questions. If you have advanced requirements for your project, contact us and our staff can help you find a solution.
Bannerads addon
Installation
The Bannerads addon installs just like a standard EE plugin
- Upload the files to your server and place them in the appropriate directories
- Create a web accessible folder for storing banner images in.
- Enable the Bannerads extension in the control panel under utilities>extension manager
- Enter settings in the extension settings form
- You will now have a new product type in the foxee tab for the weblog entries panel
Usage
- Create a weblog that you want to sell bannerads posts for
- In foxee create a new product item
- In the foxee tab in the entries panel you will see a new product called bannerads. Select the weblog you created and the expiration of the post. The expiration (expires) sets the length of time the users bannerads post will be displayed
- If you want to add recurring payments then set the recurring payment. If this field is set then the expiration of the bannerad post is set to the recurring time length. During the processing of a recurring payment the expiration date of the bannerads posts are updated to reflect the next date payment.
- Then set how many bannerads the user can post.
- Set the price and any other settings. The expiration and recurring payments fields uses the subscription length settings in FoxEE. This allows custom expiration lengths for your products.
- Insert the exp:foxee_bannerads:post_form tag in your template. This will display a SAEF based on the logged in users ability to post.
{exp:foxee_bannerads:post_form weblog="bannerads" ajax_form="yes" entry_id="{segment_3}
Description: Creates a SAEF (stand alone entry form) and sets its access privileges based on the logged in user. All SAEF variables, conditionals, and parameters can be used with this tag in addtion to the ajax_form parameter. Use the ajax_redirect plugin when using the ajax_form="yes" parameter. This tag will return a no_results conditional if a member trying to post has not placed any order for it.
Required: Yes (to offer your user the ability to post)
Added Parameters:
ajax_form="yes"
Description: Use the ajax_redirect plugin when using the ajax_form="yes" parameter
entry_id="{segment_3}"
Description: Pass the entry id of the users weblog entry through the URL. If there is not a entry id available the form will be in "new" mode and will create a new entry.
Example
{exp:foxee_bannerads:post_form weblog="default_site" entry_id="{segment_3}"}
<table>
<tr>
<td>
<p>Title<br />
<input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" onkeyup="liveUrlTitle();" /></p>
<p>URL Title<br />
<input type="text" name="url_title" id='url_title' value="{url_title}" maxlength="75" size="50" /></p>
<p>
Upload<br />
<input type="file" name="upload" class="input" />
</p>
{status_menu}
<p>Status<br />
<select name="status">
{select_options}
</select>
</p>
{/status_menu}
{category_menu}
<p>Categories<br />
<select name="category[]" size="4" multiple="multiple">
{select_options}
</select>
</p>
{/category_menu}
<input type="submit" name="submit" value="Submit" />
<input type="submit" name="preview" value="Preview" />
</td>
</tr>
</table>
{if no_results}
<p>Please purchase a bannerad product to use this form</p>
{/if}
{/exp:foxee_bannerads:post_form}
Conditionals
{if no_results}
Description: Allows you to display alternate content inside the exp:foxee_bannerads:post_form tag if the user does not have posting privileges.
Enhancements to other tags
{exp:weblog:entries foxee_product_type="bannerads"}
{exp:foxee:transaction_history foxee_product_type="bannerads"}
Description: A new product type for FoxEE is added and the "foxee_product_type" parameter can use the value "bannerads" to filter output to only the new product type.
New Conditionals for weblog:entries tag
{if foxee_is_bannerad}
Description: TRUE is the product is a "Classified" product type FALSE if not.
New Variables for weblog:entries tag
* All variables have a matching conditional that is set to the value displayed.
{foxee_posts}
Description: The number of Posts that are purchased with the product.
{foxee_post_expire format="%y%m%d"}
Description: The Date which the posts will expire on. You can use the format parameter to format the date shown.
{foxee_post_expire_title}
Description: This is the title of the expire length the product is set to.
{foxee_post_recurring format="%y%m%d"}
Description: The Date which the payment will recur on. You can use the format parameter to format the date shown.
{foxee_post_recurring_title}
Description: This is the title of the recurring length the product is set to.
Show bannerads
{exp:weblog:entries weblog="default_site"}
{foxee_bannerad_image_src}
Description: The complete URL of the image.
{foxee_bannerad_image_img}
Description: A complete HTML img element for the image.
{foxee_bannerad_image_height}
Description: The image height.
{foxee_bannerad_image_width}
Description: The image width.
New Variables/Conditionals for foxee:transaction_history tag
* All variables have a matching conditional that is set to the value displayed.
Example
{exp:foxee:transaction_history foxee_product_type="bannerads"}
{transactions}
{transaction_details}
{bannerads_posts_made} = posts made
{bannerads_posts_allowed} = posts allowed
{bannerads_posts_left} = posts left
{/transaction_details}
{/transactions}
{/exp:foxee:transaction_history}
{bannerads_posts_made}
Description: The number of bannerad posts made by the purchaser.
{bannerads_posts_allowed}
Description: The number of bannerad posts that are allowed by the purchaser.
{bannerads_posts_left}
Description: The number of bannerad posts that are left for the purchaser to make.
