News:

Wondering if this will always be free?  See why free is better.

Main Menu

Help with this error. Please :(

Started by GC, February 14, 2006, 06:34:35 PM

Previous topic - Next topic

GC

I got this:
QuoteUnknown column 'clanGroups' in 'field list'
File: /home/***/public_html/Sources/Subs.php
Line: 627


UPDATE smf_members
SET
memberIP = '**.***.***.**',
clanGroups = ''
WHERE ID_MEMBER = 1
LIMIT 1

How do I fix this?

Dannii

I presume you have a column called clanGroups in your smf_members table?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

GC

#2
*EDIT*
Ok i added it to the list. It works! Thanks! But I got another problem now. I can't access the admin section.

QuoteWarning: call_user_func(Admin): First argument is expected to be a valid callback in /home/mod/public_html/index.php on line 127
<-- is at the top of the page

and this is in the main table

QuoteUnable to load the 'main' template

oh crap. Forget me posting all these errors. Can you just visit my site at http://www.moddingcrew.com. I got tooo many errors. Like in the search section, the main section.


kegobeer

1.  Bumping your topic after less than two hours?!?
2.  Is the the result of installing a mod?  If so, what mod, did you follow the instructions, and does the mod work with your version of SMF?
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

GC

Sorry, but i'm like trying to get it to work. I'm making a new mod, well not to SMF because nobody will need it, but i'm currently planning a new site where users can create a 'clan' (a membergroup), but they can appoint a leader, recruit members, can remve members, can set clan tags, and this clan can be for a game. Later on in the versions, you will be able to request wars, and such, and thay'll have ranks. My main focus is it's own page in the profile section. But, after I did that, everything seems to be messed up.

kegobeer

Without seeing the mod, I can't point you in any particular direction.  Whateve you've done, it's wreaking havok with the templating system, and apparently you aren't calling call_user_func correctly.  Undo your changes until your forum works again.

Create a test forum that you will use when developing a mod, so your regular forum doesn't die when you hit a snag.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

GC

This is a test forum. It's on it's own domain too. My real site is untouched. I'll post the changes I did.




Changes (Profile.php):
'forumProfile' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),
'clanGroups' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),
'theme' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),
'notification' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),

$_REQUEST['sa'] = 'forumProfile';
elseif ((allowedTo('profile_extra_own') && $context['user']['is_owner']) || allowedTo('profile_extra_any'))
$_REQUEST['sa'] = 'clanGroups';
elseif ((allowedTo('profile_remove_own') && $context['user']['is_owner']) || allowedTo('profile_remove_any'))
$_REQUEST['sa'] = 'deleteAccount';

$context['profile_areas']['edit_profile']['areas']['forumProfile'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=forumProfile">' . $txt['forumProfile'] . '</a>';
$context['profile_areas']['edit_profile']['areas']['clanGroups'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=clanGroups">'. $txt['clangroups']. '</a>';
$context['profile_areas']['edit_profile']['areas']['theme'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=theme">' . $txt['theme'] . '</a>';

'forumProfile' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'),
'clanGroups' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),
'theme' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'),

'signature', 'personalText', 'avatar', 'clanGroups',
// Validate the smiley set.
if (isset($_POST['smileySet']))
{
$smiley_sets = explode(',', $modSettings['smiley_sets_known']);
if (!in_array($_POST['smileySet'], $smiley_sets) && $_POST['smileySet'] != 'none')
$_POST['smileySet'] = '';
}

// Implode the clanGroups
if ( isset($_POST['clanGroups']) || $_REQUEST['sa'] == 'clanGroups')
{
if ( !isset($_POST['clanGroups']) )
$_POST['clanGroups'] = '';
else
$_POST['clanGroups'] = implode(',', $_POST['clanGroups']);
}

// Make sure the signature isn't too long.
if (isset($_POST['signature']))

// ClanGroups Function
function ClanGroups($memID)
{
}



?>


More changes (Profile.template.php):

if ($context['show_spellchecking'])
echo '
<form name="spell_form" id="spell_form" method="post" target="spellWindow" action="', $scripturl, '?action=spellcheck"><input type="hidden" name="spellstring" value="" /></form>';
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Template for forum specific options - avatar, signature etc.
function template_clanGroups()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;

// The main containing header.
echo '
<form action="', $scripturl, '?action=profile2" method="post" name="default_options[creator]" id="creator" enctype="multipart/form-data">
<table border="0" width="85%" cellspacing="1" cellpadding="4" align="center" class="bordercolor">
<tr class="titlebg">
<td height="26">
&nbsp;<img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" align="top" />&nbsp;
', $txt['clangroups_profile'], '
</td>
</tr><tr class="windowbg">
<td class="smalltext" height="25" style="padding: 2ex;">
', $txt['clangroups_info'], '
</td>
</tr><tr>
<td class="windowbg2" style="padding-bottom: 2ex;">
<table border="0" width="100%" cellpadding="5" cellspacing="0">';

// Game Name, Clan Name, Clan Tag...
echo '
<tr>
<td width="40%"><b>', $txt['clangroups_game'], ': </b></td>
<td><input type="text" name="default_options[clangroups_name]" size="50" maxlength="50" value="', @$context['member']['options']['clangroups_game'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['clangroups_clanname'], ': </b></td>
<td><input type="text" name="default_options[clangroups_clanname]" size="50" maxlength="50" value="', @$context['member']['options']['clangroups_clanname'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['clangroups_clantag'], ': </b></td>
<td><input type="text" name="default_options[clangroups_clantag]" size="3" maxlength="3" value="', @$context['member']['options']['clangroups_clantag'], '" /></td>
</tr>
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';

// Show the standard "Save Settings" profile button.
template_profile_save();

echo '
</table>
</td>
</tr>
</table>';

echo '
</form>';

}
////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Template for showing theme settings. Note: template_options() actually adds the theme specific options.
function template_theme()


Those are ALL the changes.


kegobeer

Please, have some patience.  I haven't had any time to work on this, and I'm sure no dev has had time, either.  I haven't forgotten about you.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

GC

I'm sorry. Just i might be leaving town in a bit, and I have a programing contest coming up. So i'm trying to rush this.

Dannii

Your changes listed there are useless as you haven't told us what you have changed to what.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

GC

nothing has be changed. I've just added stuff.

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

GC

I posted it above :S.

QuoteChanges (Profile.php):
Code:

'forumProfile' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),
'clanGroups' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),
'theme' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),
'notification' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),


Code:

$_REQUEST['sa'] = 'forumProfile';
elseif ((allowedTo('profile_extra_own') && $context['user']['is_owner']) || allowedTo('profile_extra_any'))
$_REQUEST['sa'] = 'clanGroups';
elseif ((allowedTo('profile_remove_own') && $context['user']['is_owner']) || allowedTo('profile_remove_any'))
$_REQUEST['sa'] = 'deleteAccount';


Code:

$context['profile_areas']['edit_profile']['areas']['forumProfile'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=forumProfile">' . $txt['forumProfile'] . '</a>';
$context['profile_areas']['edit_profile']['areas']['clanGroups'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=clanGroups">'. $txt['clangroups']. '</a>';
$context['profile_areas']['edit_profile']['areas']['theme'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=theme">' . $txt['theme'] . '</a>';


Code:

'forumProfile' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'),
'clanGroups' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),
'theme' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'),


Code:

'signature', 'personalText', 'avatar', 'clanGroups',

Code:

// Validate the smiley set.
if (isset($_POST['smileySet']))
{
$smiley_sets = explode(',', $modSettings['smiley_sets_known']);
if (!in_array($_POST['smileySet'], $smiley_sets) && $_POST['smileySet'] != 'none')
$_POST['smileySet'] = '';
}

// Implode the clanGroups
if ( isset($_POST['clanGroups']) || $_REQUEST['sa'] == 'clanGroups')
{
if ( !isset($_POST['clanGroups']) )
$_POST['clanGroups'] = '';
else
$_POST['clanGroups'] = implode(',', $_POST['clanGroups']);
}

// Make sure the signature isn't too long.
if (isset($_POST['signature']))


Code:

// ClanGroups Function
function ClanGroups($memID)
{
}



?>



More changes (Profile.template.php):
Code:


if ($context['show_spellchecking'])
echo '
<form name="spell_form" id="spell_form" method="post" target="spellWindow" action="', $scripturl, '?action=spellcheck"><input type="hidden" name="spellstring" value="" /></form>';
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Template for forum specific options - avatar, signature etc.
function template_clanGroups()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;

// The main containing header.
echo '
<form action="', $scripturl, '?action=profile2" method="post" name="default_options[creator]" id="creator" enctype="multipart/form-data">
<table border="0" width="85%" cellspacing="1" cellpadding="4" align="center" class="bordercolor">
<tr class="titlebg">
<td height="26">
&nbsp;<img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" align="top" />&nbsp;
', $txt['clangroups_profile'], '
</td>
</tr><tr class="windowbg">
<td class="smalltext" height="25" style="padding: 2ex;">
', $txt['clangroups_info'], '
</td>
</tr><tr>
<td class="windowbg2" style="padding-bottom: 2ex;">
<table border="0" width="100%" cellpadding="5" cellspacing="0">';

// Game Name, Clan Name, Clan Tag...
echo '
<tr>
<td width="40%"><b>', $txt['clangroups_game'], ': </b></td>
<td><input type="text" name="default_options[clangroups_name]" size="50" maxlength="50" value="', @$context['member']['options']['clangroups_game'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['clangroups_clanname'], ': </b></td>
<td><input type="text" name="default_options[clangroups_clanname]" size="50" maxlength="50" value="', @$context['member']['options']['clangroups_clanname'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['clangroups_clantag'], ': </b></td>
<td><input type="text" name="default_options[clangroups_clantag]" size="3" maxlength="3" value="', @$context['member']['options']['clangroups_clantag'], '" /></td>
</tr>
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';

// Show the standard "Save Settings" profile button.
template_profile_save();

echo '
</table>
</td>
</tr>
</table>';

echo '
</form>';

}
////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Template for showing theme settings. Note: template_options() actually adds the theme specific options.
function template_theme()


Dannii

:|

Where IN profile.php? At the top? At the bottom? In the middle? Isolated lines of code are useless.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

GC

I copied the lines above and below the code. If you look at it enough, you'll see the top part. Just copy the part before the extra added stuff. Like teh parts without clanGroups

Dannii

I'll consider helping, but only if you do it in the standard "find"/"replace" format.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

GC

Ok i shalll do. Do u mind if u can give me your MSN or AIM? It'll be easier through a chat messenger.

GC

////////  Changes (Profile.php): \\\\\\\\
FIND:
'forumProfile' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any')),

ADD AFTER:

'clanGroups' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),


FIND:
$_REQUEST['sa'] = 'forumProfile';
elseif ((allowedTo('profile_extra_own') && $context['user']['is_owner']) || allowedTo('profile_extra_any'))


ADD AFTER:

$_REQUEST['sa'] = 'clanGroups';
elseif ((allowedTo('profile_remove_own') && $context['user']['is_owner']) || allowedTo('profile_remove_any'))


FIND:
$context['profile_areas']['edit_profile']['areas']['forumProfile'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=forumProfile">' . $txt['forumProfile'] . '</a>';

ADD AFTER:

$context['profile_areas']['edit_profile']['areas']['clanGroups'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=clanGroups">'. $txt['clangroups']. '</a>';


FIND:
'forumProfile' => array(array('profile_extra_any', 'profile_extra_own'), array('profile_extra_any'), 'post'),

ADD AFTER:

'clanGroups' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')),


FIND:
'signature', 'personalText', 'avatar',

ADD AFTER:
'clanGroups',

FIND:
// Validate the smiley set.
if (isset($_POST['smileySet']))
{
$smiley_sets = explode(',', $modSettings['smiley_sets_known']);
if (!in_array($_POST['smileySet'], $smiley_sets) && $_POST['smileySet'] != 'none')
$_POST['smileySet'] = '';
}


ADD AFTER:

// Implode the clanGroups
if ( isset($_POST['clanGroups']) || $_REQUEST['sa'] == 'clanGroups')
{
if ( !isset($_POST['clanGroups']) )
$_POST['clanGroups'] = '';
else
$_POST['clanGroups'] = implode(',', $_POST['clanGroups']);
}


FIND:
?>

ADD BEFORE:
// ClanGroups Function
function ClanGroups($memID)
{
}


////////// (Profile.template.php): \\\\\\\\\\

FIND:

if ($context['show_spellchecking'])
echo '
<form name="spell_form" id="spell_form" method="post" target="spellWindow" action="', $scripturl, '?action=spellcheck"><input type="hidden" name="spellstring" value="" /></form>';
}


ADD AFTER:

////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Template for forum specific options - avatar, signature etc.
function template_clanGroups()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;

// The main containing header.
echo '
<form action="', $scripturl, '?action=profile2" method="post" name="default_options[creator]" id="creator" enctype="multipart/form-data">
<table border="0" width="85%" cellspacing="1" cellpadding="4" align="center" class="bordercolor">
<tr class="titlebg">
<td height="26">
&nbsp;<img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" align="top" />&nbsp;
', $txt['clangroups_profile'], '
</td>
</tr><tr class="windowbg">
<td class="smalltext" height="25" style="padding: 2ex;">
', $txt['clangroups_info'], '
</td>
</tr><tr>
<td class="windowbg2" style="padding-bottom: 2ex;">
<table border="0" width="100%" cellpadding="5" cellspacing="0">';

// Game Name, Clan Name, Clan Tag...
echo '
<tr>
<td width="40%"><b>', $txt['clangroups_game'], ': </b></td>
<td><input type="text" name="default_options[clangroups_name]" size="50" maxlength="50" value="', @$context['member']['options']['clangroups_game'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['clangroups_clanname'], ': </b></td>
<td><input type="text" name="default_options[clangroups_clanname]" size="50" maxlength="50" value="', @$context['member']['options']['clangroups_clanname'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['clangroups_clantag'], ': </b></td>
<td><input type="text" name="default_options[clangroups_clantag]" size="3" maxlength="3" value="', @$context['member']['options']['clangroups_clantag'], '" /></td>
</tr>
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';

// Show the standard "Save Settings" profile button.
template_profile_save();

echo '
</table>
</td>
</tr>
</table>';

echo '
</form>';

}
////////////////////////////////////////////////////////////////////////////////////////////////////////////


Those are ALL the changes.

Advertisement: