News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Custom fields and filters of post

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

Previous topic - Next topic

Americano

Quote from: davidhs on August 03, 2018, 05:34:41 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?

Americano

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.


davidhs

Quote from: Americano on August 03, 2018, 11:32:32 AM
Quote from: davidhs on August 03, 2018, 05:34:41 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?
I will try but not sure...

Quote from: Americano 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.
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"

kaki

#263
Quote from: vjones on August 02, 2016, 12:26:54 PM
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

davidhs

Quote from: kaki on November 14, 2018, 05:14:58 AM
Quote from: vjones on August 02, 2016, 12:26:54 PM
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.

davidhs

Quote from: moyack on March 09, 2018, 10:00:41 AM
Quote from: davidhs on March 07, 2018, 04:55:16 PM
Quote from: moyack on March 07, 2018, 03:22:32 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.

Quote from: Americano on August 03, 2018, 11:32:32 AM
Quote from: davidhs on August 03, 2018, 05:34:41 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?
Done.

Quote from: davidhs on August 04, 2018, 02:23:15 PM
Quote from: Americano 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.
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.

Quote from: davidhs on November 14, 2018, 08:30:23 AM
Quote from: kaki on November 14, 2018, 05:14:58 AM
Quote from: vjones on August 02, 2016, 12:26:54 PM
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:
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.

moyack

Hi!!!

Updated and working like a charm!!!!

Thanks :D


Kikoigo

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.......

davidhs

Quote from: Kikoigo 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.......
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").

Kikoigo


Kikoigo

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

davidhs

Quote from: Kikoigo 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
I replay in Spanish support topic https://www.simplemachines.org/community/index.php?topic=515911.msg4002256#msg4002256

davidhs

Quote from: Kikoigo 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......
Fixed.




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

OtterlyAdorable

Hi!

I found your mod while I was trying to solve this problem.
QuoteMy 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?

davidhs

Quote from: OtterlyAdorable on March 04, 2019, 11:43:20 AM
Hi!

I found your mod while I was trying to solve this problem.
QuoteMy 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.

OtterlyAdorable

Yeah the more I was looking into it, the more I suspected as much.

Thank you for your response.  =)

moyack

Hi Davidhs!!

I was wondering if there's in the process an update to support SMF 2.1, now that it's reaching the Stable state.

Hugs!!!

davidhs

Quote from: moyack on March 30, 2019, 05:37:28 PM
Hi Davidhs!!

I was wondering if there's in the process an update to support SMF 2.1, now that it's reaching the Stable state.

Hugs!!!
I tried to do this some time ago but this mod (and others of my mods) need write/read text of textarea editor and I did not can to do this. :(
https://www.simplemachines.org/community/index.php?topic=557881.0

Arantor

The editor has been updated since then; it's possible you might find it works now.
Holder of controversial views, all of which my own.


Advertisement: