Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated

Add An extra activity when writing on wall.

6 years 2 months ago
  • Elie's Avatar
    Topic Author
  • Elie
  • Offline
  • Fresh Boarder
  • Posts: 63
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Hi,

Suppose a person write on community wall, it stores data in wall and engagement table. I want that data also gets stored in another table. May I know which file do I need to edit for adding code related to insertion of record in one more table?

Thanks
Nirmal

6 years 2 months ago
Licenses:
JomSocial Active GURU Active Publisher Active AdAgency Active iSEO Active Socialize Active

Hi

Files responsible for maintaining database requests for wall can be found in /components/com_community/wall.php

6 years 2 months ago
  • Elie's Avatar
    Topic Author
  • Elie
  • Offline
  • Fresh Boarder
  • Posts: 63
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Hi,

File which you had mentioned is wrong. I had identified right file. It is components/com_community/controllers/system.php . ajaxStreamAddComment() gets called when adding comment on jom-social stream. I had added my code there for writing into another table. Now, an alert appears with message "Undefined error." . Please let me know the issue.

JTable::addIncludePath(JPATH_ADMINISTRATOR.'components/com_comment/tables');
$ctable = JTable::getInstance('comment', 'ccommentTable');
$ctable->contentid = $act->cid;
$ctable->component ='com_k2';
$ctable->ip =$_SERVER;
$ctable->userid = $act->actor;

$now = JDate::getInstance();
$now = $now->toSql();
$ctable->date = $now;

$actuser = CFactory::getUser($my->id);
//$ctable->NAME = $actuser->username;
$ctable->email = $actuser->email;
$ctable->comment = $comment;
$ctable->published = 1;
$ctable->parentid = $act->cid;

if(!$ctable->store(true))
{
JError::raiseError(500, 'Table store error: '.$ctable->getError());
return false;
}

Thanks

6 years 2 months ago
Licenses:
JomSocial Active GURU Active Publisher Active AdAgency Active iSEO Active Socialize Active

Hi

Sorry, must have misunderstood what You are trying to achieve.

Please tell me the url to the page where I'll be able to check it and what to do to see the problem. Will also need an access to ftp to be able to fix it.

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW