Ads
Module "Ads" shows the text and graphics, sorted by date.
Module refers to the part of the CMS «Content" and can be installed optionally.
Module "Advertising" can be attached to the various pages of the site. If the module is attached to a few pages in the administrative part of the module there is a special filter "section of the website" with the possibility of filtering the output (ads list of categories and settings) as belonging to the page.
The module consists of three parts: ad category, ads and ad specifications.
Ads
In the ads are sorted by date.
Ads have the following characteristics.
Основные:
- Creation date – Shown in dd.mm.yyyy hh:mm format. If the specified date if later than the current one, the banner will start to be displayed on site starting from the set date.
- Ad Owner – The user who has created the ad in a site form.
- Title – Used in links to ad, titles. The parameter has different values for different language versions of the site.
- Published – If this field is empty the ad will not be displayed on a site. The parameter has different values for different language versions of the site.
- Category – Category to which the ad belongs. The list of categories is edited in the tab above. Additional categories where the ad will be shown as well, can be selected. Hold down CTRL(Win) or Command(Mac) to select several categories. Parameter is shown if "Use categories" option is enabled in module settings.
- Images – Images will be automatically uploaded after choice. After uploading images will be automatically processed according to module settings. Parameter is shown if "Use images" option is enabled in module settings.
- Features.
- Features – Group of fields defined in "Features". The parameter has different values for different language versions of the site.
- Short description – Short description of an Ad. Short description will be shown in Ads list and in the blocks. If "Add to description" is selected, the Short description will be shown on Ad's page with the Full description. Otherwise the Short description will be shown in the list, and a item's page will show only the Full description. If "Use typography" is on, the content will be formatted according to rules of screen typographics using web service "Typography". Option "HTML-code" allows you to disable the visual editor for the current field. This setting will be taken in the subsequent editing. The parameter has different values for different language versions of the site.
- Description – Full description for ad page. If "Use typography" is on, the content will be formatted according to rules of screen typographics using web service "Typography". Option "HTML-code" allows you to disable the visual editor for the current field. This setting will be taken in the subsequent editing. The parameter has different values for different language versions of the site.
- Dynamic blocks.
- Point on the map – Ability to set or edit a point on the GeoMap. The parameter is displayed if the settings module enabled "Connect GeoMap".
- Similar ads – Similar ads are shown by diafan's tag show_block_rel. By default connections between ads are one-way. This can be modified by enabling the option "Link back to parent in the block of similar ads" in module settings.
- Tags – Addition of tags to the ad. It You can whether add a new tag, or open and select one from already existing tags. Parameter is shown, if the option "Add tags" is enabled in module settings.
- Views counter – Quantity of views of the current ad on a site. Statistics is collected and parameter is shown, if the option "Enable views counter" is enabled in module settings.
- Rating – Average rating according to voting of site users. Parameter is shown, if the parameter "Enable rating to ads" is enabled in module settings.
- Comments – Comments from users to the current ad. Parameter is shown, if the option "Show comments to ads" is enabled in module settings.
Дополнительные:
- ID – Element number in a DB (for web master and programmer).
- Editor – Changes after the first saving. Shows site administrator who edited this site page at first.
- Last Modify – Changes after element saving. Is shown in title Last Modify.
- Site section – Moving of ad to other page of a site, to which the module is attached. Parameter is shown if "Use categories" option is disabled in module settings. If this option is enabled, then the site section is set the same as the basic category.
- Parameters SEO.
- Window title in a browser, Title tag – If this field is empty Title tag will be automatically generated as "Ad name - Page name - Site name" The parameter has different values for different language versions of the site.
- Keywords, Keywords tag – If empty - Keywords tag will be automatically generated according to templates of automatic generation from module settings (for SEO-expert). The parameter has different values for different language versions of the site.
- Description, Description tag – If empty - Description tag will be automatically generated according to templates of automatic generation from module settings (for SEO-expert). The parameter has different values for different language versions of the site.
- Canonical tag – The parameter has different values for different language versions of the site.
- Semantic URL – Clean URLs (user-friendly URLs), page address of a type: http://site.ru/psewdossylka/. Look site parameters.
- Redirect to current page from the page – Allows to redirect from the specified page to the current one.
- Do not index – Inhibit for indexation of current page. If checked the page will have a tag:
<meta name = "robots" content = "noindex">
(for SEO-expert). - Changefreq – Probable frequency of page changes. This value is used for generating of sitemap.xml file. Read more in the description XML-format of a file Sitemap (for SEO-expert).
- Priority – Priority of URL concerning other URL on your site. This value is used for generating of sitemap.xml file. Read more in the description XML-format of a file Sitemap (for SEO-expert).
- Display options.
- Display period – If this field is selected the current ad will be published on a site during the specified period. At other time site users will not see the ad, getting 404 error "Page not found" (for site administrator).
- Access – If option "Access only" is on, the ad will be visible only for authorised site users, for selected types. Unauthorised users including search robots will see "404 Page not found" (for site administrator).
- Important (always above) – If checked, the ad will be shown listed first, regardless of the specified date. If several important news, they will be sorted by date.
- Do not show on a sitemap – Hides link to ad sitemap.xml file and "Sitemap" module.
- Templates.
- Page template – Possibility to enable template of a site for an ad page which differs from the main one (themes/site.php). All site templates should be located in a folder themes with extension .php (for example, themes/dizain_so_slajdom.php). Read more in section "Site templates". (For webmaster and programmer. Do not modify this parameter unless you are sure about the result!).
- Module template – Template of module content showing on page of specific ad (For webmaster and programmer. Do not modify this parameter unless you are sure about the result!).
- Indexing for search – Ad is automatically indexed for "Site search" module at modification.
- Indexing for sitemap – Ad is automatically indexed for sitemap.xml sitemap.
The module "Announcements" integrated automatic publication of announcements in RSS format.
Address RSS-feed: http://site.com/ab/rss/.
In the russian version of the website address of the RSS-feed news will look like: http://site.com/ru/ab/rss/.
Categories
Category ads can have an unlimited number of subcategories. If necessary, the category can not be used. To do this, disable the "Use category" in the module settings.
When deleting a category will delete all sub-categories and ads.
Categories have the following characteristics.
Основные:
- Name – Is used in links to category, titles. The parameter has different values for different language versions of the site.
- Published – If unchecking the site visitors will not see the category. The parameter has different values for different language versions of the site.
- Create item in menu – If this field is selected item with link to the current category will be created in "Site menu" module.
- Images – Possibility of uploading of several images. Variants of images size are specified in settings. Parameter is shown if "Use images for categories" option is enabled in module settings.
- Features attached to category – The list of Features, applicable to ads of a current category.
- Short description – Short description of a category. If "Add to description" is selected, the Short description will be shown on element's page with the Full description. Otherwise the Short description will be shown in the list, and a item's page will show only the Full description. If "Use typography" is on, the content will be formatted according to rules of screen typographics using web service "Typography". Option "HTML-code" allows you to disable the visual editor for the current field. This setting will be taken in the subsequent editing. The parameter has different values for different language versions of the site.
- Description – If "Use typography" is on, the content will be formatted according to rules of screen typographics using web service "Typography". Option "HTML-code" allows you to disable the visual editor for the current field. This setting will be taken in the subsequent editing. The parameter has different values for different language versions of the site.
- Dynamic blocks.
- Comments – Comments from users to the current category. Parameter is shown, if the option "Show comments to category" is enabled in module settings.
- Rating – Average rating according to voting of site users. Parameter is shown, if the parameter "Enable rating to category" is enabled in module settings.
- Indexing for search – The category is automatically indexed for "Site search" module at modification.
- Indexing for sitemap – The category is automatically indexed for sitemap sitemap.xml.
Дополнительные:
- ID – Element number in a DB (for web master and programmer).
- Editor – Changes after the first saving. Shows site administrator who edited this site page at first.
- Last Modify – Changes after element saving. Is shown in title Last Modify.
- Site section – Moving of category to other page of a site, to which the module is attached (for site administrator).
- Parameters SEO.
- Window title in a browser, Title tag – If empty - Title tag will be automatically generated as "Photo name - Page name - Site name", or according to templates of automatic generation from module settings (for SEO-expert). The parameter has different values for different language versions of the site.
- Keywords, Keywords tag – If empty - Keywords tag will be automatically generated according to templates of automatic generation from module settings (for SEO-expert). The parameter has different values for different language versions of the site.
- Description, Description tag – If empty - Description tag will be automatically generated according to templates of automatic generation from module settings (for SEO-expert). The parameter has different values for different language versions of the site.
- Canonical tag – The parameter has different values for different language versions of the site.
- Semantic URL – Clean URLs, i.e. the page address of a type: http://site.ru/psewdossylka/. See site parameters (for SEO-expert).
- Redirect to current page from the page – Allows to redirect from the specified page to the current one.
- Do not index – Inhibit for indexation of current page. If checked the page will have a tag:
<meta name = "robots" content = "noindex">
(for SEO-expert). - Changefreq – Probable frequency of page changes. This value is used for generating of sitemap.xml file. Read more in the description XML-format of a file Sitemap (for SEO-expert).
- Priority – Priority of URL concerning other URL on your site. This value is used for generating of sitemap.xml file. Read more in the description XML-format of a file Sitemap (for SEO-expert).
- Display options.
- Access – If option "Access only" is on, the category will be visible only by authorised site users, for marked types. Unauthorised users including search robots will see "404 Page not found" (for site administrator).
- Templates.
- Page template – Possibility to enable template of a site for a category page which differs from the main one (themes/site.php). All site templates should be located in a folder themes with extension .php (for example, themes/dizain_so_slajdom.php). Read more in section "Site templates". (For webmaster and programmer. Do not modify this parameter unless you are sure about the result!).
- Module template – Template of module content showing on page of ads list in a category (For webmaster and programmer. Do not modify this parameter unless you are sure about the result!).
- Module template for nested ads – Template of module content showing on page of specific ad, nested to the current category (For webmaster and programmer. Do not modify this parameter unless you are sure about the result!).
- Sorting: set before – Sorting of categories in the list. Field can be edited only for the categories displayed on a site.
- Do not show on a sitemap – Hides link to category in sitemap.xml file and "Sitemap" module.
- Nesting: belongs to – Moving of a current category and all its subcategories to another category (for site administrator).
Features
Features – this additional parameters characterizing the ad. You can add features common (for all ads within the same section of the website) or assign characteristics to one or more categories of ads.
Features have the following characteristics.
Основные:
- Name – Name of additional feature of an ad; can be filled when editing the goods. The parameter has different values for different language versions of the site.
- Type – Possible values:
- input,
- number,
- date,
- date and time,
- text area,
- checkbox,
- select,
- select multiple,
- field with visual editor,
- e-mail,
- phone,
- title of features group,
- files,
- images.
- Maximum files to add – Quantity of added files. No form of files addition is shown if the value is zero. Parameter is shown if the characteristic type is set as "files".
- Accessible types of files (through a comma) – Parameter is shown if the characteristic type is set as "files".
Example:
doc, gif, jpg, mpg, pdf, png, txt, zip
- Recognize images – Allows to display the attached files in JPEG, GIF, PNG format as images. Parameter is shown if the characteristic type is set as "files".
- Size for large image – Size of the image displayed in the user part of a site when increasing preview image. Parameter is shown if the characteristic type is set as "files" and "Recognize images" option is enabled.
- Size for small image – Size of preview image. Parameter is shown if the characteristic type is set as "files" and "Recognize images" option is enabled.
- Use animation when increasing images – Parameter adds JavaScript code, allowing to enable animation when increasing images. Parameter is shown if "Recognize images" option is enabled. Parameter is shown if the characteristic type is set as "files" and "Recognize images" option is enabled.
- Maximum size of uploaded files – Parameter shows maximum admissible size of uploaded files set in hosting settings. Parameter is shown if the characteristic type is set as "files".
- Generate sizes of images – Sizes of images set in "Image" module. Parameter is shown if the characteristic type is set as "image".
- Values, Semantic URL – The field is shown for feature of "checkbox", "select" and "select mutliple" types.
- Required for filling from the user part.
- Unit – Parameter is shown if the feature type is set as "number". The parameter has different values for different language versions of the site.
- Separate page for values – This field is shown for features of "Select list" and "Multiple select list" types. If this option is enabled then a page with ads united by one feature will be shown on a site. For example, city: London. For this page can be set URL. Just fill field "Semantic URL".
- Site section – Site section features to be used.
- Category – Categories of ads for which the specific parameter is applicable. If no category is specified the feature is considered as general.
- Use in the form of search – Allows to show feature in the form of a search, invoked by show_search tag.
- Show in the list – Allows to show value of ads features in the ads list on a site.
- Show in ads block – Allows to show value of ads feature in the block of ads invoked by show_block tag.
- Shown on ad page – If checked, this feature will be shown on the page of ads.
- Show parameter in the block for sorting of ads – Allows to show feature in a form of link for sorting of ads according to feature value.
- Feature description – The parameter has different values for different language versions of the site.
- Sorting: set before – Editing of sequence of the characteristic in the list
If you selected "tick" will be 2 additional fields: "yes" and "no." They allow you to set the display settings for a user of the site. If the value is empty, then when your ad will be displayed only the name of the parameter (the active tick) and does not show anything (when inactive check mark).
If the values are set, then displays these values.
Example:
Extensive: yes
Extensive: no.
If you selected "select" or "select multiple," then there will be additional fields with values.
If you selected "field with visual editor", then when editing field will display a visual editor that lets you edit the text style.
Statistics
Settings
Main settings
- Main.
- Quantity of ads on a page – Quantity of simultaneously shown ads in the list.
- Number of categories per page – The number of simultaneously displayed in the list of categories on the first page of the module. This parameter appears if the option marked "Enable categories".
- Date format – Format date in the module.
Possible values:
- 01.05.2016,
- 01.05.2016 14:45,
- 1 may 2016,
- 1 may,
- 1 may 2016, monday,
- yesterday 15:30,
- do not show.
- Link back to parent in the block of similar ads – Allows to use connection, set in the ad with other ads, in other directions.
- Categories.
- Enable categories – Allows to enable/disable ads categories.
- Quantity of ads in a categories list – For the module first page where several adds from all categories are shown. This parameter appears if the option marked "Enable categories".
- Quantity of ads in a list of nested category – For the module first page and for category page. This parameter appears if the option marked "Enable categories".
- Show adds of subcategories – If this field is selected adds from all nested categories will be shown in the list of category adds. This parameter appears if the option marked "Enable categories".
- Options.
- Views counter – Allows to count quantity of views of a certain ad.
- Show counter on a site – Allows to show quantity of views of a certain ad on a site. Parameter is shown if "Views counter" option is enabled. This parameter appears if the option marked "Views counter".
- Connect GeoMap – Connection module "GeoMap". The parameter will not be enabled if "GeoMap" module is not installed. For details, see in the [module "GeoMap"] (http://www.diafancms.com/dokument/full-manual/upmodules/geomap/).
- Enable comments to ads – Connecting the "Comments" module. The parameter will not be active if the module "Comments" is not installed. For details, see. In the [module "Comments"] (http://www.diafancms.com/dokument/full-manual/upmodules/comments/).
- Show comments to categories – Connecting the "Comments" to ad categories. The parameter will not be enabled if the module "Comments" is not installed. For details, see in the [module "Comments"] (http://www.diafancms.com/dokument/full-manual/upmodules/comments/).
- Enable tags – Enabling of "Tags" module. Parameter will not be enabled if "Tags" module is not installed. See more information in section "Tags" module.
- Show adds rating – Enabling of "Rating" module. Parameter will not be enabled if "Rating" module is not installed. See more information in section "Rating" module.
- Enable rating to categories – Connection of "Rating" module to categories. Parameter will be off if "Rating" module is not installed. See more information in "Rating" module.
- Enable relinking – Use linking in the module. See more information in section "Site Links" module.
- Autogenerate for SEO.
- Template for automatic generating Title – If the template set and the ad is not registered title Title, then the header is automatically generated template. In the template, you can add:
- %name – name,
- %category – the category name,
- %parent_category – name top-level categories (SEO-specialist).
The parameter has different values for different language versions of the site. - Template for automatic generating of Title for a category – If the template set and the category is not registered title Title, then the header is automatically generated template. In the template, you can add:
- %name – the name of the category,
- %parent – the name of the top-level categories,
- %page – page (text can be changed in the interface "Languages" – "Translation Interface") (SEO-specialist).
The parameter has different values for different language versions of the site. This parameter appears if the option marked "Enable categories". - Template for automatic generating Keywords – If the template set and the ad is not filled Keywords, then the field Keywords automatically generated template. In the template, you can add:
- %name – name,
- %category – the category name,
- %parent_category – name top-level categories (SEO-specialist)..
The parameter has different values for different language versions of the site. - Template for automatic generating Keywords for a category – If the template set and the category is not filled Keywords, then the field Keywords automatically generated template. In the template, you can add:
- %name – the name of the category,
- %parent – the name of the top-level categories (SEO-specialist).
The parameter has different values for different language versions of the site. This parameter appears if the option marked "Enable categories". - Template for automatic generating Description – If the template set and the ad is not filled Description, then the field Description automatically generated template. In the template, you can add:
- %name – name,
- %category – the category name,
- %parent_category – name top-level categories,
- %anons – short description (SEO-specialist).
The parameter has different values for different language versions of the site. - Template for automatic generating of Description for a category – If the template set and the category is not filled Description, then the Description field is automatically generated template. In the template, you can add:
- %name – the name of the category,
- %parent – the name of the top-level categories,
- %anons – short description (SEO-specialist).
The parameter has different values for different language versions of the site. This parameter appears if the option marked "Enable categories". - Templates.
- Template for elements list – By default - modules/ab/views/ab.view.list.php. Parameter for developers only! Do not set unless you are sure about the result.
- Template for the module first page (if categories are enabled) – By default - modules/ab/views/ab.view.fitst_page.php. Parameter for developers only! Do not set unless you are sure about the result.
- Template for element page – By default - modules/ab/views/ab.view.id.php. Parameter for developers only! Do not set unless you are sure about the result.
- Template for the list of elements with identical characteristic – Parameter for developers only! Do not set unless you are sure about the result.
- Template for search of elements – Parameter for developers only! Do not set unless you are sure about the result.
- Template for adds of the user – Parameter for developers only! Do not set unless you are sure about the result.
- Additionally.
- Diferent item in administration menu for each section of a site – If the module is attached to several pages, selection of this parameter will show several items in administrative menu for convenience of fast access (for site administrator).
- Indexing for sitemap – When modyifying settings publish of page, the module is automatically reindexed sitemap.xml.
Addition of ad on a site
- Only registered users can add the ads.
- Use safety code (captcha) – User should enter a safety code in order to add an ad.
- Moderation ads for – The ad is added from the form on a site as inactive and should be activated in administrative part of a site.
- Use required fields in ad form – Allows to show/hide required fields (name, short description, full description, period of showing, image) in the form of Ad addition.
Images
- Use images – Allows to enable/disable uploading of images to ads.
- Generate sizes of images – Sizes of images set in "Image" module and tag by Latin letters for enabling of the image on a site. Two sizes are required: preview images in file list (tag medium) and full image (tag large).
- Display of images in the list – Parameter accepts:
- no (disables images in the list);
- one image;
- show all images. Option will be displayed if the option "Use Image".
- Use images for categories – Allows to enable/disable uploading of images to categories.
- Generate the sizes of images for categories – Sizes of images set in "Image" module and tag by Latin letters for enabling of the image on a site. Two sizes are required: preview images in file list (tag medium) and full image (tag large). Parameter is shown if "Use images for categories" option is selected.
- Display images in categories list – Parameter accepts:
- no (disables images in the list);
- one image;
- show all images. Option will be displayed if the option "Use images for categories".
- Use animation when increasing images – Parameter adds JavaScript code, allowing to enable animation when increasing images. Parameter is shown if "Use images" option is selected.
- Maximum size of uploaded files – Parameter shows maximum admissible size of uploaded files set in hosting settings. Parameter is shown if "Use images" option is selected.
- Apply settings to earlier uploaded images – Allows to reconvert the size of already uploaded images. The button is necessary, if settings of images sizes were modified. Parameter is shown if "Use images" option is selected.
Messages and notifications
- Message after sending – Message received by the user at successful uploading of the ad from the form on a site; HTML tags are allowed for messages. The parameter has different values for different language versions of the site.
Example:
<div align="center"><b>
Ad successfully added.!
</b></div>
- E-mail sender – Possible values:
- e-mail, specified as a parameter of the site;
- other (when selected, an additional field appears register e-mail).
- Notify about of new ads by e-mail – Possibility to notify the administrator about new ads from the form in user part of a site.
- E-mail for administrator notifications – Possible values:
- e-mail, specified as a parameter of the site;
- other (when selected, an additional field appears register e-mail).
This parameter appears if the option marked "Notify about of new ads by e-mail". - Subject of notification e-mail – You can add:
- %title – site name,
- %url – the address of the site (for example, site.ru).
This parameter appears if the option marked "Notify about of new ads by e-mail".Example:
Ad was added on site
%title (
%url)
- Notification message – You can add:
- %title – site name,
- %url – the address of the site (for example, site.ru),
- %message – ad.
This parameter appears if the option marked "Notify about of new ads by e-mail".Example:
Hello, admin
%title (
%url)!
<br>
In the category Ads, a new ad:
<br>
%message
- Notify about of new ads by SMS – Possibility to send SMS to the administrator upon appearing of a new ad. Parameter can be enabled if SMS notifications are set in Site parameters.
- Phone number in federal format – Phone number for SMS notification of the administrator about new ads. This parameter appears if the option marked "Notify about of new ads by SMS".
- Notification message – Text of SMS notification of the administrator about new ads. Maximum 800 characters. This parameter appears if the option marked "Notify about of new ads by SMS".
Template tags
Для работы с модулем «Ads» служат следующие шаблонные теги:
show_block – shows latest ads on all pages, except the ads page, when the list of the same ads as in the function is shown.
Атрибуты:
— count – number of displayed ads (by default 3);
— site_id – pages to which the module is attached. Page identifiers are enumerated comma-separated. You can indicate negative value, then the ads from the indicated section will be excluded. By default all pages are selected;
— cat_id – categories of ads, if "Use categories" is checked in the module settings. Category identifiers are enumerated comma-separated. You can indicate negative value, then the ads from the indicated category will be excluded. You can indicate current value, then the ads from the current (opened) category or all categories, if neither of them is opened, will be shown. By default the category is not taken into account, all ads are shown.;
— sort – sorting ads: date – by date (by default), rand – randomly;
— images – number of images attached to the piece of ads;
— images_variation – image size tag, set in module settings;
— param – значения дополнительных характеристик;
Example:
Объявления обладают следующими характеристиками:
- тип: квартира, дом, участок – выпадающий список, номер 3;
- площадь – число, номер 10;
- новостройка – галочка, номер 16.
Значит значение атрибута param="3=5&3=6&10>50&16=1" расшифровывается как объявления о квартире и доме (5 и 6 номер), площадью более 50 кв.м, в новостройке.
<insert name="show_block" module="ab" param="param="3=5&3=6&10>50&16=1">
Номер (или идентификатор) характеристики можно посмотреть, если подвести курсор к названию характеристики в списке характеристик в административной части. Появиться всплывающая подсказка «Редактировать (номер характеристики)».
Номер (или идентификатор) значения характеристики можно посмотреть, если при редактировании характеристики подвести курсора на нужное значение. Появиться всплывающия подсказка «ID: номер».
— only_module – show the block only on the page to which "Ads" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;
— tag – tag attached to the ads;
— defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;
— defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;
— template – tag template (file modules/ab/views/ab.view.show_block_template.php; default - file modules/ab/views/ab.view.show_block.php).
Example:
<insert name="show_block" module="ab">
выведет 3 последние объявления сайта
<insert name="show_block" module="ab" count="5">
выведет 5 последних объявлений сайта
<insert name="show_block" module="ab" count="1" site_id="12">
выведет последнее объявление, прикрепленнок к странице 12
В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"]
.
show_block_rel – shows similar ads on the page of the ad. By default the connection between ads are one-sided, this can be changed by checking the option "Link back to parent in the block of similar ads" in module settings.
Атрибуты:
— count – number of displayed ads (by default 3);
— images – number of images attached to the piece of ads;
— images_variation – image size tag, set in module settings;
— defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;
— defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;
— template – tag template (file modules/ab/views/ab.view.show_block_rel_template.php; default - file modules/ab/views/ab.view.show_block_rel.php).
Формат даты задается в настройках модуля.
Example:
<insert name="show_block_rel" module="ab">
выведет 3 объявления, прикрепленные к текущей объявления
В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"]
.
show_form – выводит форму добавления сообщения. Для правильной работы тега должна существовать страница, к которой прикреплен модуль Объявления.
Атрибуты:
— site_id – pages to which the module is attached. Page identifiers are enumerated comma-separated. By default all pages are selected. Если задано несколько страниц, то в форме появляется выпадающий список «Раздел»;
— cat_id – categories of ads, if "Use categories" is checked in the module settings. Category identifiers are enumerated comma-separated. Можно указать значение current, тогда форма будет добавлять объявление в текущую (открытую) категорию или выводить поле «Категория», если ни одна категория не открыта. Если задано несколько категорий, то в форме появляется выпадающий список «Категория»;
— only_module – show the block only on the page to which "Ads" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;
— defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;
— defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;
— template – tag template (file modules/ab/views/ab.view.form_template.php; default - file modules/ab/views/ab.view.form.php).
Example:
<insert name="show_form" module="ab">
выведет форму добавления объявления
В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"]
.
show_search – выводит форму поиска объявлений. Если для категорий прикреплены дополнительные характеристики, то поиск по ним производится только на странице категории.
Атрибуты:
— site_id – pages to which the module is attached. Page identifiers are enumerated comma-separated. By default all pages are selected. Если выбрано несколько страниц сайта, то в форме поиска появляется выпадающих список по выбранным страницам. Можно указать отрицательное значение, тогда указанные страницы будут исключены из списка;
— cat_id – categories of ads, if "Use categories" is checked in the module settings. Category identifiers are enumerated comma-separated. Можно указать значение current, тогда поиск будет осуществляться по текущей (открытой) категории или по всем категориям, если ни одна категория не открыта. Если выбрано несколько категорий, то в форме поиска появится выпадающий список категорий, который будет подгружать прикрепленные к категориям характеристики. You can indicate negative value, then the indicated categories will be excluded from list. Можно указать значение all, тогда поиск будет осуществлятся по всем категориям объявлений и в форме будут участвовать только общие характеристики. Атрибут не обязателен;
— ajax – подгружать результаты поиска без перезагрузки страницы. Результаты подгружаются только если открыта страница со списком объявлений, иначе поиск работает обычным образом: true – результаты поиска подгружаются, по умолчанию будет перезагружена вся страница.;
— only_module – show the block only on the page to which "Ads" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;
— defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;
— defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;
— template – tag template (file modules/ab/views/ab.view.show_search_template.php; default - file modules/ab/views/ab.view.show_search.php).
Example:
<insert name="show_search" module="ab">
выведет форму поиска по каталогу объявлений
В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"]
.
Database
{ab} – Ads
{ab_category} – Категории объявлений
{ab_category_parents} – Parents relations of категорий объявлений
{ab_category_rel} – Связи объявлений и категорий
{ab_counter} – View counter of ads
{ab_param} – Дополнительные характеристики объявлений
{ab_param_category_rel} – Связи дополнительных характеристик объявлений и категорий
{ab_param_element} – Значений дополнительных характеристик объявлений
{ab_param_select} – Варианты значений дополнительных характеристик объявлений типа список
{ab_rel} – Связи похожих объявлений
Files
The module is located in the folder modules/ab and arranged classically.
modules/ab/ab.php – Controller;
modules/ab/ab.action.php – Обработка запроса на добавление объявления;
modules/ab/ab.install.php – Module installation;
modules/ab/ab.model.php – Model;
modules/ab/ab.rss.php – RSS ads feed;
modules/ab/ab.search.php – Settings for search indexing for "Search" module;
modules/ab/ab.sitemap.php – Map of links for "Site map" module;
modules/ab/admin/ab.admin.php – Ads editing;
modules/ab/admin/ab.admin.action.php – Обработка POST-запросов в административной части модуля;
modules/ab/admin/ab.admin.category.php – Editing ads categories;
modules/ab/admin/ab.admin.config.php – Module settings;
modules/ab/admin/ab.admin.count.php – Количество новых и неактивных объявлений для меню административной панели;
modules/ab/admin/ab.admin.counter.php – Viewings statistics;
modules/ab/admin/ab.admin.menu.php – Map of links for "Menu on the website" module;
modules/ab/admin/ab.admin.param.php – Редактирование дополнительных характеристик объявлений;
modules/ab/admin/js/ab.admin.param.js – Редактирование характеристик объявлений, JS-сценарий;
modules/ab/img/* – images;
modules/ab/js/ab.edit.js – JS-сценарий формы редактирования объявления;
modules/ab/js/ab.form.js – JS-сценарий формы добавления объявления;
modules/ab/js/ab.js – JS-сценарий модуля;
modules/ab/js/ab.show_search.js – JS-сценарий формы поиска по объявлениям;
modules/ab/views/ab.view.attachments.php – Template of attached to the ad in the form edit ad files;
modules/ab/views/ab.view.edit.php – Template of ad edit form;
modules/ab/views/ab.view.first_page.php – Template of the first page of the module, if the settings module checked "Use category";
modules/ab/views/ab.view.form.php – Template of ad add form;
modules/ab/views/ab.view.id.php – Template of ad page;
modules/ab/views/ab.view.images.php – Template of attached to email images, shown on the edit ads form;
modules/ab/views/ab.view.list.php – Template of ads list;
modules/ab/views/ab.view.param.php – Template of ads additional characteristics;
modules/ab/views/ab.view.rows.php – Ad list template;
modules/ab/views/ab.view.rows_block.php – Ad list template ads block;
modules/ab/views/ab.view.rows_block_rel.php – Ad list template for block similar ads;
modules/ab/views/ab.view.show_block.php – Template of ads block;
modules/ab/views/ab.view.show_block_rel.php – Template of similar ads block;
modules/ab/views/ab.view.show_search.php – Template of search ads form;
modules/ab/views/ab.view.sort_block.php – Template of "Sorting" with sorting link block.