MyBB Community Forums

Full Version: Smethead's Mod/Plugins list [2 new plugins and 3 updated plugins]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
ok, thanks for the info
Wow, this thread got a bit behind. It was already on the fourth page of 'Code Modifications'.

Anywayz... 1 new plugin today. My first of the new year. I know, it's already the third week in January, but I got a bit distracted.
Automatic PM on Move/Rename/Delete Thread is the name and you can find more info about it on the first page.
gr8 Smile conglatulations
i'll defintly use this mod Smile

thanks
An update for [N.A.R.S.>2<] (Alternative Reputation System). It's not a necessary update. A bit more info on the first post
This is the changelog:
2.2:	FIX:	Users with 0 reputation will have their links back on their postbits.
	FIX:	Some users might have had problems with activating and deactivating. That's solved now.
	ADD:	On reputation details pages, the small table with the times can now change background colour.
	FIX:	MySQL 5 fixes: Deactivation blocks when backups are enabled.
	ADD:	Members can now choose if they want their reputation to be shown to all users.
		  if not, only they, the user who got the rep and Rep-Moderators can see it.
	UPD:	Guests and users who aren't logged in, or banned can no longer access the repdetails.php pages.
	ADD:	You can now show the reputations given by a member on the repdetails.php page.
2.3:	ADD:	Rep-Moderators can now see who has reported a reputation.
	UPD:	Fixed the recount tool a bit for reported reputations.

For all people having a white screen on deactivating NARS 2.0/2.1/2.2b, there are 2 ways of solving the problem:
1. Disable Backups and deactivate the plugin.
2. If you want to keep using backups: Open nars.php and find:
$db->query("DELETE * FROM ".TABLE_PREFIX."nars_backup");
And replace it with:
$db->query("DELETE FROM ".TABLE_PREFIX."nars_backup WHERE 1=1 ");
Now you can deactivate the plugin.
I think this problem only occurs when using MySQL 5

The plugin is not completely translated into german, finnish and italian, because I added some new strings.

[edit]Another small update, sorry.[/edit]
I'm still not able to deactivate it ^

I still get the white screen.

[edit] And the settings aren't there anymore under board settings.
You did edit nars.php correctly, right?

If you have access to your Database:

Go to "TABLE_PREFIX."users and delete the field reportwarnings
Go to "TABLE_PREFIX."reputation and delete the fields reason, reported, showtoall and reportedby

after that, open nars.php and replace the whole deactivate function with
function nars_deactivate()
{
	global $db, $mybb;
	$db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='Alternative Reputation System Settings'");
	//RESTORE EDITED TEMPLATES
	require "./inc/adminfunctions_templates.php";
	find_replace_templatesets("index",'#\$nars_report#',"", 0);
	find_replace_templatesets("member_profile",'#<!-- NARS_1_4 -->#','<td class="trow1"><strong>$lang->rating</strong></td>
<td class="trow1">$ratestars $ratelink</td>', 0);
	find_replace_templatesets("postbit",'#\$post\[nars_replink\]#','$post[replink]',0);
	
	//RESTORE EDITED FILES
	$fh = fopen('./jscripts/general.js', "r") or cperror("Could not open file!"); //OPEN FILE
	$data = fread($fh, filesize('./jscripts/general.js')) or cperror("Could not read file!"); //MAKE TEMPORARY STRING
	fclose($fh); //CLOSE FILE AGAIN
	$newdata = preg_replace('#'.preg_quote('popupWin("reputation2.php').'#','popupWin("reputation.php',$data); //REPLACE IN STRING
	$fw = fopen('./jscripts/general.js', "w") or cperror('Could not open file!'); //OPEN FILE AGAIN
	$fb = fwrite($fw, $newdata) or cperror('Could not write to file'); //WRITE STRING TO FILE
	fclose($fw); //CLOSE FILE AGAIN
}
I hope that works.
Thanks for the reply Smile

I deleted reportwarnings, but don't see any of the others in the database.

[edit] Also, what exactly to I replace? I ended up messing something up, so I had to go back to the original.
I don't exactly know which version you have, but replace the whole deactivate function.

it starts with (about line 534)
function nars_deactivate()
{
and ends with (around line 629)
}

//PLUGIN HOOK FUNCTIONS
Replace everything in between those { and } with
    //RESTORE EDITED FILES
    $fh = fopen('./jscripts/general.js', "r") or cperror("Could not open file!"); //OPEN FILE
    $data = fread($fh, filesize('./jscripts/general.js')) or cperror("Could not read file!"); //MAKE TEMPORARY STRING
    fclose($fh); //CLOSE FILE AGAIN
    $newdata = preg_replace('#'.preg_quote('popupWin("reputation2.php').'#','popupWin("reputation.php',$data); //REPLACE IN STRING
    $fw = fopen('./jscripts/general.js', "w") or cperror('Could not open file!'); //OPEN FILE AGAIN
    $fb = fwrite($fw, $newdata) or cperror('Could not write to file'); //WRITE STRING TO FILE
    fclose($fw); //CLOSE FILE AGAIN
and try to deactivate the plugin once again. After that, upload the new files and activate your plugin.

Deactivate and activate it once more, to make sure everything has been done correctly.
That deactivated it. I uploaded the new version and tried to install. I got this error:

mySQL error: 1060
Duplicate column name 'reported'
Query: ALTER TABLE mybb_reputation ADD reported CHAR( 3 ) NOT NULL, ADD reason VARCHAR( 255 ) NOT NULL, ADD showtoall VARCHAR( 3 ) DEFAULT 'yes' NOT NULL, ADD reportedby SMALLINT( 6 ) NOT NULL
i guess because reported is already there.
so it doesn't make much problem
waitting confirmation from Smethead, how ever it should be activated anyway !!
regards
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30