Include mybb editor in custom pages
techu Offline
Member
***
Posts: 154
Joined: Sep 2010
Post: #9
RE: Include mybb editor in custom pages

Code:
1
2
3
4
5
6
7
8
9
<?php
define('IN_MYBB', 1); 
require "global.php"; 

add_breadcrumb("Anunturi", "index.php"); 

eval("\$anuntindex = \"".$templates->get("anuntindex")."\";"); 
output_page($anuntindex); 
?>

Put this php in forum root..

And use this code in template

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html>
<head>
<title>{$mybb->settings[bbname]}</title>
{$headerinclude}
</head>
<body>
{$header}
<br />
<table width="100%" border="0">
<tr><td>
<textarea id="message" name="message" rows="20" cols="70" tabindex="2" ></textarea> 
<!-- start: codebuttons --> 
<script type="text/javascript" src="jscripts/editor.js?ver=1600"></script> 
<script type="text/javascript"> 
<!--
	var editor_language = {
	title_bold: "Insert bold text",
	title_italic: "Insert italic text",
	title_underline: "Insert underlined text",
	title_left: "Align text to the left",
	title_center: "Align text to the center",
	title_right: "Align text to the right",
	title_justify: "Justify text",
	title_numlist: "Insert numbered list",
	title_bulletlist: "Insert bulleted list",
	title_image: "Insert image",
	title_hyperlink: "Insert hyperlink",
	title_email: "Insert email address",
	title_quote: "Insert quoted text",
	title_code: "Insert formatted code",
	title_php: "Insert formatted PHP code",
	title_close_tags: "Close any open MyCode tags that you currently have open",
	enter_list_item: "Enter a list item. Click cancel or leave blank to end the list.",
	enter_url: "Please enter the URL of the website.",
	enter_url_title: "Optionally, you can also enter a title for the URL.",
	enter_email: "Please enter the email address you wish to insert.",
	enter_email_title: "Optionally, you may also enter a title for the email address.",
	enter_image: "Please enter the remote URL of the image you wish to insert.",
	enter_video_url: "Please enter the URL of the video.",
	video_dailymotion: "Dailymotion",
	video_googlevideo: "Google Video",
	video_metacafe: "MetaCafe",
	video_myspacetv: "MySpace TV",
	video_vimeo: "Vimeo",
	video_yahoo: "Yahoo Video",
	video_youtube: "YouTube",
	size_xx_small: "XX Small",
	size_x_small: "X Small",
	size_small: "Small",
	size_medium: "Medium",
	size_large: "Large",
	size_x_large: "X Large",
	size_xx_large: "XX Large",
	font: "Font",
	size: "Text Size",
	color: "Text Color"
};
	var clickableEditor = new messageEditor("message", {lang: editor_language, rtl: 0, theme: "default"});
	if(clickableEditor)
	{
		clickableEditor.bindSmilieInserter("clickable_smilies");
	}
// -->
</script> 
</td></tr>
</table>


[Image: banner.png]
04-01-2011 02:23 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Include mybb editor in custom pages - techu - 04-01-2011 02:23 AM

 Standard Tools
Forum Jump: