Can the update form also be added to the activity feed on home page

boplive
@boplive
9 years ago
345 posts
Just curios..i know we can add an activity feed to the home page..but can the update form itself be added to the activity feed to do updates on the home page or any other page...i tried it along time ago and it work or it looked like it work..but I no longer have access to tht coding of a update form tht I used awhile ago
updated by @boplive: 04/08/15 09:27:05PM
michael
@michael
9 years ago
7,719 posts
The issue your going to run into is that on the home page the users profile might or might not be set.

When the admin visits a profile, they take on that profiles id until they visit another profile. Same issue with people with more than one profile. Its expected that stuff will be added to profiles, not really the home site. You could try and get it to work like that by making sure there is a profile id set.

Its just not intended behaviour. Same with adding stuff. if you go from a location other than the users profile to /something/create you risk the profile id not being set and it appearing in a location you weren't expecting.
boplive
@boplive
9 years ago
345 posts
Yeah...i got you...i understand, when I tried the form on the home page a long time ago..i really didn't check around for any different behavior...i was kind of happy that it look like it worked..but truly maybe it didn't work...it populated on the home page but now I understand it may have not truly connected with the users profile..i never checked
Thanx Michael
michael
@michael
9 years ago
7,719 posts
In most cases its not going to be a problem because the user will have _some_ profile_id that belongs to them set. Its just going to be the rare cases, so test well on:
* just logged in and not visited a profile yet
* user owns two (or more) profiles

It was a while ago when I was looking at doing something similar and put this code in my template:
{if !isset($_user.profile_id) && isset($_user._profile_id)}
    {$_user.profile_id = $_user._profile_id}
{/if}
"If the user doesn't have a $_user.profile_id, then use the home one from their user account." It was needed for what I was fiddling with at the time, you'd need to test. Might not be needed, not sure.
boplive
@boplive
9 years ago
345 posts
I'll check it out tonight..now I'll just need to back track and see what form code i used on the homepage..can't remember if I got it from one of the profile templates in the earlier elastic skin months ago or from the earlier jraction modules template before all these updates..
Will keep you posted...thanx michael ;)
boplive
@boplive
9 years ago
345 posts
I'm gonna have to forget about this one..i tried a few ways and the action form is not displaying..everything else is ok...displaying the timeline activity on the homepage...just can't get the form to show
michael
@michael
9 years ago
7,719 posts
bump this tread on Wednesday. I'm in New Zealand right now but back in Tokyo on Wednesday. I'll setup a test structure when I get home. If you have the code where your at, that would make it easer to get set up. :)

Tags