| View previous topic :: View next topic |
| Author |
Message |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jun 26, 2006 12:04 am Post subject: Hopefully my last question before deploying ... |
|
|
Is it possible to link directly to link from Mambo to add event?
I tried this http://box127.bluehost.com/~thecente/thyme/index.php?calendar=Add%20Men's%20Event&event_action=Add
but obviously this doesn't work.
I have built in a front end in mambo at
http://box127.bluehost.com/~thecente/sched/index.php
username tester1
password password
It takes you to a page to make a selection and the options you see are based on what user group you are in mambo (registered, author, editor etc.)
Right now I am forced to stop at the calendar view but I would rather go directly to add event for the specificed calendar.
I think this is my last question ... sorry for all the trouble and thanks for all the help. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jun 26, 2006 1:09 am Post subject: |
|
|
I am sorry ... really dumb typo on my part. Thanks for double checking and yes this does the trick just fine.
Thanks! |
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jun 26, 2006 9:33 am Post subject: |
|
|
Hi Again Ian ...
I do notice that although this works ... it always arrives at the add events page with the date set to January 12, 2006. Is there any way to have it start on current date? |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jun 26, 2006 9:56 pm Post subject: |
|
|
| Thanks! |
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jul 03, 2006 8:45 am Post subject: |
|
|
This little file isn't doing anything. I think I did it right ... I put it in the customize directory and saved it with php extension and also made sure that there were no hidden characters
I have been making stupid mistakes lately so I rechecked the code and location for about 30 minutes to make sure I was really having a problem before posting.
|
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon Jul 03, 2006 2:16 pm Post subject: |
|
|
Since you are using the locations mod it is not looking at it. I must have forgotten to add it in. Sorry about that. Just under:
$_cal_event->duration = "01:00";
Add
@include(_CAL_BASE_PATH_."customize/event_defaults.php"); |
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jul 03, 2006 5:55 pm Post subject: |
|
|
Thank you Ian.
I am not using the locations mod. It is seeing the file I have tested that. It just isn't doing anything to the date. |
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jul 03, 2006 5:59 pm Post subject: |
|
|
| When I tried it this morning it is now showing tomorrow's date which I can live with. I have no idea why it is working now but it is. Maybe it is some sort of caching thing. Anyway, thanks Ian. |
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jul 03, 2006 6:11 pm Post subject: |
|
|
| Sorry ... I just tried it again and it is back to showing the 12th of January. I have no idea why it showed tomorrow that one time. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon Jul 03, 2006 7:40 pm Post subject: |
|
|
Hi Jenn,
Could you post the code from your event_defaults.php file please? Leave out the <?php and ?> |
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jul 03, 2006 7:46 pm Post subject: |
|
|
Actually I was thinking about this ... you had a link to a way to pass the date in the URL. You were doing this from within PHP ... is it possible just to hard code the date into the url .. i.e. index.php?today'sdate&calendar= ... ?
Here is my code but maybe I don't need to do it this way if I can get the above working.
| Code: |
if(!$_REQUEST['m']) {
$_cal_event->starttime = _ex_localtime();
}
|
Thanks |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon Jul 03, 2006 7:52 pm Post subject: |
|
|
Sure, you can do this:
| Code: |
list($y,$m,$d) = explode("-",date("Y-n-j"));
echo("<a href='...&m={$m}&d={$d}&y={$y}..'>Add</a>");
|
|
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Wed Jul 05, 2006 8:10 am Post subject: |
|
|
| I was being lazy and hoping that I wouldn't have to do this from within php (it is a series of links on another page outside of Thyme) but I managed to do the echo and concatenate thing. Being a PHP newbie I was amazed that I got it to work! Thanks Ian! |
|
| Back to top |
|
 |
|