Forum Replies Created
-
I just fixed this problem with a hack. My site functioned similar to the site described by Bbrian017
all of the time since requests come to the function bp_core_time_since(). I noticed the line in bp_core.php as follows:
$newer_date = ( !$newer_date ) ? ( strtotime( gmdate( ‘Y-m-d H:i:s’ ) ) + ( 60*60*0 ) ) : $newer_date;
all time since functions on my site operated normally except in site wide activity where all time was plus 7 hours. it was easy to see that I could subtract 7 hours by editing the ( 60*60*0 ) tho be ( 60*60*-7 )
This hack made the activity stream right on but replaced all the other times with the Use GMT Timezone statement. from this, the obvious hack is to copy bp_core_time_since() in its entirety and insert it just below the original the rename both lines in the function that read bp_core_time_since() to bp_core_time_since2(). this way I could keep the time adjustment for the activity stream without causing a failure of the other time since calculations that work correctly. After you have duplicated and renamed the function bp_core_time_since2, all that is left is to change the line in function 2 by your offset, in my case -7 so ( 60*60*-7 ) then change the function reference in
buddypress/bp-activity/bp-activity-templatetags.php look for line 299
function bp_activity_insert_time_since( $content, $date )
then line 306 and change bp_core_time_since to bp_core_time_since2
the end result is the code works for both after the hack
ok, figured out another hack to get post deletes working on 1.1.3 Please read all my other entries and follow the same precautions. I am as of yet completely baffeled as to why this is happening and even more baffeled as to why the fixes work. on my site I had three problems, all with the activity stream as follows. could not delete a post, could not use RSS on the activity stream and post times are off by exactly the number of hous my server is off GMT.
While I still believe these are all related in some wierd way, I have yet to discover it. my changes are just code hacks that can only be done when the installed system is known.
here is the fix for delete post:
Find this file
http://yourdomain/yourinstalledfolder/wp-content/plugins/buddypress/bp-activity bp-activity-templatetags.php
Find this line:
function bp_activity_delete_link()
6 lines below find this href statement segment
$bp->root_domain . ‘/’ . $bp->activity->slug . ‘/delete/
modify this seciton to this:
$bp->root_domain . ‘/buddypress/’ . $bp->activity->slug . ‘/delete/
by adding; buddypress/
this should fix the delete buttons on your activity stream itself and return you to the correct page after deletion.
Steve
PS please let me know how it works for you.
Ok, I am mistaken, the post above is incorrect. it is exactly the same problem for deleting posts. Someone on my site posted just as I deleted and i thought it was multiple records but a review of records shows that it was just the one I selectd.
So, a simple way to delete a post from the activity stream seems to be to change the url from;
http://yourdomain/installedFolder/activity/delete/38?_wpnonce=db334cffab
to:
http://yourdomain/installedFolder/buddypress/activity/delete/38?_wpnonce=db334cffab
this will delete the item and leave you at a blank page you can just then back out. I will look for the hard code changes to get you to the right page and make it so you do not need to alter the url.
Steve
The delete function is not working but don’t do this If you use the above logic and insert buddypress in the url called on delete, it deletes the whole page of comments. So be careful with that. It is obvious to me that the delete function is disabled by a call to the wrong virtual url. I will try to figure that out based on what I have learned.
Steve
I modified the define in Bp-activity.php and while it made the RSS function work on the sitewide activity it also made the other rss links fail. I suggest a patch in the code to allow immediate functionality while I look further for the complete solution.
Here is my suggestion. find: yourdomainsetup/wp-content/plugins/buddypress/bp-activity/bp-activity-widgets.php and download the file as a backup or keep a copy in the folder on your server with a slightly modified name so you can change it back if you have issues after this patch.
type this line into a web browser and see if it gives you your feed, change your domain and install folder to the values for your site;
http://yourdomain/installfolder/buddypress/activity/feed
if it does, tell the PHP code to call it as follows
go to the same file; yourdomainsetup/wp-content/plugins/buddypress/bp-activity/bp-activity-widgets.php
edit the statement line (should be line 23) in bp-activity-widgets.php
that reads;
href=”‘ . bp_get_sitewide_activity_feed_link() . ‘”
to; href=”http://yourdomain/installfolder/buddypress/activity/feed”
Please report back the success or failure of this procedure. It seems possible that the inability to delete entries on the activity widget could be related to this. I will keep looking.
If you see a mistake in my instructions please correct them.
document this edit for yourself in case you need to change it back at a later date
Steve
The virtual url call is incorrect. the main page calls http://yourdomain/installfolder/activity/feed and does not work. On my site the feeds work on the profile page and any member page but not the site feed.
If you call this url directly and get the feed; http://yourdomain/installfolder/buddypress/activity/feed
then changing the call will fix it. I will be back with that solution as soon as I have it.
well, on my site the url refers to a folder that is not there, investigating……