vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - gWoWEvents - World of Warcraft Event Signup (https://vborg.vbsupport.ru/showthread.php?t=170592)

Kinneas 04-01-2008 04:26 PM

Quote:

Originally Posted by Eviserator (Post 1469231)
If you are receiving the following error:

PHP Fatal error:

Cannot use string offset as an array in /XXX/XXX/XXX/forum/includes/cron/cron.gwowevents.charinfo.php on line 50

I have rewritten the CRON process and it is working fine for me now.

Try replacing ALL of the code in your cron.gwowevents.charinfo.php file with the following:

Code:

<?php
        // ########################################################################
        //
        // gWoWEvents, Copyright ? 2006, Ryan Snook (www.gryphonllc.com )
        //
        // If you have fixes, improvements or other additions to make to
        // gWoWEvents, please contact me at rsnook@gmail.com for collaboration.
        // I appreciate your kind consideration.
        //
        // This work is licensed under the Creative Commons
        // Attribution-Noncommercial-No Derivative Works 3.0 United States License.
        // To view a copy of this license, visit
        // http://creativecommons.org/licenses/by-nc-nd/3.0/us/ or send a letter to
        // Creative Commons, 171 Second Street, Suite 300,
        // San Francisco, California, 94105, USA.
        //
        // ########################### SVN info ###################################
        // $Id: cron.gwowevents.charinfo.php 830 2008-01-23 20:18:51Z gryphon $
        // $Rev: 830 $
        // $LastChangedBy: gryphon $
        // $Date: 2008-01-23 12:18:51 -0800 (Wed, 23 Jan 2008) $

        // ######################## SET PHP ENVIRONMENT ###########################
        error_reporting(E_ALL & ~E_NOTICE);
        if (!is_object($vbulletin->db))
        {
                exit;
        }
        // ########################## REQUIRE BACK-END ############################
        require_once('./includes/functions_gwowevents.php');
                // Following line provided by LostPhoenix 
        $res = $vbulletin->db->query("SELECT * FROM " . TABLE_PREFIX . "gwowevents WHERE `armorydata` != '1' GROUP BY `realmchar` ORDER BY `armorydata` ASC");

        while ($char = $vbulletin->db->fetch_array($res))
        {
                require_once('./includes/class_gwowarmory.php');
                $x = new gWoWArmory;
                $x->SetLocale($char['locale']);
                $x->SetRealmName($char['realm']);
                $x->SetCharName($char['character']);

                sleep(5);
                $character['sheet'] = $x->FetchCharacterSheet();
                sleep(5);
                $character['skills'] = $x->FetchCharacterSkills();

                if ($character['characterInfo']['errCode'] != 'noCharacter')
                {
                  $charinfo_query = "
                  `charurl` = '" . $character['sheet']['characterInfo']['character']['charUrl'] . "',
                  `level` = '" . $character['sheet']['characterInfo']['character']['level'] . "',
                      `title` = '" . $character['sheet']['characterInfo']['character']['prefix'] . "',
                  `faction` = '" . $character['sheet']['characterInfo']['character']['faction'] . "',
                  `factionid` = '" . $character['sheet']['characterInfo']['character']['factionId'] . "',
                  `gender` = '" . $character['sheet']['characterInfo']['character']['gender'] . "',
                  `genderid` = '" . $character['sheet']['characterInfo']['character']['genderId'] . "',
                  `race` = '" . $character['sheet']['characterInfo']['character']['race'] . "',
                  `raceid` = '" . $character['sheet']['characterInfo']['character']['raceId'] . "',
                  `class` = '" . $character['sheet']['characterInfo']['character']['class'] . "',
                  `classid` = '" . $character['sheet']['characterInfo']['character']['classId'] . "',
                  `talentspec` = '" .
                    $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeOne'] . "," .
                    $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeTwo'] . "," .
                    $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeThree'] . "',
                  `talent1` = '" . $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeOne'] . "',
                  `talent2` = '" . $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeTwo'] . "',
                  `talent3` = '" . $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeThree'] .

"',
                  `guild` = '" . $character['sheet']['characterInfo']['character']['guildName'] . "',
                  `guildurl` = '" . $character['sheet']['characterInfo']['character']['guildUrl'] . "',
                  `hp` = '" .

$character['sheet']['characterInfo']['characterTab']['characterBars']['health']['effective'] . "',
                  `mp` = '" .

$character['sheet']['characterInfo']['characterTab']['characterBars']['secondBar']['effective'] . "',
                  `str` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['strength']['effective'] . "',
                  `agi` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['agility']['effective'] . "',
                  `sta` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['stamina']['effective'] . "',
                  `int` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['intellect']['effective'] . "',
                  `spi` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['spirit']['effective'] . "',
                  `arm` = '" . $character['sheet']['characterInfo']['characterTab']['baseStats']['armor']['effective']

. "',
                  `strbase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['strength']['base'] . "',
                  `agibase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['agility']['base'] . "',
                  `stabase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['stamina']['base'] . "',
                  `intbase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['intellect']['base'] . "',
                  `spibase` = '" . $character['sheet']['characterInfo']['characterTab']['baseStats']['spirit']['base']

. "',
                  `armbase` = '" . $character['sheet']['characterInfo']['characterTab']['baseStats']['armor']['base']

. "',
                  `prof1` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['0']['name'] . "',
                  `skill1` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['0']['value']['0'] . "',
                  `prof2` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['1']['name'] . "',
                  `skill2` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['1']['value']['0'] . "',
                  `cooking` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['0']['value']['0'] . "',
                  `firstaid` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['1']['value']['0'] . "',
                  `fishing` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['2']['value']['0'] . "',
                  `riding` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['3']['value']['0'] . "',
                  ";
                  $char['realmchar'] = addslashes($char['realm'] . "." . $char['character']);
                  if ($character['sheet']['characterInfo'] &&

$character['sheet']['characterInfo']['characterTab']['characterBars']['health']['effective'])
                  {
                        $vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET " . $charinfo_query . "

`armorydata` = '1' WHERE `realmchar` = '" . $char['realmchar'] . "'");
                  }
                  else
                  {
                        $vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET `armorydata` = '2' WHERE

`realmchar` = '" . $char['realmchar'] . "'");
                      }
                }

                if (VB_AREA == 'AdminCP')
                {
                    echo $char['character'] . '<pre>';
                    print_r($character['skills']);
                    echo '<pre><hr />';
                }
                $char_updated .= $char['character'] . ", ";
        }
        echo $char_updated;
?>


Can confirm that this also resolved the problem for me. Thanks :)

3drage 04-06-2008 06:41 PM

Getting the following error when attempting to run the chron manually:

Code:

Database error in vBulletin 3.6.8:

Invalid SQL:
UPDATE vbgwowevents SET
                                `charurl` = 'r=Silvermoon&n=Druidia',
                                `level` = '60',
                                `title` = '',
                                `faction` = 'Horde',
                                `factionid` = '1',
                                `gender` = 'Male',
                                `genderid` = '0',
                                `race` = 'Tauren',
                                `raceid` = '6',
                                `class` = 'Druid',
                                `classid` = '11',
                                `talentspec` = '0,34,17',
                                `talent1` = '0',
                                `talent2` = '34',
                                `talent3` = '17',
                                `guild` = 'The Revenants',
                                `guildurl` = 'r=Silvermoon&n=The+Revenants&p=1',
                                `hp` = '4518',
                                `mp` = '3589',
                                `str` = '111',
                                `agi` = '143',
                                `sta` = '300',
                                `int` = '175',
                                `spi` = '166',
                                `arm` = '2025',
                                `strbase` = '72',
                                `agibase` = '56',
                                `stabase` = '74',
                                `intbase` = '117',
                                `spibase` = '115',
                                `armbase` = '1521',
                                `prof1` = 'Mining',
                                `skill1` = '321',
                                `prof2` = 'Skinning',
                                `skill2` = '314',
                                `cooking` = '42',
                                `firstaid` = '322',
                                `fishing` = '1',
                                `riding` = '150',
                        `armorydata` = '1' WHERE `realmchar` = 'Silvermoon.Druidia';

MySQL Error  : Lost connection to MySQL server during query
Error Number : 2013
Date        : Sunday, April 6th 2008 @ 12:38:50 PM
Script      : http://www.deathwing-guild.com/admincp/cronadmin.php?do=runcron&cronid=19
Referrer    : http://www.deathwing-guild.com/admincp/cronadmin.php?do=modify
IP Address  : 24.10.8.51
Username    : Necronomicon
Classname    : vb_database


Mother_Dee 04-07-2008 12:37 PM

New error: Cannot use string offset as an array ... on line 116. :(

Quote:

Originally Posted by Eviserator (Post 1469231)
If you are receiving the following error:

PHP Fatal error:

Cannot use string offset as an array in /XXX/XXX/XXX/forum/includes/cron/cron.gwowevents.charinfo.php on line 50

I have rewritten the CRON process and it is working fine for me now.

Try replacing ALL of the code in your cron.gwowevents.charinfo.php file with the following:

Code:

<?php
        // ########################################################################
        //
        // gWoWEvents, Copyright ? 2006, Ryan Snook (www.gryphonllc.com )
        //
        // If you have fixes, improvements or other additions to make to
        // gWoWEvents, please contact me at rsnook@gmail.com for collaboration.
        // I appreciate your kind consideration.
        //
        // This work is licensed under the Creative Commons
        // Attribution-Noncommercial-No Derivative Works 3.0 United States License.
        // To view a copy of this license, visit
        // http://creativecommons.org/licenses/by-nc-nd/3.0/us/ or send a letter to
        // Creative Commons, 171 Second Street, Suite 300,
        // San Francisco, California, 94105, USA.
        //
        // ########################### SVN info ###################################
        // $Id: cron.gwowevents.charinfo.php 830 2008-01-23 20:18:51Z gryphon $
        // $Rev: 830 $
        // $LastChangedBy: gryphon $
        // $Date: 2008-01-23 12:18:51 -0800 (Wed, 23 Jan 2008) $

        // ######################## SET PHP ENVIRONMENT ###########################
        error_reporting(E_ALL & ~E_NOTICE);
        if (!is_object($vbulletin->db))
        {
                exit;
        }
        // ########################## REQUIRE BACK-END ############################
        require_once('./includes/functions_gwowevents.php');
                // Following line provided by LostPhoenix 
        $res = $vbulletin->db->query("SELECT * FROM " . TABLE_PREFIX . "gwowevents WHERE `armorydata` != '1' GROUP BY `realmchar` ORDER BY `armorydata` ASC");

        while ($char = $vbulletin->db->fetch_array($res))
        {
                require_once('./includes/class_gwowarmory.php');
                $x = new gWoWArmory;
                $x->SetLocale($char['locale']);
                $x->SetRealmName($char['realm']);
                $x->SetCharName($char['character']);

                sleep(5);
                $character['sheet'] = $x->FetchCharacterSheet();
                sleep(5);
                $character['skills'] = $x->FetchCharacterSkills();

                if ($character['characterInfo']['errCode'] != 'noCharacter')
                {
                  $charinfo_query = "
                  `charurl` = '" . $character['sheet']['characterInfo']['character']['charUrl'] . "',
                  `level` = '" . $character['sheet']['characterInfo']['character']['level'] . "',
                      `title` = '" . $character['sheet']['characterInfo']['character']['prefix'] . "',
                  `faction` = '" . $character['sheet']['characterInfo']['character']['faction'] . "',
                  `factionid` = '" . $character['sheet']['characterInfo']['character']['factionId'] . "',
                  `gender` = '" . $character['sheet']['characterInfo']['character']['gender'] . "',
                  `genderid` = '" . $character['sheet']['characterInfo']['character']['genderId'] . "',
                  `race` = '" . $character['sheet']['characterInfo']['character']['race'] . "',
                  `raceid` = '" . $character['sheet']['characterInfo']['character']['raceId'] . "',
                  `class` = '" . $character['sheet']['characterInfo']['character']['class'] . "',
                  `classid` = '" . $character['sheet']['characterInfo']['character']['classId'] . "',
                  `talentspec` = '" .
                    $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeOne'] . "," .
                    $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeTwo'] . "," .
                    $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeThree'] . "',
                  `talent1` = '" . $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeOne'] . "',
                  `talent2` = '" . $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeTwo'] . "',
                  `talent3` = '" . $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeThree'] .

"',
                  `guild` = '" . $character['sheet']['characterInfo']['character']['guildName'] . "',
                  `guildurl` = '" . $character['sheet']['characterInfo']['character']['guildUrl'] . "',
                  `hp` = '" .

$character['sheet']['characterInfo']['characterTab']['characterBars']['health']['effective'] . "',
                  `mp` = '" .

$character['sheet']['characterInfo']['characterTab']['characterBars']['secondBar']['effective'] . "',
                  `str` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['strength']['effective'] . "',
                  `agi` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['agility']['effective'] . "',
                  `sta` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['stamina']['effective'] . "',
                  `int` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['intellect']['effective'] . "',
                  `spi` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['spirit']['effective'] . "',
                  `arm` = '" . $character['sheet']['characterInfo']['characterTab']['baseStats']['armor']['effective']

. "',
                  `strbase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['strength']['base'] . "',
                  `agibase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['agility']['base'] . "',
                  `stabase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['stamina']['base'] . "',
                  `intbase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['intellect']['base'] . "',
                  `spibase` = '" . $character['sheet']['characterInfo']['characterTab']['baseStats']['spirit']['base']

. "',
                  `armbase` = '" . $character['sheet']['characterInfo']['characterTab']['baseStats']['armor']['base']

. "',
                  `prof1` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['0']['name'] . "',
                  `skill1` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['0']['value']['0'] . "',
                  `prof2` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['1']['name'] . "',
                  `skill2` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['1']['value']['0'] . "',
                  `cooking` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['0']['value']['0'] . "',
                  `firstaid` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['1']['value']['0'] . "',
                  `fishing` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['2']['value']['0'] . "',
                  `riding` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['3']['value']['0'] . "',
                  ";
                  $char['realmchar'] = addslashes($char['realm'] . "." . $char['character']);
                  if ($character['sheet']['characterInfo'] &&

$character['sheet']['characterInfo']['characterTab']['characterBars']['health']['effective'])
                  {
                        $vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET " . $charinfo_query . "

`armorydata` = '1' WHERE `realmchar` = '" . $char['realmchar'] . "'");
                  }
                  else
                  {
                        $vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET `armorydata` = '2' WHERE

`realmchar` = '" . $char['realmchar'] . "'");
                      }
                }

                if (VB_AREA == 'AdminCP')
                {
                    echo $char['character'] . '<pre>';
                    print_r($character['skills']);
                    echo '<pre><hr />';
                }
                $char_updated .= $char['character'] . ", ";
        }
        echo $char_updated;
?>



atomhead 04-10-2008 02:39 PM

Getting "server has gone away messages", manual update does not work either, and my characters aren't updating in the event page.

atomhead 04-10-2008 03:27 PM

Quote:

Originally Posted by LostPhoenix (Post 1461267)
Here is my hack for those of us who have hosts that don't like the cron. It's not perfect but it does work.

Find the following code in cron.gwowevents.charinfo.php
Code:

if ($character['characterInfo'] && $character['characterInfo']['characterTab']['characterBars']['health']['effective'])
{
        $vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET " . $charinfo_query . " `armorydata` = '1' WHERE `realmchar` = '" . $char['realmchar'] . "'");
}
else
{
        $vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET `armorydata` = '2' WHERE `realmchar` = '" . $char['realmchar'] . "'");
}

and change it to:
Code:

$dbhost = '';
$dbname = '';
$dbuser = '';
$dbpasswd = '';

if ($character['characterInfo'] && $character['characterInfo']['characterTab']['characterBars']['health']['effective'])
{
        //$vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET " . $charinfo_query . " `armorydata` = '1' WHERE `realmchar` = '" . $char['realmchar'] . "'");
        @ $db2 = mysql_connect("$dbhost", "$dbuser", "$dbpasswd");
        mysql_select_db("$dbname",$db2);
        mysql_query("UPDATE " . TABLE_PREFIX . "gwowevents SET " . $charinfo_query . " `armorydata` = '1' WHERE `realmchar` = '" . $char['realmchar'] . "'", $db2);
        mysql_close($db2);
} else {
        //$vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET `armorydata` = '2' WHERE `realmchar` = '" . $char['realmchar'] . "'");
        @ $db2 = mysql_connect("$dbhost", "$dbuser", "$dbpasswd");
        mysql_select_db("$dbname",$db2);
        mysql_query("UPDATE " . TABLE_PREFIX . "gwowevents SET `armorydata` = '2' WHERE `realmchar` = '" . $char['realmchar'] . "'", $db2);
        mysql_close($db2);
}

Obviously you have to add your database info. Until I take the time to learn vbulletin and fix it properly lol.

This will put more stress on your SQL server as it opens and closes a connection each time it updates the user.

This fixed my armory updating problem (I also setup that other hack someone posted about grouping characters or something)

atomhead 04-11-2008 04:45 PM

Does this work with the "new thread on event creation" mod? I'm going to test it later when I get time...

Caerydd 04-14-2008 10:54 AM

Quote:

Originally Posted by atomhead (Post 1488387)
Does this work with the "new thread on event creation" mod? I'm going to test it later when I get time...

As yet this is supposedly not compatible with Event Forums.

atomhead 04-14-2008 04:23 PM

I posted on the Event Forums thread asking if they could make it work with this mod. Currently after creating a raid vBEF makes the thread but I get amessage "not authorized to signup" even though permissions are set correctly. If anyone can help it would be appreciated. :)

https://vborg.vbsupport.ru/showthread.php?t=123416

atomhead 04-14-2008 04:24 PM

Quote:

Originally Posted by Caerydd (Post 1490316)
As yet this is supposedly not compatible with Event Forums.

Ok, thanks. I posted my issue hopefully that helps and someone can look into it :)

Kinneas 04-28-2008 12:21 PM

This stopped working for me after upgrading to RC4 due to the CSRF patches.

To fix it, edit the template "gwe_signup_form"

Find:
Code:

<form action="calendar.php?do=getinfo&e=$eventinfo[eventid]" method="post">
Below Add:
Code:

<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
Should work again :)


All times are GMT. The time now is 01:10 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.01578 seconds
  • Memory Usage 1,846KB
  • 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
  • (7)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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