TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 22, 2024, 03:31:51 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,197
  • Total Topics: 21,221
  • Online today: 226
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 150
  • Total: 150

USER CP - An alternative to Profile Screen

Started by akulion, October 18, 2006, 07:57:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

G6Cad

Gave a reply that shoul have been posted on another forum and thread  :uglystupid2:

Sorry for that....

Check the file and look at line 18 and see what it say there.

alan s

Quote from: dazzler on March 04, 2007, 09:53:38 PM
hey guys.. great mod..

anybody know why i am getting this error

http://www.staffsminis.co.uk/forum/index.php?action=usercp

8: Undefined index: usercp
File: /home/dazdes/public_html/staffsminis/forum/Sources/usercp.php
Line: 18


i am using the custom action one..

Once i have this error fixed i will work on applying it to my board

Daz

Did you follow my instructions on page one of this thread or did you use the mod package i uploaded 2 pages back?

dazzler

#192
i used the info of the first page.. http://www.tinyportal.net/index.php?topic=9809.msg81246#msg81246  then read through and changed some bits.. then altered the template code to the same as the one posted later on

line

18 reads $context['page_title'] = $mbname . ' - ' . $txt['usercp'];


alan s

Well there might have been a bit of error in my coding back then , You can either do 2 things, You can either undo all the changes you made and then use the mod package i posted 2 pages back or you can open up the usercp.php and usercp.template.php and replace the code in them with the ones posted below.

usercp.php

<?php


if (!defined('SMF'))
die('Hacking attempt...');

function 
usercp()
{
global $context$mbname$txt;


//Load the main msn template
loadtemplate('usercp');

//Load the main msn template
$context['sub_template']  = 'main';

}
?>


usercp.template.php


<?php

/*

UserCp

*/

 
function template_main()

{

global $db_prefix$scripturl$webmaster_email$txt$user_info,$settings$modSettings$context;


if (
$context['allow_edit_profile'])
echo
'

<table border="0" width="100%" id="table1" cellspacing="1" style="border-collapse: collapse">

<tr>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2">

<a href="'
$scripturl'?action=profile;u=;sa=account"><img border="0" src="usercp/ksysguard.png" width="80" height="80"></a></font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2">

<a href="'
$scripturl'?action=profile;u=;sa=theme"><img border="0" src="usercp/kivio.png" width="80" height="80"></a></font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2">

<a href="'
$scripturl'?action=theme;sa=pick;u=;sesc='$context['session_id'], '"><img border="0" src="usercp/blockdevice.png" width="80" height="80"></a></font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2">

<a href="'
$scripturl'?action=profile;u=;sa=forumProfile"><img border="0" src="usercp/kuser.png" width="80" height="80"></a></font></td>

</tr>

<tr>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="'
$scripturl'?action=profile;u=;sa=account"><b>My Account Info</a><br>

</b></font><font face="Verdana" size="1">Click here if you want to

change your account related information such as username, email,

password or other sensitive details.</font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="'
$scripturl'?action=profile;u=;sa=theme"><b>Look & Layout Options</a><br>

</b></font><font face="Verdana" size="1">Click here to change the way

the forum looks for you, options include the look and layout for the

boards and posts.</font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"> <a href="'
$scripturl'?action=theme;sa=pick;u='$context['member']['id'], ';sesc='$context['session_id'], '"><b>My Theme</a><br>

</b></font><font face="Verdana" size="1">This screen will allow you to

set your default theme which you wish to use every time you login.</font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="'
$scripturl'?action=profile;u=;sa=forumProfile"><b>My Profile</a><br>

</b></font><font face="Verdana" size="1">Click here to change the way

your profile looks and appears to everyone.</font></td>

</tr>

<tr>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2">

<a href="'
$scripturl'?action=profile;u=;sa=statPanel"><img border="0" src="usercp/kwalletmanager.png" width="80" height="80"></a></font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2">

<a href="'
$scripturl'?action=profile;u=;sa=showPosts"><img border="0" src="usercp/kedit.png" width="80" height="80"></a></font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2">

<a href="'
$scripturl'?action=profile;u=;sa=notification"><img border="0" src="usercp/mailreminder.png" width="80" height="80"></a></font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2">

<a href="'
$scripturl'?action=profile;u=;sa=editBuddies"><img border="0" src="usercp/kdmconfig.png" width="80" height="80"></a></font></td>

</tr>

<tr>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="'
$scripturl'?action=profile;u=;sa=statPanel"><b>My Stats</a><br>

</b></font><font face="Verdana" size="1">Here you can check how many

posts you have made, which games you are a champion in and other

activity related info.</font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="'
$scripturl'?action=profile;u=;sa=showPosts"><b>My Posts</a><br>

</b></font><font face="Verdana" size="1">This option will show you all

the posts you have made since you became a member of this site.</font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="'
$scripturl'?action=profile;u=;sa=notification"><b>My Notifications</a><br>

</b></font><font face="Verdana" size="1">This screen will allow you to

change the type and frequency of notifications you get via e-mail when

participating in threads.</font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="'
$scripturl'?action=profile;u=;sa=editBuddies"><b>Buddies</a><br>

</b></font><font face="Verdana" size="1">This screen will allow you to

select buddies to add to your list. </font></td>

</tr>

<tr>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2">

<a href="'
$scripturl'?action=profile;u=;sa=pmprefs"><img border="0" src="usercp/mail.png" width="80" height="80"></a></font></td>

<td align="center" width="25%" valign="top">

<a href="'
$scripturl'?action=search"><img border="0" src="usercp/find.png" width="80" height="80"></a></td>

<td align="center" width="25%" valign="top">

<a href="'
$scripturl'?action=pm;sa=send;u=1"><img border="0" src="usercp/agent.png" width="80" height="80"></a></td>

</tr>

<tr>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="'
$scripturl'?action=profile;u=;sa=pmprefs"><b>My Messages Options</a><br>

</b></font><font face="Verdana" size="1">This screen will allow you to

set your preferences for PMs received on the board and also allow you to

ignore people you do not wish to receive PMs from.</font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="'
$scripturl'?action=search"><b>Search</a><br>

</b></font><font face="Verdana" size="1">This screen will allow you to

search for posts made in the board.</font></td>

<td align="center" width="25%" valign="top">

<font face="Verdana" size="2"><a href="mailto:'
$webmaster_email ,'"><b>Contact Admin</a><br>

</b></font><font face="Verdana" size="1">Still  having problems?<br>

Then contact the admin from here and submit your questions.</font></td>

</tr>

</table>

'
;

}

?>



dazzler

#194
i now get this error



8: Undefined index: member
File: /home/dazdes/public_html/staffsminis/forum/Themes/helios_multi11final_tp/usercp.template.php (eval?)
Line: 73

line 73 is the theme chooser line.. i dont have muti themes

G6Cad

usercp.template.php is the file you should check in , not the index.template.php in Helios ;)
And Helios IS a multi color theme ;)

dazzler

hey G6

Its disabled the colour change is.. but i know where you are coming from www.staffsminis.co.uk is the site for visual ref

i have edited the usercp.templete and not the index.template in helios


dazzler

well to let you know removed the info for the theme chooser and the error has gone.. i would assume if using multi themes this is ok?

Thanks for the code.. wicked work mate

and cheers for the help!

dazzler

sorry to tripple post..

Any ideas, and this will save me ages in time of how to change the "theme chooser" into add an article?

this is the main reason i want to get this up and running to allow all my users an easy way to find how to add an article as our site is club based with most members being able to add artiles for the news

help would be good guys

alan s

Quote from: binkles on March 07, 2007, 01:07:26 PM
Slightly off topic, but would it be possible to re-write mods for specific themes?
I mean only popular ones, maybe just the DilberMC one that is modified for TP.
It would help out alot of ppl who havent got a clue about editing PHP.

I have selfish motives for asking this. :2funny:

Lol I guess you use DilberMC

Install the package posted here first , as it is the root user cp package.

Then install the package attached to this post to update the DilberMC theme to work with the UserCP.