Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by iyeru42

  1. The bridge is now fixed... mybb had to change its cookie path to get sessons right.
  2. I need help with correcting the following MyBB 1.4.1 partial Bridge... <?php/************************* Coppermine Photo Gallery ************************ Copyright © 2003-2008 Dev Team v1.1 originally written by Gregory DEMAR This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. ******************************************** Coppermine version: 1.4.19 $HeadURL: [url="https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/bridge/mybb.inc.php"
  3. Thanks, but now I have a new problem. Seems autoparse is being gotten, null. Which it isn't, it's 1.Also, your regex makes my whole posts go blank. // Convert links to clickable links.function clickableLinks($post){ // Regex Match $regex = "((?:http|ftp|https)://(?:\w+\.)+\w+\.?(?:/[\w.])*/?)(?!\]|\)|[\.;] )"; // Replace foo' $post = preg_replace($regex, '<a href="$1">$1</a>', $post); return $post;} Using this instead: $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="\\1">\\1</a>', $text); $text = eregi_replace
  4. So, how do I put this into php? do I use ereg_replace? No, I would use preg_replace if I used this.Example: <?php$string = 'April 15, 2003';$pattern = '/(\w+) (\d+), (\d+)/i';$replacement = '${1}1,$3';echo preg_replace($pattern, $replacement, $string);?> But I don't know how to incorporate your match.
  5. I still would rather have JUST the regex, I don't need a whole extra extension. I already have bbcode functions, and they work fine. Now I need to auto-parse links that people have not used bbcode with.I need it to check a variable, $iAutoParse and see if it's true (since I already have this variable defined, then search the post itself, $strPostBody, for any http:// and auto-parse them with <a href="$link[]">$link[]</a> or something.
  6. I don't manage my php installation, so I can't. I'm also no good at "compiling" either, just like on Linux.
  7. I need it so that it checks if the URL is within BBCode and if it is, won't parse it. Also, it should end the link if there's a ) or . or ; or ] and don't parse if there's a URL= attached to the front of http:// (IE: URL=http://)Basically, I want http://www.this.com to parse like IPB, etc. does automatically. Of course, not all URLs will have www. in front.
  8. I'm having a problem with this, well... sort of. $usergroup_sql = mysql_query("SELECT * FROM `usergroups` WHERE `id`='".$_SESSION['usergroup']."'"); $userg_sql_array = mysql_fetch_assoc($usergroup_sql); $_SESSION['permissions']['cmakethreads'] = $userg_sql_array['cmakethreads']; In a blank PHP Document (manually defining $_SESSION['usergroup']), this works fine, but when I put it into my message board... Everything in $usergroup_sql is blank when its line executes. Note $_SESSION['usergroup'] DOES exist and is set to a number (meaning a session IS set) when I'm browsing around. (I echo'
  9. Another issue, but it focuses on two variables, one dependant off of a previous one. // Load Style Configs... // Get the default style first! $sql2 = mysql_query("SELECT `name`,`id` FROM `styles` WHERE `default`='1'"); $row2 = mysql_fetch_array($sql2); // Grab The style configs for that style. $sql3 = mysql_query("SELECT `content`,`name` FROM `style_config` WHERE `styleid`='{$row2['id']}'"); $style_cfg = Array(); while($row3 = mysql_fetch_array($sql3)){ $style_cfg[$row3['name']] = $row3['content']; } $CFG['style']['table']['bgcolor'] = $style_cfg['tbl-bg']; $CFG['style']['table']['cella
  10. I finally got it fixed by using this: <?phpif( ( $result = mysql_query( "SELECT name,data FROM maxlen" ) ) ){ while( $row = mysql_fetch_assoc( $result ) ) { $CFG['maxlen'][$row['name']]=$row['data']; } mysql_free_result( $result );}?>
  11. using these instead... $CFG['maxlen']['username'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='username'"), "data"); $CFG['maxlen']['password'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='password'"), "data"); $CFG['maxlen']['email'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='email'"), "data"); $CFG = Array(); $CFG['maxlen'] = mysql_fetch_array(mysql_query("SELECT `data` FROM `maxlen`"), MYSQL_ASSOC); Give out errors: Fatal error: Class 'data' not found in installDB.php on line 201 Noti
  12. I'm having a problem getting STRING data from a MySQL query.using the following: $CFG['maxlen']['username'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='username'")); $CFG['maxlen']['password'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='password'")); $CFG['maxlen']['email'] = mysql_fetch_object(mysql_query("SELECT `data` FROM `maxlen` WHERE `name`='email'")); gives me an error later stating that a class cannot be converted to a string.I used this instead: $CFG = Array(); $CFG['maxlen'] = mysql_fetch_array(mysql_query("SE
  13. Man, am I so stupid... I forgot a comma
  14. iyeru42

    Blank PHP Error

    After I fixed another error stating $dbConn wasn't a valid variable, the error page I created that set display_errors on no longer displays errors, and still shows a blank page.Seems it was the "return" in the if/else down south where ExecuteSQL was executed. (It isn't a function, so the if/else cannot return anything.) Well, thanks for trying you guys.
  15. iyeru42

    Blank PHP Error

    Actually, I have narrowed it down finally. // Executes a given file as semicolon-terminated SQL statements.function ExecuteSQL($filename){ global $filename; // Get contents of the file. $filedata = file_get_contents($filename); if($filedata === FALSE) { return FALSE; } // Explode statements into elements of an array. $aSQL = explode(';', $filedata); // Execute each of the queries. foreach($aSQL as $strSQL) { if(trim($strSQL)) { if(!mysql_query(trim($strSQL))) { return FALSE; } } } return TRUE;} and // Execute the installation SQL script. if(ExecuteSQL("./includes/install.{$aDB
  16. iyeru42

    Blank PHP Error

    No wait, that was a previous error. Sorry, there is no error log data for this. There's an error, but it's just blank. Not even the error log has the information.
  17. iyeru42

    Blank PHP Error

    ((See post under Deirdre's Dad's, still not fixed yet though))
  18. Nevermind, I'll just use separate files for different access and configuration.P.S: Since the code is over 20000 characters, I'm editing it out. But if you still want to know the problem...1.] The installer is split into two files: index.php and includes/install.inc.php2.] install.inc.php and index.php within the setup folder here give out two different db connection outputs. (however, install.inc.php alone gives out two different connections between certain steps)3.] However, install.inc.php doesn't carry over session/request data for DB information between steps (at least since I changed it.
  19. Read reply under/after justsomeguy's post.
  20. Thanks man, it works now :3
  21. PHP gives the error... $fh = fopen("../includes/dbinfo.inc.php", "w"); if ($fh==false) { die("unable to create ../includes/dbinfo.inc.php. Make sure the includes directory within the forum root dir is CHMOD to 0777."); } else { $strWriteData = "<?php\n$aDBInfo['type'] = '".$aDBInfo['type']."';\n$aDBInfo['address'] = '".$aDBInfo['address']."';\n$aDBInfo['username'] = '".$aDBInfo['username']."';\n$aDBInfo['password'] = '".$aDBInfo['password']."';\n$aDBInfo['database'] = '".$aDBInfo['database']."';\n$aDBInfo['email'] = '".$aDBInfo['email']."';\n?>"; fwrite($fh, $strWriteData); fclose($fh
  22. Nevermind, I'm going to use a different method.
  23. I'd give you the flash, but it's that gallery thing again. So here's what I got...In Scene 1, first frame, 3rd layer: stop();function matureField() {gotoAndPlay("mature");}function normalField() {gotoAndPlay("normal");} On my mature_btn within Selectors MC: on(press) { _root.matureField();} On my normal_btn within Selectors MC: on(press) { _root.normalField();} These two buttons are the same object, two different instances. Clicking on normal_btn calls forth matureField() instead of normalField(); Besides my preloader, I have like, no other actionScript to interfere with this.
  • Create New...