DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • August 20, 2019, 11:11:15 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Need to create a popup form.  (Read 4671 times)
0 Members and 1 Guest are viewing this topic.
Dannic
Guest
« on: September 09, 2005, 07:02:41 PM »

Need to create a popup to insert terms and agreements.  I have done this in the past with a rules module I made but it required a seperate file in the root directory for the game.

Is there anyway to force this through a module without another file?
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #1 on: September 09, 2005, 07:06:16 PM »

Like, an addnav that will bring up a popup?
Code:
addnav("Terms and Agreements","runmodule.php?module=terms&op=popup",true,"500x300");
In there, have a checkbox, pass it through an httppost and if successful, set a pref to make the link not show anymore. With that, you will also need to use popup_header/footer for the popup.
« Last Edit: September 09, 2005, 07:06:56 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Dannic
Guest
« Reply #2 on: September 09, 2005, 07:09:02 PM »

Yeah. I know all the rest of it.  I just need to open a popup to display terms.

Since the players aren't logged in at this point that doesn't exactly work the way I would like.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #3 on: September 09, 2005, 07:18:53 PM »

You can still have stuff display, despite a person being logged in or not, you just need to have in the moduleinfo:
"allow_anonymous"=>1,
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Dannic
Guest
« Reply #4 on: September 09, 2005, 07:20:15 PM »

Its not on the index page. This is on the create page.

Code:
if(get_module_setting("requireterms")){
            rawoutput("<input type=\"checkbox\" name=\"terms\" />&nbsp&nbsp");
            $terms = translate_inline("Terms and Agreements");
            output("I have read the ");
            rawoutput("<a href='runmodule.php?module=creationaddon&op=terms'>$terms</a><br><br>.");   
            addnav("","runmodule.php?module=creationaddon&op=terms",true,"500x300");   
         }


Both

Code:
define("ALLOW_ANONYMOUS",true);
define("OVERRIDE_FORCED_NAV",true);

are defined so it should allow the module to run while the user is anonymous.  So I must have something wrong here.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #5 on: September 09, 2005, 07:21:50 PM »

Code:
rawoutput("<a href='runmodule.php?module=creationaddon&op=terms' onClick=\"".popup("runmodule.php?module=creationaddon&op=terms")."; return false;">");
« Last Edit: September 09, 2005, 07:22:18 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Dannic
Guest
« Reply #6 on: September 09, 2005, 07:32:57 PM »

I have no idea what you are trying to do there.  none of that will work.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #7 on: September 09, 2005, 07:34:03 PM »

Place that anchor tag around your $terms, and it should work, creating a popup from a link.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Dannic
Guest
« Reply #8 on: September 09, 2005, 07:35:47 PM »

I've tried several variations on this.  it errors out.

This was the last one i tried since.

Code:
rawoutput("<a href='runmodule.php?module=creationaddon&op=terms' onClick=\''".popup("runmodule.php?module=creationaddon&op=terms").">$terms</a><br><br>.")
« Last Edit: September 09, 2005, 07:36:48 PM by Dannic » Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #9 on: September 09, 2005, 07:47:47 PM »

I was just testing, so don't mind the text in there... but I can't get it into a sized window... I can only get a new window:
Code:
         rawoutput("<input type=\"checkbox\" name=\"terms\" />&nbsp&nbsp");
            $terms = translate_inline("Terms and Agreements");
            output("I have read the ");
            rawoutput("<a href='runmodule.php?module=contest&op=pop' target='_blank' onClick='".popup("runmodule.php?module=contest&op=pop","500x300")."; return false;'\">$terms</a><br><br>.");  
            addnav("","runmodule.php?module=contest&op=pop",true,"500x300");
         break;
      case "pop":
         popup_header("Butt");
         output("anus");
         popup_footer();
         break;
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Dannic
Guest
« Reply #10 on: September 09, 2005, 07:53:57 PM »

alright.  got the new window and the right size.  now to get it to output the text I want while not logged in.  
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #11 on: September 09, 2005, 09:23:49 PM »

You should set
Code:
"override_forced_nav"=>true,
in your *_get_module_info() Smiley
Or you'd have to use addnavs... :p
Logged

Running for more than three years now:
Dannic
Guest
« Reply #12 on: September 10, 2005, 07:51:12 AM »

it was actually
Code:

"allowanonymous"=>true,


That I was missing.
Logged
JollyGG
Mod God
*****
Offline Offline

Posts: 607


Jolly Good!


View Profile WWW
« Reply #13 on: February 04, 2009, 12:15:04 AM »

love the description...I d/led it Wink
Logged

Senior Staff Coder to: RPGLink
Supporter of: Forbidden Realm and LotGD4Adults2.
Released Modules: Here
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
89 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search