Replies: 1 comment 4 replies
-
@im-L0r3 Are you wrapping the code in [code] or [pre] BB codes or using similar in TinyMce? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The goal is to create pages where I can show users snippets of PHP code.
I can put some code on the page, but some bits of specific code either "disappear" when pasting, or the page contents is deleted when hitting the save button.
I can imagine this is some sort of conflict with e107s PHP, but is there any sort of workaround? Iv attempting escaping in various ways without success.
THIS WORKS:
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => https://api.nightbot.tv/oauth2/token, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => "grant_type=client_credentials&client_id={YourClientIdHere}&client_secret={YourClientSecretHere}&scope=channel channel_send commands commands_default regulars subscribers timers" )); $nightbotApi = curl_exec
BUT THE FULL CODE FAILS to paste at the spot immediately after the "url_exec" above:
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => https://api.nightbot.tv/oauth2/token, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => "grant_type=client_credentials&client_id={YourClientIdHere}&client_secret={YourClientSecretHere}&scope=channel channel_send commands commands_default regulars subscribers timers" )); $nightbotApi = curl_exec($curl); curl_close($curl);
Beta Was this translation helpful? Give feedback.
All reactions