[OzzModz] Conversation Lock & Invite Permissions

[OzzModz] Conversation Lock & Invite Permissions 2.0.0

No permission to download
Sorry about the quick update, but there was an issue that I did not catch until I tried a fresh install.
 
Did you miss me? Well, I can tell, your level has grown. But still there are comments to the additions. You say you have an addition for 2.1, but you did not indicate the corresponding requirement in addon.json, where it will allow you to install on 2.0.
"require": [],
In modifications and replacements I began to use regular expressions, the young man shows the level is growing. But huge blocks anyway.
<xf:option name="open_invite" checked="{{ ($draft.open_invite OR $conversation.open_invite) ? 'checked' : '' }}">
You already use the syntax and using OR in this context would not be appropriate; it would be more appropriate to ||. Why else throw in () is also not clear
<xf:option name="conversation_locked" checked="{{ ($draft.conversation_open OR $conversation.conversation_open) ? '' : 'checked' }}">
Same thing, but nothing to complain about as such. But already at times it became better than it was.
 
Did you miss me? Well, I can tell, your level has grown. But still there are comments to the additions. You say you have an addition for 2.1, but you did not indicate the corresponding requirement in addon.json, where it will allow you to install on 2.0.
"require": [],
In modifications and replacements I began to use regular expressions, the young man shows the level is growing. But huge blocks anyway.
<xf:option name="open_invite" checked="{{ ($draft.open_invite OR $conversation.open_invite) ? 'checked' : '' }}">
You already use the syntax and using OR in this context would not be appropriate; it would be more appropriate to ||. Why else throw in () is also not clear
<xf:option name="conversation_locked" checked="{{ ($draft.conversation_open OR $conversation.conversation_open) ? '' : 'checked' }}">
Same thing, but nothing to complain about as such. But already at times it became better than it was.

I won't be making any changes to the code, that is exactly how it is in it's original form in the XF template.
 
Last edited:
I looked, yes it is so simply wrapped up in its own conditions. It is better to make a regular expression that will still find these conditions and insert $1, $2 into yours
You should suggest that to the XenForo developers. He's simply re-used the original XF template code and I wouldn't change that either.

Changing it could result in other add-ons that might modify that code being unable to do so.

Original XF code
<xf:option name="open_invite" checked="{{ ($draft.open_invite OR $conversation.open_invite) ? 'checked' : '' }}">
<xf:option name="conversation_locked" checked="{{ ($draft.conversation_open OR $conversation.conversation_open) ? '' : 'checked' }}">

His code
<xf:option name="open_invite" checked="{{ ($draft.open_invite OR $conversation.open_invite) ? 'checked' : '' }}">
<xf:option name="conversation_locked" checked="{{ ($draft.conversation_open OR $conversation.conversation_open) ? '' : 'checked' }}">
 
View previous topics.
I have.
Not sure if it is intended but you come across as quite arrogant. It is one thing to suggest improvements (at least in your mind) especially when requested or welcomed, but it is a whole other matter when you comment on every add-on a person writes and suggest they rewrite it the way you think it should be.
Why not just write your own add-ons. Seemingly you know how to better than most so wouldn't that be a better use of your time? This would allow you to share your knowledge much more easily and permit others to learn from your code.
I cannot wait to see what great and complex add-ons you come up with.
 
You should suggest that to the XenForo developers. He's simply re-used the original XF template code and I wouldn't change that either.

Changing it could result in other add-ons that might modify that code being unable to do so.

Original XF code
<xf:option name="open_invite" checked="{{ ($draft.open_invite OR $conversation.open_invite) ? 'checked' : '' }}">

His code
<xf:option name="open_invite" checked="{{ ($draft.open_invite OR $conversation.open_invite) ? 'checked' : '' }}">
For example:
1564402661403.webp
We just found 3 blocks and in front of them inserted 3 macros that add their own. Here the same principle and in addition, it will be possible to omit the requirement 2.1 as well as 2.0 it will be fine then to work. Only then he finds these blocks and wraps them in the conditions. And all because the search for regular expression and data insertion, what is found and the initial tags will be similar in search with 2.0.
 
For example:
View attachment 207446
We just found 3 blocks and in front of them inserted 3 macros that add their own. Here the same principle and in addition, it will be possible to omit the requirement 2.1 as well as 2.0 it will be fine then to work. Only then he finds these blocks and wraps them in the conditions. And all because the search for regular expression and data insertion, what is found and the initial tags will be similar in search with 2.0.
Again, suggest that to the Xenforo developers.

What he's done in this add-on is perfectly fine for the template modification he does. It's fine to have your opinion, but don't try to force it on others.

EDIT: Also, there's no reason for anyone to be supporting 2.0. It's already been declared EOL.
 
Last edited:
Again, suggest that to the Xenforo developers.

What he's done in this add-on is perfectly fine.
What exactly? The developers have already made a smart TMS system. Or to write a regular expression to search for? If the point is that there are no checks for the version, but the required 2.1 is indicated. Or what?
 
What exactly? The developers have already made a smart TMS system. Or to write a regular expression to search for? If the point is that there are no checks for the version, but the required 2.1 is indicated. Or what?
The point is you're being overly zealous with your comments. There's nothing wrong with what he's done in this add-on and you're imposing your opinion.

The checking of the 2.1 requirement isn't a show stopper that needs immediate fixing. That can wait for a future release. The point of it working or not working in 2.0 is irrelevant because 2.0 is no longer supported by XenForo (except security updates). It's up to each developer if they want to support 2.0 or not. In this case, he doesn't want to and that's fine. It was just something overlooked in the addon.json file that isn't a huge deal.

That check is easy to fix in addon.json by adding/chaning it to this:
"require": {"XF": [2010031, "XenForo 2.1.0+"]},
 
As the statistics show, people just download and do not look at compatibility. And not only and not just by the developers, this was done. In addition to all this, you can see their official plug-ins where they also increase the requirement for the XF version in their add-ons. Since they understand that some may put a new version on the old version, where there will be either errors or problems or not applied modifications. No, I do not impose anything on anyone. Supplement must be of high quality if you put them on public display in the public part. Again, I will give an example with @Xon, @Bespoke, @Siropu, @Lukas W. and not only those who have very good quality supplements and nothing to say to them.
And there are people with terrible code: @AndyB. In the case of @ozzy47, he corrected his add-ons and his skills are still growing. And it is always necessary to strive for the best, at the moment, as I pointed out, there’s almost nothing to complain about, but there are moments.
 
Your original comment centered around this bit of code...
<xf:option name="open_invite" checked="{{ ($draft.open_invite OR $conversation.open_invite) ? 'checked' : '' }}">
You already use the syntax and using OR in this context would not be appropriate; it would be more appropriate to ||. Why else throw in () is also not clear
That is the original XenForo template code.

If you have an issue with that syntax, take it up with the XenForo developers. It's not something that is just in this add-on.

EDIT: That syntax is used in other XF stock templates, including PAGE_CONTAINER
<a href="{$xf.contactUrl}" data-xf-click="{{ ($xf.options.contactUrl.overlay OR $xf.options.contactUrl.type == 'default') ? 'overlay' : '' }}">{{ phrase('contact_us') }}</a>
 
Last edited:
Your original comment centered around this bit of code...

That is the original XenForo template code.

If you have an issue with that syntax, take it up with the XenForo developers. It's not something that is just in this add-on.

EDIT: That syntax is used in other XF stock templates, including PAGE_CONTAINER
<a href="{$xf.contactUrl}" data-xf-click="{{ ($xf.options.contactUrl.overlay OR $xf.options.contactUrl.type == 'default') ? 'overlay' : '' }}">{{ phrase('contact_us') }}</a>
I kind of clearly and clearly said that I looked at the engine and said to replace the modification, which will not copy-paste the engine by replacing it with my own, but will just add.
 
I kind of clearly and clearly said that I looked at the engine and said to replace the modification, which will not copy-paste the engine by replacing it with my own, but will just add.
What you may consider clear and what the rest of the world considers clear may be two entirely different things. To me what you're suggesting is about as clear as mud and I think that might be because of a language barrier. If you think you have a better way to do what is being done, post a complete example not just bits of template code that have no meaning in this add-on.

I'm sure suggestions are welcome, but your suggestion isn't the only way to do something and it in reality may not be a better way. The only way to know for sure is with a full example of code as it would be used in this add-on.

Again, as it stands there is nothing wrong with the template modification as it's being done now.
 
Last edited:
Top Bottom