PCP and the new Shop MOd w/ effects
-----
| Author | Message | |
|---|---|---|
|
Pogue Moran |
||
| Wed Sep 13, 2006 9:35 pm Post subject: Re: re: PCP and the new Shop MOd w/ effects | ||
|
Thoul wrote: No, it's a separate add-on.
Anyway, I found the problem. In def_userfuncs_shop3.php, find this: Code: if ( $board_config['viewprofile'] == 'images' )
{ Before it, add: Code: global $board_config;
That'll fix it. I'll have to put out a new version with this fix in it. Hmm this is odd I added the code above and still nothing changed im still having the problem |
||
|
Thoul |
||
| Wed Sep 13, 2006 10:06 pm Post subject: re: PCP and the new Shop MOd w/ effects | ||
|
Make sure you add it before and not after those first couple of lines. That's the important thing that is broken in the current release. You'll have to change the option in the Shop Settings back to images, too.
|
||
|
Pogue Moran |
||
| Wed Sep 13, 2006 10:40 pm Post subject: Re: re: PCP and the new Shop MOd w/ effects | ||
|
Thoul wrote: Make sure you add it before and not after those first couple of lines. That's the important thing that is broken in the current release. You'll have to change the option in the Shop Settings back to images, too.
I'm about to swear at my computer I've done that and its still blank |
||
|
Pogue Moran |
||
| Wed Sep 13, 2006 10:44 pm Post subject: | ||
|
here's my whole function pcp_output_inventory_profile code section
Code: function pcp_output_inventory_profile($field_name, $view_userdata, $map_name='')
{ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $res = ''; $img = ''; global $board_config; if ($board_config['viewprofile'] == "images") { $itempurge = str_replace("Þ", "", $view_userdata['user_items']); $itemarray = explode('ß',$itempurge); $itemcount = count ($itemarray); $user_items = "<br>"; for ($xe = 0;$xe < $itemcount;$xe++) { if ($itemarray[$xe] != NULL) { if ($board_config['viewtopiclimit'] < $xe) { $user_items .= ' <a href="'.append_sid("shop.".$phpEx."?action=inventory&searchid=".$view_userdata['user_id']).'" title="'.$view_userdata['username'].'\'sInventory"><br />more...</a>'; break; } if (file_exists("shop/images/".$itemarray[$xe].".jpg")) { $user_items .= ' <img src="shop/images/'.$itemarray[$xe].'.jpg" title="'.$itemarray[$xe].'" alt="'.$itemaray[$xe].'">'; } elseif (file_exists("shop/images/".$itemarray[$xe].".gif")) { $user_items .= ' <img src="shop/images/'.$itemarray[$xe].'.gif" title="'.$itemarray[$xe].'" alt="'.$itemaray[$xe].'">'; } } } } $img = $user_items; if ($board_config['viewprofile'] == "link") { $temp_url = append_sid("./shop.php?action=inventory&searchid=" . $view_userdata['user_id']); $usernameurl = '<a href="' . $temp_url . '">' . $lang['user_inventory_link'] .'</a>'; $img = $usernameurl; } $res = pcp_output_format($field_name, $txt, $img, $map_name); return $res; } |
||
|
Thoul |
||
| Wed Sep 13, 2006 10:54 pm Post subject: re: PCP and the new Shop MOd w/ effects | ||
|
That's the Shop 2 file. You need to edit the shop3.php file.
|
||
|
Pogue Moran |
||
| Wed Sep 13, 2006 11:27 pm Post subject: Re: re: PCP and the new Shop MOd w/ effects | ||
|
Thoul wrote: That's the Shop 2 file. You need to edit the shop3.php file.
hmmm odd thats what i have in shop 3 let me redownload that file and test |
||
|
Thoul |
||
| Wed Sep 13, 2006 11:31 pm Post subject: re: PCP and the new Shop MOd w/ effects | ||
|
You may have uploaded the Shop 2 file over the Shop 3 file or something, but that's definitely Shop 2 code.
|
||
|
Pogue Moran |
||
| Wed Sep 13, 2006 11:33 pm Post subject: Re: re: PCP and the new Shop MOd w/ effects | ||
|
Thoul wrote: That's the Shop 2 file. You need to edit the shop3.php file.
I dont know how my shop 2 file became my shop3 file I musta did something weird anyway it works now thanks for your continued patience. Btw I got my medals system working on my add on section of the profile. Check it out under the test account and select my username. I wish I could get the toggle working though |
||
|
Thoul |
||
| Thu Sep 14, 2006 12:16 am Post subject: re: PCP and the new Shop MOd w/ effects | ||
|
No problem, I'm glad it got worked out.
Quote: Btw I got my medals system working on my add on section of the profile. Check it out under the test account and select my username.
I would, but regular users can't see the addons section of other members. You can because you're an admin, but the test account can't. I'm glad you got it working, though. I think I've just managed to get the referral working, too. Here's what you need to do for that. Make a new file called profilcp/profilcp_addons_refer.php containing this code: Code: <?php
if ( !defined('IN_PHPBB') ) { die('Hacking attempt'); exit; } include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_extend_rp.' . $phpEx); if ( !empty($setmodules) ) { pcp_set_menu('addons', 05, __FILE__, 'profilcp_addons_shortcut', 'profilcp_addons_pagetitle' ); pcp_set_sub_menu('addons', 'referralcp', 10, __FILE__, 'Rp_center', 'Rp_center' ); return; } // session id check if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) { $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; } else { $sid = ''; } // // Start of program proper // if ( isset($HTTP_GET_VARS['sub']) || isset($HTTP_POST_VARS['sub']) ) { $mode = ( isset($HTTP_GET_VARS['sub']) ) ? $HTTP_GET_VARS['sub'] : $HTTP_POST_VARS['sub']; $mode = htmlspecialchars($mode); if ( $mode == 'referralcp' ) { include($phpbb_root_path . 'includes/user_rp_center.'.$phpEx); exit; } } redirect(append_sid("index.$phpEx", true)); ?> Then in your includes/user_rp_center.php file, find these lines: include($phpbb_root_path . 'includes/page_header.'.$phpEx); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); Add a // to the beginning of both of them. That should do it. Try to test the invite e-mail, if you can... I can't try that out on my test server (it doesn't have email). |
||
|
Pogue Moran |
||
| Thu Sep 14, 2006 12:27 am Post subject: re: PCP and the new Shop MOd w/ effects | ||
|
Nice I was going to send an invite to you as a test but i dont know your email. That works out well. I'm trying to figure out what I should allow to send to the addons. I've noticed one thing though the viewtopic side link needs to change to wherever the mod is put
|
||