[MODDB] Karma MOD

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!
Anti-Spam Guide
Locked
orkgashmo
Registered User
Posts: 6
Joined: Fri Apr 06, 2007 6:46 pm

Re: [BETA] Karma MOD

Post by orkgashmo »

yes, I made some mistake the first time I tried to install the Cash MOD, because now both of them are working properly in all the forum :D

again, thank you very much!
tdo001
Registered User
Posts: 4
Joined: Fri Jan 18, 2008 9:57 pm

Re: [BETA] Karma MOD

Post by tdo001 »

SQL ERROR [ mysql4 ]

Duplicate column name 'post_karma' [1060]

SQL

ALTER TABLE phpbb_posts ADD post_karma mediumint(8) DEFAULT '0' NOT NULL, ADD post_karma_powered mediumint(8) DEFAULT '0' NOT NULL, ADD post_karma_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, ADD post_karma_search mediumint(8) DEFAULT '0' NOT NULL, ADD post_karma_search_powered mediumint(8) DEFAULT '0' NOT NULL

BACKTRACE

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

FILE: install_karma/install_install.php
LINE: 459
CALL: dbal_mysql->sql_query()

FILE: install_karma/install_install.php
LINE: 86
CALL: install_install->load_schema()

FILE: install_karma/index.php
LINE: 206
CALL: install_install->main()

FILE: install_karma/index.php
LINE: 78
CALL: module->load()

what is that mean? plz help
DjMax
Registered User
Posts: 2
Joined: Wed Jan 16, 2008 7:44 am

Re: [BETA] Karma MOD

Post by DjMax »

hi, no errors, but cant install.
thanks, sorry i dont speak english

Spanish language!!!!

Cant run install_install.php
when run:

Code: Select all

session_begin(); $auth->acl($user->data); $user->setup(array('install', 'mods/karma')); // Only admin can istall or update Karma MOD if (!$auth->acl_get('a_')) { trigger_error('NOT_AUTHORISED'); } // Try to override some limits - maybe it helps some... @set_time_limit(0); $mem_limit = @ini_get('memory_limit'); if (!empty($mem_limit )) { $unit = strtolower(substr($mem_limit, -1, 1)); $mem_limit = (int)$mem_limit; if ($unit == 'k') { $mem_limit = floor($mem_limit/1024); } else if ($unit == 'g') { $mem_limit *= 1024; } else if (is_numeric($unit)) { $mem_limit = floor($mem_limit/1048576); } $mem_limit = max(128, $mem_limit) . 'M'; } else { $mem_limit = '128M'; } @ini_set('memory_limit', $mem_limit ); $mode = request_var('mode', 'karma'); $sub = request_var('sub', ''); $template->set_custom_template('../adm/style', 'admin'); $template->assign_var('T_TEMPLATE_PATH', '../adm/style'); $install = new module(); $install->create('install', "index.$phpEx", $mode, $sub); $install->load(); // Generate the page $install->page_header(); $install->generate_navigation(); $template->set_filenames(array( 'body' => $install->get_tpl_name()) ); $install->page_footer(); /** * @package install */ class module { var $id = 0; var $type = 'install'; var $module_ary = array(); var $filename; var $module_url = ''; var $tpl_name = ''; var $mode; var $sub; /** * Private methods, should not be overwritten */ function create($module_type, $module_url, $selected_mod = false, $selected_submod = false) { global $db, $config, $phpEx, $phpbb_root_path; $module = array(); // Grab module information using Bart's "neat-o-module" system (tm) $dir = @opendir('.'); if (!$dir) { $this->error('Unable to access the installation directory', __LINE__, __FILE__); } $setmodules = 1; while (($file = readdir($dir)) !== false) { if (preg_match('#^install_(.*?)\.' . $phpEx . '$#', $file)) { include($file); } } closedir($dir); unset($setmodules); if (!sizeof($module)) { $this->error('No installation modules found', __LINE__, __FILE__); } // Order to use and count further if modules get assigned to the same position or not having an order $max_module_order = 1000; foreach ($module as $row) { // Check any module pre-reqs if ($row['module_reqs'] != '') { } // Module order not specified or module already assigned at this position? if (!isset($row['module_order']) || isset($this->module_ary[$row['module_order']])) { $row['module_order'] = $max_module_order; $max_module_order++; } $this->module_ary[$row['module_order']]['name'] = $row['module_title']; $this->module_ary[$row['module_order']]['filename'] = $row['module_filename']; $this->module_ary[$row['module_order']]['subs'] = $row['module_subs']; $this->module_ary[$row['module_order']]['stages'] = $row['module_stages']; if (strtolower($selected_mod) == strtolower($row['module_title'])) { $this->id = (int) $row['module_order']; $this->filename = (string) $row['module_filename']; $this->module_url = (string) $module_url; $this->mode = (string) $selected_mod; // Check that the sub-mode specified is valid or set a default if not if (is_array($row['module_subs'])) { $this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_subs'])) ? $selected_submod : $row['module_subs'][0]); } else if (is_array($row['module_stages'])) { $this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_stages'])) ? $selected_submod : $row['module_stages'][0]); } else { $this->sub = ''; } } } // END foreach } // END create /** * Load and run the relevant module if applicable */ function load($mode = false, $run = true) { global $phpbb_root_path, $phpEx; if ($run) { if (!empty($mode)) { $this->mode = $mode; } $module = $this->filename; if (!class_exists($module)) { $this->error('Module "' . htmlspecialchars($module) . '" not accessible.', __LINE__, __FILE__); } $this->module = new $module($this); if (method_exists($this->module, 'main')) { $this->module->main($this->mode, $this->sub); } } } /** * Output the standard page header */ function page_header() { if (defined('HEADER_INC')) { return; } define('HEADER_INC', true); global $template, $user, $stage, $phpbb_root_path; $template->assign_vars(array( 'L_CHANGE' => $user->lang['CHANGE'], 'L_INSTALL_PANEL' => $user->lang['INSTALL_PANEL'], 'L_SKIP' => $user->lang['SKIP'], 'PAGE_TITLE' => $this->get_page_title(), 'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/', 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], 'S_CONTENT_ENCODING' => 'UTF-8', 'S_USER_LANG' => $user->lang['USER_LANG'], ) ); header('Content-type: text/html; charset=UTF-8'); header('Cache-Control: private, no-cache="set-cookie"'); header('Expires: 0'); header('Pragma: no-cache'); return; } /** * Output the standard page footer */ function page_footer() { global $db, $template; $template->display('body'); // Close our DB connection. if (!empty($db) && is_object($db)) { $db->sql_close(); } exit; } /** * Returns desired template name */ function get_tpl_name() { return $this->module->tpl_name . '.html'; } /** * Returns the desired page title */ function get_page_title() { global $lang; if (!isset($this->module->page_title)) { return ''; } return (isset($lang[$this->module->page_title])) ? $lang[$this->module->page_title] : $this->module->page_title; } /** * Generate an HTTP/1.1 header to redirect the user to another page * This is used during the installation when we do not have a database available to call the normal redirect function * @param string $page The page to redirect to relative to the installer root path */ function redirect($page) { $server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'); $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'); $secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0; $script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'); if (!$script_name) { $script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI'); } // Replace backslashes and doubled slashes (could happen on some proxy setups) $script_name = str_replace(array('\\', '//'), '/', $script_name); $script_path = trim(dirname($script_name)); $url = (($secure) ? 'https://' : 'http://') . $server_name; if ($server_port && (($secure && $server_port <> 443) || (!$secure && $server_port <> 80))) { $url .= ':' . $server_port; } $url .= $script_path . '/' . $page; header('Location: ' . $url); exit; } /** * Generate the navigation tabs */ function generate_navigation() { global $user, $template, $phpEx, $language; if (is_array($this->module_ary)) { @ksort($this->module_ary); foreach ($this->module_ary as $cat_ary) { $cat = $cat_ary['name']; $l_cat = (!empty($user->lang['INSTALL_KARMA_CAT_' . $cat])) ? $user->lang['INSTALL_KARMA_CAT_' . $cat] : preg_replace('#_#', ' ', $cat); $cat = strtolower($cat); $url = $this->module_url . "?mode=$cat"; if ($this->mode == $cat) { $template->assign_block_vars('t_block1', array( 'L_TITLE' => $l_cat, 'S_SELECTED' => true, 'U_TITLE' => $url, )); if (is_array($this->module_ary[$this->id]['subs'])) { $subs = $this->module_ary[$this->id]['subs']; foreach ($subs as $option) { $l_option = (!empty($user->lang['INSTALL_KARMA_SUB_' . $option])) ? $user->lang['INSTALL_KARMA_SUB_' . $option] : preg_replace('#_#', ' ', $option); $option = strtolower($option); $url = $this->module_url . '?mode=' . $this->mode . "&sub=$option"; $template->assign_block_vars('l_block1', array( 'L_TITLE' => $l_option, 'S_SELECTED' => ($this->sub == $option), 'U_TITLE' => $url, )); } } if (is_array($this->module_ary[$this->id]['stages'])) { $subs = $this->module_ary[$this->id]['stages']; $matched = false; foreach ($subs as $option) { $l_option = (!empty($user->lang['INSTALL_KARMA_STAGE_' . $option])) ? $user->lang['INSTALL_KARMA_STAGE_' . $option] : preg_replace('#_#', ' ', $option); $option = strtolower($option); $matched = ($this->sub == $option) ? true : $matched; $template->assign_block_vars('l_block2', array( 'L_TITLE' => $l_option, 'S_SELECTED' => ($this->sub == $option), 'S_COMPLETE' => !$matched, )); } } } else { $template->assign_block_vars('t_block1', array( 'L_TITLE' => $l_cat, 'S_SELECTED' => false, 'U_TITLE' => $url, )); } } } } /** * Output an error message * If skip is true, return and continue execution, else exit */ function error($error, $line, $file, $skip = false) { global $user, $db, $template; if ($skip) { $template->assign_block_vars('checks', array( 'S_LEGEND' => true, 'LEGEND' => $user->lang['INST_ERR'], )); $template->assign_block_vars('checks', array( 'TITLE' => basename($file) . ' [ ' . $line . ' ]', 'RESULT' => '' . $error . '', )); return; } echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
thanks resolved problem. sorry incovenient.
annepenullar
Registered User
Posts: 137
Joined: Sun Oct 21, 2007 7:01 am

Re: [BETA] Karma MOD

Post by annepenullar »

Is this mod compatible with the Cash Mod?
User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp
Contact:

Re: [BETA] Karma MOD

Post by Tripp »

annepenullar wrote:Is this mod compatible with the Cash Mod?
Yes
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: [BETA] Karma MOD

Post by A_Jelly_Doughnut »

tdo001 wrote: what is that mean? plz help
It should mean that the karma MOD was once installed successfully previously, so the installer cannot continue.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
MewDragon
Registered User
Posts: 191
Joined: Fri Dec 23, 2005 6:24 pm

Re: [BETA] Karma MOD

Post by MewDragon »

So how's dev on the karma mod continuing? Is it compatible with 3.0?
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: [BETA] Karma MOD

Post by A_Jelly_Doughnut »

It is continuing ... I've just done some work on it yesterday. And it is compatible with 3.0
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
pianodude363
Registered User
Posts: 92
Joined: Thu Nov 17, 2005 4:29 am

Re: [BETA] Karma MOD

Post by pianodude363 »

wow what a great idea for a mod! I can't wait until it's released.
User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp
Contact:

Re: [BETA] Karma MOD

Post by Tripp »

pianodude363 wrote:wow what a great idea for a mod! I can't wait until it's released.
It's already released and works with phpBB 3.0.0
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs
User avatar
PCGUY112887
Registered User
Posts: 502
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Re: [BETA] Karma MOD

Post by PCGUY112887 »

Drugs wrote:
pianodude363 wrote:wow what a great idea for a mod! I can't wait until it's released.
It's already released and works with phpBB 3.0.0
I think he means the official release. Can't call something released if it doesn't work from the get-go :lol:
electricx
Registered User
Posts: 46
Joined: Mon Oct 15, 2007 2:01 pm

Re: [BETA] Karma MOD

Post by electricx »

hi ppl, after instal the mod i get this error

Code: Select all

Parse error: syntax error, unexpected ')' in ...forumincludesfunctions_karma.php on line 623
what i do ?
grover66
Registered User
Posts: 36
Joined: Mon Mar 19, 2007 1:48 pm

Re: [BETA] Karma MOD

Post by grover66 »

A_Jelly_Doughnut wrote:It is continuing ... I've just done some work on it yesterday.
great! looking forward to checking it out :lol:
grover66
Registered User
Posts: 36
Joined: Mon Mar 19, 2007 1:48 pm

Re: [BETA] Karma MOD

Post by grover66 »

electricx wrote:hi ppl, after instal the mod i get this error

Code: Select all

Parse error: syntax error, unexpected ')' in ...forumincludesfunctions_karma.php on line 623
what i do ?
have a look at some of the previous pages, the solution is a few pages back but I can't remember which. it is a simple line replace.
electricx
Registered User
Posts: 46
Joined: Mon Oct 15, 2007 2:01 pm

Re: [BETA] Karma MOD

Post by electricx »

hey tanks :) the solution are in the page 29 :)

but know i have another problem :s my template are not the subsilver/2

and in my template, i have same line are not in the files :s i have any solution ? :s and
after save all files, i need install a module or another ?
Locked

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