Add forum's CSS to a custom PHP file
#1
Hello guys!

I added a custom PHP file to my server's root.

I'm using <object> HTML tag to show it to my forum's index.
The problem is that I need to make my script to display with the same CSS as my forum's.

My forum URL is http://forum.ad-rp.ga.

Looking forwards for tips.
MyBB Fan - Best Open Source Forum Engine

FreeDomain.Club - Free Domain & VPS provider
Reply
#2
what is the link of your custom php file ?
Reply
#3
http://forum.ad-rp.ga/server.php

As you can notice, it displays only simple text. I want to apply my forum's CSS attributes to it.
MyBB Fan - Best Open Source Forum Engine

FreeDomain.Club - Free Domain & VPS provider
Reply
#4
it would be better to use OUGC pages plugin or this method for the custom php file
Reply
#5
It seems it's not working how I want to, especially when using <frame> or <object> HTML tags. I tried to directly add the PHP code into my index HTML template, but it's not working too.
MyBB Fan - Best Open Source Forum Engine

FreeDomain.Club - Free Domain & VPS provider
Reply
#6
you may PM me your requirement and temporary access to forum admin panel & files (FTP)

however its about midnight for me & I can check it tomorrow
Reply
#7
Try with following edit(s):

In your server.php file at the top, before <?php that contains code that is pulling your server status
add
<?php

define("NO_ONLINE", 1);
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'server.php');

require_once "./global.php";

$tid = $theme['tid'];

?>

<style type="text/css">
@import url(cache/themes/theme<?php echo $tid ?>/global.css);
</style>

<?php the rest of your php code ?>
Reply
#8
Thanks, I'll give it a try!

Edit: Well, it its working, somehow, but it does not takes the font of my CSS. The text only takes my forum's background and text color.

See at http://forum.ad-rp.ga.

Fixed, thanks to everybody for help!
MyBB Fan - Best Open Source Forum Engine

FreeDomain.Club - Free Domain & VPS provider
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)