Jump to content

teraßyte

Clients
  • Posts

    33,425
  • Joined

  • Days Won

    47

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by teraßyte

  1. While reviewing some code in the forums application I found a couple of places that check the wrong class name for topics if the group is allowed to hide its own topics.

     

    These are the 2 files where IPS\forums\Topics needs to be replaced with IPS\forums\Topic:

    1. Line 649 in \applications\forums\modules\front\forums\forums.php
      		$canHide = ( \IPS\Member::loggedIn()->group['g_hide_own_posts'] == '1' or \in_array( 'IPS\forums\Topics', explode( ',', \IPS\Member::loggedIn()->group['g_hide_own_posts'] ) ) );

       

    2. Line 530 in \applications\forums\sources\Topic\Topic.php
      		$canHide = ( $item ) ? $item->canHide() : ( \IPS\Member::loggedIn()->group['g_hide_own_posts'] == '1' or \in_array( 'IPS\forums\Topics', explode( ',', \IPS\Member::loggedIn()->group['g_hide_own_posts'] ) ) );

     

     

    I searched all the files just in case, but those are the only ones I found.

  2. There is a tool in ACP to rebuild the achievements right away (see the button in the Other Settings screenshot):

     

    Before rebuilding, you can change the rules so that they add only 1 point for each content they make. By default, users get 10 points for a new item they post and 5 points for each comment/reply.

  3. Yeah. With 10k accounts, options #1 and #2 aren't really feasible. 😅

     

    The only real option would be #3. A quick script to import a CSV file that contains only the account email and their joined date. It could quickly go through the data to update the date column in the members' table using the email.

    It should be easy enough for your developer in case you want to go ahead with it.

  4. 13 minutes ago, PinPics said:

    Or when an account is present, does it skip all fields?

    Yes, it skips the account. The code doesn't account for updating existing ones.

    Your only options are:

    1. Delete the imported members and re-import them with the proper field selected for the join date.
    2. If the accounts are only a few, manually update the unix timestamps directly in the database. (Always make a backup before any manual edits.)
    3. If you have a lot of accounts, create a script to automatically update the joined unix timestamp.
    4. Give up on updating the joined date. 😋
  5. IPS always provides only the latest version for download. Unless you have the older version already downloaded on your computer (which doesn't seem to be the case since you just took over the forum), the only version available right now is 4.7.14 which requires PHP 8.

     

    Is your problem that the server doesn't have PHP 8 available yet? Or just that you're unsure of how to upgrade the forum to the latest version and change the PHP version at the same time?

    If it's the former, I would change hosting since PHP 8 has been available for a long while now. If it's the latter, there are ways to upgrade.

  6. Version 4.7.14 adds 1 new setting and removes 2 others:

    {
        "added": [
            "x_hashtag"
        ],
        "edited": [],
        "removed": [
            "mp_onboard_complete",
            "twitter_hashtag"
        ]
    }

     

    The mp_onboard_complete setting is removed in the \applications\core\setup\upg_107720\queries.json file:

        "8": {
            "method": "delete",
            "params": [
                "core_sys_conf_settings",
                [
                    "conf_app=? AND conf_key=?",
                    "core",
                    "mp_onboard_complete"
                ]
            ]
        },

     

    The twitter_hashtag setting is instead left so that the upgrade.php script in the same folder can copy the value into the new x_hashtag one (step2). However, once the copy is done, the old twitter_hashtag setting is not deleted from the database.

  7. On a fresh install, both Twitter and X share links are inserted in the core_share_links table.

    This happens because the file \applications\core\data\schema.json was updated in 4.7.14 to insert a new row (ID 10), but the old one (ID 0) was not removed:

            "inserts": {
                "0": {
                    "share_id": 1,
                    "share_title": "Twitter",
                    "share_key": "twitter",
                    "share_enabled": 1,
                    "share_position": 1,
                    "share_groups": "*"
                },
                [...]
                "10": {
                    "share_id": "13",
                    "share_title": "X",
                    "share_key": "x",
                    "share_enabled": "1",
                    "share_position": "13",
                    "share_canonical": "1",
                    "share_groups": "*",
                    "share_autoshare": "0"
                }
            },

     

  8. In the latest 4.7.14 version, the template core > front > global > siteSocialProfiles was changed to add support for X (former Twitter) share link, but the <LI> element was mistakenly changed to an <A> element instead.

     

    4.7.13 version:

    <li class='cUserNav_icon'>

    4.7.14 version:

    <a class='cUserNav_icon'>

     

    You can easily compare it in the Theme Differences tool, too: https://invisioncommunity.com/index.php?app=core&module=system&controller=plugins&do=diff

×
×
  • Create New...