MyBB Community Forums

Full Version: User CP Defaults?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I've had a couple problems lately w/ ppl saying that they can't see signatures. The ones I addressed directly just had to check the signature option in the User CP.

It seems very odd that this would be disabled by default. Is there a place in the admin CP where I can set defaults for UserCP options?

The reason I'm bringing this up is because I've even had some ppl with avatars disabled (no way that's a default w/ install).
There isn't a setting for it I believe, but you could alter some of the user CP templates to ensure it's set to be on by default. For the signature issue, take a look at the usercp_editsig template and alter it to look like so:

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->edit_sig}</title>
{$headerinclude}
</head>
<body>
{$header}
<form action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table width="100%" border="0" align="center">
<tr>
{$usercpnav}
<td valign="top">
{$error}
{$signature}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->edit_sig}</strong></td>
</tr>
<tr>
<td class="trow1" valign="top" width="20%"><span class="smalltext">{$lang->edit_sig_note}</span>
{$smilieinserter}</td>
<td class="trow1" width="80%">
<textarea rows="15" cols="70" id="signature" name="signature">{$sig}</textarea>
{$codebuttons}
</td>
</tr>
<tr>
<td class="trow2">
<span class="smalltext">{$lang->edit_sig_note2}</span>
</td>
<td class="trow2">
<span class="smalltext">
<label><input type="radio" class="radio" name="updateposts" value="enable" checked="checked" />&nbsp;{$lang->enable_sig_posts}</label><br />
<label><input type="radio" class="radio" name="updateposts" value="disable" />&nbsp;{$lang->disable_sig_posts}</label><br />
<label><input type="radio" class="radio" name="updateposts" value="0" />&nbsp;{$lang->leave_sig_settings}</label></span>
</td>
</tr>
</table>
<br />
<div align="center">
<input type="hidden" name="action" value="do_editsig" />
<input type="submit" class="button" name="submit" value="{$lang->update_sig}" />
<input type="submit" class="button" name="preview" value="{$lang->preview}" />
</div>
</td>
</tr>
</table>
</form>
{$footer}
</body>
</html>

If you wish to set it as on for all current users, run this query via phpmyadmin too:

UPDATE mybb_posts SET includesig = '1' WHERE 1;
Hey!

Sorry for the late reply, been a bit busy lately.

The issue seems to be in the "Your Profile > Edit Options" area though. The field "Display users' signatures in their posts." should be enabled by default, along with "Display users' avatars in their posts."

Also about the edit you posted, I couldn't tell which part was modified from the original. Here is my template:

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->edit_sig}</title>
{$headerinclude}
</head>
<body>
{$header}
<form action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table width="100%" border="0" align="center">
<tr>
{$usercpnav}
<td valign="top">
{$error}
{$signature}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->edit_sig}</strong></td>
</tr>
<tr>
<td class="trow1" valign="top" width="20%"><span class="smalltext">{$lang->edit_sig_note}</span>
{$smilieinserter}</td>
<td class="trow1" width="80%">
<textarea rows="15" cols="70" id="signature" name="signature">{$sig}</textarea>
{$codebuttons}
</td>
</tr>
<tr>
<td class="trow2">
<span class="smalltext">{$lang->edit_sig_note2}</span>
</td>
<td class="trow2">
<span class="smalltext">
<label><input type="radio" class="radio" name="updateposts" value="enable" />&nbsp;{$lang->enable_sig_posts}</label><br />
<label><input type="radio" class="radio" name="updateposts" value="disable" />&nbsp;{$lang->disable_sig_posts}</label><br />
<label><input type="radio" class="radio" name="updateposts" value="0" checked="checked" />&nbsp;{$lang->leave_sig_settings}</label></span>
</td>
</tr>
</table>
<br />
<div align="center">
<input type="hidden" name="action" value="do_editsig" />
<input type="submit" class="button" name="submit" value="{$lang->update_sig}" />
<input type="submit" class="button" name="preview" value="{$lang->preview}" />
</div>
</td>
</tr>
</table>
</form>
{$footer}
</body>
</html>

Also, when I tried running that query in phpmyadmin it kept returning "You have to choose at least one column to display". I'm probably doing it all wrong Undecided
Change the template to the following:

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->edit_sig}</title>
{$headerinclude}
</head>
<body>
{$header}
<form action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table width="100%" border="0" align="center">
<tr>
{$usercpnav}
<td valign="top">
{$error}
{$signature}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->edit_sig}</strong></td>
</tr>
<tr>
<td class="trow1" valign="top" width="20%"><span class="smalltext">{$lang->edit_sig_note}</span>
{$smilieinserter}</td>
<td class="trow1" width="80%">
<textarea rows="15" cols="70" id="signature" name="signature">{$sig}</textarea>
{$codebuttons}
</td>
</tr>
<tr>
<td class="trow2">
<span class="smalltext">{$lang->edit_sig_note2}</span>
</td>
<td class="trow2">
<span class="smalltext">
<label><input type="radio" class="radio" name="updateposts" value="enable" checked="checked" />&nbsp;{$lang->enable_sig_posts}</label><br />
<label><input type="radio" class="radio" name="updateposts" value="disable" />&nbsp;{$lang->disable_sig_posts}</label><br />
<label><input type="radio" class="radio" name="updateposts" value="0" />&nbsp;{$lang->leave_sig_settings}</label></span>
</td>
</tr>
</table>
<br />
<div align="center">
<input type="hidden" name="action" value="do_editsig" />
<input type="submit" class="button" name="submit" value="{$lang->update_sig}" />
<input type="submit" class="button" name="preview" value="{$lang->preview}" />
</div>
</td>
</tr>
</table>
</form>
{$footer}
</body>
</html>

As for the query, how were you running it?
(2012-04-26, 01:22 AM)euantor Wrote: [ -> ]As for the query, how were you running it?

1- Login to phpmyadmin
2- Open "home" database
3- Switch to Query Tab
4- Enter your query in "SQL query on database home:"
That should be working just fine then I believe. Unless, of course, you've changed your table prefix from "mybb_" to something else.
The prefix is the same, I was able to find the values per-person for that field too.

It was in the exact format you put it but the software says "You have to choose at least one column to display". When I select "mybb_posts.*" as a column, it shortens the query to "FROM mybb_posts" and gives the same column error.