View Single Post
  #3  
Old 02-26-2009, 02:17 PM
Frank H. Shaw Frank H. Shaw is offline
 
Join Date: Aug 2007
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have been able to play with the function that I am calling here is as far as i have gotten so far on it.

Please review it and tell me what you think - how i am doing and is there a better way then what i am doing.

The function that is the first function does get called because I put some debuging in it so I know that happens so if have correct logic in my function then it should all work as I want it to.

But you say i can not do it from a templete form with out using js well i am using the onchange event and I hope the event is the best one for my purposes here.

Please explain more why you are saying what you said in your replay so that I understand what you mean.

This is what you said:

Quote:

You can not call a PHP function from a template. If you need a function to be processed you will need to write it in JS.
Here below is how far i have gotten so far.


PHP Code:

function trap_calandar_jump($jump)
{
    
$debugmsg $jump;       // This is my debuging stuff so i know the function does get called.
    
    
switch ($jump) {

    case 
1:
        
// Logic here  Jump drop down 1
         
$page $_GET["c"];
         
$url "http://www.burningtaper.org/forums/calendar.php?s=&month=3&year=2009&do=&c=" .$page;
         
ob_end_clean(); 
         
header("Location: " $url); 
        break;
    case 
2:
        
// Logic here Jump drop down 2
         
$page $_GET["y"];
         
$url "http://www.burningtaper.org/forums/calendar.php?s=&month=3&year=2009&do=&y=" .$page;
         
ob_end_clean(); 
         
header("Location: " $url); 
        
        break;
    case 
3:
        
// Logic here Jump drop down 3
         
$page $_GET["z"];
         
$url "http://www.burningtaper.org/forums/calendar.php?s=&month=3&year=2009&do=&z=" .$page;
         
ob_end_clean(); 
         
header("Location: " $url); 
        
        break;


}
//switch
    


If you look at back at the orginal post you will see that the use of the $_GET I can stuff the redirect with the value of the selected calandar ID because the value is in the $_GET for c, y, z, and only c is the orginal from the first jump_calandar.

You can see that the value is put in the $_GET because it is in the address bar of the browser.

Below is the url just a sample

PHP Code:

http
://www.mydomain.org/forums/calendar.php?s=&month=2&year=2009&do=&c=16&y=2&z=23 
So by doing a redierct and so that the target of the new url should make the correct calandar from the other two dropdowns.

Now if there is nothing in the way VB handles the going to the calandar in there logic to undo what I have done then this should work.

If any one know different and or knows of such logic that i would have to address or look at on this please let me know.

THANKS

Frank H. Shaw
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01178 seconds
  • Memory Usage 1,790KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete