A little bit of knowledge...
-----
| Author | Message | |
|---|---|---|
|
Swat |
||
| Fri May 04, 2007 7:35 am Post subject: | ||
|
Just so you can see how I have the configuration panel set up, I took this screen shot.
|
||
|
Thoul |
||
| Fri May 04, 2007 3:52 pm Post subject: Re: A little bit of knowledge... | ||
|
Your settings seem fine. Can you post the last thirty or so lines from posting.php, please? I doubt there's a problem there, but it doesn't hurt to look and be sure.
Since this only happens with the number of posts setting turned up, it is probably a problem somewhere in mods/vc_newposts/vc_newposts.php. It's going to be hard to track down, since we can't get an error message from it anywhere. Try replacing this chunk of code in that file: Code: // Compute Random Seed
$power = pow(2,32); list($usec, $sec) = explode(' ', microtime()); $compute = (float) $sec + ((float) $usec * 100000000); $factor = ( function_exists('posix_getpid') ) ? posix_getpid() : $this->additionals['factor']; $compute = $compute * 1000000 * $factor; $this->seed = intval($compute / $power); $this->seed = ( !$this->seed || $this->seed == 1 ) ? fmod($compute, $power) : $this->seed; with: Code: list($usec, $sec) = explode(' ', microtime());
$compute = (float) $sec + ((float) $usec * 100000000); $this->seed = $compute * $this->additionals['factor']; |
||
|
Swat |
||
| Fri May 04, 2007 4:56 pm Post subject: | ||
|
posting.php was located in the root directory of the forum and here is the bottom portion of the file:
|
||
|
Swat |
||
| Fri May 04, 2007 5:11 pm Post subject: | ||
|
I also tried the vc_newposts code change and there was no difference. I'm not sure if i did it right becuase I grabbed the entire code you have showing and replaced with the entire code you have showing. This removed the header and some other additional lines of code. In either case it didn't change the result. Still just a header, with nothing in the body. I have changed the file back.
|
||
|
Thoul |
||
| Mon May 07, 2007 5:07 pm Post subject: Re: A little bit of knowledge... | ||
|
Okay, use this code to replace your vc_newposts.php (keep a backup of the old one):
http://www.phpbbsmith.com/files/vc_newposts.txt When you try again, there should, hopefully, be a series of lines printed that say things like "Check 10 passed." If you see these, post them here, please. That will help us figure out exactly where the problem is coming from in the code, hopefully. |
||
|
Swat |
||
| Mon May 07, 2007 5:52 pm Post subject: | ||
|
hola Thoul. I replaced the txt file and as you can see from the screen shot below we have some passed tests:
|
||
|
Thoul |
||
| Wed May 09, 2007 5:57 am Post subject: Re: A little bit of knowledge... | ||
|
Okay, that gives me a better idea of where the problem lies. Does your includes/functions.php file include this line?
Code: function dss_rand()
If not, you're missing some code added to that file in phpBB 2.0.20, which this mod needs to run. |
||
|
Swat |
||
| Wed May 09, 2007 8:39 am Post subject: | ||
|
Nope...however I am running version phpBB 2.0.21
|
||
|
Thoul |
||
| Wed May 09, 2007 5:51 pm Post subject: Re: A little bit of knowledge... | ||
|
Ok, that sounds like the problem, then. Add this to your functions.php:
Code: /** * Our own generator of random values * This uses a constantly changing value as the base for generating the values * The board wide setting is updated once per page if this code is called * With thanks to Anthrax101 for the inspiration on this one * Added in phpBB 2.0.20 */ function dss_rand() { global $db, $board_config, $dss_seeded; $val = $board_config['rand_seed'] . microtime(); $val = md5($val); $board_config['rand_seed'] = md5($board_config['rand_seed'] . $val . 'a'); if($dss_seeded !== true) { $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '" . $board_config['rand_seed'] . "' WHERE config_name = 'rand_seed'"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Unable to reseed PRNG", "", __LINE__, __FILE__, $sql); } $dss_seeded = true; } return substr($val, 4, 16); } It goes right before: Code: //
// Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced. // |
||
|
Swat |
||
| Wed May 09, 2007 10:22 pm Post subject: | ||
|
Thoul, that looks to have been the missing link. I still need to go back and put back the old vc_newposts.php file so it doesn't post the test results, but it is allowing new members to make posts and see the VC window. I do still appear to have one issure which goes back to my quad installation noted earlier. You helped me clean the control panal windo to show just one installation, but as you can see from the screen shot below, there is a file somewhere that still has the four instances of code.
|
||