MyBB Community Forums

Full Version: Breadcrumb & Custom Profile Fields (Read & Edit value)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to make a custom page, I name it test.php. I need the page to be able to read and change the value of custom profile page no. 4.

Here's what I have currently:
<?php

define('IN_MYBB', 1);
require_once './global.php';

?>
<head>
<title><? echo $mybb->settings['bbname']; ?> - Test Page</title>
<? echo $headerinclude; ?>
</head>
<body>
	<? echo $header; ?>

	<table border="0" cellspacing="<? echo $theme['borderwidth']; ?>" cellpadding="
<? echo $theme['tablespace']; ?>" class="tborder" style="clear: both;">
		<tr>
			<td class="thead"><strong><? echo $mybb->settings['bbname']; ?> Test Page</strong></td>
		</tr>
		<tr>
			<td class="trow1">Content Here</td>
		</tr>
	</table>
	<? echo $footer; ?>
</body>
</html>

  1. I want to replace "Content Here" with the value of custom profile field no. 4.
  2. Is there any code that can change the value of custom profile field no. 4?
  3. Is there any way to add the breadcrumb?
Thank you very much.
I thing you may check this
Thanks, any idea about the custom profile field value reading & editing from the custom page?
mybb->user['fid4']
I don't know if that can use also for writing...
you might take a look at:
http://wiki.mybboard.net/index.php/Help:...ng_Postbit
The breadcrumb is replaced by the output_page function in inc/functions.php. The function replaces
<navigation>
with the breadcrumbs (you can see this in the header template).

The way you're printing out HTML doesn't use the output_page function. You'll probably need to change your code to something like this:


<?php

define('IN_MYBB', 1);
require_once './global.php';

$my_page = '<head>';
$my_page .= '<title>'.$mybb->settings['bbname'].' - Test Page</title>';
$my_page .= $headerinclude;
$my_page .= '</head>';
$my_page .= '<body>';
$my_page .= '<navigation>';
$my_page .= '...continue this for the rest...';

output_page($my_page);

?>
I read hhttp://wiki.mybboard.net/index.php/Help:Customizing_Postbit but i still cannot find the way to edit the value.

Thanks.