Advertisement:

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

Offline Americano

  • Semi-Newbie
  • *
  • Posts: 74
Re: Custom fields and filters of post
« Reply #260 on: August 03, 2018, 11:32:32 AM »

An enhancement for next versions of this mod can be add an option for reattribute groups of fields to other user (similar to reattribute post in SMF 2.0+). This is easy, or very usefull? Really I do not know...  ??? Now you can hide creation/modification data of a group of fields and show only creation data of the post.

Please, could you do in the next version?

Offline Americano

  • Semi-Newbie
  • *
  • Posts: 74
Re: Custom fields and filters of post
« Reply #261 on: August 03, 2018, 06:29:56 PM »
Please, another request for modification. I wanted the user level to be increased with the number of records.

For example from 10 record Level "Newbie", 20 records "Jr. Member" and so on.


Offline davidhs

  • Sr. Member
  • ****
  • Posts: 996
  • Gender: Male
Re: Custom fields and filters of post
« Reply #262 on: August 04, 2018, 02:23:15 PM »

An enhancement for next versions of this mod can be add an option for reattribute groups of fields to other user (similar to reattribute post in SMF 2.0+). This is easy, or very usefull? Really I do not know...  ??? Now you can hide creation/modification data of a group of fields and show only creation data of the post.

Please, could you do in the next version?
I will try but not sure...

Please, another request for modification. I wanted the user level to be increased with the number of records.

For example from 10 record Level "Newbie", 20 records "Jr. Member" and so on.
This can be difficult... or not. I will see.
Perhaps a user level for each records is necesary. ??? For example one member can be "Jr. Member" in posts and "Newbie" in records "X"

Offline kaki

  • Newbie
  • *
  • Posts: 1
Re: SQL Error when trying to install
« Reply #263 on: November 14, 2018, 05:14:58 AM »
The error I get is:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM smf_cffp_settings_groups
 WHERE active = 1
 ORDER BY group_order ASC' at line 2
File: C:\inetpub\wwwroot\simple_machines_forum\Sources\Themes-CustomFieldFilterPost.php
Line: 43

it looks like database_2.0.php isn't getting run on install


Hello,

Same problem here,  I am working off of a fresh install of SMF no other mods are installed too, i use smf version 2.0.15 and CustomFieldFilterPost_1.5.tar.gz .
Only "smf_cffp_count_groups" and "smf_cffp_fields" are created in database.

Error after install is:
Erreur de base de données
BLOB 'data' ne peut avoir de valeur par défaut
Fichier: L:\wamp64\www\smf\Packages\temp\database-2.0.php
Ligne: 915

Then, (after refresh or click other forum link) i have the same error as Vjones.

Is it possible to have database-2.0 in a sql format to import it please?

Thank you
« Last Edit: November 14, 2018, 05:54:54 AM by kaki »

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 996
  • Gender: Male
Re: Custom fields and filters of post
« Reply #264 on: November 14, 2018, 08:30:23 AM »
The error I get is:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM smf_cffp_settings_groups
 WHERE active = 1
 ORDER BY group_order ASC' at line 2
File: C:\inetpub\wwwroot\simple_machines_forum\Sources\Themes-CustomFieldFilterPost.php
Line: 43

it looks like database_2.0.php isn't getting run on install


Hello,

Same problem here,  I am working off of a fresh install of SMF no other mods are installed too, i use smf version 2.0.15 and CustomFieldFilterPost_1.5.tar.gz .
Only "smf_cffp_count_groups" and "smf_cffp_fields" are created in database.

Error after install is:
Erreur de base de données
BLOB 'data' ne peut avoir de valeur par défaut
Fichier: L:\wamp64\www\smf\Packages\temp\database-2.0.php
Ligne: 915

Then, (after refresh or click other forum link) i have the same error as Vjones.

Is it possible to have database-2.0 in a sql format to import it please?

Thank you
I found this
https://stackoverflow.com/questions/3466872/why-cant-a-text-column-have-a-default-value-in-mysql
Columns type "text" can not have a default value in MySQL (it was a warning, but it is an error in MySQL 5.7 on Windows).

I have ready a new version of my mod with some enhancements, and also I will fix this in SMF 2.0.x. Soon, today or tomorrow.

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 996
  • Gender: Male
Re: Custom fields and filters of post
« Reply #265 on: November 16, 2018, 12:33:30 PM »
Hi davidhs:

As always, I'm doing awesome stuff with your mod but now I have an issue: I was working with a fields group which were initially "loose field" and then I've changed to "fields with several values per user" because I wanted to make them modifiable without editing the post. I've set it and then the field group didn't show anymore in the post. Then I tried to change it back but unfortunately it keeps hidden from then posts and in the message index.

I've searched in the database but it seems legit with no error. Is there a field in the database which is keeping in conflict? Is there any information you'll need to see? I'd show you the database fields via PM.

EDIT: It seems all the information from that group has been deleted... That's a bug that should be revised. Now I've lost too many fields stored for 2 years :(
First, if you want edit a group of fields always you need edit its post.

A group type "fields with several values per user" has one value for each user. This group can be used for get opinion of users about the content of post. It is not used for add fields to a post.

You can convert a group type "loose fields" to "record" (and vice versa) without losing data because both types have only one value in one post.

But if you convert a group type "loose fields" or "record" to "fields with several values per user" (and vice versa), data of this group are deleted because they are not compability with new type. You are convert a group with only one value to a group with many values.
[...] I suggest to add in a next version at least a warning about this situation in order to avoid issues like this.
Done.


An enhancement for next versions of this mod can be add an option for reattribute groups of fields to other user (similar to reattribute post in SMF 2.0+). This is easy, or very usefull? Really I do not know...  ??? Now you can hide creation/modification data of a group of fields and show only creation data of the post.

Please, could you do in the next version?
Done.

Please, another request for modification. I wanted the user level to be increased with the number of records.

For example from 10 record Level "Newbie", 20 records "Jr. Member" and so on.
This can be difficult... or not. I will see.
Perhaps a user level for each records is necesary. ??? For example one member can be "Jr. Member" in posts and "Newbie" in records "X"
Done.

The error I get is:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM smf_cffp_settings_groups
 WHERE active = 1
 ORDER BY group_order ASC' at line 2
File: C:\inetpub\wwwroot\simple_machines_forum\Sources\Themes-CustomFieldFilterPost.php
Line: 43

it looks like database_2.0.php isn't getting run on install
Hello,

Same problem here, [...]
I found this
https://stackoverflow.com/questions/3466872/why-cant-a-text-column-have-a-default-value-in-mysql
Columns type "text" can not have a default value in MySQL (it was a warning, but it is an error in MySQL 5.7 on Windows).

I have ready a new version of my mod with some enhancements, and also I will fix this in SMF 2.0.x. Soon, today or tomorrow.
Fixed.



New version:
Code: [Select]
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.

Offline moyack

  • Semi-Newbie
  • *
  • Posts: 47
  • Gender: Male
  • Bootstrap FTW!!
Re: Custom fields and filters of post
« Reply #266 on: November 18, 2018, 10:38:11 AM »
Hi!!!

Updated and working like a charm!!!!

Thanks :D