I don’t really understand the question, entry.php is a fie aailable for overloading, it’s a template file that displays the activity loop, and bp_get_activity_content_body is a loop function that can be used within it.
On the other hand, bp-core-template.php is a core file, that should not be edited and it’s not a template file running a loop, why are you looking to edit this? What new function are you trying to add?
dear @venutius
thank you very much for teach me.
I want to get first 40 charector of bp_get_activity_content_body() and set to single activity page <title> tag.
Could you please guide me to do.
Thank you very much
you mean members/single/activity.php?
on entry.php i do this
<script type=”text/javascript”>
document.title = ‘<?php echo strip_tags(mb_substr(bp_get_activity_content_body(), 0, 40)); ?>’;
</script>
this is example of my output http://www.retrophotoclub.com/members/admin/activity/47/
it is ok to change title tag, but i thing it will change after page is load finished.
i would like to try this with php with out use javascript.
Thank you so much @venutius
I think the issue is that the page title is already going to be set by the time you know the activity content in question, so there’s not a neat solution to this, you either do it in js or you do some kind of string replace in php. I’ve seen solutons like the following:
include("header.php");
$title = "TITLE";
$output = str_replace('%TITLE%', $title, $output);
echo $output;
Not entirely sure that would work though.
dear @venutius
now i put
<?php
include(“header.php”);
$title = “TITLE”;
$output = str_replace(‘%TITLE%’, $title, $output);
echo $output;
?>
to entry.php and nothing effected, may be i’m not understand how it use.
so, i will try to study about your advice about 2 day and will report the result to you again.
Thank you very much.
dear @venutius
May be i done what my expected,
“google search” can understand title tag that i set from js.
document.title = ‘<?php echo strip_tags(mb_substr(bp_get_activity_content_body(), 0, 40)); ?>’;
and search engine can index website activity by activity
with title tage from first 40 charactors of ‘activity content body’
I’d like to say thank you to you again for taking the time to help me.