[Alpha] Troll MOD (Alpha 2)

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!
Scam Warning
Locked
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: [Alpha] Troll MOD (Alpha 2)

Post by igorw » Mon Jun 23, 2008 11:18 pm

Okay guys, alpha 2 is out! Important changes:
  • Using MODX 1.2.0
  • Now has a config page, and the ACP module has its own tab in the acp
  • Config options are: troll virus, troll chance; possibility to reject posts, pms and emails
  • The constants for the MOD have been moved to a separate file, so the edit to constants.php is no longer needed
  • Fixed some small things, like trolling bots
  • Added an a_troll permission, so that'll be needed to access the troll modules
  • Added two new troll actions: SQL error and auth removal
Please test it out and report any problems as soon as possible! I've also included some update instructions, look in the contrib folder.

My plan is to get alpha 3 (or beta 1) out next weekend, with some nice new stuff. I hope i can make it :mrgreen:.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

Forke
Registered User
Posts: 102
Joined: Fri Feb 08, 2008 6:03 am

Re: [Alpha] Troll MOD (Alpha 2)

Post by Forke » Mon Jun 23, 2008 11:39 pm

wow, evil, thats amazing. I really think this is one of the best mods. I've tried before and it worked great. Also, I'm amazed on the simplicity of the install instructions.

I'll try this version. If I run into issues, I let you know.
My first validated mod!
Adaptive Quick Search

sotis
Registered User
Posts: 294
Joined: Tue Oct 17, 2006 4:56 pm
Location: Bulgaria
Contact:

Re: [Alpha] Troll MOD (Alpha 2)

Post by sotis » Tue Jun 24, 2008 4:37 am

When I run install/index.php I recieve this:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/constants_troll.php on line 21: Constant TROLLS_TABLE already defined
[phpBB Debug] PHP Notice: in file /includes/constants_troll.php on line 22: Constant TROLL_ACTIONS_TABLE already defined
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3293: Undefined index: HIDDEN_USER_TOTAL_AND
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3602: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2956)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3604: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2956)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3605: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2956)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3606: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2956)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 210: Undefined index: MIB
Натисни тук за да се върнеш на началната страница
General Error
template->_tpl_load_file(): File ./../styles/prosilver/template/install_main.html does not exist or is empty


User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: [Alpha] Troll MOD (Alpha 2)

Post by igorw » Tue Jun 24, 2008 7:35 am

You didn't complete all of the update instructions (the one with constants.php). You are not running phpBB 3.0.1, or if you are it's not been updated correctly.

I'll have a look at this, although it shouldn't happen...

Code: Select all

template->_tpl_load_file(): File ./../styles/prosilver/template/install_main.html does not exist or is empty
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

User avatar
Black Antitoon
Registered User
Posts: 219
Joined: Mon Dec 25, 2006 12:12 pm
Contact:

Re: [Alpha] Troll MOD (Alpha 2)

Post by Black Antitoon » Tue Jun 24, 2008 9:41 am

That's great! I'm going to try it very soon! :D
Do you recognise my avatar? :)

sotis
Registered User
Posts: 294
Joined: Tue Oct 17, 2006 4:56 pm
Location: Bulgaria
Contact:

Re: [Alpha] Troll MOD (Alpha 2)

Post by sotis » Tue Jun 24, 2008 11:56 am

eviL<3 wrote:You didn't complete all of the update instructions (the one with constants.php). You are not running phpBB 3.0.1, or if you are it's not been updated correctly.

I'll have a look at this, although it shouldn't happen...

Code: Select all

template->_tpl_load_file(): File ./../styles/prosilver/template/install_main.html does not exist or is empty
There is no instructions for constants.php

Code: Select all

Files to Edit

memberlist.php, 
posting.php, 
ucp.php, 
includes/ucp/ucp_pm_compose.php 

Included Files

root/adm/style/acp_troll.html , 
root/includes/acp/acp_troll.php , 
root/includes/acp/info/acp_troll.php , 
root/includes/hooks/hook_troll.php , 
root/includes/troll/base.php , 
root/includes/troll/troll_auth.php , 
root/includes/troll/troll_disabled.php , 
root/includes/troll/troll_exit.php , 
root/includes/troll/troll_grace.php , 
root/includes/troll/troll_logout.php , 
root/includes/troll/troll_redirect.php , 
root/includes/troll/troll_sleep.php , 
root/includes/troll/troll_sql.php , 
root/includes/constants_troll.php , 
root/includes/functions_troll.php , 
root/install/functions_install.php , 
root/install/index.php , 
root/install/schemas/firebird_schema.sql , 
root/install/schemas/mssql_schema.sql , 
root/install/schemas/mysql_40_schema.sql , 
root/install/schemas/mysql_41_schema.sql , 
root/install/schemas/oracle_schema.sql , 
root/install/schemas/postgres_schema.sql , 
root/install/schemas/sqlite_schema.sql , 
root/install/style/install_error.html , 
root/install/style/install_footer.html , 
root/install/style/install_header.html , 
root/install/style/install_main.html , 
root/language/en/acp/troll.php , 
root/language/en/mods/info_acp_troll.php , 
root/language/en/mods/troll.php 

Edit:
Oh, I understand what you mean for constants.php, but I don't upgrade from Alfa1.
Maybe there is something wrong with main upgrade to 3.0.1

iBotPeaches
Registered User
Posts: 131
Joined: Tue Jul 24, 2007 12:38 am
Location: Vahalla
Contact:

Re: [Alpha] Troll MOD (Alpha 2)

Post by iBotPeaches » Tue Jun 24, 2008 6:46 pm

Upgrading to A2. I get the same errors as both above posts. I removed it from constants.php and it still says its being defined. Its soo confusing. On the upgrade to install it says "there is nothing to do" How can I upgrade when theres nothing to do?
Image

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: [Alpha] Troll MOD (Alpha 2)

Post by igorw » Tue Jun 24, 2008 7:13 pm

Okay, updating was something i didn't really try. Let me test it out. ;)

EDIT:

I have found the problem, and it will be fixed in the next version. For now: to install the MOD, you have to have a valid admin session, go to the ACP. Then simply replace the "adm" in your address bar with "install". Then it should work.

Make sure you replace all the files before trying to run the update script.

And i've just noticed another thing for updating. In order to update please apply this fix.

Open: install/functions_install.php
Find:

Code: Select all

call_user_func_array(array($db_tools, 'schema_changes'), $args);
Replace with:

Code: Select all

call_user_func_array(array(&$db_tools, 'schema_changes'), $args);
Sorry guys :oops:. Alternatively get the current SVN with the two bugs fixed (but watch out, it will probably mess up your version number :) for the MOD). Link
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

iBotPeaches
Registered User
Posts: 131
Joined: Tue Jul 24, 2007 12:38 am
Location: Vahalla
Contact:

Re: [Alpha] Troll MOD (Alpha 2)

Post by iBotPeaches » Tue Jun 24, 2008 8:53 pm

Did that, and still the page loads with "constants already described"

I'll just wait for the next upgrade. I even did that fix and no go.
Image

User avatar
Smavy
Registered User
Posts: 36
Joined: Wed Mar 28, 2007 12:04 pm
Location: Germany
Contact:

Re: [Alpha] Troll MOD (Alpha 2)

Post by Smavy » Tue Jun 24, 2008 8:54 pm

Hi,
I look forward to the first Beta. :D
Thank you for your work evil<3

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: [Alpha] Troll MOD (Alpha 2)

Post by igorw » Tue Jun 24, 2008 9:14 pm

iBotPeaches, and you're sure you don't have the edit added to constants.php? It needs to be removed. Check the update instructions in the contrib folder...

Smavy, danke. ;)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

iBotPeaches
Registered User
Posts: 131
Joined: Tue Jul 24, 2007 12:38 am
Location: Vahalla
Contact:

Re: [Alpha] Troll MOD (Alpha 2)

Post by iBotPeaches » Wed Jun 25, 2008 2:12 am

I honestly have no clue what I did, but It works now. Let me run through what I did.

I re FTPed Alpha 2 files, then tried install. still failed.I deleted the constant part from constants_trolls so I could get the updater to load, then I did the update.Then it failed.I downloaded Alpha 1 files and uploaded those and did that mySQL query. That just caused a bazillion errors. I then re uploaded Alpha 2 files and that mySQL manually without the updater and it works!
Image

Jaglavak
Registered User
Posts: 7
Joined: Sun Feb 03, 2008 4:08 am

Re: [Alpha] Troll MOD (Alpha 2)

Post by Jaglavak » Fri Jun 27, 2008 2:13 am

I'm getting the following error when trolling
  • Fatal error: Declaration of troll_sleep::action() must be compatible with that of troll_action::action() in /includes/troll/troll_sleep.php on line 34
I also now have two Troll tabs in the APC - the old one and the new one.

Troll chance always stays at 2

Line 34 is the last one in this snippet:

Code: Select all

class troll_sleep extends troll_action
{
	public $settings = array(
		'min'	=> array('lang' => 'TROLL_SLEEP_MIN',	'validate' => 'int:1',	'type' => 'dimension:3:4', 'explain' => false),
		'max'	=> array('lang' => 'TROLL_SLEEP_MAX',	'validate' => 'int:60',	'type' => 'dimension:3:4', 'explain' => false),
	);

	public function action($min, $max)
	{
		// suppress errors to prevent error messages when maximum time is reached
		@sleep(rand($min, $max));
	}
}  
i removed troll_sleep.php from the directory and it's working OK

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: [Alpha] Troll MOD (Alpha 2)

Post by igorw » Fri Jun 27, 2008 5:24 pm

Okay, remove troll_sleep for now. Damn, that got in a bit early :roll:.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

User avatar
Jaga
Registered User
Posts: 140
Joined: Mon Jun 23, 2008 5:10 am

Re: [Alpha] Troll MOD (Alpha 2)

Post by Jaga » Fri Jun 27, 2008 7:01 pm

It looks to me like it could be solved by simply adding in a temp var for the random sleep interval, and then passing the value instead of trying to pass the rand function. I really haven't looked at the code beyond this however, so it's purely a guess.

Locked

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