[ALPHA] Shoutbox MOD v0.1.3

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Barduck
Registered User
Posts: 101
Joined: Fri Aug 04, 2006 7:19 am
Location: Belgium
Contact:

Post by Barduck » Sat Sep 09, 2006 2:22 pm

for being in alpha, this is a great MOD (a,d I use it on 3 templates and have about 50 other MOD's on my forum, no problem yet!)

But:
1. this could really use a button (like submit or refresh) that opens a pop-up box for smiley's being put in
2. a prune button only visible for moderators and/or admins would definitly make those people's life easier (instead of having to remove every shout manualy). Maybe in to the ACP?

And then a question: I have the ModCP MOD two. So if I do the same things in there a in the admin section, will Mod's be able to remove the shouts?

So any one that could do those; TIA
AVE CAESAR, MORITURI TE SALUTANT

Barduck
Registered User
Posts: 101
Joined: Fri Aug 04, 2006 7:19 am
Location: Belgium
Contact:

Post by Barduck » Sun Sep 10, 2006 4:17 pm

Allright everybody who uses this MOD!!! I've found a way to have a prune button. Use this MOD: [RC] Shoutbox add-on: Erase Shoutbox Contents MOD
In this MOD find:

shout'

and replace by

shoutbox

The upload like told in the MOD. You now have a fully working prune action, generated from inside the ACP
AVE CAESAR, MORITURI TE SALUTANT

User avatar
littlepaws
Registered User
Posts: 353
Joined: Thu Mar 30, 2006 10:40 pm

Post by littlepaws » Wed Sep 13, 2006 4:22 pm

When i click the refresh button it refreshes and then goes to the index page.

This also happens when I submit a shout

If im viewing the shoutbox can it just refresh the page its on i.e the shoutbox page. Also when i submit a shout.

if on on the index page can it do it for just that page too

Many Thanks
www.littlepawsdogtraining.com
website for dog lovers

www.tottenhamhotspursforum.co.uk
Football Fans forum

www.xbox360fanzone.com
Xbox 360 Forum

switch13
Registered User
Posts: 5
Joined: Sat Aug 26, 2006 9:53 am

Post by switch13 » Sun Sep 17, 2006 6:08 pm

I've been browsing this thread for 30mins but can't find the actual MOD. Can somebody give me a link on where the actual mod is?

User avatar
defender-uk
Registered User
Posts: 380
Joined: Tue Jun 01, 2004 9:06 am
Location: London, UK
Contact:

Post by defender-uk » Tue Sep 19, 2006 9:43 am

You can download the version I have done for battye HERE
Barduck wrote: for being in alpha, this is a great MOD (a,d I use it on 3 templates and have about 50 other MOD's on my forum, no problem yet!)

But:
1. this could really use a button (like submit or refresh) that opens a pop-up box for smiley's being put in
2. a prune button only visible for moderators and/or admins would definitly make those people's life easier (instead of having to remove every shout manualy). Maybe in to the ACP?

And then a question: I have the ModCP MOD two. So if I do the same things in there a in the admin section, will Mod's be able to remove the shouts?

So any one that could do those; TIA


I'll look into what I can do.

Keefy wrote: Installed Defenders altered Shoutbox

The Shotbox seems to be working ok on the index page with no errors shown.

If you click the SHOUTBOX title which takes you to the shoutbox page with all the shouts on thats where the error is

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fhlinux209/mysite.com/user/htdocs/forum/db/mysql4.php on line 235

though you can submit a shout there and its all works ok.

ALSO:-

In the control panel ive have it set to no guests, show 10 shouts on index and 75 shouts to be stored, now the problem is i have over 75 shouts now, but its only showing the 1st 75 shouts on the shoutbox page (its not deleting the old shouts), the new shouts are only showing on the index page


Fixed in v0.15 (available in the link at the top of THIS post.

User avatar
scubajeep2003
Registered User
Posts: 150
Joined: Tue Sep 27, 2005 2:49 am

Post by scubajeep2003 » Wed Sep 20, 2006 2:11 am

littlepaws wrote: When i click the refresh button it refreshes and then goes to the index page.

This also happens when I submit a shout

If im viewing the shoutbox can it just refresh the page its on i.e the shoutbox page. Also when i submit a shout.

if on on the index page can it do it for just that page too

Many Thanks


I figured out how to get it to go back to the shoutbox page after submitting. As for the refresh, I am still trying to hack through the code to find where its redirected. Hope this helps.

open shoutbox.php

find this line of code

Code: Select all

else
		{
		redirect( append_sid('index.'.$phpEx) );
		}
	}
?>
replace it with this

Code: Select all

else
		{
		redirect( append_sid('shoutbox.'.$phpEx) );
		}
	}
?>
Last edited by scubajeep2003 on Wed Sep 20, 2006 2:57 am, edited 2 times in total.

User avatar
scubajeep2003
Registered User
Posts: 150
Joined: Tue Sep 27, 2005 2:49 am

Post by scubajeep2003 » Wed Sep 20, 2006 2:56 am

I also got rid of the refresh button because it went to the index page. This just seemed out of whack. From what I know of php coding, this cannot be done with an easy change. So, I ended up recoding it to just RESET the text box, that way if someone messes up, it just clears it and they dont make a bad post. This seemed like a logical thing to do since the user can just hit the F5 button on their keyboard or the refresh button to refresh the page.

Here is what I changed:

open shoutbox_body.tpl from your template folder and find this code

Code: Select all

<span class="gensmall">
		{L_MAKE_A_SHOUT}&nbsp;<input type="text" name="shout" length="50" maxlength="255" /> <input type="submit" name="submit" value="{L_SUBMIT}" /> <input type="submit" name="submit" value="{F_REFRESH}" />
		</span>
replace it with this

Code: Select all

<span class="gensmall">
		{L_MAKE_A_SHOUT}&nbsp;<input type="text" name="shout" length="50" maxlength="255" /> <input type="submit" name="submit" value="{L_SUBMIT}" /> <input type="reset" name="reset" value="{F_REFRESH}" />
		</span>
Maybe that will help everyone out around the refresh button problem.

You can check it out on http://www.MoJeepin.com/forum/shoutbox.php

User avatar
defender-uk
Registered User
Posts: 380
Joined: Tue Jun 01, 2004 9:06 am
Location: London, UK
Contact:

Post by defender-uk » Thu Sep 21, 2006 8:31 pm

Thanks, but v0.15 has fixed all the issues.

User avatar
littlepaws
Registered User
Posts: 353
Joined: Thu Mar 30, 2006 10:40 pm

Post by littlepaws » Fri Sep 22, 2006 1:00 pm

wheres the latest version download?

only one available here was Version: 0.1.3
www.littlepawsdogtraining.com
website for dog lovers

www.tottenhamhotspursforum.co.uk
Football Fans forum

www.xbox360fanzone.com
Xbox 360 Forum

User avatar
defender-uk
Registered User
Posts: 380
Joined: Tue Jun 01, 2004 9:06 am
Location: London, UK
Contact:

Post by defender-uk » Fri Sep 22, 2006 11:45 pm

Try looking at the post above your posts.

User avatar
littlepaws
Registered User
Posts: 353
Joined: Thu Mar 30, 2006 10:40 pm

help with shoutbox_install.php

Post by littlepaws » Sat Sep 23, 2006 5:50 pm

I have version 013 installed but need help installing latest version 015

help with shoutbox_install.php

I have already ran the shoutbox_install.php file as follows

Code: Select all

<?php
/***************************************************************************
 *                               shoutbox_install.php
 *                            -------------------
 *   begin                : Sat, Oct 26, 2005
 *   copyright          : (C) 2005 Battye @ CricketMX.com
 *   email                : cricketmx@hotmail.com
 *
 *   $Id: shoutbox.php, v1 (October 2005) battye Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'config.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

$sql = array();
$sql[] = "CREATE TABLE `" . SHOUTBOX_TABLE . "` (
  `shoutbox_id` int(5) NOT NULL default '0',
  `shoutbox_datetime` VARCHAR( 255 ) NOT NULL default '',
  `shoutbox_text` varchar(255) NOT NULL default '',
  `shoutbox_author` int(5) NOT NULL default '0'
);";

$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES('guest_shoutbox', '0')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES('rows_shoutbox', '5')";

	for ($i = 0; $i < count($sql); $i++) 
	{
		if( !$db->sql_query($sql[$i]) )
		{
		echo 'The shoutbox table / rows could not be created (' . $sql[$i] . ')<br />';
		}
	}
	
message_die(GENERAL_MESSAGE, $lang['Shoutbox_table_made']);	
?>
I get an error meesage when trying to run the new shoutbox_install.php

Code: Select all

<?php
/***************************************************************************
 *                               shoutbox_install.php
 *                            -------------------
 *   begin                : Sat, Oct 26, 2005
 *   copyright          : (C) 2005 Battye @ CricketMX.com
 *   email                : cricketmx@hotmail.com
 *
 *   $Id: shoutbox.php, v1 (October 2005) battye Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//include($phpbb_root_path . 'config.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

if(!defined('SHOUTBOX_TABLE'))
{
  die("Error in install");
}

$sql = array();
$sql[] = "CREATE TABLE `" . SHOUTBOX_TABLE . "` (
  `shoutbox_id` int(5) NOT NULL default '0',
  `shoutbox_datetime` int( 11 ) NOT NULL default 0,
  `shoutbox_text` varchar(255) NOT NULL default '',
  `shoutbox_author` int(5) NOT NULL default '0'
);";

$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('guest_shoutbox', '0')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('rows_shoutbox', '5')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('max_rows_shoutbox', '100')";

	for ($i = 0; $i < count($sql); $i++) 
	{
		if( !$db->sql_query($sql[$i]) )
		{
		echo $i . ': The shoutbox table / rows could not be created (' . $sql[$i] . ')( ' . $db->sql_error() . ' )<br />';
		}
	}
	
message_die(GENERAL_MESSAGE, $lang['Shoutbox_table_made']);	
?>
What do i need to do?
Last edited by littlepaws on Sat Sep 23, 2006 6:03 pm, edited 1 time in total.
www.littlepawsdogtraining.com
website for dog lovers

www.tottenhamhotspursforum.co.uk
Football Fans forum

www.xbox360fanzone.com
Xbox 360 Forum

User avatar
littlepaws
Registered User
Posts: 353
Joined: Thu Mar 30, 2006 10:40 pm

Shoutbox.php showing newest post at the bottom of the list?

Post by littlepaws » Sat Sep 23, 2006 6:00 pm

Shoutbox.php showing newest post at the bottom of the list?

How can i get it to appear at top of list?
www.littlepawsdogtraining.com
website for dog lovers

www.tottenhamhotspursforum.co.uk
Football Fans forum

www.xbox360fanzone.com
Xbox 360 Forum

User avatar
defender-uk
Registered User
Posts: 380
Joined: Tue Jun 01, 2004 9:06 am
Location: London, UK
Contact:

Post by defender-uk » Sun Sep 24, 2006 12:42 pm

The install is for installation, I do not put together upgrade scripts for Alpha/Beta mods (sorry).


The refresh button jumps to the bottom, so thats how the list is.

If you want it to display the other way round you'll need to change

Code: Select all

$shoutbox_sql = "SELECT * FROM " . SHOUTBOX_TABLE . " ORDER BY shoutbox_id ASC LIMIT $last_row,75";
to

Code: Select all

$shoutbox_sql = "SELECT * FROM " . SHOUTBOX_TABLE . " ORDER BY shoutbox_id DESC LIMIT $last_row,75";
It's the ASC which is changed to DESC.

rusty12345678909
Registered User
Posts: 170
Joined: Mon Mar 13, 2006 7:09 pm

Post by rusty12345678909 » Tue Sep 26, 2006 3:05 pm

I am trying to install Shoutbox MOD Version: 0.1.3



I am to the part where it says OPEN admin/admin_board.php


FIND

"L_AUTOLOGIN_TIME_EXPLAIN" => $lang['Autologin_time_explain'],

I cant find it, I also searched my whole phpbb directory "Containing text" and it returned nothing.


Please advise, thanks

rusty12345678909
Registered User
Posts: 170
Joined: Mon Mar 13, 2006 7:09 pm

Post by rusty12345678909 » Tue Sep 26, 2006 3:17 pm

I skipped adding the
// Shoutbox MOD
"L_SHOUTBOX" => $lang['Shoutbox'],
"L_SHOUTBOX_EXPLAIN" => $lang['Shoutbox_explain'],
"L_GUEST_SHOUTBOX" => $lang['Shoutbox_open_to_guests'],
"L_SHOUTBOX_ROWS" => $lang['Shoutbox_rows'],
// End ..


but it still seems to work, what does that part do?

Also how can I make the text box where you type wider?

Thanks agian

Post Reply

Return to “[2.0.x] MODs in Development”