Thread Rating:
  • 12 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Patches 1.5
#31
This user has been denied support. This user has been denied support.
Can you reproduce this breakage behaviour? I can't imagine what would cause it. Other than PHP hitting some time limit or memory contraint or similar during execution or the download just getting interrupted by unreliable network or something. For arbitrary data structures it could also be a recursion limit, but the depth of the patches structure is limited so that can't be it either.
Reply
#32
Can I ask what are the limitations of this plugin? I mean, this plugin can edit all mybb files? .css, .php, .js, etc?

Also, is it possible to edit plugin's php files?
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#33
I believe you can modify absolutely eveything, yes. It really is a must have for anybody modifying core files.
Reply
#34
This user has been denied support. This user has been denied support.
The limitation is that this plugin uses /* */ style comments to mark the lines that were inserted / modified. So it can modify any code that understands these kind of comments. It was made with PHP and maybe JavaScript in mind, but CSS should work as well (although global.css is generated and frequently overwritten my MyBB's theme system so you should make changes there instead). And yes, it can edit plugin files. PluginLibrary has an example plugin that edits itself this way.

Another limitation is that the edits are line based. You can not modify only part of a line. Usually this is not a problem but for minimized JavaScript or obfuscated PHP code.

Yet another limitation is that this just isn't as powerful as real patches (GNU diff / patch). There's no line numbers and no context that could help this plugin find the right place to make modifications. So it only works if the search pattern actually exists, is unique, and if the affected code wasn't moved / changed in a way that makes the edit invalid.
Reply
#35
I ask because I tried editing a plugin and a error showed up,

Quote:Another limitation is that the edits are line based. You can not modify only part of a line.

Maybe this is the mistake I did.

Thanks for answering, both of you Smile
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#36
This user has been denied support. This user has been denied support.
What error? The file needs to be writable, that's all.
Reply
#37
(2011-09-09, 09:01 PM)frostschutz Wrote: What error? The file needs to be writable, that's all.

I mean that I tried editing a part of a line and not the whole line, maybe that was the reason for the error.
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#38
While trying to change a password of an user I have got the error message that inc/languages/deutsch_du/patches.lang.php is missing.
However, the plugins only language file is placed in the admin-folder!? I copied the language-file into deutsch_du as well and changing the password worked.

Any idea what the reason for this error-message can be?
My Plugins on MyBBoard.de
(english descriptions included)
Reply
#39
(2011-09-09, 09:29 PM)Omar G. Wrote:
(2011-09-09, 09:01 PM)frostschutz Wrote: What error? The file needs to be writable, that's all.

I mean that I tried editing a part of a line and not the whole line, maybe that was the reason for the error.

you need to operate on the whole line as that is the way patches comments out the code changes.
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#40
(2011-11-12, 04:33 PM)pavemen Wrote:
(2011-09-09, 09:29 PM)Omar G. Wrote:
(2011-09-09, 09:01 PM)frostschutz Wrote: What error? The file needs to be writable, that's all.

I mean that I tried editing a part of a line and not the whole line, maybe that was the reason for the error.

you need to operate on the whole line as that is the way patches comments out the code changes.

Yes I know that already, thanks Toungue

(2011-11-12, 04:31 PM)Jockl Wrote: While trying to change a password of an user I have got the error message that inc/languages/deutsch_du/patches.lang.php is missing.
However, the plugins only language file is placed in the admin-folder!? I copied the language-file into deutsch_du as well and changing the password worked.

Any idea what the reason for this error-message can be?

I don´t know the reason but that happens many times in one of my forums that I installed using the spanish installer (I used the english installer in the other one and this had never passed), I think it only happens in that cases.
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)