Advertisement:

Author Topic: Custom fields and filters of post  (Read 105475 times)

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Custom fields and filters of post
« Reply #280 on: March 31, 2019, 06:26:18 AM »
The editor has been updated since then; it's possible you might find it works now.
I was waiting for the next release of SMF 2.1, but I did not know that RC1 and RC2 are already there! I will adapt my mods.

Offline Sesquipedalian

  • The Mad Doctor
  • Lead Developer
  • Sr. Member
  • *
  • Posts: 969
  • Gender: Male
  • It works! ... in theory.
    • Sesquipedalian on GitHub
Re: Custom fields and filters of post
« Reply #281 on: March 31, 2019, 09:00:52 AM »
Among other things, you will want to pay attention to 2.1's changes to the way input fields are handled on the post authoring form. The $context['posting_fields'] array, the integrate_post_end hook, and this documentation will be of interest.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Offline tjrpcaft

  • Semi-Newbie
  • *
  • Posts: 31
Re: Custom fields and filters of post
« Reply #282 on: April 08, 2019, 04:10:46 PM »
Excuse me if my reply is "necro-posting", but could someone paste here links of forums that use this mod?

I would like to try it, but I would like to see some real examples first. Is that ok?

Regards

Offline tjrpcaft

  • Semi-Newbie
  • *
  • Posts: 31
Re: Custom fields and filters of post
« Reply #283 on: April 11, 2019, 04:00:59 AM »
bump

Offline Benqo

  • Semi-Newbie
  • *
  • Posts: 42
Re: Custom fields and filters of post
« Reply #284 on: April 11, 2019, 08:33:06 AM »
Hi,

I tried to install this mod on my new forum and find it a bit strange that files in the installation section and in core theme are reported differently. In installation section ./Themes/default/MessageIndex.template.php is marked as "Test successful", but in core theme as "Test failed" (see screenshots.

So, what message should I trust now? Or is it because the files in question are modified twice, first mod working, second one not?

Regards, Thomas

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,664
    • StoryBB/StoryBB on GitHub
Re: Custom fields and filters of post
« Reply #285 on: April 11, 2019, 08:59:06 AM »
It’s more that SMF ships with 2 themes, the default theme is what this plugin was built for, and the old theme, named “Core” is sufficiently different it doesn’t work. If you’re using Curve or any other third party theme, ignore the issues for Core.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Benqo

  • Semi-Newbie
  • *
  • Posts: 42
Re: Custom fields and filters of post
« Reply #286 on: April 11, 2019, 11:37:46 AM »
Well, it also reports errors for the theme I'm using as well.  ;D

Not sure, what I should do and if it is worth to do the changes manually.

Regards, Thomas

Offline tjrpcaft

  • Semi-Newbie
  • *
  • Posts: 31
Re: Custom fields and filters of post
« Reply #287 on: April 12, 2019, 12:19:43 PM »
Excuse me if my reply is "necro-posting", but could someone paste here links of forums that use this mod?

I would like to try it, but I would like to see some real examples first. Is that ok?

Regards

bump

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Custom fields and filters of post
« Reply #288 on: April 12, 2019, 01:09:49 PM »
Excuse me if my reply is "necro-posting", but could someone paste here links of forums that use this mod?

I would like to try it, but I would like to see some real examples first. Is that ok?

Regards
I can not tell you any forum but you can search in this topic. Here you can see images of some users. For example:
https://www.simplemachines.org/community/index.php?topic=518886.msg3967090#msg3967090

Also you can install a test forum, install this mod and do the example of first post of this topic.



Well, it also reports errors for the theme I'm using as well.  ;D

Not sure, what I should do and if it is worth to do the changes manually.

Regards, Thomas
I suppose your forum is SMF 1.1.x/2.0.x (not 2.1 Beta/RC).

My mod need do changes in some files modified by another mod. Can you attach image of errors in install?

Offline moyack

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
  • Bootstrap FTW!!
Re: Custom fields and filters of post
« Reply #289 on: April 12, 2019, 09:30:42 PM »
I can not tell you any forum but you can search in this topic. Here you can see images of some users. For example:
https://www.simplemachines.org/community/index.php?topic=518886.msg3967090#msg3967090

Well, my site could make this mod a good advertisement...

https://wc3modding.info/wc3-editing-tools/ (message index)
https://wc3modding.info/4263/the-jass-newgen-pack-jngp-2-0/ (topic example)

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Custom fields and filters of post
« Reply #290 on: April 13, 2019, 01:13:07 PM »
I can not tell you any forum but you can search in this topic. Here you can see images of some users. For example:
https://www.simplemachines.org/community/index.php?topic=518886.msg3967090#msg3967090

Well, my site could make this mod a good advertisement...

https://wc3modding.info/wc3-editing-tools/ (message index)
https://wc3modding.info/4263/the-jass-newgen-pack-jngp-2-0/ (topic example)
Good example, I like it!

Comments:

1. Field Keywords. When you add/modify a "WC3 Tools" this field is a text button and user can write keywords comma separeted, but different users can write similar words for same keyword (Jass, jass, jas, jjas, jaas...). If you define this button as combo box (text button + select box), user can write keywords in text button or select keywords from select box. Keywords written in text button will be added in select box when other register will created and could reused.

2. Add link to filter in values. Perhaps you tried this or you do not want... You can write values of field with links to filter (now you have only text) and when click on a value, filter is activated. You can try this code in templates:
Code: [Select]
<?php

if (!function_exists('cffp_filter'))
{
function cffp_filter($id_group$field_value$field_database$max 0)
{
$value_array explode(', '$field_value);

$filter_array = array();
foreach ($value_array as $k => $value)
{
if ($max && $k >= $max// If there are many values, perhaps is better show only $max values.
break; // Exit foreach.

$filter_array[] = '<a href="#" onclick="javascript: if (document.getElementById(\'cffp_filters\') && document.getElementById(\'cffp_' $id_group '_' $field_database '\')) { document.getElementById(\'cffp_' $id_group '_' $field_database '\').value = \'' $value '\'; document.getElementById(\'cffp_filters\').submit(); } return false;">' $value '</a>';
}

return implode(', '$filter_array) . ($max && $k >= $max ' [...]' '');
}
}

// Group "WC3 Tools" has ID = 5 (I see in your HTML code page ;) )
$id_group 5;

// Field "Tool Category" has ID (unknown for me, you can see in settings area of mod; for example = 7;
$field_name '{FIELD_7_NAME}'// Name of this field: Tool Category
$field_value '{FIELD_7_VALUE}'// Value of this field: Jass Scripting, Specific WE Module as a Standalone App, Text Editor &amp; Highlighter, World Editor (WE) Add on or plugin
$field_database '{FIELD_7_DATABASE}'// Column name of this field in database (I see in your HTML code page and is 'column_6').

// Now, you can write all "Tool Category" values with links to filter.
echo '<strong>'$field_name':</strong> 'cffp_filter($id_group$field_value$field_database);

?>

In next updates I will try add a function for do this more easy. :)

Offline moyack

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
  • Bootstrap FTW!!
Re: Custom fields and filters of post
« Reply #291 on: August 28, 2019, 08:49:04 AM »
Hi!!

Long time no see!! I have a question about reassign records to another member. I want to set some resources to a member, but when I follow the interface, it doesn't' change the resource to an specific member. Can you give me a hint??

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Custom fields and filters of post
« Reply #292 on: August 28, 2019, 01:23:37 PM »
Hi!!

Long time no see!! I have a question about reassign records to another member. I want to set some resources to a member, but when I follow the interface, it doesn't' change the resource to an specific member. Can you give me a hint??
You need fill these fields:
- Attribute guest groups made with: Username of: moyack
- Attribute specific posts: POST IDs WITH RECORDS
- Attribute groups of type: SELECT TYPE OF RECORDS TO REASSIGN
- Attribute registered member groups: [X]
- Attribute groups to member: olofmoleman

This only reattribute groups of fields. If you want also attribute post with this group, you need reattribute posts.

Offline moyack

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
  • Bootstrap FTW!!
Re: Custom fields and filters of post
« Reply #293 on: September 08, 2019, 09:25:48 PM »
Hi!!

Long time no see!! I have a question about reassign records to another member. I want to set some resources to a member, but when I follow the interface, it doesn't' change the resource to an specific member. Can you give me a hint??
You need fill these fields:
- Attribute guest groups made with: Username of: moyack
- Attribute specific posts: POST IDs WITH RECORDS
- Attribute groups of type: SELECT TYPE OF RECORDS TO REASSIGN
- Attribute registered member groups: [X]
- Attribute groups to member: olofmoleman

This only reattribute groups of fields. If you want also attribute post with this group, you need reattribute posts.

Thanks!!

Worked perfectly. May I suggest a feature based on this? To add a button after the "Move to another post" that changes the owner of the record to the message poster.

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Custom fields and filters of post
« Reply #294 on: September 09, 2019, 11:32:49 AM »
May I suggest a feature based on this? To add a button after the "Move to another post" that changes the owner of the record to the message poster.
I will see on next update. :)