![]() |
call of external php skript to export guild event list
I don't know if something like this has allready been developed, id so it would be nice if I could get a hint where to look for it.
What I want to do is, to have an additional button in the Guild window event list (either for each event or under all events), with which I can copy the content and send it via a post command to a php script on my webserver that will than put these entries in a database to be shown on our guild website. It would not be big issue, if the internal browser would have to be used to reach this goal, but better way would be a direct call of the php file on the remote server if possible somehow. I allready worked with the guild window little bit, and I found out allread how to put an additional button under the whole list, but I donīt know how to call now the exteral php skript via the onpress method. The Data theat should be inluded in the transfer to the php script is the date, the type of event and the event itself. If I have to go through the browserwindow I would like to know how the data from the guildevents can be saved into a variable tht I can pass to the html form to be send to the server. Another possibility would be just adding the data behin the call of the script as otpions, but this would limit the tranfer to one event what ould lead to a lot of browercalls if there has not been an update of the serverdatabse for some days. I hope tht I could mke clear what my purpose is and what kind of solutions I was allready think about. Unfortunatly I am quit a noob on XML so that ther might be an easy solution that I could just not find by now. For ny help, comment or solution I would be very pleased. |
If you want to run it as an automatic script then adding it as parameters to the URL (i.e. an HTTP GET) is your only option, there is not way to script an HTTP POST method from the UI. Your only other option is to have your script output everything to your chat window and then upload your chat log to your server and let your php script parse it.
|
Thank you for your input. That was allready what I thought would be the answer. So I will try to make it done bythe Get Method and not uploading the whole eventlog but only event by event. Is there any way to call a PHP skript from the UI without opening the internal browser (or at least open it invisible and close it directly afterwards). Sorry for my many questions but as I am really new to this issue I am struggling quite a bit with the XML Syntax.
|
Not sure what you were thinking off how you would like to connect to your php if not via http (shell access?). Anyway the answer is no, you need to run it through the browser but you can do it transparently to the user.
|
So that seems enough information for the first run (as I hope). So I will give it a try to modify the default guildtemplate to call the internal browser to post the data. Perhaps I have to ask some more questions, but I allready found some similar examples that I could grap anf modify in orer to reach the desired goal. The PHP file should be quite easy to prgramm, as it just has to innsert the transfered data to a database (and check if this entry was allready submitted).
As soon as I have some results I will post them here for additional comments. |
Having tried to get this problem solved for weeks now, I did not come to the solution and so I have to ask for some help again.
I have allready found out that the desired changes have to be made in the eq2ui_event_template.xml and the values I want to access to post them as part of the URL are: $Type$; $Text$ und $Date$. But I have some Problems accessing them in the call of the browserwindow. this is part of the call procedure: <Button LocalTooltip="Insert into Guild Homepage" Location="166,0" Name="Upload" OnPress="OthURIString='http://test.com/guildevents.php?' ## ?????? (here I have the problems) browser OthURIString" PackLocation="fff" ScrollExtent="24,16" Size="24,16" Style="/ButtonStyles.find.style" /> I hope that anyone can give me a helping hand with this issue. Another problem I might run into is, that I have to add connectors between the different values to add to the database by using "&" how can I add this between the values as somehow this does not work in my trials (the url works quite fine). Thanks in advance |
You're going to have build the command first, at least unless the concat function changed.
IE you'll have to do OnHoverIn="OthURIString=' blahblahblah ' ## whatever" and then do OnPress="browser OthURIString" I'm not sure how you'll reference the events though. I haven't really looked at that window, but you may have issues trying to get an individual event, as I recall its templated rather than dynamic-data based. |
Concat works with direct references Lordebon, and you can also access individual events from that table. I had a window which exported the most recent n events, not sure if I never released it.
For the & character add ## '&' ##to the URL if that's what you are asking. |
Quote:
IE doing A ## B ## C would end up with something like ABABC instead of ABC. It was weird, but doing the concatenation in an OnHover and saving it as a variable and then calling that variable later in the actual OnPress didn't do that. They might have fixed that issue, though. |
Quote:
say A ## B ## C will probably output something like you said. |
Quote:
|
Oooo! If someone has code for an export to text for guild roster and/or one for n number of events I would love to get a copy of it. (The only XML I know is from looking at and copying from other peoples' scripts). Would love to be able to get the text of events and roster either into a copyable textbox or clipboard, if either is possible.
Thanks in advance if anyone has anything that could help me, and I apologize for the hijack, but this sounded very much like something I've wanted for ages :) |
| All times are GMT -5. The time now is 11:06 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI