• [MOD] Shoutbox 4 0 5 1
Currently:  

Author Topic: [MOD] Shoutbox  (Read 310442 times)

0 Members and 2 Guests are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Shoutbox
« Reply #120 on: August 09, 2007, 09:40:26 PM »
Here problem. ;)

shout.php is from ZIP you send ...  no have it on site :mrgreen:

Upload it on ROOT_PATH gallery. Should work. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bjorn666

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Shoutbox
« Reply #121 on: August 09, 2007, 09:42:14 PM »
ok, then i get this:
Fatal error: Call to a member function query() on a non-object in ./shout.php on line 62

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Shoutbox
« Reply #122 on: August 09, 2007, 09:54:19 PM »
Quote
**************************************/

add after:

Quote
define('ROOT_PATH', './');
include(ROOT_PATH . "global.php");
require(ROOT_PATH . "includes/sessions.php");

Quote
function get_num_words ($text) {
  $text_words = explode (" ", $text);
  $text_words = sizeof ($text_words);
  return $text_words;
}

replace:

Quote
function get_num_words ($text) {

if (strlen(trim($text)) == 0) {
return;
} else {

  $text_words = explode (" ", $text);
  $text_words = sizeof ($text_words);

  return $text_words;
}
}

Quote
//--------------------------------------------------------------------------
//---------------Save Shouts------------------------------------------------
//--------------------------------------------------------------------------
$shout = (stripslashes(trim($HTTP_POST_VARS['shout'])));
if ($shout == "shout it!") {
  $shout_user = trim($HTTP_POST_VARS['shout_user']);
  $shout_message = $HTTP_POST_VARS['shout_message'];
  $shout_message = trim ($shout_message);
  $shout_date = time();
  $shout_ip = $session_info['session_ip'];
  $shout_user_id = $user_info['user_id'];

replace:

Quote
//--------------------------------------------------------------------------
//---------------Save Shouts------------------------------------------------
//--------------------------------------------------------------------------
$shout = (stripslashes(trim($HTTP_POST_VARS['shout'])));
if ($shout == "shout it!") {
  $shout_user = (isset($HTTP_POST_VARS['shout_user'])) ? (stripslashes(trim($HTTP_POST_VARS['shout_user']))) : "";
  $shout_message = (isset($HTTP_POST_VARS['shout_message'])) ? un_htmlspecialchars(trim((string)$HTTP_POST_VARS['shout_message'])) : "";
  $shout_date = time();
  $shout_ip = $session_info['session_ip'];
  $shout_user_id = $user_info['user_id'];

Done.
« Last Edit: August 27, 2011, 02:20:19 PM by thunderstrike »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bjorn666

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Shoutbox
« Reply #123 on: August 09, 2007, 10:00:11 PM »
ok, then i get:
Parse error: syntax error, unexpected $end in ./shout.php on line 142

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Shoutbox
« Reply #124 on: August 09, 2007, 10:00:47 PM »
Top of ?> - add }
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bjorn666

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Shoutbox
« Reply #125 on: August 09, 2007, 10:04:13 PM »
ok, no error this time, but a blank site... no text or buttons.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Shoutbox
« Reply #126 on: August 09, 2007, 10:05:20 PM »
Check web error logs.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bjorn666

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Shoutbox
« Reply #127 on: August 09, 2007, 10:08:00 PM »
No error log....

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Shoutbox
« Reply #128 on: August 09, 2007, 10:08:30 PM »
No have or no new report ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bjorn666

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Shoutbox
« Reply #129 on: August 09, 2007, 10:13:48 PM »
no new report

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Shoutbox
« Reply #130 on: August 09, 2007, 10:16:26 PM »
Sorry - can no do on this (for now).
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bjorn666

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Shoutbox
« Reply #131 on: August 09, 2007, 10:17:05 PM »
Ok, thanks for help anyway

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Shoutbox
« Reply #132 on: August 09, 2007, 10:19:29 PM »
PHP site say PHP v5 out official January 2008. There, more solution.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Shoutbox
« Reply #133 on: August 09, 2007, 10:27:44 PM »
One last ...

Is register_globals off or on from site ? If no ide .. go to ACP - > phpinfo() . Fin info there.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bjorn666

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Shoutbox
« Reply #134 on: August 12, 2007, 08:53:50 PM »
its off.