DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • June 18, 2013, 12:10:50 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: 1 2 [3]   Go Down
  Print  
Author Topic: Need help with module  (Read 1096 times)
0 Members and 1 Guest are viewing this topic.
RaynDarren
Mod God
*****
Offline Offline

Posts: 639


View Profile WWW
« Reply #30 on: July 23, 2012, 11:31:10 PM »

case_tour
this is the nav to get to case_dorm
addnav("Dormitory","runmodule.php?module=dwellings&op=enter&dwid=1");


case_dorm
Code:
<?php
output
("You have a key! Please proceed to the dwelling");
$acctid $session['user']['acctid'];
$sql db_query("SELECT keyowner FROM " db_prefix("dwellingkeys"). " WHERE dwid = 1 AND keyowner = '$acctid'");
if (
db_num_rows($sql) > 0){

addnav("Dormitory","runmodule.php?module=dwellings&op=enter&dwid=1");
}
break;
?>

Logged

Brendan
I am Brendan.
Mod God
*****
Offline Offline

Posts: 823


View Profile
« Reply #31 on: July 24, 2012, 04:06:35 AM »

There should be a case "dorm": at the top
Logged
RaynDarren
Mod God
*****
Offline Offline

Posts: 639


View Profile WWW
« Reply #32 on: July 24, 2012, 10:25:29 AM »

There isn't a case "name here"; at the top of any of the other files... this one needs it though?
Logged

Brendan
I am Brendan.
Mod God
*****
Offline Offline

Posts: 823


View Profile
« Reply #33 on: July 24, 2012, 02:47:05 PM »

Can you attach the module
Logged
RaynDarren
Mod God
*****
Offline Offline

Posts: 639


View Profile WWW
« Reply #34 on: July 24, 2012, 04:21:21 PM »

Apologies for the delay, Smiley.

Thank you for all your help!
Logged

Brendan
I am Brendan.
Mod God
*****
Offline Offline

Posts: 823


View Profile
« Reply #35 on: July 24, 2012, 07:13:36 PM »

Edit case_enter.php

Add this..
Code:
<?php
$acctid 
$session['user']['acctid'];
$sql db_query("SELECT keyowner FROM " db_prefix("dwellingkeys"). " WHERE dwid = 1 AND keyowner = '$acctid'");
if (
db_num_rows($sql) > 0){

addnav("Dormitory","runmodule.php?module=dwellings&op=enter&dwid=1");
}
?>

Logged
RaynDarren
Mod God
*****
Offline Offline

Posts: 639


View Profile WWW
« Reply #36 on: July 24, 2012, 08:35:05 PM »

Did that, sitll doesn't work... there's no link on the server for the drom. It is my dwelling so I can't give myself a key. Could that be the issue?
Logged

Brendan
I am Brendan.
Mod God
*****
Offline Offline

Posts: 823


View Profile
« Reply #37 on: July 25, 2012, 01:49:52 AM »

Yes, i had that problem too but after creating a test account and giving them a key the link worked.
Logged
RaynDarren
Mod God
*****
Offline Offline

Posts: 639


View Profile WWW
« Reply #38 on: July 25, 2012, 03:53:29 PM »

Excelent! Thanks so much!
Logged

RaynDarren
Mod God
*****
Offline Offline

Posts: 639


View Profile WWW
« Reply #39 on: July 25, 2012, 05:35:32 PM »

when your calling it from another module do

Code:
<?php
$acctid 
$session['user']['acctid'];
get_module_pref("Name","MODULE_NAME",$acctid);
?>


So I did that and the link I put below it appears in the links no matter if the pref is true or false. What'd I do wrong now?

code I used:
{code}
$acctid = $session['user']['acctid'];
get_module_pref("sent","adoptapp",$acctid);
addnav("Continue","runmodule.php?module=agency&op=hall");
{/code}
Logged

Brendan
I am Brendan.
Mod God
*****
Offline Offline

Posts: 823


View Profile
« Reply #40 on: July 26, 2012, 03:58:54 AM »

Code:
<?php
$acctid 
$session['user']['acctid'];
if (
get_module_pref("sent","adoptapp",$acctid) == true){
addnav("Continue","runmodule.php?module=agency&op=hall")
}
?>

Logged
Pages: 1 2 [3]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
17 Guests, 1 User
Astarael|Jack
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search