this documentation should be used starting with product versions bigger then Auction Factory 1.6.9 and Ads Factory 1.5.4
class FieldType_inputBox extends FactoryFieldTypes{
var $type_name = "TextBox";
var $class_name = "inputBox";
var $has_options = 0;
var $sql_type = "varchar";
var $length = 200;
var $_attributes = null;
var $_options = null;
function display($name, $id, $css_attributes="", $css_class="", $javascript_attributes="" ){
$attributes = $this->prepareAttributesString();
$css_class = $this->prepareClassName($css_class);
return "<input type=\"text\" name=\"$name\" id=\"$id\" $attributes class=\"$css_class\"
style=\"$css_attributes\" $javascript_attributes value=\"".htmlentities($this->value)."\" />";
}
function display_search($name, $id, $css_attributes="", $css_class="", $javascript_attributes="" ){
return $this->display($name, $id, $css_attributes, $css_class, $javascript_attributes );
}
}
You can add your check class as the input posted above. Customize the display and show search methods adding the name of the control to the fields.config.ini in the field_list= param .
You should have a class like:
class FieldType_checkBox extends FactoryFieldTypes
and add in the field_list "checkBox"
COLLECT MULTIPLE OPTIONS:
"overwrite the getVar method"
class FieldType_checkbox must have it's definition of the FactoryFieldTypes getVar method so the multiple options are collected all from $_POST.
"add the [] to the controller html field name "
A multiple optioned html control must have the name "name[]" instead of "name" in it's html output like bellow:
<input type="checkbox" name="mynice_name[]" value="value1" />
<input type="checkbox" name="mynice_name[]" value="value2" />
Note! A checkbox group is a multi option controlled by it's behavior - you can select more than one checkbox and all checkboxes refer to the same property.
PLUGIN EXAMPLE FOR A CHECKBOX FIELD:
class FieldType_checkbox extends FactoryFieldTypes{
var $type_name = "CheckBox";
var $class_name = "checkBox";
var $has_options = 1;
var $sql_type = "varchar";
var $length = 200;
var $_attributes = null;
var $_options = null;
function display($name, $id, $css_attributes="", $css_class="", $javascript_attributes="" ){
$this->value = explode(",", $this->value);
$css_class = $this->prepareClassName($css_class);
$ret = "";
if(count($this->_options))
foreach($this->_options as $k => $option){
$selected = " ";
if( in_array($option->option_name,$this->value) )
$selected = " checked=\"checked\" ";
$ret.= "<input type=\"checkbox\" name=\"{$name}[]\" id=\"$id\" $selected value=\"".htmlentities($option->option_name)."\" > ".$option->option_name;
}
return $ret;
}
function getVar($name){
return implode(",",FactoryLayer::getRequest( $_REQUEST, $name ));
}
function getValue(){
return $this->value;
}
}
Tiny MCE Plugins: TinyMCE is a platform-independent Web-based JavaScript HTML WYSIWYG Editor control. You can install any Tiny MCA pluging you want, by default, Deluxe Blog Factory comes with Youtube plugins already installed.
Settings: Here is where you configure you Deluxe Blog Factory component.
General: Some basic settings are found here, like:
Comments: Here is where you set the commenting options:
Deluxe Blog Factory is a multi user blogging component from The Factory developed for Joomla! 1.5. Deluxe Blog Factory comes with everything you need for blogging so you do not need to install additional extensions, everything is found within the Blog Factory component.
Before you can start blogging you first have to create an account, click on Create an account, usually located on the Login Form.
A Registration form should appear looking like this:
After registering a blog you can go to My Blog Dashboard to see the content of your blog, comments and followers.
For instance the Latest Comments panel has the option to choose how many characters of the comments to show if a specific comment exceeds the set amount. You can also set the widget reload interval in minutes. When you are done with the configuration press "save" or "cancel" to return to the normal view. Each panel loads and refreshes individually so you don't have to worry about losing changes made to another panel if you are editing more than one at a time.
In the Settings page of the Deluxe Blog Factory component you can find General and Avatar settings, and Blog settings if you have a blog created.
Under the Blog page you will find the Blog description, number of posts per page, pingbacks, update notifications, comment notification and report notification.
Selecting "No" for "Send update notifications" will disable both the new comment and report comment notifications.
You can add as many folders as you want, delete them and upload files to a file. When you upload files they will be stored in the folder you are browsing at that time. Moving files can be done by clicking on the item, dragging and dropping it over the folder you want to move it in.
This is used for adding images located on the internet, just paste the link of the picture in the Image URL space. There are also some alignment and dimension options available.
When you are done adding content to the post you should go to the Post Information tab and add tags, choose category, select if you want to allow others to write comments on your post or allow pingbacks.
Optionally you can add Metadata Information like a description and keywords.
After you are done with everything click on "Save post" or "Save and return" which will return you to the previous page. You can edit posts from the dashboard in the Latest Posts panel or by clicking on the edit icon when viewing the post in your blog.The button is located under the post.
If you want the blogs can be shown either in thumbnail mode or in a list where the owner is also shown by clicking on "Change View". If you want you can view only the blogs you are currently following by using the filter.
By hovering your mouse over a certain blog, a bar with the View blog and Follow options will appear. If you select to follow a blog you will be announced if the owner posts anything new, the notification is sent via email.
To view the specific blog click on View blog or the blog name, depending on the view you chose.
Here you see the whole post along with its tags, category, comments, rating, the Bookmarks and who posted it under what blog.
To view the latest posts on the website click on Latest Posts on the main menu, this will show you a list with all the blogs in order from the last posted to oldest. All posts from all blogs are shown here, they can be filtered the same way as in the Blog view by clicking on the category or blog name of the respective post.
The Deluxe Blog Factory component comes with seven modules for easy display and management of content on your website: Tag Cloud, Random Blogs, Latest posts, Top Active blogs, Top Rated Blogs, Top Rated Posts and Search.
Revised "Deluxe Blog Factory" version 1.1.1.
A "position" is an area of the component Smarty template where certain fields assigned to it will automatically render and display.
At installation of Ads Factory 1.5.0 there are by default installed two positions and included in the templates of their scope:
A position, in order to display fields must
Management of positions implies creation new positions or editing a field display from a position.
Access to this section is from Sections / Page positions:
Creating New positions
Press the "New position" link from the "Page positions" section and fill the details of the new to be created position.
Of importance are the unique name field, the template for wich the position is and the Position item layout.
Verify is just a flag that get's setup to "Yes" on the first loading of a page with the position on it.
A position can be deleted. The snippet code is left to be cleared manually. ( for cleaning template should be): after deleting the database records of the position you will be pointed for the snippet to look for in the template.
Position displaying in templates
After a position information is stored in the database, the position must be included in the template in the area you need / like.
If you are familiar with HTML this should be very simple.
Otherwise a look on the template will give you a hint on location areas of the template for that actual HTML knowledge not been necessary.
For instance if you want your new position bellow the category name when looking at the details page, it is kind expectable to search in the t_details_add.tpl for "category" or "cat" or "catname" occurrences and see if it sounds with what do you see on the page.
If you are using the template editor from the component, point your cursor there and insert the position with the snippet tool
or insert the actual Smarty if you have it in clipboard.
Evidently you can use any PHP / text editor for inserting the Smarty position code.
Observations
Debugging / previewing a position place: Instead of introducing the position Smarty snippet you can insert some valid HTML just to see how it will be visualized on front.
Inserting something like : LABEL : VALUE should give you a visual on how it would look when it will be rendered with fields.
Adding surrounding HTML, CSS properties: The "Insert at cursor" tool just inserts the position renderer meaning this:
{include file='elements/display_fields.tpl' position='defdetailspageheader'}
You could add extra html arround this like:
<div>
{include file='elements/display_fields.tpl' position='defdetailspageheader'}
</div>
Or CSS properties
<span style="color:#DEDEDE important!;" >
{include file='elements/display_fields.tpl' position='defdetailspageheader'}
</span>
Or even JavaScript
<p onmouseover="alert('These are some custom fields!');" >
{include file='elements/display_fields.tpl' position='defdetailspageheader'}
</p>
The snippet must be inserted in HTML valid positions:
Some of the infinite examples of invalid positions ( see where "HERE" is ):
<a href="/HERE">Some link</a>
{$add->wash_hands HERE}
<table>
HERE
<tr>
HERE
<td>bla bla</td>
HERE
<td>bla bla</td>
</tr>
</table>
For the listing templates: The snippet must be inserted between the {foreach} smarty tags ( {foreach .. } and {/foreach} ) so the custom fields of each item will be displayed!
Custom fields can be setup to be displayed automatically to a certain position by just assigning the field to that position. For Ads Factory 1.5.0 new installations, there can already be assigned fields to the default installed positions (Listing Middle - listingmiddle and Details Page Header - defdetailspageheader). When other positions created, fields can be assigned to those too.
In section "Positions / Fields positioning" you can do this:
A field can be assigned to all the positions available.
Revised "Ads Factory" version 1.5.0.