vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [HIS] Hack Installer System (Build 3) (https://vborg.vbsupport.ru/showthread.php?t=71542)

sabret00the 04-27-2005 04:11 PM

getting this error trying to generate an installer
PHP Code:

<?php

// Phrases

WarningInvalid argument supplied for foreach() in \his_files\hack_creator_b2.php.bak on line 202

?>

PHP Code:

            // Generate phrases file.
            if (isset($hack['phrase_like']) && ($_REQUEST['text'] != 1 || $_REQUEST['type'] == "phrases")) {
                // Grab the phrases.
                $teh_phrases = $DB_site->query("SELECT varname, text, phrasetypeid FROM ".TABLE_PREFIX."phrase WHERE (varname LIKE '$hack[phrase_like]') && phrasetypeid NOT IN (5000, 6000) ORDER BY languageid DESC");
                while ($the_phrases = $DB_site->fetch_array($teh_phrases)) {
                    // Put the phrases in an array.
                    $hack_phrases[$the_phrases[varname]]['text'] = str_replace("'", "\'", $the_phrases['text']);
                    $hack_phrases[$the_phrases[varname]]['phrasetypeid'] = $the_phrases['phrasetypeid'];
                }
                // Start the phrases.php file.
                if ($_REQUEST['text'] != 1) {
                    echo "phrases.php <a href=\"hack_install.php?$_SERVER[QUERY_STRING]&text=1&type=phrases\">(Save This File)</a><br /><div class=\"smallfont\" style=\"height:250px;width:100%;overflow:auto\"><pre>&lt;?php\n\n// Phrases\n";
                } else {
                    echo "<?php\n\n// Phrases\n\n";
                }
                // Go through each phrase and spit it out.       // #####################################
                foreach ($hack_phrases as $varname => $phrase) { // ################## LINE 202
                    if ($_REQUEST['text'] != 1) {                // #####################################
                        echo '$phrase['."'$varname'".'][\'text\'] = \''.htmlentities($phrase['text']).'\';'."\n";
                        echo '$phrase['."'$varname'".'][\'phrasetypeid\'] = '."'$phrase[phrasetypeid]';\n\n";
                    } else {
                        echo "\$phrase['$varname']['text'] = '$phrase[text]';\n";
                        echo "\$phrase['$varname']['phrasetypeid'] = '$phrase[phrasetypeid]';\n\n";
                    }
                }
                // End the file and continue, or...
                // End output buffering and spit out the file.
                if ($_REQUEST['text'] != 1) {
                    echo "\n?&gt;</pre></div><br /><br />";
                } else {
                    echo "\n?>";
                    header ( "Content-type: text/php" );
                    header('Content-Disposition: attachment; filename="phrases.php"');
                    $omgzprint = ob_get_contents();
                    ob_end_clean();
                    print $omgzprint;
                    unset($omgzprint);
                }
                // Now unset some crap.
                unset($teh_phrases);
                unset($the_phrases);
                unset($hack_phrases);
            }

line 202 is marked on the right side of the code, help please :happysad:

Marco van Herwaarden 04-27-2005 06:45 PM

In your hackfiles/..../1/index.php make sure you not commented out "$hack['phrase_like']".

If you don't have any phrases that match the pattern, you can get this error and just ignore.

Marco van Herwaarden 04-27-2005 06:46 PM

On second thought, if you don't want to generate phrases, comment out the "$hack['phrase_like']".

sabret00the 04-27-2005 07:15 PM

thanks marco, that cleared up the problem, was a problem to do with case sensitivity

one more problem though
PHP Code:

<?php

// Settings

$settinggroup['threadbot']['phrase'] = 'threadBOT';
$settinggroup['threadbot']['displayorder'] = '6431';

$setting['threadbot_on']['titlephrase'] = '';
$setting['threadbot_on']['descphrase'] = '';
$setting['threadbot_on']['grouptitle'] = 'threadbot';
$setting['threadbot_on']['value'] = '1';
$setting['threadbot_on']['defaultvalue'] = 'yes';
$setting['threadbot_on']['optioncode'] = 'yesno';
$setting['threadbot_on']['displayorder'] = '10';

$setting['threadbot_username']['titlephrase'] = '';
$setting['threadbot_username']['descphrase'] = '';
$setting['threadbot_username']['grouptitle'] = 'threadbot';
$setting['threadbot_username']['value'] = 'jetzxia';
$setting['threadbot_username']['defaultvalue'] = '';
$setting['threadbot_username']['optioncode'] = '';
$setting['threadbot_username']['displayorder'] = '20';

$setting['threadbot_feeders']['titlephrase'] = '';
$setting['threadbot_feeders']['descphrase'] = '';
$setting['threadbot_feeders']['grouptitle'] = 'threadbot';
$setting['threadbot_feeders']['value'] = '18';
$setting['threadbot_feeders']['defaultvalue'] = '';
$setting['threadbot_feeders']['optioncode'] = '';
$setting['threadbot_feeders']['displayorder'] = '30';


?>

all of the phrases/text for those settings appear to be missing?

Marco van Herwaarden 04-27-2005 07:21 PM

Sorry never seen that happen.


All times are GMT. The time now is 04:23 PM.

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.01031 seconds
  • Memory Usage 1,760KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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