PHP CODE
#3
(2022-08-23, 08:46 AM)[ExiTuS] Wrote: First of all, we need to know the plugin to have a look at the code.
Can you provide the plugin (.php) file?

[ETS]

OOOOH, It has to do with the plugin I installed.. I didnt relize that, I assumed it was just like that by default.
Umm the plugin is called phpcolors.php

and heres the code to it.
<?php

// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("global_start", "phpcolors");

function phpcolors_info()
{
	return array(
		"name"			=> "PHP Colors",
		"description"	=> "Sets the highlight colors used in [php] tags.",
		"website"		=> "http://mybbsecurity.net/",
		"author"		=> "Nathan Malcolm",
		"authorsite"	=> "http://mybbsecurity.net/",
		"version"		=> "1.0",
		"guid" 			=> "",
		"compatibility" => "*"
	);
}

function phpcolors()
{
    ini_set('highlight.string', 'orange;'); // Color for highlighting a string in PHP syntax (e.g. echo 'this will be purple')
    ini_set('highlight.comment', 'lime;'); // Color for highlighting PHP comments (e.g. this is a comment)
    ini_set('highlight.keyword', 'crimson;'); // Color for syntax highlighting PHP keywords (e.g. parenthesis and semicolon) 
    ini_set('highlight.default', 'aqua;'); // Default color for PHP syntax (e.g. <?php)
}

?>

THIS HAS GOT ME RIPPING MY HAIR OUT..

I spent 4 hours trying to figure this out..........

If anyone has a solution? or a better plugin. Im all ears.
Reply


Messages In This Thread
PHP CODE - by C0D3D - 2022-08-22, 10:39 PM
RE: PHP CODE - by [ExiTuS] - 2022-08-23, 08:46 AM
RE: PHP CODE - by C0D3D - 2022-08-23, 02:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)