MyBB Community Forums

Full Version: Make a new page with same HTML and CSS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So I am trying to grab the HTML and CSS of one of the pages on my forum so that I can make a new page with the same layout. Is there a place where I can find this or a plugin I could possible use to be able to do this?
you can use OUGC Pages plugin
(06-20-2015, 04:27 AM).m. Wrote: [ -> ]you can use OUGC Pages plugin

But you still need the template and I don't know how to get that said template.
When you choose "page source" with your browser, you get the entire HTML for a page. But what you can do with that Huh .
(06-21-2015, 12:58 AM)SilentThief Wrote: [ -> ]But you still need the template and I don't know how to get that said template.

which page on the forum you are trying to replicate....
I use this idea to make my own pages, not sure if that's what you're looking for but it makes your pages look the same as your forum. http://community.mybb.com/thread-116225.html
At the end of a script you always have a statement:

output_page($showthread);

like here for shopthread. You can save the variable (in this case $showthread) which contains the HTML of the page by adding before the call to output_page:

$myfile = fopen("html.txt", "w");
fwrite ($myfile, $showthread);
fclose($myfile);

The file html.txt will be stored in the root of your forum. Look whether this is the type of file you want by opening it in a text editor.
(06-21-2015, 12:40 PM)mmadhankumar Wrote: [ -> ]
(06-21-2015, 12:58 AM)SilentThief Wrote: [ -> ]But you still need the template and I don't know how to get that said template.

which page on the forum you are trying to replicate....

I am trying to make a new page for upgrade information and stuff. I just need the background images, theme colors, styles, etc. of the theme.
(06-23-2015, 06:12 AM)SilentThief Wrote: [ -> ]I am trying to make a new page for upgrade information and stuff. I just need the background images, theme colors, styles, etc. of the theme.

then the referred thread at post #6 should help...
(06-20-2015, 02:54 AM)SilentThief Wrote: [ -> ]So I am trying to grab the HTML and CSS of one of the pages on my forum so that I can make a new page with the same layout. Is there a place where I can find this or a plugin I could possible use to be able to do this?


Okey try this ..

Step 1 :
create testing.php in your root hosting

Step 2

Add this code in testing.php
<?php
/**
 * MyBB 1.8
 * Copyright 2014 MyBB Group, All Rights Reserved
 *
 * Custum Page By Nucky Prayanta Natalius
 * Site : http://zekonila.com
 *
 */

define('IN_MYBB', 1);
define('THIS_SCRIPT', 'testing.php');

require_once './global.php';
require_once MYBB_ROOT.'inc/functions_forumlist.php';
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new postParser;

$plugins->run_hooks('index_start');

//
// Custom Plugin here 
//
       
$plugins->run_hooks('index_end');

eval("\$zekonila .= \"".$templates->get("testingme")."\";");
eval('$testingme = "'.$templates->get('testingme').'";');
output_page($testingme);



Step 3

Create new template with name "testingme" in template you use now ..

and paste this in new template

<html>
<head>
	<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<body>
{$header}
	
<!-- Your Content Zekonila.com -->
	
	Ini hanyalah tetsing saja<br/>
	This Only testing
<!-- Your Content Zekonila.com -->
	
{$footer}
</body>
</html>


Save and open now testing.php with your url mybb ..
i use this for create custom page with same HTML dan CSS in my forum ..
Pages: 1 2