Classifieds Addon

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.

hccdevelopment

Classifieds addon

The foxee classifieds addon is a robust posting management tool. It allows you to sell weblog entries for the weblog of your choice and display them for a given time period. You can set how many times the user can post in that weblog and conditionally show a SAEF based on their accessibility.

The Classifieds addon enhances the SAEF to allow you to sell weblog posts through foxee. This can be used for many applications, one being a classified adds system. You can use all of the standard SAEF tags to allow your users to edit their entries or cancel them.

Installation

The Classifieds addon installs just like a standard EE plugin

  1. Upload the files to your server and place them in the appropriate directories
  2. Enable the Classifieds extension in the control panel under utilities>extension manager
  3. 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 posts for
  • In foxee create a new product item
  • In the foxee tab in the entries panel you will see a new product called classifieds. Select the weblog you created and the expiration of the post. The expiration (expires) sets the length of time the users post will be displayed
  • Then set how many times the user can post.
  • Set the price and any other settings. The expiration field uses the subscription length settings in FoxEE. This allows custom expiration lengths for your products.
  • Insert the exp:foxee_classifieds:post_form tag in your template. This will display a SAEF based on the logged in users ability to post.

{exp:foxee_classifieds:post_form weblog="classifieds" 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_classifieds: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>

{formatting_buttons}

<p><a href="{upload_url}" onclick="window.open(this.href, '_blank', 'width=400,height=600');return false;" onkeypress="this.onclick()">File Upload</a>

<
a href="{smileys_url}" onclick="window.open(this.href, '_blank', 'width=600,height=440');return false;" onkeypress="this.onclick()">Smileys</a></p>

{custom_fields}
{if required}
{/if}{field_label}<br />
{field_instructions}
{if textarea}
<textarea id="{field_name}" name="{field_name}" dir="{text_direction}" cols="50" rows="{rows}" onclick="setFieldName(this.name)">{field_data}</textarea><br />
{/if}

{if textinput}
<input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50" onclick="setFieldName(this.name)" /><br />
{/if}

{if pulldown}
<select id="{field_name}" name="{field_name}">
{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}<br />
</
select>
{/if}

{if date}
<input type="text" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50" onclick="setFieldName(this.name)" /><br />
{/if}

{if relationship}
<select id="{field_name}" name="{field_name}">
{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}<br />
</
select>
{/if}
{
/custom_fields}

<p>Trackback URLs<br />
<
textarea name="trackback_urls" cols="50" rows="5">{trackback_urls}</textarea> </p>

</
td>
<
td valign="top">

<
input type="submit" name="submit" value="Submit" />
<
input type="submit" name="preview" value="Preview" />

{status_menu}
<p>Status<br />
<
select name="status">
{select_options}
</select>
</
p>
{/status_menu}

<p><input type="checkbox" name="sticky" value="y" {sticky} /> Make Entry Sticky</p>
<
p><input type="checkbox" name="allow_comments" value="y" {allow_comments} /> Allow Comments</p>
<
p><input type="checkbox" name="allow_trackbacks" value="y" {allow_trackbacks} /> Allow Trackbacks</p>
<
p><input type='checkbox' name='dst_enabled' value='y' {dst_enabled} />DST Active on Date of Entry</p>

{ping_servers}
<p>Ping Servers<br />
{ping_row}
<input type="checkbox" name="ping[]" value="{ping_value}" {ping_checked} /> {ping_server_name}<br />
{/ping_row}
</p>
{/ping_servers}

{category_menu}
<p>Categories<br />
<
select name="category[]" size="4" multiple="multiple">
{select_options}
</select>
</
p>
{/category_menu}

</td>
</
tr>
</
table>

{if no_results}
<p>Please purchase a post product to use this form</p>
{/if}
{
/exp:foxee_classifieds:post_form} 

Conditionals

{if no_results} 

Description: Allows you to display alternate content inside the exp:foxee_classifieds:post_form tag if the user does not have posting privileges.

Enhancements to other tags

{exp:weblog:entries foxee_product_type="classifieds"

{exp:foxee:transaction_history foxee_product_type="classifieds"

Description: A new product type for FoxEE is added and the "foxee_product_type" parameter can use the value "classifieds" to filter output to only the new product type.

New Conditionals for weblog:entries tag

{if foxee_is_classified} 

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.

New Variables/Conditionals for foxee:transaction_history tag

* All variables have a matching conditional that is set to the value displayed.

{classifieds_posts_made} 

Description: The number of classified posts made by the purchaser.

{classifieds_posts_allowed} 

Description: The number of classified posts that are allowed by the purchaser.

{classifieds_posts_left} 

Description: The number of classified posts that are left for the purchaser to make.



Join our Mailing List