So this is the project I am working:
I am creating a type of user dashboard that will show a map of nodes submitted but users with location lat/long info.
I want the map to only show what the current user has submitted and not what anyone else has submitted.
This is what I have done:
1. I am using the Google Maps API (not gmap) to produce the maps. I started with gmap but it didn't allow me to do everything I wanted.
2. I am populating the map with a geoRSS feed (using the location module) and would like to supply a feed based on the user that is logged in.
3. I created an RSS feed for "content type A" with views2. This works to the point of showing all published "content type A" nodes.
OK so here is where it gets tricky.
4. I want the "content type A" to only show up on the map if the currently logged in user is the author.
I tried to filter it by the currently logged in user but it displayed nothing on the map.
What I would like to do is set up individual RSS feeds per user . Something like this: mysite.com/username/feed/rss.xml.
I think this should be a pretty simple thing to do but I do not know how to do it in views. I will have many people using this site so the feed would have to be created automatically.
I was thinking about creating a taxonomy term for each user and using that as a filter but I'm not sure how to do that either.
Any point in the right direction would be greatly appreciated.
Cheers,
Latte/
Comments
* Bump * Any help would be
I figured out how to make an RSS feed based on the Current logged in user.
The rss feed is provided to the currently logged in user by creating a view and filtering it by current user and creating an argument for Uid and check Provide default argument and then select User ID from logged in user
The problem is that I am loading the feed into a .js file that does not know who the current logged in user is.
I am sooooo close and I still can't get it.
Any Ideas?
Cheers,
latte
I was so close to helping
I was so close to helping you until you mentioned javascript, sorry!
I believe you can pass the userid as a variable to your JS file, but exactly how this is done I can't help.
Javascript
Yeah this is the part that is driving me crazy. It needs to keep the session data so it knows who is logged in.
The code I am using is from Google Maps API and it is sitting in mysite.com/js. I am adding it to a block to generate the Google map.
----Javascript snippet----
var map;
var geoXml;
var markerState = 1;
var trafficInfo;
var trafficState = 0;
function gmap() {
if (GBrowserIsCompatible()) {
geoXml = new GGeoXml("http://mysitename.com/service_links/service_user.xml");
map = new GMap2(document.getElementById("map_canvas"));
//load the XML feed
map.setCenter(new GLatLng(49.496675,-102.65625), 3);
map.addControl(new GLargeMapControl());
map.addControl(new GLargeMapControl());
map.addOverlay(geoXml);
}
}
-------
I'm not a developer but I can usually hack my way through basic PHP and javascipt. This one really has me perplexed.
If it wasn't javascript,
If it wasn't javascript, what would have been your idea?
Ultimately I would like to do it this way. mysite.com/username/feed/rss.xml.
I think it is the most efficient way. I'm just surprised that this isn't already available in Drupal let alone D 6.x.
It would be a huge help if someone could come up with this. I'm sure a lot of people could use something like this.
Cheers,
Latte
Why?
Why isn't this functionality already in Drupal. User life stream or channel RSS feed.
It would just make thing so much easier.
Does anyone have any thoughts?
Cheers,
latte/
Create a user feed using Views 2
Here it is for anyone else looking for it.
Create a Feed display to show nodes by individual users, dynamically selected through the URL (hot!)
http://drupal.org/node/314097
I search and search and I finally (after 2 days) found this nice tutorial.
When I get home I will try it and let you all know if it works with what I am doing.
Cheers,
Latte/