MyBB Community Forums

Full Version: mybb theme intergration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
OK, so I have 2 questions. The first is, is it possible to change the index page of my site so that if the user has a certan theme in mybb then a theme with the same color scheme will appear? (The layouts could be customisable in the admin cp like all themes or could be stand alone pages, i'll make them if someone tells me how to make them work with mybb). My 2nd question is not mybb related but it goes along with my 1st question. Can someone help make an index page (backstageneopets.com/index.php) that has an iframe and if a user goes to index.php?frame=23 then the page will load 23.html(same floder as the index) in the iframe? I would also like the index page to have the layout found at http://www.backstageneopets.com/pass_sav.../(username: Username pass: apple35 , CaSe SeNtIvE) Lastly I don't know any php so if you could write things in a way that I could understand it, I would be very appreciative.

Thanks so much!
OK, so i've tryed to do a little work on my second qustion by my self and this is what i came up with:
........ <div
 style="position: absolute; top: 200px; left: 190px; width: 438px; height: 497px;"><iframe
 src=<?php
$frame = "nav_home.html";
echo $frame;
?> name="main" frameborder="0" height="999"
 width="438">.......
so then i tryed to go to backstageneopets.com/pass_save/layout/index.php?frame=pets.html and it did not work, what do i need to make this work?

edit: i also tryed to google how to do this but could not find out how
You currently have:
<div
 style="position: absolute; top: 200px; left: 190px; width: 438px; height: 497px;"><iframe
 src=<?php
$frame = "nav_home.html";
echo $frame;
?> name="main" frameborder="0" height="999"
 width="438"></div>

The biggest problem is that you're always assigning nav_home.html to $frame. What you want to do instead is to see if $_GET['frame'] is set and sanitize it (check to see if it exists among other things). If $_GET['frame'] is not set or fails your sanity check then assign a default value to $frame.

<div
 style="position: absolute; top: 200px; left: 190px; width: 438px; height: 497px;"><iframe
 src="<?php
if (isset($_GET['frame']) && exists($_GET['frame']))
{ // should probably do more checks
$frame = $_GET['frame']'
}
else
{
$frame = "nav_home.html";
}
echo htmlspecialchars($frame);
?>" name="main" frameborder="0" height="999"
 width="438"></div>
perfect, thankx! can any one help me with my 1st qustion?
nekng Wrote:............. The first is, is it possible to change the index page of my site so that if the user has a certan theme in mybb then a theme with the same color scheme will appear? (The layouts could be customisable in the admin cp like all themes or could be stand alone pages, i'll make them if someone tells me how to make them work with mybb) .............. Lastly I don't know any php so if you could write things in a way that I could understand it, I would be very appreciative.

Thanks so much!
You can create your own cusom pages using the MyBB template system. Here's a tutorial: http://community.mybboard.net/showthread.php?tid=6615
Why not use the css of the desired theme... that would seem like the easiest method wouldn't it?
no, i don't want the theme to be the same, i wasnt the mani site's theme to change(based off the forum settings)
So you want an extra setting within the users profile that would let them choose a theme for the main site?
exactly!
Why not use the current system and make an sql query and determine which style they use now and then php could determine which style it should load from that? making an switch for example. however people need to be logged in.
Pages: 1 2