Forum Activity for @tig

TiG
@tig
12/04/17 08:35:28PM
184 posts

Flattening ACP Style Overrides during a Skin Clone


Jamroom Developers

@michael - Absolutely - file system all the way; enable our power tools! I told Perrie the same thing, we do this once and move on. :)

The delta update is the line by line update that we can do while doing a file comparison in PHPStorm. Maybe terminology has changed, but we used to refer to differences as 'deltas' - mathematics.

Slightly off topic but related, we just did a trial run new skin install using the Marketplace. After the install, I activated and saved the new skin and then ran an integrity check with cache reset. Oddly, at least one template override did not engage. (Tinymce disappeared too from comments but I am still hunting that down.) While diagnosing the problem, I manually updated the aforementioned template override file to force it to be most current and it then showed up.

When installing a brand new skin with template and css overrides, is there anything else we should do other than make the new skin active, save and then do an integrity check?
updated by @tig: 12/04/17 08:35:49PM
TiG
@tig
12/04/17 07:20:45PM
184 posts

Flattening ACP Style Overrides during a Skin Clone


Jamroom Developers

@michael

One of my very first thoughts was to copy the View Changes info and try to apply the changes from there. My proof-of-concept was to take a copy and compare it to the .css file using PHPStorm. That demonstrated that there was no realistic way to use PHPStorm's convenient delta update functionality. The View Changes format is too different from the underlying file.

Overriding the files with copies (as you suggest) would of course work and with far less effort, but the end result is undesirable for future maintenance. Thus I will continue what I am doing - manually transferring ACP style changes to the underlying files. When done, I will have a file-based skin style. Then we will simply apply a discipline to ensure we remain file based.

Thanks for looking into this and offering suggestions. This is a lot mechanical work but it will be worth it in the end.
TiG
@tig
12/04/17 04:53:10PM
184 posts

Flattening ACP Style Overrides during a Skin Clone


Jamroom Developers

Cloning a skin flattens templates (nice!) but it does not seem to do this for the ACP styles: Color and Font, Padding and Margin, Advanced and Untagged.

From my perspective it is important that everything possible be in files for obvious development reasons. Unfortunately to accomplish this it seems I must manually apply every ACP style override into the cloned skin's css files.

If there is an automated method for accomplishing this I would be quite happy to use it. :)
updated by @tig: 03/06/18 09:48:58AM
TiG
@tig
11/23/17 08:08:35AM
184 posts

Duplicates and 'follow_unique' in jrdiscussion_follow_topic


Jamroom Developers

@Brian - thanks for the advice. I wish the truth were the opposite though because it would be much better for NT to be based on the most highly supported, highly used components of the platform. NT necessarily must customize since it is a discussion / debate forum. Under a new design we would naturally prefer to customize from the tree trunk and major branches rather than a relatively isolated minor branch.
TiG
@tig
11/21/17 01:31:28PM
184 posts

Duplicates and 'follow_unique' in jrdiscussion_follow_topic


Jamroom Developers

@Paul

Sounds like we should investigate retrofitting threading into jrForum via an ntForum module. Will investigate the feasibility of this when we get to that point. Thanks much for the suggestion. That is the answer I expected based on what Brian noted earlier.

Threading will never NOT be a necessity for NT. :)
TiG
@tig
11/21/17 10:57:17AM
184 posts

Duplicates and 'follow_unique' in jrdiscussion_follow_topic


Jamroom Developers

@Paul Thanks for the instructions

Nobody else uses discussion? Brian hinted at that but I did not think NT was that unique.

NT is planning on a major version upgrade. This will enable us to rebuild the site from scratch using a fresh (current) jamroom platform with all the advantages that obviously brings. (Of course existing data will constrain us a bit.) When we do that, we might have the opportunity to migrate away from jrDiscussion. We want (need) to retain the concept of a public artifact (let's call it an article but logically it is a discussion or a blog) that presents content and hosts a stream of comments. What module(s) would you folks prefer we use? Very good information for us to have going forward.
TiG
@tig
11/20/17 04:45:23PM
184 posts

Duplicates and 'follow_unique' in jrdiscussion_follow_topic


Jamroom Developers

@Michael - thanks for the tip. I used that helpful capability several times in the past to build our alpha environment (in particular, getting SB template overrides over from production).
TiG
@tig
11/20/17 02:48:34PM
184 posts

Duplicates and 'follow_unique' in jrdiscussion_follow_topic


Jamroom Developers

@Paul

Thanks so much for doing that. Were your changes limited to jrDiscussion?

I would like to apply these changes to our alpha site so that my new module (ntTracker) works with what it will see in production. Thus I need to know what was changed. I presume I could simply copy jrDiscussion from production and upload it to the alpha site and run integrity check. Is this true? (Alpha is up to date with all updates as of today.)
updated by @tig: 11/20/17 03:06:42PM
TiG
@tig
11/20/17 08:20:13AM
184 posts

Duplicates and 'follow_unique' in jrdiscussion_follow_topic


Jamroom Developers

@Michael - the only process that consistently adds duplicates that I have found is as I noted. If a user clicks to follow a discussion that generates a record. Each comment the user makes on the followed discussion creates another record.

The odd thing about follow_unique is that the data content is simply a time value. It seems to simply be a uniqueness factor yet it is not clear how it is ever used.

Regardless, my question was simply due diligence. Follow does seem to work for my purposes. As long as I can conclude that a particular user is following a particular discussion (topic) by the presence of at least one (topic,user) pairing in the database then my logic will work.

In short my algorithm presumes: at least one pairing = following, no pairings = not-following

Thanks.
TiG
@tig
11/19/17 08:41:54PM
184 posts

Duplicates and 'follow_unique' in jrdiscussion_follow_topic


Jamroom Developers

This is a very specific question, but I am making use of the 'follow discussion' functionality and want to ensure I understand the semantics. The functionality seems to act as though (follow_topic_id,follow_user_id) is the unique key yet the table (by extension) shows duplicates for this pairing. From what I can tell, the duplicates occur if one is already following a discussion - each new comment posted on the discussion creates another record in the table. Thus following creates a record and each subsequent comment creates a record. Unfollowing deletes all records per (follow_topic_id, follow_user_id).

Question One: What purpose do the duplicate records serve?

Per this code, the follow_unique column is another factor:

$req = "SELECT follow_topic_id FROM {$tbl} WHERE follow_topic_id = '{$tid}' AND follow_user_id = '{$uid}' LIMIT 1";
    $fol = jrCore_db_query($req, 'SINGLE');
    // toggle
    if (!$fol) {
        [b]$unq = substr(md5(microtime()), 0, 16);[/b]
        $req = "INSERT INTO {$tbl} (follow_topic_id,follow_user_id,follow_created,follow_unique) VALUES ('{$tid}','{$uid}',UNIX_TIMESTAMP(),'{$unq}') ON DUPLICATE KEY UPDATE follow_created = UNIX_TIMESTAMP()";
        $tag = $_ln['jrDiscussion'][43];
        $fol = 'on';
    }

Question Two: What function does follow_unique serve - especially given follow_created?

Again, I just want to ensure I understand this mechanism because my logic relies upon it to a degree.
updated by @tig: 02/22/18 06:24:01PM
  11