[ABD] (Topic &) Post Rating System (with Karma module)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
effco
Registered User
Posts: 16
Joined: Thu May 29, 2008 10:10 pm

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by effco »

Did you use premodded files or did you patched phpBB yourself ?

For a "normal Install" you can copy files from contrib folder and see if you get better luck.
User avatar
Locou
Registered User
Posts: 80
Joined: Wed Apr 30, 2008 11:47 am
Location: Germany

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by Locou »

I think this is a great mod, but I've got problems to install it.
I edited all files and put them on my webspace, but when I open up the /install/ folder I get this error:

Code: Select all

General Error
Unable to remove files within ./../cache/. Please check directory permissions.
I know what you would say. "Set the chmod to 777"
I've done this but the error still show up!
I've set the chmod to the whole phpbb3 folder to 777 and I tried to set it to 7777 and 666 and 775 ...
I've cleared the cache folder several times and it still doesn't work.
Crap. :(
Last edited by Locou on Wed Jun 11, 2008 2:12 pm, edited 1 time in total.
tupeu
Registered User
Posts: 320
Joined: Wed Jul 25, 2007 5:47 pm
Location: roFLmania
Contact:

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by tupeu »

effco wrote:Did you use premodded files or did you patched phpBB yourself ?

For a "normal Install" you can copy files from contrib folder and see if you get better luck.
I can`t use the premodded files because i have over 10 other modes installed already!
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by Alfatrion »

@tupeu:
1. Would you check the edits against the premodded files
2. Do the stats error go away after pressing the submit butting in overview?

@Locou: This is very strange. Can you show us the permissions. "ls -lisad cache cache/*"
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
User avatar
Locou
Registered User
Posts: 80
Joined: Wed Apr 30, 2008 11:47 am
Location: Germany

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by Locou »

Alfatrion wrote:@Locou: This is very strange. Can you show us the permissions. "ls -lisa cache cache/*"
Do you mean this? Right?
Image
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by Alfatrion »

Yes, it looks oke.

drwxr-xr-x 14 akruijff prs 1024 Jun 9 15:11 demo/
drwxrwxrwx 2 akruijff prs 4608 Jun 11 19:29 demo/cache/
-rw-rw-rw- 1 www prs 2704 Jun 9 15:38 demo/cache/[cstd]*

OPEN includes/acp/info/acp_prs.php
FIND

Code: Select all

        function update_install()
        {
                $module_data = $this->module();
                prs_cron();
                prs_add_modules($this->basename);
                $this->template();
        }
REPLACE-WITH

Code: Select all

        function update_install()
        {
                $module_data = $this->module();
                prs_cron();
                prs_add_modules($this->basename);
//              $this->template();
        }
END

If this doesn't work contact the phpbb general support.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
User avatar
Locou
Registered User
Posts: 80
Joined: Wed Apr 30, 2008 11:47 am
Location: Germany

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by Locou »

uhm.
this is the content of the root\includes\acp\info\acp_prs.php

Code: Select all

<?php
/**
*
* @package prs
* @version 1.0.0 2007/12/23 07:00:00 GMT
* @copyright (c) 2008 Alfatrion
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

include($phpbb_root_path . 'includes/prs/functions_prs_admin.' . $phpEx);

/**
* @package module_install
*/
class acp_prs_info
{
	var $u_action;
	var $acp;
	var $basename = 'prs';
	var $imageset_bases;
	var $release_date;
	var $templates;
	var $profiles;
	var $version ;

	function acp_prs_info()
	{
/*
		global $db, $user, $auth, $template, $module;
		global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
*/
		$this->acp = new acp_modules();

		// hour, minute, second, month, day, year
		$this->release_date = mktime(0, 0, 0, 6, 8, 2008);
		set_config('prs_release_date', $this->release_date);
		$this->version = '0.4.0';

		$this->profiles = array(
			'profile_minimal'	=>	array(
				'overall_footer',
				'viewtopic_body',
				'viewforum_body',
			),
			'profile_user'		=>	array(
				'memberlist_view',
				'viewforum_body',
				'search_results',
				'ucp_main_front',
			),
			'profile_mcp'		=>	array(
				'mcp_forum',
				'mcp_topic',
				'mcp_post',
			),
		);
		$this->templates = array(
			'prosilver' => array(
				'imageset'	=> array(
					'prs_star_s_' => array(
						'small'		=> TRUE,
						'height'	=> 9,
						'width'		=> 8,
					),
					'prs_star_v_' => array(
						'small'		=> FALSE,
						'height'	=> 20,
						'width'		=> 17,
					),
					'prs_star_uv_' => array(
						'small'		=> FALSE,
						'height'	=> 20,
						'width'		=> 17,
					),
				),
				'profiles'	=>	array(
					'profile_minimal',
					'profile_user',
					'profile_mcp',
				),
			),
			'subsilver2' => array(
				'imageset'	=> array(
					'prs_star_s_' => array(
						'small'		=> TRUE,
						'height'	=> 9,
						'width'		=> 8,
					),
					'prs_star_v_' => array(
						'small'		=> FALSE,
						'height'	=> 20,
						'width'		=> 17,
					),
					'prs_star_uv_' => array(
						'small'		=> FALSE,
						'height'	=> 20,
						'width'		=> 17,
					),
				),
				'profiles'	=>	array(
					'profile_minimal',
/*
					'profile_user',
					'profile_mcp',
*/
				),
			),
		);
	}

	function module()
	{
		return array(
			'filename'	=> 'acp_prs',
			'title'		=> 'ACP_CAT_PRS',
			'version'	=> $this->version,
			'modes'		=> array(
				'overview'	=> array(
					'title' => 'PRS_OVERVIEW', 
					'auth' => 'acl_a_board && acl_a_server', 
					'cat' => array('ACP_CAT_PRS')
				),
				'details'	=> array(
					'title' => 'PRS_DETAILS', 
					'auth' => 'acl_a_board && acl_a_server', 
					'cat' => array('ACP_CAT_PRS')
				),
				'update'	=> array(
					'title' => 'PRS_UPDATE',
					'auth' => 'acl_a_board && acl_a_server', 
					'cat' => array('ACP_CAT_PRS')
				),
				'stats'	=> array(
					'title' => 'PRS_STATS',
					'auth' => 'acl_a_board && acl_a_server', 
					'cat' => array('ACP_CAT_PRS')
				),
			),
		);
		
	}

	function update_sql() {
		prs_sql_imageset_data($this->templates);
	}
	
	function add_sql() {
		global $db;

		$this->update_sql();

#		Uncomment this if the error troubles you.
#		$db->sql_return_on_error(TRUE);

		prs_sql_table_prs_votes();
		prs_sql_table_prs_votes_chi();
		prs_sql_table_prs_penalty();
		prs_sql_table_prs_modpoints();
		prs_sql_table_posts();
	}

	function del_sql() {
		global $db;

		$sql = 'DROP TABLE ' . PRS_MODSPOINTS_TABLE;
		$db->sql_freeresult($db->sql_query($sql));

		$sql = 'DROP TABLE ' . PRS_PENALTY_TABLE;
		$db->sql_freeresult($db->sql_query($sql));

		$sql = 'DROP TABLE ' . PRS_VOTES_TABLE;
		$db->sql_freeresult($db->sql_query($sql));

		$sql = 'DROP TABLE ' . PRS_VOTES_CHI_TABLE;
		$db->sql_freeresult($db->sql_query($sql));

		$sql = 'ALTER TABLE ' . POSTS_TABLE . '
			DROP COLUMN prs_score,
			DROP COLUMN prs_standard_diviation,
			DROP COLUMN prs_shadowed,
			DROP COLUMN prs_penaltized';
		$db->sql_freeresult($db->sql_query($sql));

		$sql = 'DELETE FROM CONFIG_TABLE
			WHERE config_name REGEXP \'prs_.*\'';
		$db->sql_freeresult($db->sql_query($sql));
	}

	function template($template = '', $profile = '')
	{
		if (!isset($template) || !strlen($template))
		{
			foreach (array_keys($this->templates) as $template)
			{
				$this->template($template);
			}
			return;
		}

		global $cache;

		$file = 'ctpl_admin_acp_prs.html.php';
		$cache->remove_file($cache->cache_dir . $file);

		$cache->destroy('_cfg_template_' . $template);

		$profiles = $list = array();
		if ($profile == NULL || strcmp($profile, ''))
		{
			$profiles = $this->templates[$template]['profiles'];
		}
		else
		{
			$profiles[] = $profile;
		}
		foreach ($profiles as $profile)
		{
			$todo = $this->profiles[$profile];
			$list = array_merge($list, $todo);
		}
		foreach ($list as $file)
		{
			$file = 'tpl_' . $template . '_' . $file . '.html.php';
			$cache->remove_file($cache->cache_dir . $file);
		}

		$cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
	}

	function install()
	{
		$module_data = $this->module();
		prs_add_modules($this->basename);
		$this->template();
		$this->add_sql();
		set_config('prs_version', $this->version);
		set_config('prs_release_date', $this->release_date);
		set_config('prs_install_date', time());
		add_log('admin', 'LOG_PRS_INSTALLED');

	}

	function update()
	{
		$module_data = $this->module();
		prs_add_modules($this->basename);
		$this->template();
		$this->update_sql();
		set_config('prs_version', $this->version);
		set_config('prs_release_date', $this->release_date);
		set_config('prs_update_date', time());
		add_log('admin', 'LOG_PRS_UPDATED');
	}

	function uninstall()
	{
		$this->del_modules();
		$this->del_sql();
	}
}
?>
I can't find the code. :?
tupeu
Registered User
Posts: 320
Joined: Wed Jul 25, 2007 5:47 pm
Location: roFLmania
Contact:

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by tupeu »

i`m trying to check my files along with the premodded files
didn`t find obvious problems, only this little thing:

in the install you say this:

posting.php

find:

Code: Select all

$post_need_approval =
add after:

Code: Select all

// PRS
			prs_new_posts($data, $mode, $current_time);

but the correct line to find is:

Code: Select all

$post_need_approval = (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? true : false;

Somehow, after taking your edits on to my files it worked but there is just a little problem, look at the picture:

Image

As you can see the stars appear after the quickedit, edit and delete buttons
I want the stars before thos buttons, how to do it?

Thank You

EDIT:

When i changed the settings in Can users only vote on the first post in a topic? from NO to YES and then voted on a topic, after the page reloaded i get this error:

Code: Select all

SQL ERROR [ mysql4 ]

Unknown column 't.topic_first_post_id' in 'where clause' [1054]

SQL

SELECT topic_id FROM phpbb_topics WHERE t.topic_first_post_id = 2186 LIMIT 1

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: includes/db/mysql.php
LINE: 205
CALL: dbal_mysql->sql_query()

FILE: includes/db/dbal.php
LINE: 159
CALL: dbal_mysql->_sql_query_limit()

FILE: includes/prs/functions_prs_basis.php
LINE: 214
CALL: dbal->sql_query_limit()

FILE: includes/prs/functions_prs_support.php
LINE: 158
CALL: prs_is_votable_basis()

FILE: prs.php
LINE: 50
CALL: prs_is_votable()
T
But when it was SET to NO i did not get that error !
User avatar
Alfatrion
Registered User
Posts: 166
Joined: Sat Feb 17, 2007 3:06 am

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by Alfatrion »

Place place a bug report on my forum.

Just find the one line you need to comment out.
My abandoned (for own reference). mod: Post Rating System (website | screenshots | demo | support)
toasterthegamer
Registered User
Posts: 8
Joined: Mon Oct 01, 2007 6:59 pm

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by toasterthegamer »

I cant seem to get any stars to show up! :P

http://shaderguru.x10hosting.com/forums ... hp?f=4&t=2

I can see topic stars but no post stars no mater what settings I use. I also how would I also allow the top 5 topics to be posted on my main site?

Thanks,
-Toaster
effco
Registered User
Posts: 16
Joined: Thu May 29, 2008 10:10 pm

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by effco »

I think the general concept of mods sucks. Mods should not be about modifying files of phpBB but completely separated files that would plug into phpBB without the need of modifying it.

Then Mod Developers wouldnt suffer about users maybe applying the patches correctly or not and bug reports would become more obvious.
tupeu
Registered User
Posts: 320
Joined: Wed Jul 25, 2007 5:47 pm
Location: roFLmania
Contact:

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by tupeu »

effco wrote:I think the general concept of mods sucks. Mods should not be about modifying files of phpBB but completely separated files that would plug into phpBB without the need of modifying it.

Then Mod Developers wouldnt suffer about users maybe applying the patches correctly or not and bug reports would become more obvious.
You`ve seen too many vB and IPB broads :P
There are a FEW mods for phpBB3 that need only a line of code to be placed in a board file and the rest is done only by placing the mods files in the root of the board
I have installed over 10 mods so when i upgrade or install another mod i must be extremely carefull not to f*ck-up the board...i know that feelin ~

Alfatrion, please tell me how to move the stars from edit and delete buttons to before them ?
I will also open a support ticket on your forum with the other problem !

EDIT:
I tried to register on your forum but i didn`t get any email yet and i had been some time ~
phpDummie
Registered User
Posts: 292
Joined: Thu Feb 16, 2006 12:09 am
Location: USA
Contact:

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by phpDummie »

effco wrote:I think the general concept of mods sucks. Mods should not be about modifying files of phpBB but completely separated files that would plug into phpBB without the need of modifying it.

Then Mod Developers wouldnt suffer about users maybe applying the patches correctly or not and bug reports would become more obvious.
I hear you. Looking at how nicely this implemented by Joomla, I am very disappointed by phpbb3 in that respect. Some next generation!
phpDummie
Registered User
Posts: 292
Joined: Thu Feb 16, 2006 12:09 am
Location: USA
Contact:

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by phpDummie »

tupeu wrote:I tried to register on your forum but i didn`t get any email yet and i had been some time ~
Don't need no e-mail confirmation, just start using your account.
tupeu
Registered User
Posts: 320
Joined: Wed Jul 25, 2007 5:47 pm
Location: roFLmania
Contact:

Re: [ALPHA] (Topic &) Post Rating System (with Karma module)

Post by tupeu »

phpDummie wrote:
tupeu wrote:I tried to register on your forum but i didn`t get any email yet and i had been some time ~
Don't need no e-mail confirmation, just start using your account.
YOU ARE WORNG ! - you must activate the account by e-mail !~

After I create my account it says:

Code: Select all

Your account has been created. However, this board requires account activation, an activation key has been sent to the e-mail address you provided. Please check your e-mail for further information.
I made another one right now just to check if i didn`t see very well last time but it says exactly the same, you need to confirm the account by e-mail...but the e-mail never comes, i used 3 e-mail accounts untill now


And can`t even unninstall it ~ jeez
Locked

Return to “[3.0.x] Abandoned MODs”