Hi,

I need to theme the RSVP pages

I would like to theme the RSVP pages and move the menus, theme the like I can do on the view pages.

How can I do that? is it in the rsvp.theme file? I don't have to mofify the RSVP module in order to control output placement do I?

Thanks,
Chris

Comments

owahab’s picture

Version: 5.x-1.5 » 5.x-1.x-dev
Priority: Critical » Normal
Status: Active » Fixed

Hi Chris,

You don't have to modify rsvp.theme in order to theme some output. You just need to override the original function by which RSVP themes output.

Please go through http://drupal.org/node/55126

socialnicheguru’s picture

Title: Themei the RSVP pages (/rsvp, /rsvp/manage, etc) » Theme the RSVP pages (/rsvp, /rsvp/manage, etc)
Status: Fixed » Active

Ok. Can you let me know if I am on the right track with my thinking here?

Here are some tangible examples of what I want to do:

1. I want to move the directory 'user/'. $user->uid .'/rsvp' to 'user/rsvp''/. $user->uid.

The original function is function rsvp_menu($may_cache) .

So would create the following with my zen theme to do this?
function zen_rsvp_menu($may_cache)
Copy the entire function and make my slight edits

Is this thinking correct?

2. I want to add the ability for a member to get points if they said yes to an RSVP.

would I overwrite function rsvp_set_invites($attendees, $rid, $bdy) with function zen_rsvp_set_invites($attendees, $rid, $bdy)

and add something like this:

$user = _rsvp_check_user_email($email);
userpoints_userpointsapi('points', $points, $user->uid, 'invite To Event ');

4. I want to change the actual look and feel of pages defined as functino theme_rsvp... in rsvp.theme i can. But this is more of a styling layer correct? I should try to theme the content iin function theme_rsvp_invites for example by creating zen_rsvp_invites?

Should I try to avoid php coding in the theme_rsvp... functions?

I am new to this concept so I want to make sure that I do it the right way.

Chris

socialnicheguru’s picture

Hi,

after taking a look at the rsvp module. there are several places where either "content" or "output" are defined. I need to theme these. So other than going into the module and making modifications how can I do this.

chris

owahab’s picture

Status: Active » Fixed

Drupal theming mechanism allows you to override functions declared by RSVP module.
For instance, theme('rsvp_invite_mail', $invite) will mean that the following functions will be "suggested" to handle the output of the $invite object:
#1 themename_rsvp_invite_mail($invite)
#2 phptemplate_rsvp_invite_mail($invite)
#3 theme_rsvp_invite_mail($invite)
The functions will be "tried" from top to bottom until one of them is found to be declared.

So you may simply copy the function theme_rsvp_invite_mail() to your theme's template.php file, rename it and modify the output.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

socialnicheguru’s picture

Status: Closed (fixed) » Active

OK so to be specific, I want to be able to theme the page

/rsvp

/rsvp/manage

I understand how to theme the mail that goes out.

But I don't know how to theme the acutal drupal pages. those pages don't seem to have a Drupal theme function so that I can actually retheme them.

Is that correct?

owahab’s picture

Category: support » feature

True.

This will be more of a feature request.

socialnicheguru’s picture

i will write up what I am looking for as a feature request... could I help sponsor the dev to move it along?

owahab’s picture

Yes, sure.

duaelfr’s picture

Status: Active » Closed (won't fix)

This version of RSVP is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.