Closed (won't fix)
Project:
RSVP
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 May 2008 at 02:31 UTC
Updated:
3 Feb 2013 at 17:51 UTC
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
Comment #1
owahab commentedHi 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
Comment #2
socialnicheguru commentedOk. 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
Comment #3
socialnicheguru commentedHi,
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
Comment #4
owahab commentedDrupal 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.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
socialnicheguru commentedOK 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?
Comment #7
owahab commentedTrue.
This will be more of a feature request.
Comment #8
socialnicheguru commentedi will write up what I am looking for as a feature request... could I help sponsor the dev to move it along?
Comment #9
owahab commentedYes, sure.
Comment #10
duaelfrThis 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.