vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - World of Warcraft Class Recruitment Status module (db backend) (https://vborg.vbsupport.ru/showthread.php?t=137670)

mdroschak 03-18-2007 04:30 PM

THe first part works great and it shows up perfect now.

When i go to add the recruit.php to edit the first module this is what i get.

Fatal error: Cannot redeclare class recruit in C:\Inetpub\wwwroot\bbz\forums\modules\class_recrui t.php on line 17

Im assuming this has to do with your php4 edit, making changes now to see what happens. I think you should make it a little bit more clear that you need to edit the Class_recruit.php file if you use php4. I wasn't sure which one you meant so i looked through them all to find the code you posted.

EDIT: I've made the changes to the class_recruit.php file and still have the same error message. So as of right now i just have the issue getting the edit module to display. The other one looks perfect and is using my style.

turnipofdoom 03-18-2007 05:33 PM

Lets see if that fixes it for you, grab the files and replace functions_recruit.php and recruit.php in your modules dir with the ones in the zip.

mdroschak 03-18-2007 06:00 PM

PERFECT!

Thanks a ton for your quick responses, nice to have a supported mod...

One other quick question, not a big deal but just curious. Is there a way to make the recruit_edit.php file use your forum template? I notice the colors and everything else is right on but it doesn't fit itself into the frame size, outlines, etc.. I dont know how difficult it is to do that.. and really its not a big deal because it matches perfect. The size is just a bit off because it's kind of on it's own.

Thanks again!

turnipofdoom 03-18-2007 06:14 PM

Not at the moment, I have to do that still. I wasnt planning on releasing this until I had but such is life. For us, its private, so 99% of visitors never see the small visual errors with the forum =)

mdroschak 03-18-2007 06:18 PM

Sounds good, I will keep an eye out for an update when you get around to it. Otherwise things are working great, thanks for the nice module =)

Dan 03-18-2007 06:35 PM

Great idea :)

Synth 03-21-2007 07:06 PM

Well, I have everything installed with the updated files and it all shows fine now, and can update the status.

The only thing is, I have set the status editing module to only show for admins. When I am logged in all the linked text on my front page is a light grey color. This only happens for me as I am the only one who can see the edit module. Anyone else i.e members, visitors etc. do not have the problem because that module does not show up for them.

Also, you mentioned to update the image paths in the recruit.php but for the life of me cannot see where the paths need updated.

Thanks alot for this by the way!

turnipofdoom 03-22-2007 10:01 PM

My mistake on the link update instructions, first mod and all ;p It was removed, and that was part of the previous version..

You can try removing the style class definitions in recruit.php

<body class='module'> just remove class='module',
same with:
<table class="module">
<td valign="top" class="thead">

otherwise, I am not sure why it would change the link colors, but ill look at it.

Xaices 03-25-2007 07:38 PM

ok what am I doing wrong?

recrutment.sql
Code:

-- phpMyAdmin SQL Dump
-- version 2.8.0.4
-- http://www.phpmyadmin.net
--
-- Host: 192.168.42.200
-- Generation Time: Mar 18, 2007 at 11:26 AM
-- Server version: 5.0.26
-- PHP Version: 5.1.6-pl6-gentoo

-- --------------------------------------------------------

--
-- Table structure for table `recruitment`
--

CREATE TABLE `recruitment` (
  `Class` varchar(15) NOT NULL default '',
  `Status` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`Class`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `recruitment`
--

INSERT INTO `recruitment` (`Class`, `Status`) VALUES ('Warrior', '1'),
('Paladin', '2'),
('DreadKnight', '2'),
('Ranger', '1'),
('Rogue', '1'),
('Monk', '2'),
('Bard', '2'),
('Cleric', '2'),
('Shaman', '1'),
('Desciple', '1'),
('Bloodmage', '1'),
('Sorcerer', '1'),
('Druid', '1'),
('Psionicist', '1'),
('Necromancer', '1');

I go to forums/admincp/

maintenance/Execute SGL Query

I copy and paste the above into the manual query.

I get this error.

Quote:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';

--
-- Dumping data for table `recruitment`
--

INSERT INTO `recruitme' at line 20
INFO:
vB 3.6.4
PHP Version 4.4.4
Client API version 4.1.21

I am doing something wrong, I just do not know what, obviously. Yes I changed the classes from WoW to Vanguard.

Xaices 03-25-2007 10:26 PM

ok I went into myPHPadmin and created the table from there. Seems to all work except I get this error now.

Quote:

Warning: Missing argument 16 for setstatus() in /modules/class_recruit.php on line 45
That error message appears right above the edit display on the frontpage of cmps.

Here is the code for class_recruit.php that I am using.

PHP Code:

<?php
/*======================================================================*\
    class_recruit.php
    ------------------------------------------------------------------
    
     * Dark Portal Syndicate http://www.darkportals.com
     * Copyright 2002-2007
     * ------------------
     * class_recruit.php
     * Began: 6/27/05
     * Last Modified 3/18/2007
     * Authors: Delinah Howard, Jessica Zakhar. <site-admins@darkportals.com>
    ------------------------------------------------------------------

\*=======================================================================*/

class recruit {

    var 
$result_rows = array();
    var 
$vbObj;

    function 
recruit()
    {

        global 
$vbulletin;
        
$this->vbObj =& $vbulletin;
    
    }
        
    function 
setStatus$druid,
                        
$warrior
                        
$paladin
                        
$dreadknight
                        
$ranger
                        
$rogue
                        
$monk,
                        
$bard,
                        
$cleric,
                        
$shaman,
                        
$desciple,
                        
$bloodmage,
                        
$sorcerer,
                        
$druid,
                        
$psionicist
                        
$necromancer )
    {
    
    
$classes = array(
                    
'Warrior' => $this->vbObj->db->escape_stringstrip_tags$warrior'<b>' ) ),
                    
'Paladin' => $this->vbObj->db->escape_stringstrip_tags$paladin'<b>' ) ), 
                    
'DreadKnight' => $this->vbObj->db->escape_stringstrip_tags$dreadknight'<b>' ) ),
                    
'Ranger' => $this->vbObj->db->escape_stringstrip_tags$ranger'<b>' ) ),
                    
'Rogue' => $this->vbObj->db->escape_stringstrip_tags$rogue'<b>' ) ),
                    
'Monk' => $this->vbObj->db->escape_stringstrip_tags$monk'<b>') ),
                    
'Bard' => $this->vbObj->db->escape_stringstrip_tags$bard'<b>' ) ),
                    
'Cleric' => $this->vbObj->db->escape_stringstrip_tags$cleric'<b>' ) ),
                    
'Desciple' => $this->vbObj->db->escape_stringstrip_tags$desciple'<b>' ) ),
                    
'Bloodmage' => $this->vbObj->db->escape_stringstrip_tags$bloodmage'<b>' ) ),
                    
'Sorcerer' => $this->vbObj->db->escape_stringstrip_tags$sorcerer'<b>' ) ),
                    
'Druid' => $this->vbObj->db->escape_stringstrip_tags$druid'<b>' ) ),
                    
'Psionicist' => $this->vbObj->db->escape_stringstrip_tags$psionicist'<b>' ) ),
                    
'Necromancer' => $this->vbObj->db->escape_stringstrip_tags$necromancer'<b>' ) )
                    );

    foreach( 
$classes AS $key => $value )
        {
            
$query = ( "UPDATE recruitment SET status='$value' WHERE class='$key'" );
            
$this->vbObj->db->query$query );
        }
    }

Line 45 of that is
PHP Code:

                        $necromancer 

So what happens now is that when I fill out the edit fields and hit save I get that error and Dread Knight and Necromancer show no values. If I hit the refresh button on the page then certain class values get changed.

Any ideas?


All times are GMT. The time now is 08:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01278 seconds
  • Memory Usage 1,789KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete