Sorry to bother you with this... some questions. I installed the flag module and flags are not appearing on nodes. I have enabled it for page, panels, userprofile, user nodes, & event... not seeing any flags on any pages. I need to have users flag user profiles using "advanced profile" module especially and also events. But flags are not displaying even on page nodes. I am using the "clean" theme.
Looking at this post:
should I go through this process adding the code to the module and also the theme? I upgraded to jquery 1 - no display, then to jquery 2 - and no display. I also upgraded to the dev version of the module and same result. Before I add the code listed on the other post to the module & template, maybe there is something I missed? If I have to add that code can you be more specific as to where in each file? The checkboxes are appearing, for example on "content types" and when creating a new node ("add to bookmarks") - the javascript is appearing in the header page code for pages and events but not the profiles.
Side note / different issue: "My bookmarks" is appearing in navigation menu for unregistered users as well.
Any assistance or recommendations appreciated.
Comments
Comment #1
quicksketchMaybe your theme isn't printing out any links at all (like "Add a comment" and "x Reads")? Flag's links should follow them. If the links are being printed anywhere, you might need to use that code Moofie posted in the other issue (actually this sounds like it might be the exact same request). At the same time, this request might need to be pushed to nodeprofile module, requesting that the links be printed out.
Comment #2
mooffie commentedPlease open a new issue.
Comment #3
typehost commented#1 quicksketch - you are right - I don't have any "add a comment" or "x read" - commenting is just added through the form. When adding the code listed on the other page, it would be good if the instructions are more clear.
Comment #4
mooffie commentedSo this issue is 'fixed', right? Please re-open if it isn't.
The "general audience" was not supposed to use that code. See explanation in a new issue, "a bad thing have happened":
http://drupal.org/node/280766
Comment #5
typehost commentedActually, I added that code and got the same mass of error listed on the other page - just the same. I plugged the print code into the template, and it is just displaying in the top corner with the errors. Trying to position the print code exactly in the template in every instance it is supposed to appear is probably not going to work well for me, as the automatic addition feature is really key to the module. You mentioned something about the template missing a node function, it seems a better idea to try to add that and get it working correctly. Any suggestions or pointing in the right direction to fix it would be great. Seems like a great module and we need it on our site, I am not sure if there are any alternatives.
Comment #6
typehost commentedIncidentally, I changed back to bluemarine and the bookmark links are appearing for pages and events without any problem, but not appearing on user profile nodes using "advanced profile" (which is what we really need to bookmark).
Comment #7
mooffie commentedUsing this attitude won't help you (or me understanding the problem).
If you get "the same mass of error listed on the other page" then it means you don't have a $node object in your template. The one-line code in that other issue is meant to be put in your 'node.tpl.php' (or similar).
I suggest you first try to make the flag link appear on a 'page' or 'event'. If you manage to do that, you know your code is ok. Then find out how/where to get at the $node object of your "advanced profile".
Comment #8
typehost commentedThanks for that: I put the code in the module & the one line in node.tpl.php and the links are displaying now on pages and events.
For Advanced Profile / userprofiles:
I put the same code in node-userprofile.tpl.php but no effect.
Advanced Profile is also using Panels2.
Comment #9
mooffie commentedFirst, try to put the following there:
What happens?
Comment #10
mooffie commentedJeffrey, I hope you didn't give up on this ;-)
This new function, _flag_create_link(), was just commited to the 'dev' version of this module.
I'll also write a book page describing "how to put a flag link anywhere", so I'm interested in how your user profile problem will be solved.
Comment #11
typehost commentedAll that is in node-uprofile.tpl.php is this code:
I put the line you listed before and after that but didn't see anything print with either method.
There is also an advanced_profile_userinfo.tpl.php which has the print code for the cck fields - when I added the original code to that the whole list of errors came up again. When I added the code you gave me last there, it printed nicely under the "online" status button in the user profile. So, maybe we are close. But note - it only printed "The node associated with this user is: " and not the node user id info.
I appreciate your assistance with this.
Comment #12
mooffie commentedI downloaded this 'advanced profile' (I'll use 'AP' for short), and rummaged in its files, but came to the comnclusion that we can use the help of its people.
This 'flag' module flags nodes. The various profile modules provide nodes.
What's needed is the code that gives you the user's node. This isn't really a 'flag' issue.
I suggest you open an issue, at AP's queue, and ask them how to get at the user's node, in a template. Don't mention the 'flag' module: it's irrelevant. (And please leave here a link to the issue you open.)
Lastly, are you sure you need 'flag'? I see that AP intergates with buddylist, and buddylist provides a list of users, doesn't it?
Comment #13
typehost commentedI am using advanced profile with node profile / user node - the display is with panels 2. Basically, we need users to be able to bookmark other users' profiles for a social network - that is part of the site's functionality. I saw on the previous post an issue with panels, waiting for a new version of that to come out, maybe that will fix it.
Comment #14
typehost commentedI've opened up a support request in the advanced profile issues for this question:
http://drupal.org/node/280987
Comment #15
typehost commentedIs it necessary also for a new issue on the menu question - I don't think we should have a display of "my Bookmarks" for unregistered users in navigation.
Comment #16
neyoung commentedit looks like typehost is running into the same problem I was with this issue http://drupal.org/node/279318. I was trying to add the link to a panels page (panels2 module) and he/she is trying to add it to Advanced Profile (which is a glorified Panels Page). From the research I've done and talking with sdboyer, Panels2 doesn't provide access to the $node object, which is why typehost and I both get the errors. Which is exactly what mooffie said :)
I assume that typehost tried to do what I did. Add a new "Custom content pane" to a panel and call the flag_create_link() function from within the custom content pane. This is a no go. sdboyer added a new content type for panels2 in the dev release that has a "Custom php content pane". Which I think would help us get access to the $node object via panels2's context system. But I don't know enough to do this.
However, I think that maybe an easier solution would be if there was a flag block. sdboyer should be asked about this, but I believe that any block that is available on a site can be dropped into a panel page as a pane. Next time I see sdboyer on irc I'll ask about this. If this is the case, then making a simple block that called the flag_create_link() function would work for typehost and I.
At any rate, this is all new to me so I'm not 100% sure of what I'm doing, but I'm trying to learn quickly :)
Comment #17
neyoung commentedtypehost... this should solve your problems!
http://drupal.org/node/279318#comment-930035
Comment #18
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #19
typehost commentedNeyoung
Thanks for that, but it did not solve my problem. I am looking to print an icon + "Bookmark this" on the Advanced Profile page, in the user info section below "Send PM" & "Add Buddy".
This is the code of the advanced_profile_userinfo.tpl.php file:
The link is not appearing that way - see also:
http://drupal.org/node/280987
Comment #20
sirkitree commentedSo what it looks like you're trying to do is to bookmark a user, correct?
If so, you need to have a flag that is a user flag, first off. Let's call if 'friend' for example. Then in your tpl file, when you use flag_create_link, you need to pass in the $account->uid.
Comment #21
typehost commentedActually, referencing the note on Views 1:
"Many Drupal 5 websites use modules such as Bio or Node Profile, that create corresponding nodes for users. So, instead of flagging users directly, you can flag these nodes. Views can easily produce a list of them.
In other words, if you're using Bio or Node Profile, and you want to flag users, make your flag of type 'Nodes'."
I want the same "bookmark" as applies to the other types to also bookmark the "user profile" (content type: uprofile) that is related to each user. We are using Bio.
Comment #22
sirkitree commentedAh, sorry for not reading the issue more thoroughly.
Are you sure that the $node object exists in the tpl? I don't see it listed in the available vars in comment #19. I would assume that it does, but just trying to think of the obvious.
Comment #23
typehost commentedHonestly I don't know about adding the $node object variable to the template or if there are other variables that need to be added. For example, in the above template, the "send PM", or "contact" links will appear if another user is viewing a profile, but not if the owner is viewing his or her own profile.
Comment #24
mooffie commentedtypehost,
See this new feature: #332956: Flag Ctools integration
Comment #25
mooffie commentedI'm closing this issue. #332956: Flag Ctools integration handles this.
As for having a $node variable pointing to your usernode/bionode/nodeprofilenode: you should ask this in the appropriate module's queue. "Advanced Profile"'s queue is also an appropriate place to ask this; however, you botched your question there by mentioning "Bookmarking"/"Flag", which is irrelevant.
Comment #26
mooffie commentedAlternatively, open a feature request against "Advanced Profile": "Have the usernode/bionode/whatever accessible in advanced_profile_userinfo.tpl.php".