Closed (works as designed)
Project:
Node registration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2012 at 23:13 UTC
Updated:
19 Nov 2015 at 10:15 UTC
Jump to comment: Most recent
Comments
Comment #1
rudiedirkx commentedThere is a message for that. You can theme it by overriding
node-registration-message-registered.tpl.phpor preprocessingnode_registration_message_registered().Actually.., what "registration button" are you talking about?
Comment #2
iaminawe commentedSorry I mean for the registration link or form - once clicked and a user is registered when they visit the node again or are redirected back to it - the registration form or link is hidden as it it should be.
My question was instead of just hiding it - would it be possible to add a "You have already registered for this event" message where the link/form originally was.
Comment #3
rudiedirkx commentedThere's a Views field for that. Do you mean in a View? There's also a block that can contain that message. The node field (link) can't I think... That's the one you want? =)
Should be easy enough to make. You make it, I include it? =)
Comment #4
DanielWashbrook commentedI'm game to write it. Was looking for an easy way to tell if a user is registered for an event. Any thoughts?
Thanks for the module btw, tons of great features!
Comment #5
rudiedirkx commentedIt depends on how you want to show it. You can do a lot with Views only. Create a block with the current user (uid) and current node (nid) as arguments to get the current user's registration(s) for the current page/node. You can have that View show anything, even a 'No results behavior'.
It's still not a node field though... If you want that you'll need
hook_field_extra_fields()(or something) and use Node Registration functions like_node_registration_user_registered($node, $user). You can steal fromnode_registration_entity_view().Comment #6
o.feldmanis commentedI am lost right now. How to get the "Already registered" and other error messages for the user. What block is used for this?
Comment #7
rudiedirkx commentedThe normal messages are shown in the register form block if you don't have access (or another reason) AND have the checkboxes checked (default on). You can do (some) custom messages with a Views block. You can do all kinds of messages with a custom block (obviously), but that requires a custom module and coding.
Does that help any?
Comment #8
o.feldmanis commentedI have access (administrator) and have the check-boxes checked. Also I have included all the blocks from the node registration (Node registration: link to this page's form, Node registration: the cancel registration form for this page, Node registration: this page's form) none of them show any messages, error or confirmation.
I have searched through code for 'show_message_registered' or 'registration_success_message'. It is only saved, never called.
... maybe I am missing something?
Comment #9
rudiedirkx commentedIf you're debugging, this is where the checkboxes are used: http://drupalcode.org/project/node_registration.git/blob/refs/heads/7.x-... Let me know what you find.
Comment #10
rudiedirkx commentedAlso, try:
Relevant code starts at http://drupalcode.org/project/node_registration.git/blob/refs/heads/7.x-...
Comment #11
o.feldmanis commentedFirst I wanted to thank you for your quick responses!
I have found a solution, and (as always) it was my fault all along.
I made a custom theme from scratch and have forgotten to include the status messages in the theme!
As soon as I included the $messages in the page.tpl everything worked as it should.
It was nothing wrong with node registration all along.
Thank you, and sorry for the trouble :)
Comment #12
rudiedirkx commentedHaha no problem. Ciao
Comment #13
lucavox commentedI hide from my content type all the details.
And I created this view (block type).
If it could be useful