• [MOD] Shoutbox 4 0 5 1
Currently:  

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

0 Members and 1 Guest are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [MOD] Shoutbox
« Reply #180 on: October 06, 2008, 06:51:12 AM »
 :flag-de: Ist das möglich, dass die abgegebenen Shouts durch Zufall ausgegeben werden? Also das nicht alle Shots untereinander sind sonder durch Zufall ausgegeben werden!

 :flag-en: Is it possible that the votes by chance Shouts spent? So not all the shots at each other but are issued by coincidence!

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD] Shoutbox
« Reply #181 on: December 24, 2008, 11:07:15 PM »
Hi,

I am using the last version of 4images (1.7.6) and I got this error when I open the hompage of my site after installing this shoutbox mod:

Code: [Select]
Fatal error: Cannot redeclare get_num_words() (previously declared in /hsphere/local/home/******//******/includes/shout.php:15) in /hsphere/local/home/******/********/includes/shout.php on line 15


Do you know why?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Shoutbox
« Reply #182 on: December 25, 2008, 02:28:12 AM »
restore backups and try again, follow the installation instructions exactly...? ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD] Shoutbox
« Reply #183 on: December 25, 2008, 02:30:22 AM »
Hi V@no,

I solved this way:

Code: [Select]
/*
function get_num_words ($text) {
  $text_words = explode (" ", $text);
  $text_words = sizeof ($text_words);
  return $text_words;
}
*/

&

Code: [Select]
/*
  elseif (get_num_words ($shout_message) > $config['sh_msg_lgth']) {
    $errormsg = $lang['sh_e_msglgth'];
  } 
  */

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Shoutbox
« Reply #184 on: December 25, 2008, 04:00:00 AM »
The error should not occur if you follow instructions exactly without trying add/change something else.
Your "fix" is actually removes restrictions of how many words is allowed per message.

If anything, the "fix" should be:
add if (!function_exists("get_num_words"))
above function get_num_words ($text) {
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD] Shoutbox
« Reply #185 on: December 26, 2008, 05:04:10 AM »
Hi Vano, I just tried it, but the problem is still happening.

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD] Shoutbox
« Reply #186 on: December 26, 2008, 06:52:32 PM »
Hi all,

I believe this code in shout_editor.html is wrong. The button does not react to the click to delete the shout.


Code: [Select]
<a href="{delete_link}"><input type="button" value="{lang_delete}" class="button"></a>
Any idea why?  :?

Thanks in advance,

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD] Shoutbox
« Reply #187 on: December 26, 2008, 07:42:09 PM »
Hi,

I solved it with this code:

Code: [Select]
<input type="button" value="{lang_delete}" class="button" onclick="window.location.href='{delete_link}'">
If you have a better way, I will happy to hear it from you.

Offline mike30

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [MOD] Shoutbox
« Reply #188 on: January 02, 2009, 12:22:25 AM »
Thank you for this great modification!

Offline Honeyfee

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [MOD] Shoutbox
« Reply #189 on: January 14, 2009, 07:06:30 PM »
Ich habe die Shoutbox eingebaut und es sie läuft prima nur wenn ich auf "neue Bilder" klicke bekomme ich folgende Fehler


Notice: Constant SHOUTBOX_TABLE already defined in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 12

Notice: Undefined index: shout in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 22

Notice: Undefined variable: prof_linka in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 96

Notice: Undefined variable: prof_linkb in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 97

Notice: Undefined variable: prof_linka in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 96

Notice: Undefined variable: prof_linkb in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 97

Notice: Undefined variable: prof_linka in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 96

Notice: Undefined variable: prof_linkb in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 97

Notice: Undefined variable: prof_linka in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 96

Notice: Undefined variable: prof_linkb in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 97

Notice: Undefined variable: prof_linka in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 96

Notice: Undefined variable: prof_linkb in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 97

http://www.poser-magic.de

Offline Semi Kolon

  • Newbie
  • *
  • Posts: 20
  • Doodling is geil :P
    • View Profile
    • doodling.DE - express yourself!
Re: [MOD] Shoutbox
« Reply #190 on: February 07, 2009, 05:39:59 PM »
selbe problem auch bei mir, leider.

habe bisher auch noch keine lösung gefunden.

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [MOD] Shoutbox
« Reply #191 on: February 07, 2009, 05:52:56 PM »
Quote
Notice: Constant SHOUTBOX_TABLE already defined in /www/htdocs/w005efb0/posermagic/includes/shout.php on line 12

ist klar, wird ja auch 2mal definiert:
- includes/constants.php
- includes/shout.php

einmal reicht :wink:

kenn den mod nicht, sollte aber klappen:
in includes/shout.php
suche:
Code: [Select]
//--------------------------------------------------------------------------
//---------------Save Shouts------------------------------------------------
//--------------------------------------------------------------------------
danach einfügen:
Code: [Select]
$prof_linka = "";
$prof_linkb =  "";

########## EDIT ##########
hier wird meine Änderung wieder unwirksam 8O
also folgendes noch aus includes/shout.php rauslöschen:
Code: [Select]
  else {
    unset ($prof_linka, $prof_linkb);
  }

Kurt

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Shoutbox
« Reply #192 on: March 11, 2009, 09:15:22 PM »
on 1.76 I recieve the message after pushing the post button

Quote
:The name should be shorter than characters.

When push the button, it refreshed the screen, however there is no shout...
As long as I can finish my site before I die.

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Shoutbox
« Reply #193 on: March 12, 2009, 06:35:20 AM »
working my way through this...


Page 7 of this mod says to find:
Code: [Select]
$shout_message = (stripslashes(trim($HTTP_POST_VARS['shout_message']))); in shout_editor.php ...

and after put this:
Code: [Select]
$captcha = (isset($HTTP_POST_VARS['captcha'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['captcha'])) : "";
     if ($captcha_enable_contact && !captcha_validate($captcha)) {
      $shout_message .= (($shout_message != "") ? "<br />" : "").$lang['captcha_required'];
    }

and it says to find
Code: [Select]
"sh_message" => $shout['0']['message'],
and after  it add
Code: [Select]
"captcha_shout" => (bool)$captcha_enable_shout,
      "lang_captcha" => $lang['captcha'],
      "lang_captcha_desc" => $lang['captcha_desc'],


The only problem is I dont have this code! to modify in shout_editor.php

And the following styles were not included in the mod and had to be added to style.css:

shoutmsg

and

shoutusr

here is my shout_editor.php
Code: [Select]
<?php 
define
('GET_CACHES'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php');
define('SHOUTBOX_TABLE'$table_prefix.'shoutbox');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={charset}" />
<title>Shoutbox Editor</title>
<link rel="stylesheet" href="<?php echo TEMPLATE_PATH."/style.css" ?>" />
<SCRIPT TYPE="text/javascript">
<!--
window.focus();
//-->
</SCRIPT>
</head>
<body style="margin: 0">
<?php

$shout_id 
$HTTP_GET_VARS['shout_id'];


if (
$action == "editupdate") {
  
$sql "UPDATE ".SHOUTBOX_TABLE." SET message='".$HTTP_POST_VARS['shout_message']."' WHERE id = ".$shout_id."";
  
$result $site_db->query($sql);
  
$action "edit";
  echo 
$lang['sh_edited'];
}
if (
$action == "edit") {
  unset(
$shout);
  
$sql "SELECT * FROM ".SHOUTBOX_TABLE." WHERE id = ".$shout_id;
  
$result $site_db->query($sql);
  while (
$row $site_db->fetch_array($result)) {
    
$shout[] = $row;
  }
  
  if (
$shout['0']['usrid'] == $session_info['session_user_id']) {
  
    
?>

      <form method="post" action="<?php echo $site_sess->url(ROOT_PATH."shout_editor.php?action=editupdate&shout_id=".$shout_id?>">
      <table>
    <tr>
        <td>
        <?php echo $lang['sh_name'?><br>
          <input type="text" name="shout_user" value="<?php echo $shout['0']['name'?>" class="shoutinput">
          </td>
        </tr>
        <tr>
        <td>
        <?php echo $lang['sh_message'?><br>
        <textarea name="shout_message" cols="21" rows="2" class="shouttextarea"><?php echo $errormsg; echo $shout['0']['message'?></textarea>
        <input type="submit" name="shout" value="<?php echo $lang['sh_edit'?>" class="button">
  <a href="<?php echo $site_sess->url(ROOT_PATH."shout_editor.php?action=delete&shout_id=".$shout_id?>"><input type="button" value="<?php echo $lang['sh_delete'?>" class="button"></a>
        </td>
      </tr>
      </table>
      </form>
    <?php
    
unset($action);
  }
}

if (
$action == "delete") {
  echo 
"<br /><br /><a href=\"".$site_sess->url(ROOT_PATH."shout_editor.php?action=deleteyes&shout_id=".$shout_id)."\">".$lang['sh_ask_delete']."</a>";
}

if (
$action == "deleteyes") {
  
$sql "DELETE FROM ".SHOUTBOX_TABLE.
        WHERE id = "
.$shout_id;
  
$result $site_db->query($sql);
  echo 
"<br /><br />".$lang['sh_deleted'];
}

echo 
"<br /><a href=\"#\" onClick=\"javascript: window.close();\">".$lang['sh_close']."</a>"
?>

</body>
</html>
<?php 
include(ROOT_PATH.'includes/page_footer.php')
?>

As long as I can finish my site before I die.

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Shoutbox
« Reply #194 on: March 12, 2009, 06:59:43 AM »
How do you disable this error message:

The name should be shorter than  characters.


It seems to make more problems than it solves.
As long as I can finish my site before I die.