News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom fields and filters of post

Started by davidhs, February 21, 2014, 01:53:17 PM

Previous topic - Next topic

davidhs

Link to Mod

Custom fields and filters of post

ABOUT...

Custom fields and filters of post, 2.0.3
© 2014-2020 by davidhs
© English and British English language 2017-2018 by sangham.net
© German and German informal language 2015-2018 by sangham.net
© Portuguese for Brazil and Portugal language 2015-2018 by Americano


This work is licensed under a Creative Commons Attribution 3.0 Unported License.

DESCRIPTION

Allows to add different groups of custom fields to forum posts and filters for fields of posts.

A group of fields can be of type:

  • Fields loose: Its fields are added to a post to provide extra information. In seeking data into fields loose of a post is gets a list of posts.
  • Record: It is a set of fields that represents an independent entity of the post. In seeking data into fields of a record is gets a list of records. The post body can not be left empty but a post with record does not need body. If the user will add a record and the post body is empty, the system writes a period (".") on it and the user does not need to write anything.
  • Fields with several values per member: It is set of fields where several members can insert different values. This can be used for members to make comments or valuations about the post. If these fields are located in just the first post of a topic can be displayed as belonging to the topic.
  • Filters: This is a special type of group without fields. Used to enable a set of predefined filters that can be used on topics and posts.

The available predefined filters are:

  • Boards.
  • Record.
  • Subject.
  • Start of the subject.
  • First character of the subject.
  • Date of topic / Date posted.
  • Date of last reply / Date posted.
  • Posted by.
  • Topic with new posts / New.
  • Sticky.
  • Locked.
  • Replies.
  • Poll.

The actions to be performed on a group of custom fields are: view, add, modify, delete and move.

Furthermore other actions are possible using custom fields:

  • Filter the message index.
  • Sort the message index.
  • Show statistics.
  • Search in fields of posts, getting a list of posts.
  • Search in fields of records, getting a list of records.

Administration panel

The administration panel has the list of groups of custom fields, which allows to add new groups, modify or delete existing groups, add, modify or delete fields in a group and define templates to display those fields in a post and in message index.

    

    

Viewing posts with custom fields

When viewing a complete post (on a topic, in recent posts or profile) are displayed its groups (which are enabled when post is create or modify). Groups of type "loose fields" and "record" are shown above the post body, whereas groups of type "fields with several values per member" are shown below, unless was selected "Show as group of fields of the topic" and then is displayed at the beginning and/or end of the topic. If a group has template for posts the fields are displayed according to the template, if has not are displayed with its name and content.

In lists of posts (message index, unread post and replies) are displayed groups with fields visible in message index (according to permissions). If a group has template for message index the fields are displayed according to the template, if has not are displayed with its name and content.

Modifying values on custom fields

In a topic, posts with groups of type "fields with several values per member" have buttons for the user to post new values, and modify or remove existing ones.

For all other groups ("fields loose" and "record"), at create or modify the post are displayed allowed groups. The groups of type "loose fields" always have their fields visible, whereas the groups of type "record" have a checkbox to show or hide their fields. If has been created template for quick input in a record, Quick input field is displayed after the record fields.

Moving a group of custom fields to another post

A group of fields may have to be allocated to another post, for example before removing the post where is the group.

If user has allowed to move a group, when viewing a topic that group will have buttons to move to the first post from the topic or another post (or another topic if the group is of type "fields with several values per member" and have selected "Show as group of fields of the topic").

Filter the message index

If the user has permission to filter by a field, a button is displayed in the message index to filter topics by that field.

Type of filter button depends on the type of field:

  • The filter for text or large text fields is a text button in which enter the search string, or a select box to get data with that field empty or non-empty.
  • Fields of type select box, combo box, radio buttons or checkboxes have by filter a text button, a select box or a combo box in which enter or select the search string, or a select box to get data with that field empty or non-empty.
  • For fields of type boolean the filter is a select box with values "Yes" and "No".

If the user can modify a field, that field may be empty and its filter is a select box or combo box, he will see an option in the list to get data with that field empty.

The filter with text button allows to search loose words (separated by spaces) and to use these modifiers:

  • " (double quotes) - Searchs for an exact phrase inside quotes. For example, "tallest building"
  • - (minus sign) - Put this in front of a word or exact phrase you want to leave out. For example, jaguar speed -car
  • OR - Between words and/or exact phrases, searchs one or the other. For example, marathon OR race

If the filter is of type text or combo box, by default it is sought that the text is contained in the field value, whereas if the filter is of type select box list is sought that the text matches the value of the field.

Also, with a group of type "filters" can be added predefined filters.

The filters can be of the same group or different groups of fields.

Next to filters there is a button to activate the filters that have been given some value. As a result is obtained the messages index with topics whose first post matches all active filters.

Sort the message index

If the user has permission to sort by one or more fields, a select box is displayed in the message index to sort topics by one of those fields.

Show statistics

If a group of type "fields with several values per member" has a only one field and is of type select box, radio buttons or checkboxes (that is, there is a finite number of values), can be generate statistical data from the values entered in the field.

The statistical data to be displayed include:

  • Chart with average: It consists of a horizontal bar where the average value, the lowest allowed value and the highest allowed value are located.
  • Chart with horizontal bars: Represents the use of each allowed value through horizontal bars.
  • Chart with vertical bars: Represents the use of each allowed value through vertical bar.
  • Summary: A set of data obtained from the input values (average, sum, highest and lowest allowed value, highest and lowest used value, most and least frequent value, number of values).

The user sees these data only if it has permission. The message index can be sort by the summary data, if it has permission to sort by the field.

Using templates can be inserted the statistical data of any group of fields elsewhere.

Search in fields

In series SMF 2.0.x, under the option "Search" from the menu forum the search pages are located, showing the groups and their fields on which user have search permission. In series SMF 1.1.x, the option "Search posts and records" from the menu forum provides access to the search pages, showing the groups and their fields on which user have search permission.

Groups of type "loose fields", "fields with several values per member" and "filters" can be in several search pages, and each page contain several groups, with the only condition that the groups on a page must be permitted on a common set of posts. As a search result a list of posts is obtained.

For each group of type "register" with search permission have one page. As a result a list of records is obtained with the columns indicated at defining the fields.

In both cases the buttons used in each search field follow the same rule as in the filters.

Counter on the information about the member

The number of each type of record created by the member can be displayed in the information about that member.

This can be seen in several areas, such as the member's profile and the member's information about the poster of each message.

"Administration Center > Forum Maintenance > General Maintenance > Recount all forum totals and statistics" (series SMF 1.1.x) or "Administration Center > Forum Maintenance > Routine > Recount all forum totals and statistics" (series SMF 2.0.x) also recounts the number of each type of record created by members.

Also, the total number of each type of record created can be show on the statistics.

Membergroups based on the number of each type of record can be created in "Administration Center > Membergroups > Based on number of records".

Top posters on statistics

The top 10 posters of each type of records can be shown in the Statistics Center.

List on member's profile (only series SMF 2.0.x)

In the member's profile, under the section "Profile Info > Show Posts", can be show a list for each group of type "record", with posted messages by the member containing this type of group.

List on Moderation Center (only series SMF 2.0.x)

In the Moderation Center is possible to control the content posted by users in the groups of type "fields with several values per member".

For each group which has chosen to show this list will be displayed an access to the list under the section "Posts > Groups of fields on posts" and, optionally, a link under the option "Moderate" from the menu forum.

List of moderation (only series SMF 1.1.x)

Global moderators can to control the content posted by users in the groups of type "fields with several values per member".

The option "Moderate the groups of fields on posts" from the menu forum provides access to list with posted data, one for each group which has chosen to show this list.

Reattribute User Groups (only series SMF 2.0.x)

Allows reattribute to registered member groups of fields published by a guest or another registered member.

This is located in "Administration Center > Forum Maintenance > Members > Reattribute User Groups".

EXAMPLE

Suppose we have a forum where different programs that exist to create a forum are discussed and we want to have a set of file cards with the features of each program. You can write the file cards of each forum in messages or using this MOD to create the file cards.

First we create a board where you write messages that will contain file cards of forums (we call it "Records of forums").

Next we create several types of groups of custom fields in the administration panel of the MOD:

  • Forum: Group of type "record" to save features of forum (name, abbreviation, developer(s), version,...). We give search permission on the group so that create a search page of forums. Some properties of the group can be defined to create filters on the message index and search page, and to sort the message index. Other are defined to be displayed in the list of records result of the search. We select this group to show a counter on the information about the member and on the statistics, a list on member's profile and the top 10 posters on the statistics.
        
  • CMS: Group of type "fields loose" with a single field to indicate if a message contains data from an independent forum or belonging to a content management system (CMS). We give search permission to the group to be created a search page of posts and define its field to create filters on the message index and search page.
  • Filters: Group of type "filters" to use predefined filters in message index and search page. To display we give permission to the group.
  • Comments: Group of type "fields with several values per member" that will allow users to give their reviews about each forum, without creating any reply in the topics that contain the file cards of each forum. The group will be displayed at the end of all pages of the topic and will have two fields: "I like it!" and "Comment". We select fields and group to show a list on Moderation Center.
  • Statistics: Group of type "fields with several values per member" that will allow users to indicate if they like or not they like each forum, without creating any reply in the topics that contain the file cards of each forum, and generates statistical data. The group will be displayed at the end of all pages of the topic and will have only one field with de question.

For easier data entry we add:

  • This JavaScript code in the group CMS to write the message subject:
document.getElementById('cffp_2_column_1').onchange = function (event)
{
subject_forum();
}
document.getElementById('cffp_1_column_1').onchange = function (event)
{
subject_forum();
}
document.getElementById('cffp_1_column_2').onchange = function (event)
{
subject_forum();
}
function subject_forum()
{
document.getElementsByName('subject')[0].value = document.getElementById('cffp_2_column_1').checked ? 'CMS' : '';
if ('' != document.getElementById('cffp_1_column_1').value)
{
if ('' != document.getElementsByName('subject')[0].value)
document.getElementsByName('subject')[0].value += '. ';
document.getElementsByName('subject')[0].value += document.getElementById('cffp_1_column_1').value;

if ('' != document.getElementById('cffp_1_column_2').value)
document.getElementsByName('subject')[0].value += ' (' + document.getElementById('cffp_1_column_2').value + ')';
}
}


  • This template for quick input in the group Forum to fill the fields more rapidly:
QuoteRegular expression:
/^\s*Name\s+(.+)\s+(Abbreviation\s+(.+)\s+)?Developer\s+(.+)\s+Current version\s+(.+)\s+Written in\s+(.+)\s+Website\s+(.+)\s*/
Parameters:
1
0
2
3
4
5
6
subject_forum();

Help:
Copy the text here. Must have this format (number and type of spaces between elements does not matter):
[code]Name [NAME]
Abbreviation [ABBREVIATION] // Optional
Developer [DEVELOPER]
Current version [CURRENT_VERSION]
Written in [WRITTEN_IN]
Website [WEBSITE][/ code]

The structure is already done. We now create file cards of forums. Go to the board "Records of forums" and create a new topic. If we are to write about a content management system we enable the "CMS" field. To create the file card of a forum we enable the checkbox "Forum" and fill fields of file card with these data:
QuoteForums

Name   Simple Machines Forum
Abbreviation   SMF
Developer   The SMF Team
Current version   2.0.7 (January 20, 2014)
Written in   PHP
Website   http://www.simplemachines.org/

Name   PHP Bulletin Board
Abbreviation   phpBB
Developer   phpBB Limited
Current version   3.0.12 (September 28, 2013)
Written in   PHP
Website   http://www.phpbb.com/

Name   vBulletin
Abbreviation   vB
Developer   Internet Brands, vBulletin Solutions
Current version   5.1.0 (March 19, 2014)
Written in   PHP
Website   http://www.vbulletin.com/

Name   Invision power board
Abbreviation   IPB, IP.Board or IP Board
Developer   Invision Power Services
Current version   3.4.6 (October 29, 2013)
Written in   PHP
Website   http://www.invisionpower.com/

Name   MyBulletinBoard
Abbreviation   MyBB
Developer   MyBB Group
Current version   1.6.14 (June 30, 2014)
Written in   PHP
Website   http://www.mybb.com/

Name   Yet another Bulletin Board
Abbreviation   YaBB
Developer   YaBB Development Team
Current version   2.5.2 (October 21, 2012)
Written in   Perl
Website   http://www.yabbforum.com/

Name   Ikonboard
Developer   Ikonboard
Current version   3.1.5a (November, 2011)
Written in   PHP, Perl
Website   http://www.ikonboard.net/

Name   JavaBB
Developer   Dalton Camargo
Current version   0.99 (May 31, 2008)
Written in   Java
Website   http://www.javabb.org/




CMS

Name   Joomla!
Developer   The Joomla Project Team
Current version   2.0.20 (April 30, 2014)
Written in   PHP
Website   http://www.joomla.org/

Name   Drupal
Developer   Dries Buytaert
Current version   7.28 (May 8, 2014)
Written in   PHP
Website   https://www.drupal.org/

Name   WordPress
Developer   WordPress Foundation
Current version   3.9.1 (May 8, 2014)
Written in   PHP
Website   https://wordpress.org/


This image shows the file card that we created. We also see that there are two user comments and statistical data about this forum.

Once you have created all the file cards in the index of board "Records of forums" you see some fields next to the post subject and filters above the listing.

To search posts go to "Search > Search posts", where groups and fields with permission to search are displayed.

To search file cards of forums go to menu "Search > Search forums", where the fields on which you can filter the list of file cards of forums are displayed.

In the member's profile can be shown the groups type "Forum" posted by the user.

In the Moderation Center can be controlled the comments posted by users.

In Statistics Center can be shown the top 10 posters of records type "Forum".

SMF COMPATIBILITY


  • SMF 1.1 to 1.1.21.
  • SMF 2.0 to 2.0.17.

Support for:

  • Print topic.
  • WAP.

There may be conflict with SEF MODs, which create friendly URLs.

LANGUAGES


  • english, english_british.
  • german, german_informal (incomplete).
  • brazilian (SMF 1.1.x), portuguese_brazilian, portuguese_pt.
  • spanish (SMF 1.1.x), spanish_es, spanish_latin.

DOWNLOAD

Link to MOD

MANUAL INSTALLATION

See https://wiki.simplemachines.org/smf/Manual_installation_of_mods

COLLABORATE WITH THIS MOD

This work is licensed under a Creative Commons Attribution 3.0 Unported License.

You are free to share and adapt this MOD. Also you can collaborate in different ways:

CHANGE LOG

Legend:   ! Fixed   + Added   - Removed   * Changed   @ Note

2.0.3   2020-04-27
------------------
! The help text is still too long and generates an error on installation. It is divided in several files.
! Since version 1.1 the non-UTF-8 language text is too long and generates an error on installation. It is divided in several files.

2.0.2   2020-03-08
------------------
! SMF 2.0.x: The Quick Search of the Administration Center look for in settings variables of MOD.
+ SMF compatibility: 2.0.16 to 2.0.17.

2.0.1   2019-01-09
------------------
! Columns with no default value in MySQL must be in the INSERT clause.

2.0     2018-11-15
------------------
! SMF 1.1.x: Error in PHP code.
! SMF 1.1.x: Slashes are stripped from fields in filters and searches.
! SMF 1.1.x: Theme of the generic form of displaying lists.
! SMF 2.0.x: Columns type "text" can not have a default value in MySQL.
! When posts are reattribute to another member, the number of each type of record created by the member is recount only if number of posts is recount.
! Calculation of the number of each type of record created by members.
! Registered member data are displayed instead of poster data.
* If the number of each type of record created by the member is 0 can be hidden.
+ Fields in administration panel to indicate the labels of total and average number of each type of record created.
* The filter with text button allows to use more modifiers: - (do not search for a text), OR (search for one or another text).
+ The average number of each type of record created can be show on the statistics.
+ Show warning messages when data published by the members can be deleted because of changes in settings of groups.
+ Membergroups based on the number of each type of record, in "Administration Center > Membergroups > Based on number of records".
+ Reattribute User Groups, in "Administration Center > Forum Maintenance > Members > Reattribute User Groups".
@ "Administration Center > Forum Maintenance > Members > Reattribute User Posts" section does not exists in SMF 1.1.x and "Reattribute User Groups" section is not added.
+ Actions of Administration panel are logged to Administration log.
@ Administration log does not exists in SMF 1.1.x.
+ Moderation actions are logged to Moderation log.
+ Languages: New language string in german, german-utf8, german_informal, german_informal-utf8, thanks to sangham.net.
+ Languages: New language string in portuguese_brazilian, portuguese_brazilian-utf8, brazilian, brazilian-utf8, portuguese_pt, portuguese_pt-utf8, thanks to Americano.
! Languages: Some language string in english, english-utf8, english_british, english_british-utf8, thanks to sangham.net.

1.5     2017-11-25
------------------
@ There may be conflict with SEF MODs, which create friendly URLs.
+ The number of each type of record created by the member is shown on the information about the member in personal messages.
+ Statistics in groups of type "fields with several values per member": Sum of numeric values.
+ Predefined filters: Types of record.
+ Field in administration panel to indicate if is allowed selecting the operator with which apply the predefined filter.
+ SMF compatibility: 2.0.12 to 2.0.15.
+ Languages: New language string in german, german-utf8, german_informal, german_informal-utf8, thanks to sangham.net.
! Languages: Some language string in english, english-utf8, english_british, english_british-utf8, thanks to sangham.net.

1.4     2015-10-30
------------------
+ Field in administration panel to show, on the statistics, the top 10 posters of each type of records.
+ The total number of each type of record created can be show on the statistics.
+ SMF compatibility: 2.0.11.
+ Languages: New language string in portuguese_brazilian, portuguese_brazilian-utf8, brazilian, brazilian-utf8, portuguese_pt, portuguese_pt-utf8, thanks to Americano.
+ Languages: german, german-utf8, german_informal, german_informal-utf8, thanks to sangham.net.
- SMF 2.0.x: Languages: brazilian, brazilian-utf8, spanish, spanish-utf8 (these are not used).

1.3.2   2015-06-19
------------------
! Errors in source code.

1.3.1   2015-06-13
------------------
! SMF 2.0.x: Error in SQL code.
! Use HTML entities in ISO-8859-1 languages.
! Since version 1.2 the help text is too long and generates an error on installation. It is divided in two operations.

1.3     2015-06-07
------------------
! Error in PHP code.
! Navigation in the message index when a predefined filter is used.
! Delete statistics when topics or messages are deleted.
! When moving a group of type "fields loose" or "record" to another message, the poster of the message is assigned to group.
! SMF 2.0.x: When assigning a message to another member, the groups of type "fields loose" or "record" of that message are assigned to member.
+ Field in administration panel to show, on the information about the member, the number of each type of record created by the member.
+ "Administration Center > Forum Maintenance > Routine > Recount all forum totals and statistics" also recounts the number of each type of record created by members.
+ SMF compatibility: 1.1.21 and 2.0.10.
+ Languages: portuguese_brazilian, portuguese_brazilian-utf8, brazilian, brazilian-utf8, portuguese_pt, portuguese_pt-utf8, thanks to Americano.

1.2     2014-12-16
------------------
! Error in JavaScript code.
! Errors in PHP code.
! SMF 2.0.x: allowedTo('approve_posts') must be used instead of $context['can_approve_posts'].
! Entered values by the user in text box of a combo box with multiple selection can not be duplicated.
! Column width with only one field, in lists of moderation.
! Fields of type select box, radio buttons or checkboxes must have options.
! Empty option of select box must have the label "All" only in filters.
+ SMF 1.1.x: Implemented a generic form of displaying lists, similar to SMF 2.0.x.
+ SMF 1.1.x: Implemented database functions, similar to SMF 2.0.x.
+ Field in administration panel to indicate if quick input field will be show when data are modified.
+ Field in administration panel to add a long description in a custom field.
+ Field in administration panel to add a description in a search field.
+ Field in administration panel to add a long description in a search field.
+ Field in administration panel to indicate if creation date will be show on posted records.
+ Field in administration panel to indicate if last modification date will be show on modified records.
+ Field in administration panel to indicate if only one value per member in groups of type "fields with several values per member" is allowed.
+ Field in administration panel to indicate if is allowed selecting the operator with which apply the filter.
+ Field in administration panel to indicate if one or more filters are hidden under a tag.
+ Field in administration panel to show in filter only those items that used in the current board, if filter is a field with list of items.
+ Fields in administration panel to show statistics in groups of type "fields with several values per member".
+ Permission in administration panel to indicate if a field is used to sort the message index.
+ PHP function in "Show enclosed within text" to display statistics for the group of a message.
+ PHP function in templates to display statistics for the group of a message.
* Reorganization of the fields in the administration panel.
* The filter with text button allows to search loose words (separated by spaces) and/or literal phases (enclosed in double quotes).
* The dates of create/modify of a group (left) and actions on a group (right) are shown on the same line.
* The date of create of groups of type "fields with several values per member" are also displayed on WAP.
* When display data posted by users in the groups of type "fields with several values per member", the background color alternates for readability.
* Forum parameter "Number of posts per page in a topic page" is used in lists of moderation.
* Forum parameter "Number of search results per page" is used in lists of search in custom fields.
* If users can not search for posts and topics then they can not search in custom fields.
* The areas with data of groups of type "fields with several values per member" can be displayed unexpanded, expanded or forever expanded.
* The field "Filter the message index" in administration panel is replaced by permissions.
+ SMF compatibility: 1.1 to 1.1.20 and 2.0.9.
@ SMF 1.1.x: List for each group of type "record" are not show on member's profile.
@ SMF 1.1.x: There is not Moderation Center, but the global moderators can to control the content posted by users in the groups of type "fields with several values per member".

1.1     2014-07-17
------------------
! In WYSIWYG mode, if the user add a record and the post body is empty, the system did not write a period (".") on it.
! If a field with radio buttons or checkboxes is defined as "Not empty value" and is left blank, no error was displayed.
! Each posted data on groups of type "fields with several values per member" must be moved individually, not all from the message at once.
! Languages: english, english-utf8.
+ Support for print topic.
+ Field in administration panel to add BBC before the record when entering data.
+ Field in administration panel to add JavaScript code when a group of fields is created or modified.
+ Field in administration panel to add HTML before and after the input button and the output text in a custom field.
+ Field in administration panel to show expanded the most recent posted data in groups of type "fields with several values per member".
+ Field in administration panel to show most recent posted data at the top in groups of type "fields with several values per member".
+ Field in administration panel to indicate the maximum height of the area with posted data in groups of type "fields with several values per member".
+ Field in administration panel to show, in the member's profile, a list for each group of type "record", with posted messages by the member containing this type of group.
+ Field in administration panel to control, in the Moderation Center, the content posted by users in the groups of type "fields with several values per member".
* Field in administration panel to indicate if a group will be show on the first post of topic is selected by default.
* Field in administration panel to indicate if a group will be show on the replies of topic is selected by default.
+ Quick input field to fill the fields when a record is created.
+ Variable in "Show enclosed within text" to insert ID of the current message.
+ Variable in "Show enclosed within text" to insert field name in database of any custom field.
+ PHP function in "Show enclosed within text" to display a group of a message like in a message or like on the message index.
+ Variable in templates to insert ID of the current message.
+ Variable in templates to insert field name in database of any custom field.
+ PHP function in templates to display a group of a message like in a message or like on the message index.
+ In administration panel is shown each group and field ID.
+ Text field to add multiple options at one time when a custom field with options is created or modified in administration panel.
* Big multi-line text input fields are wider.
* Submit buttons have shortcut key to get focus.
+ SMF compatibility: 2.0.8.

1.0     2014-02-20
------------------
@ This work is licensed under a Creative Commons Attribution 3.0 Unported License https://creativecommons.org/licenses/by/3.0/
+ Groups of custom fields loose in forum posts, to provide extra information.
+ Groups of custom fields in forum posts, called records, that represents an independent entity of the post.
+ Groups of custom fields in forum posts, with several values per member. They may be seen as belonging to the post or to the topic.
+ Groups of predefined filters that can be used on topics and posts.
+ Predefined filters: Boards, Subject, Start of the subject, First character of the subject, Date of topic / Date posted, Date of last reply / Date posted, Posted by, Topic with new posts / New, Sticky, Locked, Replies, Poll.
+ Actions to be performed on a group of custom fields: view, add, modify, delete, move.
+ Filter the message index using custom fields.
+ Search in custom fields of posts, getting a list of posts.
+ Search in custom fields of records, getting a list of records.
+ Support for WAP.
+ Administration panel.
+ SMF compatibility: 2.0 to 2.0.7.
+ Languages: english, english-utf8, english_british, english_british-utf8, spanish, spanish-utf8, spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8.

kamili34

Got error on this

Znajdź: [Zaznacz]


'unapproved_posts' => $row['unapproved_posts'],
);

Dodaj Po: [Zaznacz]


// BEGIN MOD CustomFieldFilterPost
$id_msg_array[] = $context['topics'][$row['id_topic']]['first_post']['id'];
$context['cffp']['data_msg_topic'][$row['id_first_msg']] = array(
'sticky' => $context['topics'][$row['id_topic']]['is_sticky'] ? 1 : 0,
'locked' => $context['topics'][$row['id_topic']]['is_locked'] ? 1 : 0,
'id_msg' => $context['topics'][$row['id_topic']]['first_post']['id'],
'first_msg' => 1,
'subject' => $context['topics'][$row['id_topic']]['subject'],
);
// END MOD CustomFieldFilterPost




Tried manually edited but when do this cant brose boards. :/

davidhs

Other mod (i.e. mod X) modified these lines and my mod can not install here. :(

Your file have this on line 598

'unapproved_posts' => $row['unapproved_posts'],
'description' => $row['description'],

);

and my mod expects this

'unapproved_posts' => $row['unapproved_posts'],
);


If you can,
1. uninstall mod X,
2. install my mod and
3. install mod X.

If you can not uninstall mod X or you do not know which it is, you can
1. install my mod with this error and
2. modify your MessageIndex.php, line 598,
after

'unapproved_posts' => $row['unapproved_posts'],
'description' => $row['description'],

);

write

// BEGIN MOD CustomFieldFilterPost
$id_msg_array[] = $context['topics'][$row['id_topic']]['first_post']['id'];
$context['cffp']['data_msg_topic'][$row['id_first_msg']] = array(
'sticky' => $context['topics'][$row['id_topic']]['is_sticky'] ? 1 : 0,
'locked' => $context['topics'][$row['id_topic']]['is_locked'] ? 1 : 0,
'id_msg' => $context['topics'][$row['id_topic']]['first_post']['id'],
'first_msg' => 1,
'subject' => $context['topics'][$row['id_topic']]['subject'],
);
// END MOD CustomFieldFilterPost

kamili34

Works. I put it in wrong place after 'unapproved_posts' => $row['unapproved_posts']. Now with your advice is ok. :) Thanks

sardonick007

This is SO brilliant!
One question. When using "record" option, the mod puts a . (period) in the body when there is no body. However, if WYSIWYG is toggled ON by default, this does not work. Is there a way for the . to be entered while the WYSIWYG is toggled on?

This mod is replacing all my forms and multiple pages into one page of selectable forms!!!! AWESOME!

sardonick007

Also, when I use the "print" button on the post, only the post body prints. None of the fields do. Is there a workaround for this? I'm really digging into this mod, it's better than I imagined with only a few little bumps.

davidhs

Quote from: sardonick007 on February 28, 2014, 09:52:25 PM
One question. When using "record" option, the mod puts a . (period) in the body when there is no body. However, if WYSIWYG is toggled ON by default, this does not work. Is there a way for the . to be entered while the WYSIWYG is toggled on?
I do not use the WYSIWYG mode and did not think about this. :( I will see.

Now, You must put a ".".

Quote from: sardonick007 on February 28, 2014, 11:39:32 PM
Also, when I use the "print" button on the post, only the post body prints. None of the fields do. Is there a workaround for this? I'm really digging into this mod, it's better than I imagined with only a few little bumps.
Same. I do not use the print option and did not think about this. :( I will see.

sardonick007

Quote from: davidhs on March 01, 2014, 06:48:11 AM
Quote from: sardonick007 on February 28, 2014, 09:52:25 PM
One question. When using "record" option, the mod puts a . (period) in the body when there is no body. However, if WYSIWYG is toggled ON by default, this does not work. Is there a way for the . to be entered while the WYSIWYG is toggled on?
I do not use the WYSIWYG mode and did not think about this. :( I will see.

Now, You must put a ".".

Quote from: sardonick007 on February 28, 2014, 11:39:32 PM
Also, when I use the "print" button on the post, only the post body prints. None of the fields do. Is there a workaround for this? I'm really digging into this mod, it's better than I imagined with only a few little bumps.
Same. I do not use the print option and did not think about this. :( I will see.

Thank you for your response! I appreciate the effort. Even now it's an excellent script and very useful to me.

sardonick007

As I'm using this more now, I also wanted to make sure you knew that you cannot view the information in Tapatalk, only the subject and body. For those using Tapatalk to view the boards they would not see the information in the records.

So for me, the current observations are:
Does not show up on print or when using "send topic" (only subject and body sends)
Does not automatically put a . (period) in the subject when using "Record type" if the body is toggled to WYSIWYG
Does not show information if using Tapatalk

I hope this is helpful because this is such a useful mod for my business.

margarett

It is actually "normal" that custom information isn't displayed in Tapatalk. They use a custom set of Sources files, meaning that the custom edits to SMF's own files aren't displayed in mobiles. That's not an issue with this mod, more with the way Tapatalk was built...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

sardonick007

Quote from: margarett on March 01, 2014, 04:51:32 PM
It is actually "normal" that custom information isn't displayed in Tapatalk. They use a custom set of Sources files, meaning that the custom edits to SMF's own files aren't displayed in mobiles. That's not an issue with this mod, more with the way Tapatalk was built...

Yea, I see that. It's not that big a deal really, since speeds are good enough to use the phone/tablet browser. That was just one of the things I experienced and figured I'd mention. It's really the one thing on my list that is not very important, maybe it'd be nice, but it's not a deal breaker.

davidhs

This MOD works in WAP mode but Tapatalk.... I do not know this :(

Is this Tapatalk? http://tapatalk.com/activate_tapatalk.php?plugin=smf
I do not found in SMF MODs section.

I will see.

sardonick007

Yes, that's it. However the mod works fine in WAP mode as you said. Tapatalk is just a bonus, nothing major. Printing and seeing the content in announcements, send topic,  and emails would be more important than Tapatalk since mobile web is easy to use and works fine.

LadyAngel

Thank you so much for this mod - I think it's just become my new favourite!  ;D

sardonick007

Quote from: davidhs on March 01, 2014, 06:48:11 AM
Quote from: sardonick007 on February 28, 2014, 09:52:25 PM
One question. When using "record" option, the mod puts a . (period) in the body when there is no body. However, if WYSIWYG is toggled ON by default, this does not work. Is there a way for the . to be entered while the WYSIWYG is toggled on?
I do not use the WYSIWYG mode and did not think about this. :( I will see.

Now, You must put a ".".

Quote from: sardonick007 on February 28, 2014, 11:39:32 PM
Also, when I use the "print" button on the post, only the post body prints. None of the fields do. Is there a workaround for this? I'm really digging into this mod, it's better than I imagined with only a few little bumps.
Same. I do not use the print option and did not think about this. :( I will see.

Have you had any luck with these items? Is there a plan for a future update that might address this? Thanks again for a great mod.

LadyAngel

I love this mod, I really do, but there's one thing I would change - it would be faster and more efficient if the admin could mass add multiple options at once, say in a text field, rather than having to add the options one by one.

davidhs

Quote from: LadyAngel on April 03, 2014, 05:19:48 PM
it would be faster and more efficient if the admin could mass add multiple options at once, say in a text field, rather than having to add the options one by one.
Where? When a field with options is created (i.e radio/check buttom)?

LadyAngel

Yes, that kind of thing. Instead of having to input each option at a time, I'd like to be able to paste a column of options, it would just save time. :)


LadyAngel


Advertisement: