News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

User Control Panel ( User CP ) V3.0

Started by Alan S, April 28, 2007, 12:59:54 PM

Previous topic - Next topic

Alan S

Can you post line 820 to 845 of Admin.php so i can see the surrounding code aswell please.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Septimus

array('EditSmileySettings', 'area=smileys;sa=settings'),
array('ModifyOtherSettings', 'area=serversettings;sa=other'),
array('ModifyCacheSettings', 'area=serversettings;sa=cache'),
array('ModifyRegistrationSettings', 'area=regcenter;sa=settings'),
array('ManageSearchEngineSettings', 'area=sengines;sa=settings'),
array('ModifySubscriptionSettings', 'area=paidsubscribe;sa=settings'),
);

foreach ($settings_search as $setting_area)
{
// Get a list of their variables.
$config_vars = $setting_area[0](true);

foreach ($config_vars as $var)
{
if (!empty($var[1]) && $var[0] != 'permissions')
$search_data['settings'][] = array($var[1], $setting_area[1]);
}
}

$context['search_results'] = array();
$search_term = strtolower($context['search_term']);
// Go through all the search data trying to find this text!
foreach ($search_data as $section => $data)
{
foreach ($data as $item)
{
$found = false;
if (!is_array($item[0]))
$item[0] = array($item[0]);
foreach ($item[0] as $term)
{
$lc_term = strtolower($term);
if (strpos($lc_term, $search_term) !== false || (isset($txt[$term]) && strpos($txt[$term], $search_term) !== false) || (isset($txt['setting_' . $term]) && strpos($txt['setting_' . $term], $search_term) !== false))
{
$found = $term;
break;
}
}


820-858 because 845 stopped in the middle of a block :)

Alan S

On line 826 which is
array('ModifySubscriptionSettings', 'area=paidsubscribe;sa=settings'),

Add after it

array('ModifyUserCPModSettings', 'area=modsettings;sa=usercp'),

That bit of code appears to be missing so that should fix the problem.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Septimus

Lol now it's picking on 832 :(

$config_vars = $setting_area[0](true);

I did clear cache and stuff too :)

Alan S

Okay , can you attach your Admin.php file to your next post please.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Septimus

Sure, here it is :)


And thank you for the help so far, it's appreciated :).

Alan S

Ah , Turns out it was actualy a bad line of code in the mod.

Will be releasing a fix package soon ( In the next couple of hours ) , and a update to the standard package aswell.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Alan S

Okay , Have released the 2 packages , Please see page one of topic for info.


Also Septimus , Use this admin.php file and it should sort your problems
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Septimus


Fonzarello

#549
I'm tried to install the UserCP mod to my board. SMF1.1.5. In doing so I get an error that the "ManageSettings.php file cannot be found. I tried to incorporate the mod manually and its right the ManageSetting.php file isnt there.
How can I install the mod?

This is exactly what I see:

1.     Execute Modification     ./index.php     Test successful
2.    Execute Modification    ./Sources/Subs.php    Test failed
3.    Execute Modification    ./Sources/Admin.php    Test failed
4.    Execute Modification    ./Sources/ManageSettings.php    File not found
5.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Test successful
7.    Extract Tree    ./Themes/default/images/usercp    
8.    Extract File    ./Sources/usercp.php    
9.    Extract File    ./Themes/default/usercp.template.php    
10.    Execute Code    install.php

I need this mod badly. What can I do?

Alan S

Quote from: Fonzarello on August 24, 2008, 08:59:24 PM
I'm tried to install the UserCP mod to my board. SMF1.1.5, metrofreshboard.com. In doing so I get an error that the "ManageSettings.php file cannot be found. I tried to incorporate the mod manually and its right the ManageSetting.php file isnt there.
How can I install the mod?

This is exactly what I see:

1.     Execute Modification     ./index.php     Test successful
2.    Execute Modification    ./Sources/Subs.php    Test failed
3.    Execute Modification    ./Sources/Admin.php    Test failed
4.    Execute Modification    ./Sources/ManageSettings.php    File not found
5.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Test successful
7.    Extract Tree    ./Themes/default/images/usercp    
8.    Extract File    ./Sources/usercp.php    
9.    Extract File    ./Themes/default/usercp.template.php    
10.    Execute Code    install.php

I need this mod badly. What can I do?

Your using the wrong version. ManageSettings.php is a file in SMF 2.0 which means your trying to installed UserCPV2.0.2 , Your using SMF 1.1.5 so you need to install SMF UserCP2.0_Install.zip
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Fonzarello

Thanks. I tried installing the other mod for 1.1.5 I still get an error. I looked at manually installation and I didnt see the directions for editing the file that gave me the error. "Number 2. below"

   Type     Action     Description
1.    Execute Modification    ./index.php    Test successful
2.    Execute Modification    ./Themes/default/index.template.php    Test failed
3.    Execute Modification    ./Sources/ModSettings.php    Test successful
4.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
5.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Test successful
6.    Extract Tree    ./Themes/default/images/usercp    
7.    Extract File    ./Sources/usercp.php    
8.    Extract File    ./Themes/default/usercp.template.php    
9.    Execute Code    install.php


Do I not need to edit this file if I install it manually? Thanks again for your help.

ccbtimewiz

Quote from: Fonzarello on August 27, 2008, 02:08:11 PM
Thanks. I tried installing the other mod for 1.1.5 I still get an error. I looked at manually installation and I didnt see the directions for editing the file that gave me the error. "Number 2. below"

   Type     Action     Description
1.    Execute Modification    ./index.php    Test successful
2.    Execute Modification    ./Themes/default/index.template.php    Test failed
3.    Execute Modification    ./Sources/ModSettings.php    Test successful
4.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
5.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Test successful
6.    Extract Tree    ./Themes/default/images/usercp    
7.    Extract File    ./Sources/usercp.php    
8.    Extract File    ./Themes/default/usercp.template.php    
9.    Execute Code    install.php


Do I not need to edit this file if I install it manually? Thanks again for your help.

Yes you do.

Fonzarello

How do I modify this file:
./Themes/default/index.template.php
The manual installation directions for 1.1.5 do not cover editing this file. This is the only file I get an error with when trying to install the mod thru packages.

Alan S

Here are the edits you need to make on /default/index.template.php

Find

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context,


Replace with

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $ID_MEMBER, $modSettings,


Find
if ($context['current_action'] == 'search2'

Add Before

if ($context['current_action'] == 'usercp')
$current_action = 'profile';


Find

$current_action = 'admin';
if (in_array($context['current_action'], array(


Add after

'usercp',


Find

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Replace with

// Edit Profile... [profile] if usercp is enabled
if ($context['allow_edit_profile'] && $modSettings['usercp_enable'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=usercp;u=',$ID_MEMBER,'">' , $txt['usercp'] , '</a>
           </td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
    //Edit Profile... [profile] if usercp is disabled
    if ($context['allow_edit_profile'] && !$modSettings['usercp_enable'])
    echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
           </td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';



If you have a Custom theme look here to find the edits ( the edits for the default theme are also there )
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Fonzarello

Thanks. I applied the mod anyway with the error and I was going to edit the problem file manually but it seems to be working fine. Should I still edit the file or just let it be?

Also my Default/Theme/index.template.php file looks a little different than the coding that I'm supposed to change. I believe the other mods I added made changes to this file. I'm not sure what to keep and what to actually change so that the other mods continue to work properly, but, all in all it works fine even though I didn't manually edit the file.

Thanks again

Alan S

You probably should still change it since somethings missing , It could only be a minor thing but i would still recommend changing it.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

swan

Have added that code for dilber and works great the only thing is there are no images showing on it like they do in the default theme can it be sorted?

Alan S

Can you post a screenshot of the problem please? I dont quite get what you mean.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

bullbreedluverz

nice mod, lot cleaner interface for members to use - cheers

Advertisement: