Advertisement:

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

Offline Americano

  • Semi-Newbie
  • *
  • Posts: 78
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: 78
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

  • Sophist Member
  • *****
  • Posts: 1,010
  • 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

  • Sophist Member
  • *****
  • Posts: 1,010
  • 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

  • Sophist Member
  • *****
  • Posts: 1,010
  • 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

Offline Americano

  • Semi-Newbie
  • *
  • Posts: 78
Re: Custom fields and filters of post
« Reply #267 on: January 02, 2019, 05:32:38 PM »
Thanks!

Offline Kikoigo

  • Semi-Newbie
  • *
  • Posts: 14
Re: Custom fields and filters of post
« Reply #268 on: January 04, 2019, 08:30:55 AM »
on "./Themes/default/css/index.css" say..... found "?>" and add before......

"/* BEGIN MOD CustomFieldFilterPost */
/* You do not modify this CSS style. Add your style before line "BEGIN MOD CustomFieldFilterPost" */
div.cffp_post,
div.cffp_member,
div.cffp_search
{
   padding: 0.5em;
   overflow: hidden;
}
div.cffp_post div.cffp_data,
div.cffp_member div.cffp_data,
div.cffp_search div.cffp_data
{
}".............. etc

but on this file do not exist this tag.......

I use directly at the end and work.......

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,010
  • Gender: Male
Re: Custom fields and filters of post
« Reply #269 on: January 04, 2019, 11:34:14 AM »
on "./Themes/default/css/index.css" say..... found "?>" and add before......

"/* BEGIN MOD CustomFieldFilterPost */
/* You do not modify this CSS style. Add your style before line "BEGIN MOD CustomFieldFilterPost" */
div.cffp_post,
div.cffp_member,
div.cffp_search
{
   padding: 0.5em;
   overflow: hidden;
}
div.cffp_post div.cffp_data,
div.cffp_member div.cffp_data,
div.cffp_search div.cffp_data
{
}".............. etc

but on this file do not exist this tag.......

I use directly at the end and work.......
Yes, you must copy this text at end of index.css. Automatic instalation works fine but manual instalation say "copy before ?>" (this is a "bug" of SMF manual instalation because css files has not ?> at end of file; the correct is "copy at end of file").

Offline Kikoigo

  • Semi-Newbie
  • *
  • Posts: 14
Re: Custom fields and filters of post
« Reply #270 on: January 08, 2019, 03:39:51 AM »
Thx. The CSS works

Offline Kikoigo

  • Semi-Newbie
  • *
  • Posts: 14
Re: Custom fields and filters of post
« Reply #271 on: January 08, 2019, 03:42:11 AM »
Ok. After complete de guide to install the MOD. When I try to create the first group, I have this error.

Field 'template_quick_input_regex' doesn't have a default value
Archivo: /customers/9/9/e/piteurope.com/httpd.www/ulzeron/Sources/Admin-CustomFieldFilterPost.php
Línea: 2382

I don't understand why......

If you can response in Spanish, it's better for me..... LOL

THX

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,010
  • Gender: Male
Re: Custom fields and filters of post
« Reply #272 on: January 08, 2019, 07:01:02 AM »
Ok. After complete de guide to install the MOD. When I try to create the first group, I have this error.

Field 'template_quick_input_regex' doesn't have a default value
Archivo: /customers/9/9/e/piteurope.com/httpd.www/ulzeron/Sources/Admin-CustomFieldFilterPost.php
Línea: 2382

I don't understand why......

If you can response in Spanish, it's better for me..... LOL

THX
I replay in Spanish support topic https://www.simplemachines.org/community/index.php?topic=515911.msg4002256#msg4002256

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,010
  • Gender: Male
Re: Custom fields and filters of post
« Reply #273 on: January 09, 2019, 07:56:32 AM »
Ok. After complete de guide to install the MOD. When I try to create the first group, I have this error.

Field 'template_quick_input_regex' doesn't have a default value
Archivo: /customers/9/9/e/piteurope.com/httpd.www/ulzeron/Sources/Admin-CustomFieldFilterPost.php
Línea: 2382

I don't understand why......
Fixed.



New version:
Code: [Select]
2.0.1   2019-01-09
------------------
! Columns with no default value in MySQL must be in the INSERT clause.

Offline OtterlyAdorable

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Female
    • The Irate Pirate | RrrrrrP Be Here
Re: Custom fields and filters of post
« Reply #274 on: March 04, 2019, 11:43:20 AM »
Hi!

I found your mod while I was trying to solve this problem.
Quote
My forum (the Irate Pirate [nofollow]) wants to run a monthly event for users who are above the average monthly post count.

We found one mod that might help us get partway there called Enhanced Forum Statistics, but upon trying to install this mod, it got a bunch of flags for conflicting with another mod.  We have a lot of mods, and it would take me a while to figure out which mod it conflicts with.  Depending on the mod, it may be entirely unreasonable to uninstall that mod for this one.

So, our next thought was just to get a spreadsheet of info on the posts made in the past month.  All we really need is, for each post, the date and the member who posted it.  We can extrapolate the average posts per month overall and by user with that information.

The problem is, I can't find that information.  I've looked at our database on the back end, and so far as I can tell, that information isn't available, and I'm not sure where I could find it.

Your mod looks really complex and it seems like it might be able to help me with what I'm trying to accomplish, but I'm a bit lost on how to implement it.  Do you think your mod can help me?  And if so, could you point me in the right direction for implementing it properly?

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,010
  • Gender: Male
Re: Custom fields and filters of post
« Reply #275 on: March 04, 2019, 01:03:33 PM »
Hi!

I found your mod while I was trying to solve this problem.
Quote
My forum (the Irate Pirate [nofollow]) wants to run a monthly event for users who are above the average monthly post count.

We found one mod that might help us get partway there called Enhanced Forum Statistics, but upon trying to install this mod, it got a bunch of flags for conflicting with another mod.  We have a lot of mods, and it would take me a while to figure out which mod it conflicts with.  Depending on the mod, it may be entirely unreasonable to uninstall that mod for this one.

So, our next thought was just to get a spreadsheet of info on the posts made in the past month.  All we really need is, for each post, the date and the member who posted it.  We can extrapolate the average posts per month overall and by user with that information.

The problem is, I can't find that information.  I've looked at our database on the back end, and so far as I can tell, that information isn't available, and I'm not sure where I could find it.

Your mod looks really complex and it seems like it might be able to help me with what I'm trying to accomplish, but I'm a bit lost on how to implement it.  Do you think your mod can help me?  And if so, could you point me in the right direction for implementing it properly?
Sorry, with my mod you can not do this.

This mod add custom fields and get statistical data about those custom fields.

Offline OtterlyAdorable

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Female
    • The Irate Pirate | RrrrrrP Be Here
Re: Custom fields and filters of post
« Reply #276 on: March 04, 2019, 01:05:52 PM »
Yeah the more I was looking into it, the more I suspected as much.

Thank you for your response.  =)