News:

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

Main Menu

Ultimate Profile

Started by JovanT, March 12, 2009, 12:14:40 PM

Previous topic - Next topic

overdue

Will this be updated for 2.0.15?
2.1.4; default theme - curve.

-Rock Lee-

¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

anakmacan

My forum's moved to different server, after that profile pictures uploaded to the profile page dont show up, can anyone help to resolve this?

Kindred

1- did you move all the files?
2- Did you run repair_settings.php to reconfigure all of the directories, paths and URLs to your new server?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

anakmacan

Yes i did, first my new hosting company help moving all the files, and then i run repair_settings.php, everything else works.. except for that profile pictures part in the ultimate profile.

Kindred

and did you correct the path/url in the mod settings?
/index.php?action=admin;area=modsettings;sa=ultprofile;
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Azzlaer

Error al instalar en SMF Ultima version

Call to undefined function mysql_query()

-Rock Lee-

Quote from: Azzlaer on July 12, 2019, 08:38:15 PM
Error al instalar en SMF Ultima version

Call to undefined function mysql_query()

¿Que version de php estas usando? puede ser por eso te marca el error por que te dice no esta definido la funcion. Ademas trata de escribir en ingles en este foro sino tenes hacerlo en el de español para ayudarte mejor ;).

It may be an error in the PHP version used so you can not read the value, in case you do not understand Spanish :).


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Diego Andrés

#3208
To get it working replace the following code on helper.php before installing

Code (helper.php) Select
if ($db_type == 'mysql') {
$request = mysql_query('
SELECT variable, value
FROM ' . $db_prefix . 'settings
WHERE variable = "global_character_set"
AND value="UTF-8"');

if (mysql_num_rows($request) > 0) {
mysql_free_result($request);

mysql_query('ALTER TABLE ' . $db_prefix . 'profile_comments DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci');
mysql_query('ALTER TABLE ' . $db_prefix . 'profile_comments CHANGE `comment` `comment` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');

mysql_query('ALTER TABLE ' . $db_prefix . 'profile_pictures DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci');
mysql_query('ALTER TABLE ' . $db_prefix . 'profile_pictures CHANGE `title` `title` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');
mysql_query('ALTER TABLE ' . $db_prefix . 'profile_pictures CHANGE `description` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');
mysql_query('ALTER TABLE ' . $db_prefix . 'profile_pictures CHANGE `filename` `filename` TINYTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');

mysql_query('ALTER TABLE ' . $db_prefix . 'picture_comments DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci');
mysql_query('ALTER TABLE ' . $db_prefix . 'picture_comments CHANGE `comment` `comment` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');

mysql_query('ALTER TABLE ' . $db_prefix . 'profile_albums DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci');
mysql_query('ALTER TABLE ' . $db_prefix . 'profile_albums CHANGE `title` `title` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');
}
}


Code (Replace) Select
if ($db_type == 'mysql') {
$request = $smcFunc['db_query'](' ', '
SELECT variable, value
FROM {db_prefix}settings
WHERE variable = "global_character_set"
AND value="UTF-8"');

if ($smcFunc['db_num_rows']($request)  > 0) {
$smcFunc['db_free_result']($request);

$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}profile_comments DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci');
$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}profile_comments CHANGE `comment` `comment` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');

$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}profile_pictures DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci');
$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}profile_pictures CHANGE `title` `title` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');
$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}profile_pictures CHANGE `description` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');
$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}profile_pictures CHANGE `filename` `filename` TINYTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');

$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}picture_comments DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci');
$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}picture_comments CHANGE `comment` `comment` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');

$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}profile_albums DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci');
$smcFunc['db_query']('', 'ALTER TABLE {db_prefix}profile_albums CHANGE `title` `title` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL');
}
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

shadav

installed this mod on 2.0.15 and now have an error on profile

Database Error
Unknown column 'buddy_id' in 'field list'
File: /Sources/Profile-View.php
Line: 168

suggestions on how to fix it?

-Rock Lee-

Did you make sure it was installed correctly? because the error mark is that column is not found in the database. But I think it should be updated as the call does in that part, you can see what code appears in that line please.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

LBW

Please assist with the following error:

QuoteUnknown column 'com.time' in 'field list'
File: /home/vol11_1/epizy.com/epiz_24303111/htdocs/Sources/Profile-View.php
Line: 244

Current version: 2.0.15

Just to state: I'm not sure how to find line 244 on Mysql

Kindred

Looks like the mod was not fully installed
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shadav

i'd forgotten about this.... tried to install again....

I fixed the helper.php like Diego Andres posted

when i visit my profile i get the same error again

Unknown column 'buddy_id' in 'field list'
File: /Sources/Profile-View.php
Line: 166


line 166 is
'num_limit' => $number

lines 148 to 181
// Prepare the buddy list.
if (isset($modSettings['enable_buddylist']) && $modSettings['enable_buddylist'] == '1') {
$buddies = array();

if (in_array(@$context['member']['options']['num_shown_buddies'], array(3, 6, 9, 12)))
$number = $context['member']['options']['num_shown_buddies'];
else
$number = $modSettings['profile_buddies_shown'];

$request = $smcFunc['db_query']('', '
SELECT buddy_id
FROM {db_prefix}buddies
WHERE id_member = {int:id_member}
AND approved = 1
ORDER BY position ASC, time_updated DESC
LIMIT 0, {int:num_limit}',
array(
'id_member' => $context['member']['id'],
'num_limit' => $number
)
);
while ($row = $smcFunc['db_fetch_assoc']($request))
$buddies[] = $row['buddy_id'];

loadMemberData($buddies);
foreach ($buddies as $buddy) {
$user_data = $user_profile[$buddy];
$user_data['avatar_image'] = $user_data['avatar'] == '' ? ($user_data['id_attach'] > 0 ? '<img src="' . (empty($user_data['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $user_data['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $user_data['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($user_data['avatar'], 'http://') ? '<img src="' . $user_data['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($user_data['avatar']) . '" alt="" class="avatar" border="0" />');
$user_data['is_online'] = (!empty($user_data['show_online']) || allowedTo('moderate_forum')) && $user_data['is_online'] > 0;

if ($buddy != $memID)
$context['member']['buddies_data'][$buddy] = $user_data;
}
}

Diego Andrés

It installed fine for me, I'd have to have a look at it again.

SMF Tricks - Free & Premium Responsive Themes for SMF.

shadav

thank you :) whenever you get time

jsx

When I want to install this modification an error appears:

Call to undefined function mysql_query()

I use on the server PHP 7.0

-Rock Lee-

QuoteFunctions

    Do not use database-specific functions to send a query to the database (i.e. - mysql_query() for MySQL). Use $smcFunc['db_query']().
    Do not use database-specific functions to handle query results (i.e. - mysql_fetch_array() or mysql_fetch_assoc() in MySQL). Most of the time, the associative array returned by $smcFunc['db_fetch_assoc']() should be used. In rare cases like when using list(), $smcFunc['db_fetch_row']() may be used.
    Always use $smcFunc['db_free_result']() to free the resource when they are no longer needed.

https://wiki.simplemachines.org/smf/Coding_Guidelines

You have to update the line where you make the call in the database ... replacing the sentence should work.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

shadav

Quote from: shadav on October 01, 2019, 11:39:24 PM
i'd forgotten about this.... tried to install again....

I fixed the helper.php like Diego Andres posted

when i visit my profile i get the same error again

Unknown column 'buddy_id' in 'field list'
File: /Sources/Profile-View.php
Line: 166


line 166 is
'num_limit' => $number

lines 148 to 181
// Prepare the buddy list.
if (isset($modSettings['enable_buddylist']) && $modSettings['enable_buddylist'] == '1') {
$buddies = array();

if (in_array(@$context['member']['options']['num_shown_buddies'], array(3, 6, 9, 12)))
$number = $context['member']['options']['num_shown_buddies'];
else
$number = $modSettings['profile_buddies_shown'];

$request = $smcFunc['db_query']('', '
SELECT buddy_id
FROM {db_prefix}buddies
WHERE id_member = {int:id_member}
AND approved = 1
ORDER BY position ASC, time_updated DESC
LIMIT 0, {int:num_limit}',
array(
'id_member' => $context['member']['id'],
'num_limit' => $number
)
);
while ($row = $smcFunc['db_fetch_assoc']($request))
$buddies[] = $row['buddy_id'];

loadMemberData($buddies);
foreach ($buddies as $buddy) {
$user_data = $user_profile[$buddy];
$user_data['avatar_image'] = $user_data['avatar'] == '' ? ($user_data['id_attach'] > 0 ? '<img src="' . (empty($user_data['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $user_data['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $user_data['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($user_data['avatar'], 'http://') ? '<img src="' . $user_data['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($user_data['avatar']) . '" alt="" class="avatar" border="0" />');
$user_data['is_online'] = (!empty($user_data['show_online']) || allowedTo('moderate_forum')) && $user_data['is_online'] > 0;

if ($buddy != $memID)
$context['member']['buddies_data'][$buddy] = $user_data;
}
}


I tried again to install this on another project on a 2.0.17 and still i get the same error when I go to view a profile
Database Error
Unknown column 'buddy_id' in 'field list'
File: /Sources/Profile-View.php
Line: 153

line 153
'num_limit' => $number
lines 135 to 168
// Prepare the buddy list.
if (isset($modSettings['enable_buddylist']) && $modSettings['enable_buddylist'] == '1') {
$buddies = array();

if (in_array(@$context['member']['options']['num_shown_buddies'], array(3, 6, 9, 12)))
$number = $context['member']['options']['num_shown_buddies'];
else
$number = $modSettings['profile_buddies_shown'];

$request = $smcFunc['db_query']('', '
SELECT buddy_id
FROM {db_prefix}buddies
WHERE id_member = {int:id_member}
AND approved = 1
ORDER BY position ASC, time_updated DESC
LIMIT 0, {int:num_limit}',
array(
'id_member' => $context['member']['id'],
'num_limit' => $number
)
);
while ($row = $smcFunc['db_fetch_assoc']($request))
$buddies[] = $row['buddy_id'];

loadMemberData($buddies);
foreach ($buddies as $buddy) {
$user_data = $user_profile[$buddy];
$user_data['avatar_image'] = $user_data['avatar'] == '' ? ($user_data['id_attach'] > 0 ? '<img src="' . (empty($user_data['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $user_data['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $user_data['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($user_data['avatar'], 'http://') ? '<img src="' . $user_data['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($user_data['avatar']) . '" alt="" class="avatar" border="0" />');
$user_data['is_online'] = (!empty($user_data['show_online']) || allowedTo('moderate_forum')) && $user_data['is_online'] > 0;

if ($buddy != $memID)
$context['member']['buddies_data'][$buddy] = $user_data;
}
}


admin error logs
Database Error: Unknown column 'buddy_id' in 'field list'


SELECT buddy_id
FROM smf_buddies
WHERE id_member = 1
AND approved = 1
ORDER BY position ASC, time_updated DESC
LIMIT 0, 6Apply Filter: Only show the errors from this fileFile: /Sources/Profile-View.php
Line: 153

Kindred

I think there might have been a need to add a column manually...  but it's been so long since I installed this mod and I made huge tweaks to it to make it play nicely with half a dozen other mods that I don't recall exactly what was done.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: