The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
I have done all i can do to modify the templete calandar_jump to the gobutton
I might be off the wall but here is my trouble:
In the templete that calls this function "trap_calandar_jump" the templete part that does the calling is below: PHP Code:
How do I make this work? I created this function in the php file function_calandar.php PHP Code:
} The templete that is used in the calandar in vb calandar which is where I try everything - PHP Code:
That sames to work except for the thing before when the user selected a option in the drop down because the onchange event caused the auto press of the go button. Now that I have added the second function to the onchange event that functionlty is lost and the user has to press the go. How can i do both call the function and the action of pressing the go button with the user having to press it. If you have been following some of my post you will know that the templete calendar_jump above is not the whole thing and in my case i am using any number of jump calandar dropdown in the form. I have simplefied the templete so as not to confuse the issues and what i am asking here. THANKS Frank H. Shaw |
#2
|
|||
|
|||
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.
|
#3
|
|||
|
|||
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:
PHP Code:
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:
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 |
#4
|
||||
|
||||
You are calling "$_GET" as a function, and passing a parameter to it. Use square brackets to get array values.
You need to use a forward slash on the end BB Code (e.g. [/php]) - this is starting to get really annoying. |
#5
|
|||
|
|||
I reakky did not see the fact that I had ( ) unstead of the array [ ] that was due to the fact my eyes are not the greatest - I do not know why the PHP compirer did not throw a error.
I have coreeted the and now the script code is indeneted as you say is easyer for you to read. Now that I have corrected my errors that had in my script I still need the question answred that I asked in the first place - would you kindly review my questions and see if you can follow what i am asking and answer some of the questions. THANKS Frank H. Shaw --------------- Added [DATE]1235766032[/DATE] at [TIME]1235766032[/TIME] --------------- I have simplfied the select so that i am only want to call the functon on a onchange event from a templete and it seems that my function is never getting called and I thought it was. So i am regressing to ask this lets start over in the Jump_Calandar the templete that comes out of the box with the product unmodifyed. I need to take the "this.form.submit()" which is the thing that happens when the user makes a selection in the dropdown Jump_Calandar now unstead I want to call a function from my templete so the function is called "trap_calandar_jump('1')" At first i thought that i would be able to attach to functions to the onchange event but now I realize that my actual function never gets called so before i can even attempt having two functions i need to get the calling of my function to work first. {I do not even now if it is posiable to call two function from the onchange event} So what do I have to do to setup my function and get to call the function from the onchange event from the templete Jump_Calandar? Please explain step by step what needs to be done! PHP Code:
PHP Code:
PHP Code:
Here is the actaul one the change Jump_Calandar that I changed drasticly as you can see so you have a idea what i am trying to do I might be using the wrong event but i felt the onchange event was my best choice. PHP Code:
I hope this makes more sence and you can follow what i am asking. Most inport thing is to be able to call the function from the templete with the onchange event or when a selection is made on the dropdown and then if the function can cause the $gobutton get pressed by doing that inside the function that would be also ok in fact might be the best way to do it. Please note: The key is that I not only need to call the function from the templete but need to pass a value so the function can parse the value passed. Look at the actual function in the function I need to do a redirect do not know if my redirect is working or will even work until i get my function calling to work in the first place. But if I get all the redirect to work is there any thing in the vb calandar php scripts that will pervent or override what i do if there is please explain what i need to look at or consder. THANKS Frank H. Shaw --------------- Added [DATE]1235766502[/DATE] at [TIME]1235766502[/TIME] --------------- Quote:
But now you shoud be able to read my post and answer some if not all my questions THANKS --------------- Added [DATE]1235773113[/DATE] at [TIME]1235773113[/TIME] --------------- If i can not use the onchange event to call my user defined function can I use the onclick event to call my user defined function from a templete. What i have to do is be able to modify my templete above so that it will call my user defined function so that my user defined function can parse the argument pass it and that value based on some logic do a redirect to bring up a different calandar. THANKS Frank H. Shaw --------------- Added [DATE]1235777509[/DATE] at [TIME]1235777509[/TIME] --------------- The following : I am trying to call a my own user defined function to parse a value passed to the user defined function and i am haveing a hard time figure out this here is my leastest attemp at this. I tried to do it a a hidden field but that will not work either before i treid to do it as a onchange event that did not work either could some one help me understand what i do not understand. Is there a file i need to be looking at beside the two files i have now calandar.php and function_calandar.php? Here is my latest attemp at this. Was i closer doing it using the onchange event or is the way the onclick event and can some one give me a clue or example of what the templete should look like for doing this. The below has a hidden field called me this field i am trying to figure out what select was did the user press to so that I can handle that in my user defined function? PHP Code:
Frank H. Shaw --------------- Added [DATE]1235783480[/DATE] at [TIME]1235783480[/TIME] --------------- I need to be able to disquegest the select that user used to make the selection so that I can redirect the user to a different calandar then the one that comes up. The trouble is very simple the first select is over riding the other two select and so when the user makes a selection in the jump_calandar I need that commucated back to the calandar.php. I have been able to pass the value in the c, y, z as explian and shows up in the $_GET['c'], $_GET['y'], and $_GET['z'] and this is in the address bar of my browser but it takes the first on and forgets about the others. This is probley due to some logic in calandar.php that looks only at the 'c' in the $_GET now if i can find that logic i miight be able to modify it to handle the other values in the $_GET but I have not found any way to tell me which select that the user made a selection on which dropdown. Any ideas of how to do this will solve my problem in a nut shell. THANKS Frank H. Shaw --------------- Added [DATE]1235792235[/DATE] at [TIME]1235792235[/TIME] --------------- I realized the gobutton is defined somewhere and i change the gobutton to make each one different so when one press each one maybe i can tell which one was pressed but when i did this i realized that it is defined somewhere and need to ask where that is? My thought is if i can change the buttons go to a little different then maybe i could tell in my script which one was pressed. {which is all i am trying to do in the first place}. THANKS Frank H. Shaw |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|