[BETA] MPS Community 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! 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.
samureye
Registered User
Posts: 48
Joined: Sun Sep 10, 2006 6:27 pm

Post by samureye »

Kudos and thanks for keeping us well informed, man.
Tutorport
Registered User
Posts: 7
Joined: Tue Sep 12, 2006 9:44 am

Missing links

Post by Tutorport »

Hi thanks for your help on the last item, I have now got the mod installed and I think it is amazing.

I am using the Cashmod also but the links to donate and view users cash have disappeared.

Can you tell me which files I need to place the links in so that I don't do it by trial and error.

Also, will I need to make any other adjustments.

These links do show up in the normal profile but not the MPS profile.

Thanks in advance.
User avatar
Jadestone
Registered User
Posts: 630
Joined: Tue May 24, 2005 12:54 am
Location: Juno Beach, FL
Contact:

Post by Jadestone »

ok, tht is easy.

for any mod to work with mps viewprofile you only need to edit 2 files.

1) mps_viewprofile.php -> anything that goes into usercp_viewprofile.php will go here. first try just setting up the switches and the

Code: Select all

$template->assign_vars(array(
info.

since the mps file still pulls from the usercp_viewprofile.php you shouldn`t have to setup the other info ( ie: database queries ) if that doesnt work then just put all info into the mps>viewprofile.php that was in usercp_viewprofile.php


2) this one is a little tricky. you need to find where you want the info to go. i`d recommend mps_forum_stats.tpl, but if you want a new table for you info to be displayed just edit mps_viewprofile_body.tpl instead, just don`t change the table layout for the existing tables or the custom layout wont work right.

hope you got that, if you need any help let me know.
My Mods In Development: MPS Mod

MPS Support Site: Click Here
Tutorport
Registered User
Posts: 7
Joined: Tue Sep 12, 2006 9:44 am

Cash mod integration

Post by Tutorport »

Hi thanks for the reply.

I can only see one line of code difference between the usercp_viewprofile.php and the mps_viewprofile.php files and that was

Code: Select all

$cm_viewprofile->post_vars($template,$profiledata,$userdata);

$template->pparse('body');
after the

Code: Select all

	'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . $u_search_author),

	'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
);
code.

I have added this to the mps_viewprofile.php file.

The line of code I have entered into the mps_forum_stats.php file is

Code: Select all

<!-- BEGIN cashrow -->
<tr> 
  <td valign="middle" align="right" nowrap="nowrap"><span class="gen">{cashrow.CASH_NAME}:</span></td>
  <td><span class="gen"><b>{cashrow.CASH_AMOUNT}</b></span></td>
</tr>
<!-- END cashrow -->
<!-- BEGIN switch_cashlinkson -->
<tr>
  <td valign="middle" align="right" nowrap="nowrap"></span>
  <td><span class="gen">
<!-- BEGIN cashlinks -->
	[ <a href="{switch_cashlinkson.cashlinks.U_LINK}" class="genmed">{switch_cashlinkson.cashlinks.L_NAME}</a> ]
<!-- END cashlinks -->
  </span></td>
</tr>
<!-- END switch_cashlinkson -->
but I'm still not getting the links.

Can you see what I have done wrong?

Thanks mate
User avatar
Jadestone
Registered User
Posts: 630
Joined: Tue May 24, 2005 12:54 am
Location: Juno Beach, FL
Contact:

Post by Jadestone »

you are still missing the

Code: Select all

$template->assign_vars(array(
actually yours will look more like

Code: Select all

$template->assign_vars('cashrow.cashlinks , array(
or something like that, basically you dont have the info in the file to display what you want
My Mods In Development: MPS Mod

MPS Support Site: Click Here
Tutorport
Registered User
Posts: 7
Joined: Tue Sep 12, 2006 9:44 am

Re config

Post by Tutorport »

Thanks for your help mate. I think I've got it. :D
User avatar
DarthSpader
Registered User
Posts: 184
Joined: Tue Sep 30, 2003 1:56 pm

Post by DarthSpader »

Jadestone wrote: Smartor's Gallery is not integrated, as for the view pics link.. if that is on an mps page you wil have to create the link in mps_viewprofile.php as for the regular profile... that is a non mps issue


Yes, it's on an mps page, but how & where do you create the link in mps_viewprofile.php? There's several:
if ( $board_config['mps_mod_album_system'] statements.
I'm NOT Your Father Either.
User avatar
DarthSpader
Registered User
Posts: 184
Joined: Tue Sep 30, 2003 1:56 pm

Post by DarthSpader »

Also, another issue I have is:

When you view a normal profile, all looks well EXCEPT if the user was granted permission to create an mps_profile, but hasn't done so yet.

Simply, if the user_allowmps=0, then the normal profile displays correctly.
If the user_allowmps=1, and user has created an mps_profile, all is displayed correctly.
BUT if the user_allowmps=1, and user hasn't yet created an mps_profile, you will see the normal profile, but the table headers are stripped of the cellpics. Why does it do that ? Can't the profile display of a normal profile be seen correctly ?

Does this even make any sense? LOL
I'm NOT Your Father Either.
User avatar
Jadestone
Registered User
Posts: 630
Joined: Tue May 24, 2005 12:54 am
Location: Juno Beach, FL
Contact:

Post by Jadestone »

DarthSpader wrote: Also, another issue I have is:

When you view a normal profile, all looks well EXCEPT if the user was granted permission to create an mps_profile, but hasn't done so yet.

Simply, if the user_allowmps=0, then the normal profile displays correctly.
If the user_allowmps=1, and user has created an mps_profile, all is displayed correctly.
BUT if the user_allowmps=1, and user hasn't yet created an mps_profile, you will see the normal profile, but the table headers are stripped of the cellpics. Why does it do that ? Can't the profile display of a normal profile be seen correctly ?

Does this even make any sense? LOL


lol yeah, it does that becuase its also pulling the custom css, i fixed that in the next release.

and for the

Code: Select all

if ( $board_config['mps_mod_album_system'] 
you will have to input that i believe in the j version 3 times. basically after the

Code: Select all

if ( $board_config['mps_mod_album_system'] == 1
{
   my code
}
you will then make yours which would be

Code: Select all

if ( $board_config['mps_mod_album_system'] == 2
{
     your code
}
the reason for it being there so many times is because of

1) pulling the proifle image
2) pulling friend images
3) pulling comment images

hope that clearifys some info for you, also for that to work thruout MPS you will have to do the same in MPS.php & mps_bulletin.php.

if you can get this to work correctly please send me the code you used so i can integrate that into MPS as well. otherwise it will have to wait till i get time to do it myself.

also since the next release v 0.2.0 will have a few more files and a new friends display page and a comments display page those files will have to be implemented also.
My Mods In Development: MPS Mod

MPS Support Site: Click Here
User avatar
DarthSpader
Registered User
Posts: 184
Joined: Tue Sep 30, 2003 1:56 pm

Post by DarthSpader »

Jadestone wrote: lol yeah, it does that becuase its also pulling the custom css, i fixed that in the next release.


When will the next release be available? Or can I at least get the needed files from you to correct that problem?
I'm NOT Your Father Either.
User avatar
Jadestone
Registered User
Posts: 630
Joined: Tue May 24, 2005 12:54 am
Location: Juno Beach, FL
Contact:

Post by Jadestone »

looking to be about 3-4 weeks, i have made heavy changes to MPS for the next release, you can check that here

http://mps.thebladepact.com/viewtopic.php?t=64

or if you want to play with the latest versionwhich i have in testing right now, go here

http://test.thebladepact.com/

so me giving you the files wouldnt work because of code changes.

what you need to do is edit the page header and add this in.

find:

Code: Select all

	if ( $board_config['allow_mps_master_customize'] == 1 && $board_config['allow_mps_customize'] != 0 && $profiledata['user_allowmps'] != 0 )
	{
		include($phpbb_root_path . 'includes/mps_master_css.'.$phpEx);		
	}
	else if ( $board_config['allow_mps_master_customize'] != 1 && $board_config['allow_mps'] != 0 && $board_config['allow_mps_customize'] != 0 && $profiledata['user_allowmps'] != 0 && $profiledata['user_allowmps_customize'] != 0 )
	{
		include($phpbb_root_path . 'includes/mps_css.'.$phpEx);
	}
	else
	{
		$template->assign_block_vars('switch_mps_no_css', array());
	}
replace with:

Code: Select all

	if( $profiledata )
	{
		$sql = "SELECT *
				FROM " . MPS_TABLE . "
				WHERE mps_id = " .$profiledata['user_id'];
		if( !($result = $db->sql_query($sql)) )
		{
				message_die(GENERAL_ERROR, $lang['MPS_no_query'], '', __LINE__, __FILE__, $sql);
		}
		$mpsdata = $db->sql_fetchrow($result);
	

		if ( $board_config['allow_mps_master_customize'] == 1 && $board_config['allow_mps_customize'] != 0 && $profiledata['user_allowmps'] != 0 && $mpsdata )

		{

			include($phpbb_root_path . 'includes/mps_master_css.'.$phpEx);		

		}

		else if ( $board_config['allow_mps_master_customize'] != 1 && $board_config['allow_mps'] != 0 && $board_config['allow_mps_customize'] != 0 && $profiledata['user_allowmps'] != 0 && $profiledata['user_allowmps_customize'] != 0 && $mpsdata  )

		{

			include($phpbb_root_path . 'includes/mps_css.'.$phpEx);

		}

		else

		{

			$template->assign_block_vars('switch_mps_no_css', array());

		}

	}
	else
	{
		$template->assign_block_vars('switch_mps_no_css', array());
	}
that should fix it
My Mods In Development: MPS Mod

MPS Support Site: Click Here
User avatar
DarthSpader
Registered User
Posts: 184
Joined: Tue Sep 30, 2003 1:56 pm

Post by DarthSpader »

Yes! That fixed it! Thank you Very Much!
I'm NOT Your Father Either.
samureye
Registered User
Posts: 48
Joined: Sun Sep 10, 2006 6:27 pm

Post by samureye »

Do you think this mod could work with the Garage mod?
User avatar
DarthSpader
Registered User
Posts: 184
Joined: Tue Sep 30, 2003 1:56 pm

Post by DarthSpader »

Another question Jadestone..... perhaps you can tell me what's wrong. Under 'Interests', when I apply images using HTML coding, it moves them 1/2 way down the page from the Heading Title, and makes for a very lengthy page. Nothing wrong with my code tho, it just does that for some reason. Any thoughts?
I'm NOT Your Father Either.
User avatar
Jadestone
Registered User
Posts: 630
Joined: Tue May 24, 2005 12:54 am
Location: Juno Beach, FL
Contact:

Post by Jadestone »

samureye wrote: Do you think this mod could work with the Garage mod?


can work with any mod, just will have to do a little coding for it to function correctly.
DarthSpader wrote: Another question Jadestone..... perhaps you can tell me what's wrong. Under 'Interests', when I apply images using HTML coding, it moves them 1/2 way down the page from the Heading Title, and makes for a very lengthy page. Nothing wrong with my code tho, it just does that for some reason. Any thoughts?


what type of code are you using?

should be

Code: Select all

<img src=http://some_web_site.com/image.jpg>
My Mods In Development: MPS Mod

MPS Support Site: Click Here
Post Reply

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