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 
custom header prev/next links? NEED HELP PLEASE!

 
Post new topic   Reply to topic     Forum Index -> Web site integration
View previous topic :: View next topic  
Author Message
dizmarkie



Joined: 25 Oct 2008
Posts: 6

PostPosted: Sat Oct 25, 2008 4:15 am    Post subject: custom header prev/next links? NEED HELP PLEASE! Reply with quote

Here is my problem.
I have a calendar in a page with ajax tabs using spry assets in dreamweaver. I am able to target the tabs and by passing a variable in an ahref link.

the problem is that my calendar is on tab#3 lets say and when I click the prev or next links in the header my page refreshes and goes to the default tab. Where can I added my variable url tab info "?tab=3#TabbedPanels1"

can I create me own custom next and prev buttions in the page and then just turn off the built in ones from the admin panel?

what would the url parameter be to see the next and prev months? so i can append my tab specific code so the use always stay on that tab when the page refreshes!!

any help please!
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5279

PostPosted: Mon Oct 27, 2008 5:42 pm    Post subject: Reply with quote

Hi,

Is the calendar is embedded in your page using code from Thyme's calendar publisher?
Back to top
View user's profile Send private message Visit poster's website
dizmarkie



Joined: 25 Oct 2008
Posts: 6

PostPosted: Mon Oct 27, 2008 6:52 pm    Post subject: Reply with quote

Yes it is, here is my code:

Code:
############################################################

# base path of thyme with trailing slash
define("_CAL_BASE_PATH_", "/var/www/vhosts/felinity.ca/subdomains/f2/httpdocs/admin/calendar/");

# base url for calendar, with trailing slash
define("_CAL_BASE_URL_", "http://f2.felinity.ca/admin/calendar/");

require_once(_CAL_BASE_PATH_ . "include/classes/class.calendar.php");

############################################################


$cal = new calendar();

# General
#############
$cal->set("calendar", 2); # feel felinity class schedule
$cal->set("week_start", 1);
$cal->set("hour_format", 12);
$cal->set("static", 1);
$cal->set("hil_day", 1);
$cal->set("hil_week", 0);
$cal->set("theme", "slate");
$cal->set("width", "800");

# Events
####################
$cal->set("event_links", 1);
$cal->set("e_typename", 0);
$cal->set("e_popup", 1);
$cal->set("e_n_popup", 1);
$cal->set("e_size", 0);
$cal->set("event_view_url", "http://f2.felinity.ca/studio_events.php?tab=3#TabbedPanels1?eid=%eid&inst=%inst");
$cal->set("show_events", 1);

# Time zone
###################
$cal->set("timezone", -5.0);
$cal->set("dst", 0);

# Header
##############
$cal->set("show_header", 1);
$cal->set("show_header_links", 1);
$cal->set("header_align", "m");
$cal->set("header", "Events in %month");
$cal->set("txt_next", ">>");
$cal->set("txt_prev", "<<");

# Month Views
###############
$cal->set("show_weeks", 1);
$cal->set("minical_date_url", "http://f2.felinity.ca/studio.php?tab=3#TabbedPanels1");
$cal->set("e_collapse", 0);

?>
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5279

PostPosted: Mon Oct 27, 2008 7:08 pm    Post subject: Reply with quote

Hi,

Try:

After this

$cal = new calendar();

adding this ...

$cal->register_persistent("tab", '3#TabbedPanels1');

Let me know if this does not work for you.
Back to top
View user's profile Send private message Visit poster's website
dizmarkie



Joined: 25 Oct 2008
Posts: 6

PostPosted: Mon Oct 27, 2008 8:43 pm    Post subject: Reply with quote

so close, great idea.
it did not work but i do see the string below in the status. you can see the page I am using it on here. http://f2.felinity.ca/studio.php?tab=3#TabbedPanels1

when the next or prev link is clicked, the page goes blank and none of the tabs are selected.

i really thought that was gonna work. you can see after you click in the url field at the top that the "#" symbol coverts to "%23". If i manually change back to "#" it defaults to the current month and doesnt work. You'll see what i mean.

I think we're on the right track here though.
i would even make links to the months if i needed to but i need the years to auto update.

i love the tool but would love it that much more if i could embed in spry tabs Smile
Back to top
View user's profile Send private message
dizmarkie



Joined: 25 Oct 2008
Posts: 6

PostPosted: Tue Oct 28, 2008 3:28 am    Post subject: Almost there! Reply with quote

Ok, so I am a newb and rely on server behaviours for my coding so I need anyone's expertise.

the way the page displays properly is in this format

Code:
m=12&y=2008&tab=3#TabbedPanels1


so what i need to do is append
Code:
&tab=3#TabbedPanels1


so a full url in my example would be http://f2.felinity.ca/studio.php?m=06&y=2009&tab=3#TabbedPanels1

at the end of the month and november values. The code you gave me before put it before the values. Do you know how I can append at the end like I listed above? If so we're in business and I know this will help out other users that reply on apps like dreaweaver for their development.

thanks and please please help me resolve, i can't sleep, lol.
Code:
Code:
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5279

PostPosted: Thu Oct 30, 2008 3:23 pm    Post subject: Reply with quote

Hi,

There is no way to get around the URL encoding of the hash. In this case we'll have to add it to the file include/classes/class.calendar_real.php. In lines 922 and 925 you will see where the links are printed. Append &tab=3#TabbedPanels1 to the end of each link.

Let me know if you have any trouble at all.
Back to top
View user's profile Send private message Visit poster's website
dizmarkie



Joined: 25 Oct 2008
Posts: 6

PostPosted: Thu Oct 30, 2008 3:34 pm    Post subject: Reply with quote

no luck Sad

unless I am placing in the wrong area.

here is the code

Code:
 $img_prev = "<a class='"._CAL_CSS_HEADING_."' href='". $back_link ."'>".$img_prev."</a> ";


I need this
Code:
&tab=3#TabbedPanels1
to appear at the end of the link or else it will not work. I tried putting in like you suggested but on the front end the "&tab=3#TabbedPanels" still appears in the URL before the month and year string.

it also generated on the front end "&tab=3#TabbedPanels1" along with ">>"

This is pretty much the end of the road for this problem though eh?
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5279

PostPosted: Thu Oct 30, 2008 4:02 pm    Post subject: Reply with quote

Hi,

Please change this:

Code:
$img_prev = "<a class='"._CAL_CSS_HEADING_."' href='". $back_link ."'>".$img_prev."</a> ";


... to this ...

Code:
$img_prev = "<a class='"._CAL_CSS_HEADING_."' href='". $back_link ."&tab=3#TabbedPanels1'>".$img_prev."</a> ";


.. the same with $img_next. Let me know if you have any trouble.
Back to top
View user's profile Send private message Visit poster's website
dizmarkie



Joined: 25 Oct 2008
Posts: 6

PostPosted: Thu Oct 30, 2008 4:08 pm    Post subject: Reply with quote

IT WORKED!!!!

thank you sooooo much.
Now that I know how to do this I am in love with you and this product.

I can fully integrate into my spry tabs!

woo hoo! and it is now defaulting to the first tab!

i can sleep now!

can you tell i'm excited. beers on me for everyone!

thanks so much!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Web site integration 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.