Profile Comments

Started by SMFHacks.com Team, August 24, 2006, 11:12:43 AM

Previous topic - Next topic

memokal

Quote from: vbgamer45 on April 17, 2012, 08:37:16 PM
Do the following on your database:

DROP TABLE smf_profile_comments;

CREATE TABLE IF NOT EXISTS smf_profile_comments
(ID_COMMENT int(11) NOT NULL auto_increment,
ID_MEMBER mediumint(8) unsigned NOT NULL default '0',
comment text,
subject varchar (100),
date int(11) NOT NULL default '0',
COMMENT_MEMBER_ID mediumint(8) unsigned NOT NULL default '0',
approved tinyint(4) NOT NULL default '1',
PRIMARY KEY  (ID_COMMENT))
Engine=MyISAM;


I have same problem but this isnt worked on me. Or i couldnt use it.

How can i do it on database? Please step by step

vbgamer45

What error do you get?
You have to place in phpmyadmin or your database it self to run the SQL command.

But the package installer from SMF should do it for you
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

memokal

Quote from: vbgamer45 on December 10, 2016, 05:08:10 PM
What error do you get?
You have to place in phpmyadmin or your database it self to run the SQL command.

But the package installer from SMF should do it for you

hi so much thanks to answering  i get this error :
"Unknown column 'COMMENT_MEMBER_ID' in 'where clause'
.../public_html/Sources/ProfileComments2.php
Satır: 535"

i installed ajax profile comments before but removed it. After i tried profile comments it is not worked also ultimate profiles are not working because the same issue with database.

please my ignorance but i dont know much about databases i am learning. where can i find my database or where database are placed in ftp and does it matter where i put this command in the related database file

or

in phpmyadmin i have these buttons on menu : databases - sql - status - export - import - settings - variables - ... - ... -
and the left side i have something like a database file map.
my question is : should i find the file by left side first? or only using  one of these menu buttons will work for me? if yes which one is it.
If no what should i do by steps please

vbgamer45

well you have to decide either profile comments or ultimate profile will work.

You will need to delete the old smf_profile_comments table in order to get profile comments to work then install profile comments again.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

memokal

Quote from: vbgamer45 on December 11, 2016, 09:34:42 AM
well you have to decide either profile comments or ultimate profile will work.

You will need to delete the old smf_profile_comments table in order to get profile comments to work then install profile comments again.

Uhhhhhhhhh That really worked. THANK YOU!

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

MULITRI

Hi, first of all, give Thanks to vbgamer45 por this great mod i needed for my under construction forum.

In a first installation, i had the same problem like memokal had, and the solution provided worked fine as well for me, it's working perfectly.

But what i couldn't find how with my poor coding knowledge is how to change the texts "Add Comment", "Edit Comment", etc... for button images, even getting shown the "Add Comment" at right hand instead at left hand, and the "Edit Comment" and "Delete Comment" showing at bottom of the message box instead right under the last words of the message.

I know these are stetics changes, but i don't know where and how to do it. Any help would be very much apreciated.

Great work with the mod, Thanks.

vbgamer45

The mod modify s the profile.template.php file. I haven't tested this mod on rtl languages.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

MULITRI

Hello vbgamer45

I've been playing with the help of a friend with the part of the code in profile.template.php file. My friend found how to reorder the links os "Edit comment", "Delete Comment" and "Add comment".
I found how to replace the texts with buttons.
Instead two "Add comment" links (now buttons), one above the messaje field and one under, we have removed the one under the message field.

As it can be seen in the screenshot i've attached, it looks like i wanted, but we have a problem, the "Edit button" doesn't work, no click. Even adding permissions, the buttons "Edit" and "Delete" only show giving the users full permissions in profile comments, if i give the user only permissions to edit or delete his/her own comments, the buttons doesn't show in his/her own comments. Maybe is due to the problem with the Edit button inoperative.

Below is the code of profile comments how it looks actualy after our edit:

// Start Profile Comments Mod
if (allowedTo('pcomments_view'))
{
echo '
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft">',$txt['pcomments_usercomments'],'</span>
</h3>
</div><div class="windowbg2"><table align="center" width="100%">';


global $sourcedir, $smcFunc;
require_once($sourcedir . '/ProfileComments2.php');
$context['start'] = (int) $_REQUEST['start'];

$total = GetTotalComments($context['member']['id']);


echo '<tr><td colspan="2" align="right" class="windowbg"><a href="', $scripturl, '?action=comment;sa=add;u=' . $context['member']['id']  . '">',$txt['pcomments_addcomment'],'</a></td></tr>';
// Loop though all the comments

$comments = GetCommentList($context['member']['id']);

$comment_count = $context['total_pcomments'];

foreach($comments  as $row)
{
echo '<tr class="catbg"><td colspan="2">' . $row['subject'] . ' | '  . timeformat($row['date']) . '</td></tr>';

echo '<tr>
<td rowspan="2" width="12%" align="center" valign="top"  class="windowbg2">';

if ($row['real_name'] != '')
{

// Display the users avatar
$memCommID = $row['ID_MEMBER'];
if ($row['real_name'])
{
$memCommID = $row['ID_MEMBER'];
loadMemberData($memCommID);
loadMemberContext($memCommID);

ShowUserBox($memCommID);


}
}
else
echo $txt['pcomments_text_guest'] . '<br />';

echo '</td>

<td width="88%" valign="top"  class="windowbg">' . parse_bbc($row['comment']) . '</td></tr><tr><td valign="bottom" align="right" ';
if (allowedTo('pcomments_edit_any') || (allowedTo('pcomments_edit_own') && $row['ID_MEMBER'] == $user_info['id']))
{
echo '<a href="', $scripturl, '?action=comment;sa=edit&id=' . $row['ID_COMMENT'] . '">',$txt['pcomments_editcomment'],'</a>';
}
if (allowedTo('pcomments_delete_any') || (allowedTo('pcomments_delete_own') && $row['ID_MEMBER'] == $user_info['id']))
{
echo '&nbsp;<a href="', $scripturl, '?action=comment;sa=delete&id=' . $row['ID_COMMENT'] . '">',$txt['pcomments_delcomment'],'</a>';
}


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

if ($total > 0)
{
echo '<tr class="titlebg">
<td align="left" colspan="3">
' . $txt['pcomments_text_pages'];


$context['page_index'] = constructPageIndex($scripturl . '?action=profile;u=' . $context['member']['id'] , $_REQUEST['start'], $total, 10);

echo $context['page_index'];

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

echo '</table>
</div>';

}
// End Profile Comments Mod


After several days trying and trying, we cannot find what is wrong and why the Edit button is inoperative and why both Edit and Delete buttons doesn't show giving the user only permissions to edit/remove his own comments.

I will appreciate very much if you could help me. Thanks in advance.

MULITRI

Sorry to bump, but after more and more tries, i decided to uninstall completely this Mod, backing up my changes for the future, and i have reinstalled it from 0.

Definitely, something is wrong with permissions for Edit and Delete messages, those two options only show if i give full permissions to the users, which is not good as you all can imagine.

Of course as Admin i see the two options below all the messages.

I really will appreciate some help to make permissions work, if not, there is not a way to use this Mod due to users cheating risk.

Thank you.

Chalky

Can this be set up or modified so that comments can only be posted on the profiles of a specific membergroup?

vbgamer45

Possible but would probably take an hour or two of work to do so
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

MULITRI

Quote from: MULITRI on February 26, 2017, 02:08:23 PM
Sorry to bump, but after more and more tries, i decided to uninstall completely this Mod, backing up my changes for the future, and i have reinstalled it from 0.

Definitely, something is wrong with permissions for Edit and Delete messages, those two options only show if i give full permissions to the users, which is not good as you all can imagine.

Of course as Admin i see the two options below all the messages.

I really will appreciate some help to make permissions work, if not, there is not a way to use this Mod due to users cheating risk.

Thank you.

Could i get a reply about this, please?

I'm still interesting in using this Mod.

Thank you.

vbgamer45

Edit and Delete were only meant for admins I believe.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

GL700Wing

Following error encountered
8: Undefined variable: total
File: ./Themes/default/ProfileComments2.template.php
Line: 301

Fixed by making following change in ./Themes/default/ProfileComments2.template.php
Find:
function template_commentsadmin()
{
global $txt, $context, $scripturl;


Replace with:
function template_commentsadmin()
{
global $txt, $context, $scripturl, $total;
Life doesn't have to be perfect to be wonderful ...

Advertisement: