Advertisement:

Author Topic: Profile Comments  (Read 281447 times)

Offline memokal

  • Semi-Newbie
  • *
  • Posts: 20
Re: Profile Comments (SMF 2.0 Support Added!)
« Reply #760 on: December 10, 2016, 04:59:35 PM »
Do the following on your database:
Code: [Select]
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

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,956
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Profile Comments
« Reply #761 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
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

Offline memokal

  • Semi-Newbie
  • *
  • Posts: 20
Re: Profile Comments
« Reply #762 on: December 11, 2016, 05:45:21 AM »
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

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,956
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Profile Comments
« Reply #763 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.
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

Offline memokal

  • Semi-Newbie
  • *
  • Posts: 20
Re: Profile Comments
« Reply #764 on: December 11, 2016, 11:29:52 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!

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,956
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Profile Comments
« Reply #765 on: December 11, 2016, 11:36:23 AM »
Glad to help
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

Offline MULITRI

  • Semi-Newbie
  • *
  • Posts: 74
Re: Profile Comments
« Reply #766 on: February 12, 2017, 11:28:36 AM »
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.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,956
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Profile Comments
« Reply #767 on: February 13, 2017, 12:32:47 AM »
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

Offline MULITRI

  • Semi-Newbie
  • *
  • Posts: 74
Re: Profile Comments
« Reply #768 on: February 17, 2017, 01:27:47 PM »
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:
Code: [Select]
// 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.

Offline MULITRI

  • Semi-Newbie
  • *
  • Posts: 74
Re: Profile Comments
« Reply #769 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.

Offline Chalky

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,355
  • Gender: Female
  • If in doubt, give me beer...
    • ChalkCat
Re: Profile Comments
« Reply #770 on: April 23, 2017, 11:47:42 AM »
Can this be set up or modified so that comments can only be posted on the profiles of a specific membergroup?

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,956
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Profile Comments
« Reply #771 on: April 23, 2017, 01:36:04 PM »
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

Offline MULITRI

  • Semi-Newbie
  • *
  • Posts: 74
Re: Profile Comments
« Reply #772 on: April 29, 2017, 07:46:06 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.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,956
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Profile Comments
« Reply #773 on: April 29, 2017, 07:54:18 PM »
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

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 212
  • Gender: Female
Re: Profile Comments
« Reply #774 on: May 20, 2017, 07:54:32 AM »
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:
Code: [Select]
function template_commentsadmin()
{
global $txt, $context, $scripturl;

Replace with:
Code: [Select]
function template_commentsadmin()
{
global $txt, $context, $scripturl, $total;