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 April 25, 2020, 01:31:43 PM
Quote from: Americano on April 25, 2020, 10:31:24 AM
It was not what I wanted. I wanted it when a moderator was going to include a record in someone else's message, be a computer for the owner of the original message.

I am not sure understand this. But I think you can do this with my new enhancement:
Quote from: davidhs on February 21, 2014, 01:53:17 PMReattribute 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".

Else, write here an example (with images if it is possible).

checked but didn't change anything.
The post goes to the owner of the message, but the record goes to whoever included it (administrator). The counter does not change the record.

davidhs

Quote from: davidhs on April 25, 2020, 01:31:43 PM
Quote from: Americano on April 25, 2020, 10:31:24 AM
The latest version is not in Portuguese.
I see this. Same problem with all non-utf8 languages (except English). :( I will fixed now...
Fixed! Same problem with help text in some languages.




New version:
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.

davidhs

Quote from: Americano on April 26, 2020, 10:17:43 AM
Quote from: davidhs on April 25, 2020, 01:31:43 PM
Quote from: Americano on April 25, 2020, 10:31:24 AM
It was not what I wanted. I wanted it when a moderator was going to include a record in someone else's message, be a computer for the owner of the original message.

I am not sure understand this. But I think you can do this with my new enhancement:
Quote from: davidhs on February 21, 2014, 01:53:17 PMReattribute 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".

Else, write here an example (with images if it is possible).

checked but didn't change anything.
The post goes to the owner of the message, but the record goes to whoever included it (administrator). The counter does not change the record.
I tested this in my forum and works. You update to new version and test again. If this not work attach images of your steps, please.

I suppose you know have two owner data (date and user): one for message (shown below subject) and another for record (shown below record). This last can be shown/hidden in Settings for type "record".

Americano

I deleted the mod from the previous version and installed the new mod, but the registration is getting duplicated.

davidhs

Quote from: Americano on May 12, 2020, 10:25:16 AM
I deleted the mod from the previous version and installed the new mod, but the registration is getting duplicated.
??? Explain step by step (and with images if it is possible), please.

Shambles

Quote from: Americano
I deleted the mod from the previous version ...

Deleted, or uninstalled?

Americano

When I'm going to post, two identical records appear.

I already deleted and installed it again, but the problem persists.

Shambles

Quote from: Shambles on May 12, 2020, 11:51:29 AM
Quote from: Americano
I deleted the mod from the previous version ...

Deleted, or uninstalled?

Americano


Shambles

Quote from: Shambles on May 12, 2020, 11:51:29 AM
Quote from: Americano
I deleted the mod from the previous version ...

Deleted, or uninstalled?

Arantor

I don't think he understood the question.

Americano: when you removed the previous version, did you just press delete or press uninstall first? If you just deleted it, it's still installed and installing it the second time made it install twice (because you didn't uninstall the original one first)

davidhs


Regardless of whether you uninstalled or deleted the previous version of mod (I hope you have uninstalled it! Because if you only deleted the tar.gz file, it would have to be uninstalled manually),

In your image I see two problems:

  • I see two records with same name Test. This is correct?

         
    • If yes, you must call them Test1 and Test2, you will see better how it works.
    • Else, there is an error. I do not see this error in my local test forum and in other online forum with many users and records.
      Perhaps you have and error in setting of this mod (Can you attach an image of setting area, list of groups of fields (Administration Center > Modification Settings > Custom fields and filters of post)?),
      or you has installed new version of my mod with not uninstall previous version.
      Quote from: Arantor on May 12, 2020, 05:58:27 PM
      I don't think he understood the question.

      Americano: when you removed the previous version, did you just press delete or press uninstall first? If you just deleted it, it's still installed and installing it the second time made it install twice (because you didn't uninstall the original one first)

  • I see who created the post (Americano) and when (Hoje at 06:34:33 pm), but data of the creator of the Test records are hidden.
    To see if the owner of a record is changed, it is better shown this data in the post (are show bellow the record). You go to Administration Center > Modification Settings > Custom fields and filters of post, modify your record, go to section Settings for type "Record", and check Show creation date on posted data


Americano

Quote from: Arantor on May 12, 2020, 05:58:27 PM
I don't think he understood the question.

Americano: when you removed the previous version, did you just press delete or press uninstall first? If you just deleted it, it's still installed and installing it the second time made it install twice (because you didn't uninstall the original one first)

First uninstalled and then deleted.

Americano


davidhs

Ok. First we must fixed problem of record duplicate.

Problem can be there was an error on uninstall previous version and some code did not remove.

To check this I need to see your files:
- Sources/Display.php
- Themes/YOUR_THEME/Display.template.php
Can you attach here?

Americano


davidhs

Quote from: Americano on May 13, 2020, 09:33:22 PM
Segue anexo.
Code inserted by this mod is duplicated (perhaps an error occurred while uninstalling the previous version, or perhaps installation of new version was twice... I do not know.

First, I suppose you have latest versions of SMF (2.0.17) and my mod (2.0.3). Correct?

You need remove duplicate code from php files from your server. Can you (and do you know) modify code on files from your server? I suppose yes.

The code inserted by this mod is between text BEGIN MOD CustomFieldFilterPost and END MOD CustomFieldFilterPost.

You must search this text in files, and remove one copy if it is duplicate. But there is a problem: This mod modify many files (31+) and do many changes (114+).

The best is:

1. Uninstall my mod.

2. Open Sources/Admin.php, search this and delete if exists:
// BEGIN MOD CustomBlocks
array('cffpSettingsShow', 'area=modsettings;sa=cffp'),
// END MOD CustomBlocks

(Here I wrote MOD CustomBlocks instead of MOD CustomFieldFilterPost: an copy/paste error; I will fix on next update.)

3. Search MOD CustomFieldFilterPost in all files of your site. Can be this files:

Sources/Admin.php
Sources/Display.php
Sources/Load.php
Sources/ManageMaintenance.php
Sources/ManageMembergroups.php
Sources/ManageSettings.php
Sources/MessageIndex.php
Sources/ModerationCenter.php
Sources/Post.php
Sources/Printpage.php
Sources/Profile-View.php
Sources/Recent.php
Sources/RemoveTopic.php
Sources/Stats.php
Sources/Subs-Members.php
Sources/Subs-Post.php
Sources/Who.php

Themes/YOUR_THEME/Display.template.php
Themes/YOUR_THEME/ManageMaintenance.template.php
Themes/YOUR_THEME/MessageIndex.template.php
Themes/YOUR_THEME/PersonalMessage.template.php
Themes/YOUR_THEME/Post.template.php
Themes/YOUR_THEME/Printpage.template.php
Themes/YOUR_THEME/Profile.template.php
Themes/YOUR_THEME/Recent.template.php
Themes/YOUR_THEME/Stats.template.php
Themes/YOUR_THEME/Wireless.template.php
Themes/YOUR_THEME/css/index.css

Themes/YOUR_THEME/languages/Errors.ANY_LANGUAGE.php
Themes/YOUR_THEME/languages/Help.ANY_LANGUAGE.php
Themes/YOUR_THEME/languages/Modifications.ANY_LANGUAGE.php

4. Tell me what files have text MOD CustomFieldFilterPost.
In most times the code between this text can be delete, but in a few times must be replaced for other code (the SMF original code). Because of this I need know what is the file before remove or replace the code.

5. Finally, you must remove integrate hooks, from your database. We will see how.

Americano

I deleted the forum and created another one.

Americano

This mod is full of problems. Several things going wrong. In previous versions it was even working, but now it is full of defects.

I am too lazy to report the problems

davidhs

Quote from: Americano on May 15, 2020, 10:46:42 AM
This mod is full of problems. Several things going wrong. In previous versions it was even working, but now it is full of defects.

I am too lazy to report the problems

I am sorry, I do not understand what happen to you. Now I installed in my local server another test forum SMF 2.0.17 and I installed my mod (last version: 2.0.3). And works fine:
1. I created a record with one field and counter.
2. I created a post with record, the counter increased.
3. I removed a post with record, the counter decresed. The record is show only one time in each post, of course.
4. I uninstalled my mod
5. I installed again my mod.
6. I saw post and record created before uninstall.

Have somebody a similar problem?

Can you see the error log of your forum? There are something?

I supose you have correct version of PHP. If not, you should had problems with SMF, not only with my mod.

Do you have an online test forum? If yes, I can visit it and see how work (you send PM with URL and admin account).

Advertisement: