[BETA] Medal System MOD [ Latest: 0.4.6 ]

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.
eberth
Registered User
Posts: 1
Joined: Sun Mar 13, 2005 8:35 pm

Post by eberth »

Looks great but... :(

I dont understand all of these code:

what is add_sql????, and what does "change the table prefix used in your database" means???

Code: Select all

# 
#-----[ ADD SQL ]------------------------------------------ 
#
# Remember to change the table prefix used on your database
CREATE TABLE `phpbb_medal` (
  `medal_id` mediumint(8) NOT NULL auto_increment,
  `cat_id` mediumint(8) unsigned NOT NULL default '1',
  `medal_name` varchar(40) NOT NULL default '',
  `medal_description` varchar(255) NOT NULL default '',
  `medal_image` varchar(40) default NULL,
  PRIMARY KEY  (`medal_id`)
) TYPE=MyISAM;
Thallium
Registered User
Posts: 395
Joined: Mon Aug 30, 2004 12:30 am
Contact:

Post by Thallium »

It means you need to add this data to your database. You use phpmyadmin to 'run' the sql on your database. Check the knowledge base here and try searching for info about exactly how to do it, it isn't too hard, but you need to do it correctly. Hope this helps,

---Thallium
Complete phpBB powered websites, Mods/Hacks installed, unique templates, updates and repairs... reasonable. Email, PM or IM.
Sebgalach
Registered User
Posts: 3
Joined: Sat Mar 26, 2005 4:00 pm
Location: Belgique
Contact:

Post by Sebgalach »

Ok, here, I installed Medal System MOD, But the problem, it is that I have this while wanting to see the messages or to answer:

Parse error: parse error in /data/members/free/multimania/fr/g/m/e/gmedievale/htdocs/forum/viewtopic.php on line 1138

In these lines (1120 - 1140), I have:

Code: Select all

		$alignment_id = $postrow[$i]['user_alignment'];
		$csql = "SELECT *
		FROM " . RPG_FIELDS_TABLE ."
		WHERE field_id = $alignment_id ";
		$cresult = $db->sql_query($csql);
		if( !$cresult )
		{
			message_die(GENERAL_ERROR, "Couldn't obtain rpg fields from database", "", __LINE__, __FILE__, $sql);
		}
		$rpg_class = $db->sql_fetchrow($cresult);
		$alignment_name = $rpg_class['field_name'];
		$alignment_lang = $lang['rpg_fields_type_alignment'];
		if ( !$board_config['display_alignment_posts'] )
		{
		$alignment_text = $alignment_lang.'&nbsp;:&nbsp;'.$alignment_name.'<br />';
		}
		else
		{
		$alignment_text = $alignment_lang.'&nbsp;:&nbsp;'<img src="images/rpg_fields/'.$alignment_name.'.gif">'.'<br />';
		}
	}
Here is, a large whole thank you with you all :wink: .
A+
Sébastien
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

The code provided by you seems to suggest the error lies in the RPG MOD you are using since there isn't anything related to the Medal MOD.

~Mac
Sebgalach
Registered User
Posts: 3
Joined: Sat Mar 26, 2005 4:00 pm
Location: Belgique
Contact:

Post by Sebgalach »

Thanks :wink: .

With the fact, while wanting to remove the medal, I have this who appears (it is not normal...)

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /data/members/free/multimania/fr/g/m/e/gmedievale/htdocs/forum/medalcp.php on line 191

Warning: Cannot modify header information - headers already sent by (output started at /data/members/free/multimania/fr/g/m/e/gmedievale/htdocs/forum/medalcp.php:191) in /data/members/free/multimania/fr/g/m/e/gmedievale/htdocs/forum/includes/page_header.php on line 490

Warning: Cannot modify header information - headers already sent by (output started at /data/members/free/multimania/fr/g/m/e/gmedievale/htdocs/forum/medalcp.php:191) in /data/members/free/multimania/fr/g/m/e/gmedievale/htdocs/forum/includes/page_header.php on line 492

Warning: Cannot modify header information - headers already sent by (output started at /data/members/free/multimania/fr/g/m/e/gmedievale/htdocs/forum/medalcp.php:191) in /data/members/free/multimania/fr/g/m/e/gmedievale/htdocs/forum/includes/page_header.php on line 493

Page header (490 - 497)

Code: Select all

	header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');

$template->pparse('overall_header');

?>
medalcp (190 - 200) :

Code: Select all

			{
				$user_list = htmlspecialchars($HTTP_POST_VARS['unmedal_user']);

				for($i = 0; $i < count($user_list); $i++)
				{
					if ( $user_list[$i] != -1 )
					{	
						$where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . intval($user_list[$i]);
					}
				}
			}
l'erreur dans medalcp est :

Code: Select all

$user_list = htmlspecialchars($HTTP_POST_VARS['unmedal_user']);
variable # $$HTTP_POST_VARS['unmedal_user'>] is empty what puts an error of the function htmlspecialchars.

But I, can you cannot aps how change help me?

Still a large whole thanks in advance:wink: .
A+
Sébastien
doswald
Registered User
Posts: 19
Joined: Wed Feb 23, 2005 1:18 am

Post by doswald »

Same problem with me, I have used IntegraMOD and when I try to remove Medal from specific user this error came appeared
Warning: htmlspecialchars() expects parameter 1 to be string, array given in C:\Garcian\Forum\medalcp.php on line 191

Warning: Cannot modify header information - headers already sent by (output started at C:\Garcian\Forum\medalcp.php:191) in C:\Garcian\Forum\includes\page_header.php on line 807

Warning: Cannot modify header information - headers already sent by (output started at C:\Garcian\Forum\medalcp.php:191) in C:\Garcian\Forum\includes\page_header.php on line 809

Warning: Cannot modify header information - headers already sent by (output started at C:\Garcian\Forum\medalcp.php:191) in C:\Garcian\Forum\includes\page_header.php on line 810


Also, may I ask your assistance, everytime I go to medals.php do I need to type it in the browser? Or any procedure to incorporate it in ACP's.

Please help. Thank a lot.

Regards,
Dick
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

Read the first post for Know Error & BUG Fix

~Mac
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

doswald wrote: Also, may I ask your assistance, everytime I go to medals.php do I need to type it in the browser? Or any procedure to incorporate it in ACP's.

The link is in your forum header menu.

~Mac
esiason14
Registered User
Posts: 237
Joined: Tue Nov 02, 2004 3:42 am
Location: Annapolis, MD
Contact:

Post by esiason14 »

Love this mod....The only problem I'm having is with "Award Details" cant see to get it to show. Just a dead button...Ive read through this thread, but havent found any definitive answers to this problem...Any ideas?
FPM | FPMA | KM | SC
esiason14
Registered User
Posts: 237
Joined: Tue Nov 02, 2004 3:42 am
Location: Annapolis, MD
Contact:

Post by esiason14 »

UPDATE: Ok, I see the jscript toggle works with IE and not Firefox...Is there an easy fix for this...This was the included jscript file:

Code: Select all

// toggle.js
// (c) 2002 Jerrett Taylor (www.nullcreations.net / www.liquidpulse.net)
/////////////////////////////////////////////////////////////////////////////////

OriginalHeight = new Array(); 
function SlideOut(object,dest,direc) { 
    // get height and remove the 'px' 
   h = document.getElementById(object).style.height; 
    strip=/[px]/gi; h = h.replace(strip,''); h = parseInt(h); 
    // set sizes and see if we are finished 
    if (direc == 1) { h+=20; keepgoing = (dest >= h) ? true : false; } else { h-=20; keepgoing = (dest < h) ? true : false;    } 
    if (keepgoing) { 
         // not done yet, timeout so we can keep going 
         document.getElementById(object).style.height = h + 'px'; 
         setTimeout("SlideOut('" + object + "'," + dest + "," + direc + ");",60); 
    } else { 
        // either hide it or return to original size 
        if (direc == 0) { document.getElementById(object).style.display = 'none'; } else { document.getElementById(object).style.height = OriginalHeight[object]+2+'px'; } 
        } 
} 

function ToggleBox(object) { 
    // set original height if it's not already set 
    if (!OriginalHeight[object]) { 
         if (document.getElementById(object).clientHeight == 0) { 
            // if our element is hidden we need to prepare it.. show it, grab the height, shrink it to 0, and hide it again! 
             document.getElementById(object).style.display = 'block';     
             OriginalHeight[object] = document.getElementById(object).clientHeight;     
             document.getElementById(object).style.height = 0; document.getElementById(object).style.display = 'none'; 
         } 
         OriginalHeight[object] = document.getElementById(object).clientHeight;     
        } 
    // expand or contract 
    if (document.getElementById(object).style.display == 'block') { 
        document.getElementById(object).style.height = OriginalHeight[object]; 
        SlideOut(object,5,0); 
    } else { 
        document.getElementById(object).style.display = 'block'; 
        SlideOut(object,OriginalHeight[object],1);     
    } 
}
FPM | FPMA | KM | SC
User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Post by Gremlinn »

As soon as I can get a few minutes, I will compare the toggle for this mod with the one that comes with the Topic Calendar mod. I will then let everyone know.
Ice Dead
Registered User
Posts: 5
Joined: Sun Jan 16, 2005 10:48 am

Post by Ice Dead »

Hello
I would like to insert a longer description, where I can change that.

Ice Dead
User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Post by Gremlinn »

Here is what another toggle looks like. I haven't tested it with Firefox (not using firefox).

Code: Select all

function _dom_toggle()
{
        return this;
}
        _dom_toggle.prototype.objref = function(id)
        {
                return document.getElementById ? document.getElementById(id) : (document.all ? document.all[id] : (document.layers ? document.layers[id] : null));
        }

        _dom_toggle.prototype.cancel_event = function()
        {
                if ( window.event )
                {
                        window.event.cancelBubble = true;
                }
        }

        _dom_toggle.prototype.toggle = function(id, open_close_id, open_icon, close_icon)
        {
                var object = this.objref(id);
                var icon = this.objref(open_close_id);

                if ( object && object.style )
                {
                        object.style.display = (object.style.display == 'none') ? '' : 'none';
                        if ( icon && icon.src )
                        {
                                icon.src = (object.style.display == 'none') ? open_icon : close_icon;
                        }
                }
                this.cancel_event();
        }

// instantiate
dom_toggle = new _dom_toggle();
It is smaller than the one with this mod and I don't see anything that appears to be browser specific.
Xiph3r
Registered User
Posts: 342
Joined: Sun Oct 27, 2002 8:21 pm
Location: the wired
Contact:

Post by Xiph3r »

ycl6, how can i split and only show certain medails in the viewtopic area, i only wish to show 1 catagory of medals not all of them.
User avatar
realix
Registered User
Posts: 157
Joined: Tue Feb 22, 2005 4:48 pm

Post by realix »

the Award Details button doesnt seem to work. anyone has any idea how to fix?
Post Reply

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