Home · Links · Contact Us
Home arrow Forums
Home
Features
FAQ
Screen Shots
Modules
Themes
Demos
Documentation
Forums
Contact Us
Download
Purchase
Quotes

" ... I want to tell you that your thyme product is functional and valuable beyond words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."

" ... Thanks for such a complete project, its making my job much easier. ..."

" ... I have now deployed 4 different calendars and our users love them ... "

" ... Easy to install and use and a great look/design. ..."

" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."


  FAQFAQ    SearchSearch  RegisterRegister   Log inLog in 
Having Something Not Show In Add Event

 
Post new topic   Reply to topic     Forum Index -> Hacking Thyme
View previous topic :: View next topic  
Author Message
JennK



Joined: 16 Jun 2006
Posts: 108

PostPosted: Mon Jun 26, 2006 10:23 am    Post subject: Having Something Not Show In Add Event Reply with quote

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
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Mon Jun 26, 2006 11:26 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
JennK



Joined: 16 Jun 2006
Posts: 108

PostPosted: Mon Jun 26, 2006 9:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Mon Jun 26, 2006 10:00 pm    Post subject: Reply with quote

Maybe section_header would be better. It really depends on you. It does look rather large for where it is.
Back to top
View user's profile Send private message Visit poster's website
JennK



Joined: 16 Jun 2006
Posts: 108

PostPosted: Tue Jun 27, 2006 3:10 am    Post subject: Reply with quote

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
View user's profile Send private message
JennK



Joined: 16 Jun 2006
Posts: 108

PostPosted: Sun Jul 02, 2006 12:33 am    Post subject: Reply with quote

Nevermind ... your code works. Thanks Ian.
Back to top
View user's profile Send private message
JennK



Joined: 16 Jun 2006
Posts: 108

PostPosted: Thu Jul 06, 2006 12:54 am    Post subject: Reply with quote

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
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Thu Jul 06, 2006 1:09 am    Post subject: Reply with quote

Sure. case 'module'
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Hacking Thyme All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2005 eXtrovert software unless otherwise noted. All rights reserved.
Portions © 2004 Ben Brown. All rights reserved.
Trademarks are property of their respective owners.