EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 06-21-2009, 02:20 PM
Egladil Egladil is offline
A Young Mystail Rat
 
Join Date: Dec 2007
Server: Antonia Bayle
Posts: 4
Default 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.

Last edited by Egladil : 06-21-2009 at 02:53 PM.
Reply With Quote
  #2  
Unread 06-21-2009, 08:03 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

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.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.

Last edited by gm9 : 06-22-2009 at 01:58 PM. Reason: typo
Reply With Quote
  #3  
Unread 06-22-2009, 01:13 PM
Egladil Egladil is offline
A Young Mystail Rat
 
Join Date: Dec 2007
Server: Antonia Bayle
Posts: 4
Default

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.
Reply With Quote
  #4  
Unread 06-22-2009, 02:02 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

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.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #5  
Unread 06-22-2009, 03:32 PM
Egladil Egladil is offline
A Young Mystail Rat
 
Join Date: Dec 2007
Server: Antonia Bayle
Posts: 4
Default

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.
Reply With Quote
  #6  
Unread 07-24-2009, 05:11 PM
Egladil Egladil is offline
A Young Mystail Rat
 
Join Date: Dec 2007
Server: Antonia Bayle
Posts: 4
Default

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

Last edited by Egladil : 07-24-2009 at 07:08 PM.
Reply With Quote
  #7  
Unread 07-24-2009, 05:38 PM
lordebon lordebon is offline
Fetish Core author
This person is a EQ2Map developer.
Featured
 
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
Default

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.
__________________
Reply With Quote
  #8  
Unread 07-24-2009, 05:54 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

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
## '&amp;' ##
to the URL if that's what you are asking.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #9  
Unread 07-25-2009, 08:44 AM
lordebon lordebon is offline
Fetish Core author
This person is a EQ2Map developer.
Featured
 
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
Default

Quote:
Originally Posted by gm9 View Post
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
## '&amp;' ##
to the URL if that's what you are asking.
Ah. Back when I first used it it would work, but it would over-concatenate.

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.
__________________
Reply With Quote
  #10  
Unread 07-25-2009, 04:56 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Quote:
Originally Posted by lordebon View Post
IE doing A ## B ## C would end up with something like ABABC instead of ABC.
I think that is happening if you try to put a command on the same line as the concatenation, for example

say A ## B ## C

will probably output something like you said.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #11  
Unread 07-25-2009, 07:09 PM
lordebon lordebon is offline
Fetish Core author
This person is a EQ2Map developer.
Featured
 
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
Default

Quote:
Originally Posted by gm9 View Post
I think that is happening if you try to put a command on the same line as the concatenation, for example

say A ## B ## C

will probably output something like you said.
Yeah that's what I meant (and thus the OnHoverIn sets the variable and OnPress performs the command.
__________________
Reply With Quote
  #12  
Unread 07-26-2009, 01:21 PM
ObsidianDragon ObsidianDragon is offline
A Berserk Golem
 
Join Date: Aug 2005
Server: Oasis
Posts: 57
Default

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
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:26 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI