Not Solved How to inject code in 'switch' statement?
#1
Not Solved
Hello,

I would like to add the following code in inc/class_parser.php using a plugin, but I don't know how.
case "bilibili":
    // https://www.bilibili.com/video/av34623787/
    $id = substr($path[2], 2);
    break;


Can anyone help me please?
Reply
#2
Not Solved
You cannot do this (inject) in any programming language that I know.
Best regards, Peter.
PHP Developer.


#gitlab #myplugins
Reply
#3
Not Solved
Is it possible to do this with a plugin instead of editing the core file though?
Reply
#4
Not Solved
^ have you tried using patches plugin (changing plugin compatibility to try it on MyBB 1.8.x)

wrt your earlier related thread, have you tried making a MyCode for it or tried modifying js as effone suggested ..
Reply
#5
Not Solved
Depends where you want to insert it, there is so much code in that file.

Hook at parse_message_me_mycode instead.
Reply
#6
Not Solved
@.m. I completely forgot to try making a MyCode. That worked, thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)