Guild recruitment block and Application modules

phpNuke integration forum

Re: Guild recruitment block and Application modules

Postby Fanatic » Fri Apr 13, 2007 6:31 am

Hmm it seems when I get the block file in the correct folder it makes my "add new block" button not function, when I click "add new block" I just get a white page. Coud this be because my nuke version is not compatible with this file?

Also I noticed in the readme:

Run the database setup file to create and populate the table required:

http://www.yoursite.com/modules.php?nam ... ecruitment

are those instructions out of date? I dont believe there is a file with that name anywhere in the download package. Is it completely nesessary to have this mod setup in the database?

Thanks again for your help, hopefully I get this working soon
Fanatic
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Thu Apr 12, 2007 2:55 am

Re: Guild recruitment block and Application modules

Postby opiespank » Fri Apr 20, 2007 12:31 am

Quick question. I got the Module loaded and I see the config part, but all it has is drop down buttons. I can not make any changes to the recruitment.

Also, is there a spot where I tell it what my DB is? Meaning what Database and what Username and pass to use to connect to it.

Edit...

got it figured out. Instead of manually adding the table, I just used the php script. Seems to be working now.
Last edited by opiespank on Fri Apr 20, 2007 12:39 am, edited 1 time in total.
opiespank
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Fri Apr 20, 2007 12:29 am

Re: Guild recruitment block and Application modules

Postby Unicornasaurus » Thu Apr 26, 2007 4:23 pm

Alright. I got this installed and everything, and it works flawlessly except for the fact that I don't get the email. I've set it up in the appconfig.php(I made both the emails the same, just so I was sure), and I never get it. I've tried 2 different emails(one using my home email, and the other using a hotmail) but neither work.
Unicornasaurus
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Thu Apr 26, 2007 4:21 pm

Guild recruitment block and Application modules

Postby Razac » Fri May 04, 2007 3:38 am

I have taken over this on the DF side of things and have just posted the new DF version

DF Version

you can probably modify that to work in Nuke :)

Enjoy
Razac
WR.net Journeyman
WR.net Journeyman
 
Posts: 145
Joined: Thu Jul 27, 2006 6:00 pm

Re: Guild recruitment block and Application modules

Postby Zeplin » Sun May 06, 2007 7:23 pm

Great module block, works a treat - nice work :thumright:
User avatar
Zeplin
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Tue Dec 12, 2006 5:07 am

Re: Guild recruitment block and Application modules

Postby natbur » Tue May 22, 2007 12:57 pm

I was having some serious formatting issues with the admin module, so I went on what started as a slight tweaking quest, and finished as a near complete rewrite of the admin module.
/admin/modules/recruitment.php
Code: Select all
<?php
/*
==========================================
 PHP-NUKE: Recruitment Setting module
 Version 1.0.1
==========================================
 Copyright (c) 2007
  by Arioch - http://www.black-blades.org
  modified by Nod - http://hybrid.natbur.com
  
 This program is free software. You can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation
 
==========================================
*/
if (!defined('ADMIN_FILE')) {
    die (
"Access Denied");
}

global 
$prefix$db$admin_file
$aid substr("$aid"0,25); 
$row $db->sql_fetchrow($db->sql_query("SELECT radminsuper FROM " $prefix "_authors WHERE aid='$aid'")); 
if (
$row['radminsuper'] == 1) {

    function 
Modify() 
    {
        global 
$prefix$db$admin_file
        include(
"header.php");
        
GraphicAdmin();
        
Opentable();
        echo 
"<center><font class=\"title\"><b>Recruitment Settings Administration</b></font></center>";
        
Closetable();
        
$submitted $_POST['Submit'];
        
//Update database if form has been submitted
        
if($submitted == "Update"
        {
            
$status $_POST['ud_status'];
            
$druid $_POST['ud_druid'];
            
$hunter $_POST['ud_hunter'];
            
$mage $_POST['ud_mage'];
            
$paladin $_POST['ud_paladin'];
            
$priest $_POST['ud_priest'];
            
$rogue $_POST['ud_rogue'];
            
$shaman $_POST['ud_shaman'];
            
$warlock $_POST['ud_warlock'];
            
$warrior $_POST['ud_warrior'];
            
$query="UPDATE recruitment SET status='$status', druid='$druid', hunter='$hunter', mage='$mage', paladin='$paladin',
                priest='$priest', rogue='$rogue', shaman='$shaman', warlock='$warlock', warrior='$warrior'"
;
            
mysql_query($query);
        }
        
        
//Populate variables from database
        
$sql="SELECT * FROM recruitment";
        
$result $db->sql_query($sql);
        
$i=0;
        
$num=mysql_numrows($result); 
        
        
$status=mysql_result($result,$i,"status");
        
$classes = array(array("name" => "Druid""status" => mysql_result($result,$i,"druid")),
                        array(
"name" => "Hunter""status" => mysql_result($result,$i,"hunter")),
                        array(
"name" => "Mage""status" => mysql_result($result,$i,"mage")),
                        array(
"name" => "Paladin""status" => mysql_result($result,$i,"paladin")),
                        array(
"name" => "Priest""status" => mysql_result($result,$i,"priest")),
                        array(
"name" => "Rogue""status" => mysql_result($result,$i,"rogue")),
                        array(
"name" => "Shaman""status" => mysql_result($result,$i,"shaman")),
                        array(
"name" => "Warlock""status" => mysql_result($result,$i,"warlock")),
                        array(
"name" => "Warrior""status" => mysql_result($result,$i,"warrior"))
                        );
        
Opentable();
        if(
$submitted == "Update") echo "<center><h2>Record Updated!</h2></center><br>\n";
        echo 
"<form action=\"$admin_file.php?op=recruitment\" method=\"POST\">\n
            <center>\n
            <input type=\"hidden\" name=\"ud_id\" value=\"$id\">\n
            <strong>Current Recruitment Status:</strong>\n
            <select id=\"ud_status\" name=\"ud_status\">\n"
;
        if (
$status == "Open"){
        echo 
"<option value=\"Open\" selected>Open</option>\n
            <option value=\"Closed\">Closed</option>\n"
;
        } elseif (
$status == "Closed"){
        echo 
"<option value=\"Closed\" selected>Closed</option>\n
            <option value=\"Open\">Open</option>\n"
;
        }
        echo 
"</select>\n
            <table width=\"150\" border=\"0\" align=\"center\" cellpadding=\"4\" cellspacing=\"4\">\n"
;
        foreach( 
$classes as $value )
        {
            echo 
"<tr>\n
                <td width=\"70\"><strong>{$value['name']}:</strong></td>\n
                <td><select id=\"ud_"
.strtolower($value['name'])."\" name=\"ud_".strtolower($value['name'])."\">\n";
                
selected($value['status']);
            echo 
"</select></td>\n
                </tr>\n"
;
        }
        echo 
"</table>\n
            <center><input type=\"Submit\" name=\"Submit\" value=\"Update\"></center>\n
            </form>\n"
;
        
CloseTable();   
        include(
"footer.php");
    }
    function 
selected($type)
    {
        if (
$type == "High"){
            echo 
"<option value=\"High\" selected>High</option>\n
            <option value=\"Medium\">Medium</option>\n
            <option value=\"Low\">Low</option>\n
            <option value=\"Closed\">Closed</option>\n"
;
        } elseif (
$type == "Medium"){
            echo 
"<option value=\"Medium\" selected>Medium</option>\n
            <option value=\"High\">High</option>\n
            <option value=\"Low\">Low</option>\n
            <option value=\"Closed\">Closed</option>\n"
;
        } elseif (
$type == "Low"){
            echo 
"<option value=\"Low\" selected>Low</option>\n
            <option value=\"High\">High</option>\n
            <option value=\"Medium\">Medium</option>\n
            <option value=\"Closed\">Closed</option>\n"
;
        } elseif (
$type == "Closed"){
            echo 
"<option value=\"Closed\" selected>Closed</option>\n
            <option value=\"High\">High</option>\n
            <option value=\"Medium\">Medium</option>\n
            <option value=\"Low\">Low</option>\n"
;
        }
    }
    
    switch(
$op) {
        case 
"recruitment":
        
Modify();
        break;
    }

}
else {
    include(
"header.php");
    
Opentable();
    echo 
"Access Denied";
    
Closetable();
    include(
"footer.php");
}

?>
Attachments
recruitment.rar
Modified Recruitment admin page
(1.68 KiB) Downloaded 329 times
User avatar
natbur
WR.net Apprentice
WR.net Apprentice
 
Posts: 72
Joined: Fri Apr 13, 2007 12:52 pm
Location: Texas

Guild recruitment block and Application modules

Postby trilious » Sun May 27, 2007 10:20 pm

is there any ay to make it auto confirm as my email service wont work
trilious
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sun May 27, 2007 6:49 am

Re: Guild recruitment block and Application modules

Postby natbur » Tue May 29, 2007 12:39 am

trilious wrote:is there any ay to make it auto confirm as my email service wont work

What are you referring to?
User avatar
natbur
WR.net Apprentice
WR.net Apprentice
 
Posts: 72
Joined: Fri Apr 13, 2007 12:52 pm
Location: Texas

Re: Guild recruitment block and Application modules

Postby Needeles » Wed May 30, 2007 12:44 am

First off I want to say good job and thx. This is something I have been looking for.

Now I am having a few problems and not sure what to do as I am no great coder. I am able to view the different classes in the admin side and have the block setup but I cant get any changes to save. I was not able to install the DB settings with the script as it kept saying "Sorry, such file doesn't exist..." so I manually installed them and they do appear in the DB. I double checked to be sure all files were there and they seem to be. I can change the class needs but when I hit update it just reverts back to the default settings that it was installed with. It seems it is not talking with the DB correctly. I would really like to get this working but don't know where to go from here any thought would be great.

Running PHP-Nuke 7.9 w/ autotheme

EDIT: If i go into the DB itself and edit the values it then does appear correctly. So for some reason when I change the settings in the admin area it is not saving it to the DB
Last edited by Needeles on Wed May 30, 2007 12:57 am, edited 1 time in total.
Needeles
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Fri Jan 19, 2007 2:38 am

Guild recruitment block and Application modules

Postby trilious » Wed May 30, 2007 11:33 am

so when they fill form out and lcik submit on application they dont have to wait for email and can log straight in
trilious
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sun May 27, 2007 6:49 am

Re: Guild recruitment block and Application modules

Postby natbur » Fri Jun 01, 2007 3:17 am

trilious wrote:so when they fill form out and lcik submit on application they dont have to wait for email and can log straight in

Are you talking about the Recruitment block, or user registrations within PHPNuke?
User avatar
natbur
WR.net Apprentice
WR.net Apprentice
 
Posts: 72
Joined: Fri Apr 13, 2007 12:52 pm
Location: Texas

Re: Guild recruitment block and Application modules

Postby natbur » Fri Jun 01, 2007 3:38 am

Needeles wrote:First off I want to say good job and thx. This is something I have been looking for.

Now I am having a few problems and not sure what to do as I am no great coder. I am able to view the different classes in the admin side and have the block setup but I cant get any changes to save. I was not able to install the DB settings with the script as it kept saying "Sorry, such file doesn't exist..." so I manually installed them and they do appear in the DB. I double checked to be sure all files were there and they seem to be. I can change the class needs but when I hit update it just reverts back to the default settings that it was installed with. It seems it is not talking with the DB correctly. I would really like to get this working but don't know where to go from here any thought would be great.

Running PHP-Nuke 7.9 w/ autotheme

EDIT: If i go into the DB itself and edit the values it then does appear correctly. So for some reason when I change the settings in the admin area it is not saving it to the DB


It definately sounds like your admin module isn't connecting to the database. Double check that the table is named recruitment. My application code has wandered far and wide from the original, so I'm not terribly familiar with how Ymril did his updating. Hopefully, he's lurking around here and can give you some more help.
User avatar
natbur
WR.net Apprentice
WR.net Apprentice
 
Posts: 72
Joined: Fri Apr 13, 2007 12:52 pm
Location: Texas

Re: Guild recruitment block and Application modules

Postby Needeles » Fri Jun 01, 2007 7:05 am

Yup in my DB it is named correct. I know the DB is able to talk with the app module as I can change the settings in the DB and they do reflect on the module but I cant do it from the module end. Any other ideas :mrgreen:
Needeles
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Fri Jan 19, 2007 2:38 am

Re: Guild recruitment block and Application modules

Postby natbur » Fri Jun 01, 2007 12:35 pm

Needeles wrote:Yup in my DB it is named correct. I know the DB is able to talk with the app module as I can change the settings in the DB and they do reflect on the module but I cant do it from the module end. Any other ideas :mrgreen:

Possums are funny.
Seriously though, no clue why the recruitment block could read from the DB without being able to write to it.
User avatar
natbur
WR.net Apprentice
WR.net Apprentice
 
Posts: 72
Joined: Fri Apr 13, 2007 12:52 pm
Location: Texas

Re: Guild recruitment block and Application modules

Postby greekster » Mon Jun 11, 2007 6:03 pm

I have downloaded it a few times and still have no appconfig.php in the Application folder. There for when click on the application it is blank. Any clue why this is and if I am missing the appconfig can someone post it?
greekster
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Sun Jun 03, 2007 9:49 pm

PreviousNext

Return to phpNuke

Who is online

Users browsing this forum: No registered users and 0 guests

cron