| View previous topic :: View next topic |
| Author |
Message |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jun 26, 2006 10:23 am Post subject: Having Something Not Show In Add Event |
|
|
I have modified functions.php below to include a link button
| Code: |
function _ex_custom1_section_header($text)
{
echo("\n");
echo("");
echo("");
echo($text);
echo("\n");
echo("\n");
}
|
Is there a way that I can modify the function to go like this ...
| Code: |
function _ex_custom1_section_header($text)
{
### Something goes here that says if event_action!=add then do this ...
{echo("\n");
echo("");
echo("");
echo($text);
echo("\n");
echo("\n");
}
###### else do this and then have the same code as above but without my button.
}
|
(My code is coming out looking weird in this posting but hopefully you will get the idea.) |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon Jun 26, 2006 11:26 am Post subject: |
|
|
Are you sure that this is the function you want? I think you may want _ex_..._content_title() What you may be better off doing is:
| Code: |
global $_cal_view;
switch ($_cal_view) {
case 'm':
case 'y':
case 'd':
case 'w':
# calendar views, do what everyou want
break;
default:
# do something else
} |
|
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Mon Jun 26, 2006 9:45 pm Post subject: |
|
|
The reason I wanted to use the section header function is that is where I placed the button.
http://box127.bluehost.com/~thecente/thyme/
I have a big "Add Event" button but I need it to go away in the Add Event view. Do you still think I am better off with the content_title function? |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon Jun 26, 2006 10:00 pm Post subject: |
|
|
| Maybe section_header would be better. It really depends on you. It does look rather large for where it is. |
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Tue Jun 27, 2006 3:10 am Post subject: |
|
|
Hi Ian,
The code you gave me works for the event view, I am sorry I wasn't clear what I want my big ugly button to go away while you are adding an event. I took a wild guess and tried to modify your code as follows but it didn't work so I guess I was way off.
Can you see what I am trying to do though?
| Code: |
global $event_action;
switch ($event_action) {
case 'Add':
##### do something etc etc ...
|
|
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Sun Jul 02, 2006 12:33 am Post subject: |
|
|
| Nevermind ... your code works. Thanks Ian. |
|
| Back to top |
|
 |
JennK
Joined: 16 Jun 2006 Posts: 108
|
Posted: Thu Jul 06, 2006 12:54 am Post subject: |
|
|
Hi Ian,
I re-used your code to not display the view tabs when in add event
| Code: |
function _ex_custom1_tabs($tabs)
{
global $_cal_view;
switch ($_cal_view) {
case 'm':
case 'y':
case 'd':
case 'w':
etc .... |
I want the tabs to be visible in admin view though is there another "case" that I need to add? |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Thu Jul 06, 2006 1:09 am Post subject: |
|
|
| Sure. case 'module' |
|
| Back to top |
|
 |
|