Author |
Message |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Sat Jun 06, 2009 9:58 pm |
|
Working on something I would like to redistribute someday, and need to find a replacement for a script that has licensing restrictions, Shadowbox. More specifically, just need to find a replacement for one task it performed, a JS function that pops up a modal window, like so:
html
Code:<a class="option" onclick="demoMessage();">Script-triggered Message</a>
|
js
Code:function demoMessage(){
Shadowbox.open({
player: 'html',
content: '<div style="text-align:center;padding-top:10px;">You\'re using <a href="http://www.shadowbox-js.com">Shadowbox</a>!</div>',
height: 100,
width: 200
});
}
|
as used on the Only registered users can see links on this board! Get registered or login!
I was hoping to use Only registered users can see links on this board! Get registered or login! to perform that task (since it will be used in nukeNAV) but I can't seem to get it.
Will probably also be using Only registered users can see links on this board! Get registered or login! so that I can format the URL's like so
Code:<a class="option" href="demomessage.html" onclick="demoMessage();">Script-triggered Message</a>
|
which allows it to degrade to a standard link if js disabled.
I'm using this for a small inline function, because I don't want the content in a hidden div on the page... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Sun Jun 07, 2009 8:33 am |
|
You are correct. It appears that this modal doesn't have this functionality. What do you have against hidden divs? The only draw back I really see is that if you want to use this script on different pages. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jun 07, 2009 9:18 am |
|
I didn't want to use a hidden div because the content contains a bunch of smilies, and would rather reload a small function on every page than a bunch of http requests... I know some browsers don't load hidden content, but others do.. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jun 07, 2009 11:47 am |
|
Yeah that is what I was worried about you want to use it on multiple pages. Its not very friendly that way. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jun 07, 2009 11:50 am |
|
Can you just have them in a separate file and use an iframe? I know colorbox has this option. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jun 07, 2009 2:24 pm |
|
yes i suppose that's possible, although it gets a little more complicated because it needs to interact with a textarea on the parent page. I'll do some research ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jun 07, 2009 2:35 pm |
|
I wasn't sure of what kind of "interaction" you are doing. It might be just better to look for an alternative plug-in. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sun Jun 07, 2009 2:47 pm |
|
You say you are using the smilies to interact with a text area?
Why not create a customs toolbar in fckeditor.js (disable everytthing except the smilie button) and use that? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|