Making buttons with (actions) scripts?

Hi all,

Is there a way to attach a script from and actions button to a home made graphic button?

 

I am trying to do away with some of the buttons in the action blocks and have bigger, easier to see buttlons instead. I can make the buttons mouseover etc, but one that I need to copy is join event script. When I go to edit the image for the button there is a field on the advabnced tab for popup, but nothing for script....

How do I get my new button (not in the actions block) to juse the script that the current join event action button has?

 

All help appreciated,

 

Nathan : )

Quote · 24 Sep 2012

mm, that's a good one, and a great idea!

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 24 Sep 2012

I am guessing you mean the join button in the actions block for an event.

It's a onclick javascript call. Most of these can easily be found with firebug. Or in the database. Not sure how you are currently looking it up, but there is script code for the button.

onclick="getHtmlData( 'ajaxy_popup_result_div_1', 'http://www.yourste.com/m/events/join/eventid/memberid', false, 'post');return false;"

getHtmlData is a function in dolphin that does a ajax call. In this case a ajax post to http://www.yourste.com/m/events/join/eventid/memberid

The results are returned and placed in the hidden div with the id of ajaxy_popup_result_div_1 that is what shows the message indicating your were joined.

Many of the action buttons do these types of ajax calls.




https://www.deanbassett.com
Quote · 25 Sep 2012

Thank You!

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 25 Sep 2012

Thanks Deano... Awsome,

 

I can usually trace down the scripts, my big problem is implementing them. I can create a graphical button but cancan not se any fields on the image tabs to link it to a script......

 

Anyone?

Quote · 25 Sep 2012

ok, so I got this to work. You have to paste the code into the html of the button...

 

It joins me to the event but when the popup says you have "joined the event" it is displayed under the actions block. is there any way to make this display near the graphic button or in the middle of the page?

 

It is awsome and will make the site much easier to use.

 

Thanks,

 

Nathan

Quote · 25 Sep 2012

 

ok, so I got this to work. You have to paste the code into the html of the button...

 

It joins me to the event but when the popup says you have "joined the event" it is displayed under the actions block. is there any way to make this display near the graphic button or in the middle of the page?

 

It is awsome and will make the site much easier to use.

 

Thanks,

 

Nathan

 I thought i explained that, but i will try again. This script.

onclick="getHtmlData( 'ajaxy_popup_result_div_1', 'http://www.yourste.com/m/events/join/eventid/memberid', false, 'post');return false;"

The 
ajaxy_popup_result_div_1 is the div the return message is placed in. It is a hidden div style=display:none

To change where the message is displayed, create yor own div where you want the message displayed.

Example:

<div id="my_message_div" style="display: none;"></div>

Then change the script to point to it.


onclick="getHtmlData( 'my_message_div', 'http://www.yourste.com/m/events/join/eventid/memberid', false, 'post');return false;"


https://www.deanbassett.com
Quote · 25 Sep 2012

Thanks deano... I am working on it...... this is my first time, I am a div virgin lol... but I am soooooo glad to get the button working at all lol...

Quote · 25 Sep 2012

Sorry guys,

 

It works fine for the event on which I took the code, but not other events. This is the code i pasted into the button that is now on the events view page. Obviously the problem lies with the eventid/memberid part.

 

How can i make this so that it picks up which event and user it is so that it will work for any event?

onclick="getHtmlData( 'ajaxy_popup_result_div_3', 'http://globaldancenetwork.com/m/event/join/3/19', false, 'post');return false;"

Quote · 26 Sep 2012

where you putting the code? in a html or php block?

so much to do....
Quote · 26 Sep 2012

in a html block. It is within the html of a graphic button. The idea that i can put the button (which is large and obvious) at the top of the event view page....

 

I think the join event in actions is small and unobvious. I want to make everythign on my site one click simple to use and this could help that.

Quote · 26 Sep 2012

open phpmyadmin->sys_page_compose and edit the your html block.
Put "JoinEvent" in FUNC field replacing "Echo"
Now open modules/boonex/events/classes/BxEventsPageView.php and put this just after the BxEventsPageView() constructor function.

function getBlockCode_JoinEvent() {$iLoggedId = getLoggedId();$iEventId = $this->aDataEntry['ID'];return '<button onclick="getHtmlData(\'ajaxy_popup_result_div_3\', \'http://globaldancenetwork.com/m/event/join/'.$iEventId.'/'.$iLoggedId.'\', false, \'post\');return false;">Join Now</button>';}

Clear cache

and now you can dance :P

so much to do....
Quote · 27 Sep 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.