Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 09:36 am EST

Geeklog Forums

Calendar - Eventeditor Modification


Status: offline

frasier

Forum User
Newbie
Registered: 08/18/05
Posts: 10
Hi,
I've modified the eventeditor.thtml form and used the "hidden" text fields and harmless defaults for fields that are required that I don't want displayed. This works fine for me as I don't need city, state, zip, and others. I would like to modify one of the fields (Title) to insert the current logged in users name. I tried the to guess what code to enter and this didn't work:

Text Formatted Code
<input type="text" name="title" value="$_USER['username']"
 


Anyone know what I should put there to get the current logged in username?
I have disabled personal calendars and have no submission queue.
Users are required members of a group so they can edit their own events.

Also, at the bottom of this same form (eventeditor.thtml) there are fields for group (a dropdown), owner, group, members, anonymous (these are all checkboxes). I would like to make these also "hidden" but can't seem to get it right. I could leave these on the form but I think it would only confuse my users (kids, mostly).

I hope my questions are understandable. Thank you very much for your help.

Lisa
 Quote

Status: offline

frasier

Forum User
Newbie
Registered: 08/18/05
Posts: 10
angelic
No ideas for either question? Crying or Very sad
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by frasier: Anyone know what I should put there to get the current logged in username?

You can't use PHP in the templates, so you would have to create your own template variable. Something like
Text Formatted Code
$event_templates->set_var('username', $_USER['username']);
 
in function editevent.

Quote by frasier: Also, at the bottom of this same form (eventeditor.thtml) there are fields for group (a dropdown), owner, group, members, anonymous (these are all checkboxes). I would like to make these also "hidden" but can't seem to get it right.

Check the HTML source for the event editor in your browser, then throw out the {permissions_editor} variable and replace it with your hard-coded hidden fields.

bye, Dirk
 Quote

Status: offline

frasier

Forum User
Newbie
Registered: 08/18/05
Posts: 10
Laughing Thank you so much, Dirk. I tried both of your suggestions and they worked!! You're wonderful! Smile
 Quote

All times are EST. The time is now 09:36 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content