Topic-icon JFBCLike

Active Subscriptions:

None
10 years 8 months ago #36269 by jfra
JFBCLike was created by jfra
Hello, is there a module position or a way where I can place the JFBCLike button into the Jomsocial Recent activity feed? Please see attached.

Thanks for your help!

Jason

Version: 3.0.2 Jomsocial
The topic has been locked.
Support Specialist
10 years 8 months ago #36292 by alzander
Replied by alzander on topic JFBCLike
We've helped a few users do something like this for earlier versions of JomSocial. I'll have to do some investigation with 3.0 and see what we can do. This may also be possible in a plugin, and would be awesome so that template overrides aren't required.

Give me a few days, and I'll let you know what I find.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 8 months ago #36316 by jfra
Replied by jfra on topic JFBCLike
Thanks Alex, I appreciate it.

Jason
The topic has been locked.
Support Specialist
10 years 8 months ago #36332 by alzander
Replied by alzander on topic JFBCLike
No problem. It's what we're here for. Should you need anything else, just let me know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect, or our support, on the Joomla Extension Directory. It certainly isn't required, but is very appreciated:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks,
Alex
The topic has been locked.
Support Specialist
10 years 7 months ago #36600 by alzander
Replied by alzander on topic JFBCLike
Jason,
Sorry for the delay in getting back to this. I had a chance to look into this and think the solution below should work for you. Hopefully, the steps below are pretty clear, but if not, let us know.
* Copy /components/com_community/templates/default/activities.index.php to /templates/<YOUR_TEMPLATE>/html/com_community/activities.index.php (creating any directories as necessary)
** This creates a 'template override' so that any changes you make to that file won't be overridden if you update JomSocial
* Edit the file you just created in the /templates/ folder
* Search for the following code (at line 164 in my file):
// Show debug message
		if(empty($html))
		{
			// enable only during stream debugging
			// echo 'UNPROCESSED STREAM POST: ' . $act->app;
			$showStream = false;
		}
		?>
		</li>
Update that with the {JFBCLike ...} tag, as below:
// Show debug message
		if(empty($html))
		{
			// enable only during stream debugging
			// echo 'UNPROCESSED STREAM POST: ' . $act->app;
			$showStream = false;
		}
		?>
            {JFBCLike show_send_button=false href=<?php echo str_replace(JUri::base(true).'/', '', JUri::base()) . CRoute::_('index.php?option=com_community&view=profile&userid='.$act->actor.'&act='.$act->id); ?>}
		</li>
Let me know how that goes or if you have any other questions.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 7 months ago #36611 by jfra
Replied by jfra on topic JFBCLike
Hi Alex,

Thanks so much for this. One question.. I'm at this point: "to /templates/<YOUR_TEMPLATE>/html/com_community/activities.index.php (creating any directories as necessary) " and when I get to the html folder, I do not see a com_community folder. Shall I just make a folder and name it com_community and add the activities.index file? Do I need to add any other files here?

Thanks again!

Jason
The topic has been locked.
Support Specialist
10 years 7 months ago #36625 by alzander
Replied by alzander on topic JFBCLike
Correct. The note of (creating any directories as necessary) meant to create any directories that don't exist along that path. Once created, just copy that one file to the directory, and edit it from there. Copying that file makes it so if you update JomSocial, your changes aren't overwritten.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 7 months ago #36632 by jfra
Replied by jfra on topic JFBCLike
Thanks Alex,

So an error shows when I try those steps (see attached 'error' and attached 'save' if I click on the error), probably something I'm doing wrong. Attachment 1 is the first directory, and attachment 2 is the new directory I created if you can double check me.

Thanks again,

Jason
The topic has been locked.
Support Specialist
10 years 7 months ago #36635 by alzander
Replied by alzander on topic JFBCLike
Jason,
Can you try re-attaching the files? After you upload, you have to hit the green arrow to insert them into the post.

The best help will be posting a few lines from the file before and after the code change so I can see what you modified. Also, if you're getting an error message, just post what that is. From there, we should be able to help you out.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 7 months ago #36638 by jfra
Replied by jfra on topic JFBCLike
Hi Alex,

Here are the files:
File Attachment:


File Attachment:


File Attachment:


File Attachment:


This is the code I modified:

<?php
$html = ob_get_contents();
$html = trim($html);
$showStream = true;
ob_end_clean();
echo $html;

// Show debug message

if(empty($html))

{

// enable only during stream debugging

// echo 'UNPROCESSED STREAM POST: ' . $act->app;

$showStream = false;

}

?>

{JFBCLike show_send_button=false href=<?php echo str_replace(JUri::base(true).'/', '', JUri::base()) . CRoute::_('index.php?option=com_community&view=profile&userid='.$act->actor.'&act='.$act->id); ?>}

</li>


<?php
$html = ob_get_contents();
$html = trim($html);
ob_end_clean();
The topic has been locked.