TinyPortal

Development => Block Codes => Topic started by: akulion on October 18, 2006, 07:57:31 PM

Title: USER CP - An alternative to Profile Screen
Post by: akulion on October 18, 2006, 07:57:31 PM
Hi,

I finally got fedup of my members asking me the same dang questions over and over "how do I change my theme?" - "how do I change my profile?" - "how do I change my username?"


At first I was afraid...
I was petrified...

Kept thinking I could never live without a User CP by my side,
But I grew strong....

And I learned how to get along,
And now its here!


(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi26.photobucket.com%2Falbums%2Fc147%2Fjbrowning%2Fchewy.gif&hash=4796439a333fc2cbf1f348b912f4e82ad440b08c)(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi26.photobucket.com%2Falbums%2Fc147%2Fjbrowning%2Fchewy.gif&hash=4796439a333fc2cbf1f348b912f4e82ad440b08c)(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi26.photobucket.com%2Falbums%2Fc147%2Fjbrowning%2Fchewy.gif&hash=4796439a333fc2cbf1f348b912f4e82ad440b08c)

The User CP

This wont modify anything in your SMF or TP, it simply adds a very user friendly page for your visitors so they can change their settings with ease.

A demo is available here (http://path-to-peace.net/forum) ( you will have to login to see it)
User: test
Pass: test
( please kindly dont use the above account to make posts or shouts - since this is a live forum )
After you login look at the menubar at the top and click on usercp link

To include this in your pages you will have to do 3 things - pretty basic stuff so no headaches here :D

Step 1: Download this file (http://path-to-peace.net/misc/usercp.zip) and upload all its images to a folder called usercp - which you will have to create in your forum root

Step 2: Create a PHP Article and add the given code below to it and set its options as follows:
- show left bar YES
- use theme YES
- show on frontpage NO
- set featured NO


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=;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=profile;u=;sa=tpshoutbox"><img border="0" src="usercp/messenger.png" width="80" height="80"></a></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"><b>
<font face="Verdana" size="2"><a href="', $scripturl, '?action=profile;u=;sa=tpshoutbox">Show My Shouts</a><br>
</font></b><font face="Verdana" size="1">This screen will show a log of
all the shouts you have made in the shoutbox. (Note: Shouts are deleted
periodically by the admin)</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="', $scripturl, '?action=pm;sa=send;u=1"><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>
';


Step 3: Download your index.template.php file from your theme folder and make a backup first. Then open it and look for this code and make the edits as given below.

Look for

// Edit Profile... [profile]


Make edits in this line which should be nearly just after it

<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>


instead of ?action=profile put ?page=XX where XX is the numbr of the article you just created where you placed the user CP code

Instead of ' , $txt[79] , ' put USER CP

If you use a graphic based theme which uses graphics buttons - you will have to replace the images for profile to ones which say User CP.

Assumptions in the article code
In the code for Contact the Admin for user CP - it has been assumed that you use your 1st account as the Admin whose ID is 1 - however if you use another account then please put the corresponding user # there

The End.

Graphic Credits go to CrystalXP.net (http://www.crystalxp.net/en.htm) (u can get more icons from there)
Title: Re: USER CP - An alternative to Profile Screen
Post by: Raven on October 18, 2006, 08:13:07 PM
That is very very impressive Aku! :)

Looks very moddable too, your own images and to be able to change the page layout.

I like it alot!
Title: Re: USER CP - An alternative to Profile Screen
Post by: IchBin on October 18, 2006, 08:15:33 PM
VERY! cool! That is an awesome idea! Much more organized than the profile screen! I'm going to show this to the Devs at SMF. :) Although, Bloc lives here so I don't really have to lol. But I think they should see it.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 18, 2006, 08:19:44 PM
Glad you guys liked it :D

The icons im using are PNG's so they have a slight issue with IE and their backgrounds. But you can use your own icons if you prefer and also change the text and stuff around in the boxes by editing the codes :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: JPDeni on October 18, 2006, 08:28:38 PM
Very cool, Aku. Great idea. I've been thinking that there should be something like that, but it never occurred to me to make one. Definitely impressive.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 18, 2006, 08:30:05 PM
Thanks jp :D

added the graphics credits link as well in case someone wants to get aditional or alternative icons
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on October 18, 2006, 08:32:01 PM
Dang, that is so cool.  :up:

So many icons to choose from - http://www.crystalxp.net/galerie/en.cat.1.htm
Title: Re: USER CP - An alternative to Profile Screen
Post by: Raven on October 18, 2006, 08:47:03 PM
Hey we all know I suck with this, I tried to ad a paragraph at the bottom that says "If you don't like this style of UserCP then go here" but I get syntax errors, man I just suck at php or whatever it is.


<br />
echo '
<p align="center"><font face="Verdana" size="2">Don't like this tyle of UserCP? Then use the original one <a href="', $scripturl, 'action=profile"><b>Here</b></a></p>
';


You could get them into gifs easily enough, I'm doing it right now as IE just sucks with PNG, serves them right for using it >:D
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 18, 2006, 08:52:10 PM
Quote from: Raven on October 18, 2006, 08:47:03 PM
Hey we all know I suck with this, I tried to ad a paragraph at the bottom that says "If you don't like this style of UserCP then go here" but I get syntax errors, man I just suck at php or whatever it is.


<br />
echo '
<p align="center"><font face="Verdana" size="2">Don't like this tyle of UserCP? Then use the original one <a href="', $scripturl, 'action=profile"><b>Here</b></a></p>
';


You could get them into gifs easily enough, I'm doing it right now as IE just sucks with PNG, serves them right for using it :twisted:

if you want to include any additional stuff just add it before the final '; after the </table> tag

u wont need any echo statements there

all u will have to add is:


<br />
<p align="center"><font face="Verdana" size="2">Don't like this tyle of UserCP? Then use the original one <a href="', $scripturl, 'action=profile"><b>Here</b></a></p>
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on October 18, 2006, 08:55:57 PM
Very cool , Just in case people want to have a custom url and page this is how you do it ( In case you dont understand what i mean , i mean instead of having the index.php?page=XX you can have a index.php?action=usercp with a page to match it.

Backup any files i tell you to edit before trying this.


Open the index.php

Search For

'sticky' => array('LockTopic.php', 'Sticky'),

Add after

'usercp' => array('usercp.php', 'usercp'),

Index.template.php

Search for

// Edit Profile... [profile]

And find this under it

<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>

Replace that line ^ with

<a href="', $scripturl, '?action=usercp">User CP</a>


Open up the Modifications.english.php file in your languages directory.

Add this after another text string on the page.


$txt['usercp'] = 'User CP';

Then create the usercp.php Page

<?php


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

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


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

//Load the main usercp template
$context['sub_template']  = 'main';
//Set the page title
$context['page_title'] = $mbname ' - ' $txt['usercp'];

}
?>



Next Create the usercp.template.php page.

<?php
/*
User CP Page
*/
 
function template_main()
{
global $db_prefix$scripturl$txt$user_info,$settings$modSettings;

 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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';sa=theme"><b>Look &amp; 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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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='$context['member']['id'], ';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=profile;u='$context['member']['id'], ';sa=tpshoutbox"><img border="0" src="usercp/messenger.png" width="80" height="80"></a></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='$context['member']['id'], ';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"><b>
<font face="Verdana" size="2"><a href="'
$scripturl'?action=profile;u='$context['member']['id'], ';sa=tpshoutbox">Show My Shouts</a><br>
</font></b><font face="Verdana" size="1">This screen will show a log of 
all the shouts you have made in the shoutbox. (Note: Shouts are deleted 
periodically by the admin)</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="'
$scripturl'action=pm;sa=send;u=1"><b>Contact Admin</a><br>
</b></font><font face="Verdana" size="1">Still&nbsp; having problems?<br>
Then contact the admin from here and submit your questions.</font></td>
</tr>
</table>
'
;
   
}
?>



usercp.php Goes in the sources directory , usercp.template.php goes in the default themes directory.


Caps or small letters does matter!! if i dont use a capital letter you shouldnt either!!

Hope this is useful to someone.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Raven on October 18, 2006, 08:56:37 PM
I still get an error:
QuoteParse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/bzadmin/public_html/raven/forum/Sources/Load.php(1708) : eval()'d code(225) : eval()'d code on line 104
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 18, 2006, 09:01:00 PM
oh i se why

ur don't has a ' in it - if u remove that and make it dontthe error wil be gone :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: Lesmond on October 18, 2006, 09:01:33 PM
Could I put this code in a custom action? (as in custom action mod) then I could see what people are doing in the who's online list
Title: Re: USER CP - An alternative to Profile Screen
Post by: Raven on October 18, 2006, 09:09:24 PM
Ah I see, thanks Aku, works like a dream now.
http://www.bzfiend.com/raven/forum/index.php?page=7

Also gifs work nicely even on white backings, if you want then just save the images that are on that page.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 18, 2006, 09:13:11 PM
Lesmond that would be cool

we may have to wait for jpdeni, Thurnok or jocortina or another experienced PHP user to shed some light on this one :up:

ur welcome Raven - I think u forgot to put the images up - cos i cant see them
Title: Re: USER CP - An alternative to Profile Screen
Post by: Raven on October 18, 2006, 09:18:26 PM
Hmm Oh yeah thats right, I redid the script, it still says PNG not gif, fixing in about 1 min

Fixed
Title: Re: USER CP - An alternative to Profile Screen
Post by: bloc on October 18, 2006, 09:24:01 PM
Very nice. :) It can basically be added to the actual Profile template as well, with some adjustments..but the concept of "shortcut"/"dashboard" is a great idea.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Raven on October 18, 2006, 09:28:07 PM
Personally I think it would be best to have both as some people who use SMF all the time may prefere the original one, having both is an asset.

Also, does SMF not like it when you ahve two buttons with the same proporties? I made two profile buttons just with a differrent name and action, one for the new one, one for the old, and only the header loaded afterward, when I deleted the second button, it was ok again. Wierd :S
Title: Re: USER CP - An alternative to Profile Screen
Post by: Lesmond on October 18, 2006, 09:37:41 PM
Quote from: akulion on October 18, 2006, 09:13:11 PM
Lesmond that would be cool

we may have to wait for jpdeni, Thurnok or jocortina or another experienced PHP user to shed some light on this one :up:

I done it :) all I had to do was paste the code into a custom action and call it "user" then change ?page=xx to ?action=user"> works kool :up:

Thanks aku

"edit" just one thing I noticed you dont have to be logged in to view the page
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 18, 2006, 09:42:31 PM
Quote from: Bloc on October 18, 2006, 09:24:01 PM
Very nice. :) It can basically be added to the actual Profile template as well, with some adjustments..but the concept of "shortcut"/"dashboard" is a great idea.

Thanks :D comin from you it made my day :D

Quote from: Raven on October 18, 2006, 09:28:07 PM
Also, does SMF not like it when you ahve two buttons with the same proporties? I made two profile buttons just with a differrent name and action, one for the new one, one for the old, and only the header loaded afterward, when I deleted the second button, it was ok again. Wierd :S

that shouldnt cause any problems - dosent matter how many buttons u put even for the same action - could be an error in your modified code - have a closer look at it :up:

Quote from: Lesmond on October 18, 2006, 09:37:41 PM
I done it :) all I had to do was paste the code into a custom action and call it "user" then change ?page=xx to ?action=user"> works kool :up:

Thanks aku

"edit" just one thing I noticed you dont have to be logged in to view the page

cool :D and ur welcome and thanks :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on October 18, 2006, 09:47:06 PM
aku is on a roll as usual   8)
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 18, 2006, 09:51:59 PM
lol I just like to play around with coding until i either get it or it gets me :D
Title: Re: USER CP - An alternative to Profile Screen
Post by: daftdate on October 20, 2006, 09:29:29 AM
Ok at the risk of looking like a complete and utter newbie exactly what do i change with the


Instead of ' , $txt[79] , ' put USER CP


code do i replace the whole of the $txt[79] or part of it cause im doing it wrong.
I need to get some php lessons but have to learn C++ first as its a priority for work, then im going to try to get a life.  :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: fb on October 20, 2006, 10:34:26 AM
Quote from: daftdate on October 20, 2006, 09:29:29 AM
Ok at the risk of looking like a complete and utter newbie exactly what do i change with the


Instead of ' , $txt[79] , ' put USER CP


code do i replace the whole of the $txt[79] or part of it cause im doing it wrong.
I need to get some php lessons but have to learn C++ first as its a priority for work, then im going to try to get a life.  :)


You would remove all of it, and replace w/ your text:



<a href="', $scripturl, '?action=profile">USER CP</a>


 
Title: Re: USER CP - An alternative to Profile Screen
Post by: daftdate on October 20, 2006, 12:24:50 PM
ha now i see i was missing the cherverons on either side so i now put

<a href="', $scripturl, '?page=(my article no here) ">USER CP</a>
will try that later when i get back home from work, thanx  :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: Kiwitje on October 20, 2006, 02:26:44 PM
I translated your USER CP in Dutch, and posted it in the Dutch section. Hope you don't mind ! :)
http://www.tinyportal.net/smf/index.php?topic=9855.0 (http://www.tinyportal.net/smf/index.php?topic=9855.0)
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 20, 2006, 03:03:29 PM
:up: no problem - good going Kiwitje :up:

Also for those using this please fix a small error i made while typing....

change this line:

<font face="Verdana" size="2"><a href="', $scripturl, 'action=pm;sa=send;u=1"><b>Contact Admin</a><br>


TO


<font face="Verdana" size="2"><a href="', $scripturl, '?action=pm;sa=send;u=1"><b>Contact Admin</a><br>


I had mised out a ? in the code - but found it :D so fixed
Title: Re: USER CP - An alternative to Profile Screen
Post by: whoesa on October 20, 2006, 04:39:42 PM
Wowow, very cool Aku! Great job!  :up:

You keep coming with interesting stuff  :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 20, 2006, 04:45:14 PM
thanks :D

:up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: daftdate on October 20, 2006, 06:09:55 PM
Yeeeeesssss waves hands in the air franticaly and thanx you for that wonderful addition to the forum, nice going.  :D  :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: mfKG on October 20, 2006, 06:55:22 PM
from 1 acces to the "User CP" i got 2 Sites of Errors ;(

".../index.php?action=usercp
8: Undefined variable: context
Datei: /home/www/web434/html/smf/Themes/default/usercp.template.php (eval?)
Zeile: 97"

and this on different (most) lines (92,76, and so on)

who can help?
(i also tried with a the "CostumActionMod",...the same)
Title: Re: USER CP - An alternative to Profile Screen
Post by: JPDeni on October 20, 2006, 07:23:54 PM
At the beginning of the file add the line

global $context;
Title: Re: USER CP - An alternative to Profile Screen
Post by: mfKG on October 20, 2006, 07:36:06 PM
ok, now the same Errors, but not context, now member:
(not added @ the beginning of the file,  the "function" starts (global $context, $db_prefix, $spcri......... ;))

"8: Undefined index: member
Datei: /home/www/web434/html/smf/Themes/default/usercp.template.php (eval?)
Zeile: many"

(and this:
8: Use of undefined constant usercp - assumed 'usercp'
Datei: /home/www/web434/html/smf/Themes/default/Arcade.template.php (eval?)
Zeile: 637)
Title: Re: USER CP - An alternative to Profile Screen
Post by: knat on October 20, 2006, 07:44:09 PM
THANK YOU M8  :)  :)  :)

Thanks to you i now have a cool usercp on my site.. for that i thank you so much.. if i could give you karma i would  ;D

I moderated your usercp to fit what i wanted but i could not have done it without your code.. and that cool icon site  :D

Anyway here is a screenshot of what i have.. i know its in danish but it's still cool looking  8)

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fshow.imagehosting.us%2Fshow%2F1690723%2F0%2Fnouser_1690%2FT1_-1_1690723.jpg&hash=9d51a758c04412bb591a058085110d8a665db196) (http://www.imagehosting.us/index.php?action=show&ident=1690723)
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 20, 2006, 07:46:14 PM
ur welcome knat :D

----------

@ mfkg:

usercp needs to be defined somewhere....

its not a big error, just a minor warning...

still - hopefully someone more experienced with PHP could help out soon :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: JPDeni on October 20, 2006, 08:10:59 PM
mfkg, I would go back to using the php article that aku first posted, which is what I thought you were using in the first place, hence my suggestion to put the "global" line as the first line of the code. :)

Once you have aku's code working with no errors, then try the other stuff.

It looks like the $context array wasn't fully defined before the usercp file was executed, although I don't know why that would be. I also don't know why the Arcade.template.php file would have anything to do with this at all.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 20, 2006, 08:18:03 PM
even after using the global line im gettin 1 error message :

Quote
8: Undefined index: member
File: /home/.cash/akulion/path-to-peace.net/forum/Themes/default/TPortal.template.php (eval?)
Line: 90

any ideas how to fix this one?
Title: Re: USER CP - An alternative to Profile Screen
Post by: JPDeni on October 20, 2006, 08:27:48 PM
I hadn't looked at the code closely before. You don't need those $context['member']['id] variables at all. If no user is specified, it automatically goes to the user's own profile info.
Title: Re: USER CP - An alternative to Profile Screen
Post by: mfKG on October 20, 2006, 08:53:20 PM
@JPDeni
Much THX, u got it ;)
put the "global $context;" at the beginning didnt help, but inside the function.
Then i removed all "$context['member']['id]" in the usercp.template, and then,...nice, no more errors ;),...
works nice,....

@Aku: Great/nice work, like this UserCP, know i just need to translate it ;)
Title: Re: USER CP - An alternative to Profile Screen
Post by: aglioeolio on October 20, 2006, 09:00:44 PM

amazing MOD akullion  :laugh:

thatÂÃ,´s really hot... thanks
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on October 20, 2006, 09:04:11 PM
Quote from: knat on October 20, 2006, 07:44:09 PM
THANK YOU M8  :)  :)  :)

Thanks to you i now have a cool usercp on my site.. for that i thank you so much.. if i could give you karma i would  ;D

I moderated your usercp to fit what i wanted but i could not have done it without your code.. and that cool icon site  :D

Anyway here is a screenshot of what i have.. i know its in danish but it's still cool looking  8)

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fshow.imagehosting.us%2Fshow%2F1690723%2F0%2Fnouser_1690%2FT1_-1_1690723.jpg&hash=9d51a758c04412bb591a058085110d8a665db196) (http://www.imagehosting.us/index.php?action=show&ident=1690723)

Fun to read Danish language and not so hard to understand ;)
Looking good in that theme to :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: daftdate on October 20, 2006, 09:06:26 PM
just a little question, can i change those icon images to gifs and give them a transparent background and just change the file extension in the article were each image is called, once ive uploaded the revamped images that is??  :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on October 20, 2006, 09:07:57 PM
You should be able to change what ever image you like there, but you have to change the call for them in the files if you dont have the same name on the images you want instead.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 20, 2006, 09:37:16 PM
thanks JP :D fixed the errors right up :up: :D

Title: Re: USER CP - An alternative to Profile Screen
Post by: Starrbuck on October 20, 2006, 09:43:30 PM
Quote from: Alan S on October 18, 2006, 08:55:57 PM
Very cool , Just in case people want to have a custom url and page this is how you do it...

I like this method but I would also like the left TP blocks to exist as well.  How do I add them?
Title: Re: USER CP - An alternative to Profile Screen
Post by: daftdate on October 20, 2006, 09:43:50 PM
Yeeeeyyyyy it worked like a charm so now no matter which theme my students use the images fit in with the background rather than looking square and clunky.  Thats 31 themes ive just adjusted.  :) I must be nuts  :idiot2:  :D
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 20, 2006, 09:50:23 PM
Quote from: Starrbuck on October 20, 2006, 09:43:30 PM
I like this method but I would also like the left TP blocks to exist as well.  How do I add them?

to the article?

simply click on the article options link and then check the option for "show left bar" :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: Starrbuck on October 20, 2006, 09:59:43 PM
Quote from: akulion on October 20, 2006, 09:50:23 PM
to the article?

simply click on the article options link and then check the option for "show left bar" :up:

No, I meant when using the custom php.  I got around it by enabling the left blocks when in the forum, which also applies to the user cp.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 20, 2006, 10:03:32 PM
cool :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: Starrbuck on October 20, 2006, 10:05:29 PM
This is really cool.  Thanks for doing it and taking the time to post.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 20, 2006, 10:09:20 PM
Welcome - I needed it the most lol

u should have seen the amount of PM's I used to get from users asking how to change their theme lool
Title: Re: USER CP - An alternative to Profile Screen
Post by: Nokonium on October 20, 2006, 10:31:56 PM
I've been fiddling with the custom action version I have found an error in the following extra bit, there is an ? missing

Find
<br />
<p align="center"><font face="Verdana" size="2">Do not like this tyle of UserCP? Then use the original one <a href="', $scripturl, 'action=profile"><b>Here</b></a></p>


Replace with
<br />
<p align="center"><font face="Verdana" size="2">Do not like this tyle of UserCP? Then use the original one <a href="', $scripturl, '?action=profile"><b>Here</b></a></p>




A suggested refinement to prevent creating hard coded text.

Find
<a href="', $scripturl, '?action=usercp">User CP</a>

Replace with
<a href="', $scripturl, '?action=usercp">' , $txt[cp_user] , '</a>

Open  Index.english.php 

Find
?>

Add before

// User Control Panel
$txt['cp_user'] = 'User CP';





I am also getting the "Undefined index: member" error.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Raven on October 20, 2006, 10:32:37 PM
Someone say they wanted gifs? I converted and edited them as most people use IE (God knows why) and it can't display .PNG right, feel free to save the images on this page :)
http://www.bzfiend.com/raven/forum/index.php?page=7
Title: Re: USER CP - An alternative to Profile Screen
Post by: Ken. on October 20, 2006, 11:24:52 PM
Mine is throwing the error below;
I’ve been through the whole thread several times but so far am not coming up with what I’m doing wrong.
What needs to be changed to make it right?
Thanksâ€Ã,¦ Ken
Error page: test forum (http://www.mykimbrell.com/oldFamilyForum/index.php?page=8)

Parse error: parse error, unexpected '<' in /homepages/46/d100556969/htdocs/mykimbrell/oldFamilyForum/Sources/Load.php(1709) : eval()'d code(225) : eval()'d code on line 1
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on October 20, 2006, 11:31:04 PM
Do you have the <?php and ?> tags left in your article ?
Title: Re: USER CP - An alternative to Profile Screen
Post by: bloc on October 21, 2006, 12:19:02 AM
This is a great idea! Akulion: :up: :up:

I taken the freedom to put this into the actual profile.template of a new theme I will release today. Although the use of article is nice, its really a bit cumbersome - and leaves out the pure SMF users that don't have TP - or even Custom action mod installed.

What I done is to make it so the theme will show the "dashboard" page when adding "dashboard" to the querystring..like so: index.php?action=profile;u=1;sa=summary;dashboard. Also a shortcut to it and a option to make it default - for those that like that. There is in addition a check for permission, as you don't want a lot of error messages when everyone tries to view "your" dashboard. So only those that can manage members and yourself should see and use it.

But more details on it when I upload the theme.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 21, 2006, 12:26:36 AM
:D woo hoo

Really looking forward to the theme :D

Ur themes are always the best :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: Ken. on October 21, 2006, 12:28:26 AM
Quote from: G6 on October 20, 2006, 11:31:04 PM
Do you have the <?php and ?> tags left in your article ?
I don't see them G6, here is all of the code in my php article:
<p>echo&undefined;<br /><table border="0" width="100%" id="table1" cellspacing="1" style="border-collapse: collapse"><br /><span style="white-space: pre" /><tr><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=account"><img border="0" src="usercp/ksysguard.png" width="80" height="80"></a></font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=theme"><img border="0" src="usercp/kivio.png" width="80" height="80"></a></font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=theme;sa=pick;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sesc=&undefined;, $context[&undefined;session_id&undefined;], &undefined;"><img border="0" src="usercp/blockdevice.png" width="80" height="80"></a></font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=forumProfile"><img border="0" src="usercp/kuser.png" width="80" height="80"></a></font></td><br /><span style="white-space: pre" /></tr><br /><span style="white-space: pre" /><tr><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=account"><b>My Account Info</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">Click here if you want to <br /><span style="white-space: pre" /><span style="white-space: pre" />change your account related information such as username, email, <br /><span style="white-space: pre" /><span style="white-space: pre" />password or other sensitive details.</font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=theme"><b>Look & Layout Options</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">Click here to change the way <br /><span style="white-space: pre" /><span style="white-space: pre" />the forum looks for you, options include the look and layout for the <br /><span style="white-space: pre" /><span style="white-space: pre" />boards and posts.</font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=theme;sa=pick;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sesc=&undefined;, $context[&undefined;session_id&undefined;], &undefined;"><b>My Theme</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">This screen will allow you to <br /><span style="white-space: pre" /><span style="white-space: pre" />set your default theme which you wish to use every time you login.</font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=forumProfile"><b>My Profile</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">Click here to change the way <br /><span style="white-space: pre" /><span style="white-space: pre" />your profile looks and appears to everyone.</font></td><br /><span style="white-space: pre" /></tr><br /><span style="white-space: pre" /><tr><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=statPanel"><img border="0" src="usercp/kwalletmanager.png" width="80" height="80"></a></font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=showPosts"><img border="0" src="usercp/kedit.png" width="80" height="80"></a></font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=notification"><img border="0" src="usercp/mailreminder.png" width="80" height="80"></a></font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=editBuddies"><img border="0" src="usercp/kdmconfig.png" width="80" height="80"></a></font></td><br /><span style="white-space: pre" /></tr><br /><span style="white-space: pre" /><tr><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=statPanel"><b>My Stats</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">Here you can check how many <br /><span style="white-space: pre" /><span style="white-space: pre" />posts you have made, which games you are a champion in and other <br /><span style="white-space: pre" /><span style="white-space: pre" />activity related info.</font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=showPosts"><b>My Posts</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">This option will show you all <br /><span style="white-space: pre" /><span style="white-space: pre" />the posts you have made since you became a member of this site.</font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=notification"><b>My Notifications</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">This screen will allow you to <br /><span style="white-space: pre" /><span style="white-space: pre" />change the type and frequency of notifications you get via e-mail when <br /><span style="white-space: pre" /><span style="white-space: pre" />participating in threads.</font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=editBuddies"><b>Buddies</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">This screen will allow you to <br /><span style="white-space: pre" /><span style="white-space: pre" />select buddies to add to your list. </font></td><br /><span style="white-space: pre" /></tr><br /><span style="white-space: pre" /><tr><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=pmprefs"><img border="0" src="usercp/mail.png" width="80" height="80"></a></font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=tpshoutbox"><img border="0" src="usercp/messenger.png" width="80" height="80"></a></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=search"><img border="0" src="usercp/find.png" width="80" height="80"></a></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><a href="&undefined;, $scripturl, &undefined;?action=pm;sa=send;u=1"><img border="0" src="usercp/agent.png" width="80" height="80"></a></td><br /><span style="white-space: pre" /></tr><br /><span style="white-space: pre" /><tr><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=pmprefs"><b>My Messages Options</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">This screen will allow you to <br /><span style="white-space: pre" /><span style="white-space: pre" />set your preferences for PMs received on the board and also allow you to <br /><span style="white-space: pre" /><span style="white-space: pre" />ignore people you do not wish to receive PMs from.</font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><b><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=profile;u=&undefined;, $context[&undefined;member&undefined;][&undefined;id&undefined;], &undefined;;sa=tpshoutbox">Show My Shouts</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></font></b><font face="Verdana" size="1">This screen will show a log of <br /><span style="white-space: pre" /><span style="white-space: pre" />all the shouts you have made in the shoutbox. (Note: Shouts are deleted <br /><span style="white-space: pre" /><span style="white-space: pre" />periodically by the admin)</font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=search"><b>Search</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">This screen will allow you to <br /><span style="white-space: pre" /><span style="white-space: pre" />search for posts made in the board.</font></td><br /><span style="white-space: pre" /><span style="white-space: pre" /><td align="center" width="25%" valign="top"><br /><span style="white-space: pre" /><span style="white-space: pre" /><font face="Verdana" size="2"><a href="&undefined;, $scripturl, &undefined;?action=pm;sa=send;u=1"><b>Contact Admin</a><br><br /><span style="white-space: pre" /><span style="white-space: pre" /></b></font><font face="Verdana" size="1">Still  having problems?<br><br /><span style="white-space: pre" /><span style="white-space: pre" />Then contact the admin from here and submit your questions.</font></td><br /><span style="white-space: pre" /></tr><br /></table><br />&undefined;;<br /></p>
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 21, 2006, 12:32:33 AM
Ken I think u may be using the "editor" in the article

Turn the editor off from ur TP Settings Screen

And then put follow instructions as in 1st post :up: and all should go well
Title: Re: USER CP - An alternative to Profile Screen
Post by: rctxtreme on October 21, 2006, 12:41:50 AM
I've packaged up this into a handy little mod... though I'm not releasing it without akulion allowing me to...
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 21, 2006, 12:42:42 AM
rcxtreme feel free man :up:

all of us here at smf and tp share as a community :D so no problem :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: rctxtreme on October 21, 2006, 12:51:05 AM
OK, view it here (http://mods.simplemachines.org/index.php?mod=498)
Title: Re: USER CP - An alternative to Profile Screen
Post by: Ken. on October 21, 2006, 12:52:07 AM
Quote from: akulion on October 21, 2006, 12:32:33 AM
Ken I think u may be using the "editor" in the article

Turn the editor off from ur TP Settings Screen

And then put follow instructions as in 1st post :up: and all should go well

Like a Charm!!! :D

At first I was still unable to get it to work after turning off the editor, but then realized the extra code that the editor was generating was still in the article, so after clearing out all of the old code and pasting in again from your posted code all is well.

You can see the result here.
http://www.mykimbrell.com/oldFamilyForum/index.php?page=8

Many thanks to you & G6, this looks greatâ€Ã,¦ Ken

Edit to remove excess words... I talk too much. ;)
Title: Re: USER CP - An alternative to Profile Screen
Post by: mfKG on October 21, 2006, 12:52:23 AM
i was so happy, no errors, but now i got again tons of errors:
"8: Use of undefined constant usercp - assumed 'usercp'
Datei: /home/www/web434/html/smf/Themes/default/TPortal.template.php (eval?)
Zeile: 637" (lol, the file has just 461 lines?)

evrywhere this "usercp", in Arcade.template.php,BoardIndex.template.php,Who.german.php,Display.template.php,and so on.....

don't now whats to do, also not familar 'til now really with php or so ;)
Title: Re: USER CP - An alternative to Profile Screen
Post by: Mindriot on October 21, 2006, 12:53:59 AM
Great Idea Man!! I will be using this technique for my Site. Great Job! :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: rctxtreme on October 21, 2006, 01:03:13 AM
As soon as the mod gets approved (see second post on this page) I think the need for such coding will be removed ;)
Title: Re: USER CP - An alternative to Profile Screen
Post by: rebelrose on October 21, 2006, 01:08:34 AM
Quote from: akulion on October 18, 2006, 08:19:44 PM
Glad you guys liked it :D


That is awesome work, Job very well done.
Title: Re: USER CP - An alternative to Profile Screen
Post by: bloc on October 21, 2006, 01:09:33 AM
Ok, Akulion..this new free theme of mine called Leviathan has the Profile screen changed. First change the theme here:

http://www.tinyportal.net/smf/index.php?action=forum;theme=34

Then go to your profile and press the image that looks like this: (https://www.tinyportal.net/smf/Themes/leviathan_11rc3_tp/images/summary.gif)
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 21, 2006, 01:12:37 AM
Quote from: rctxtreme on October 21, 2006, 12:51:05 AM
OK, view it here (http://mods.simplemachines.org/index.php?mod=498)

aaww u mentioned me in the credits :D Thanks that really made me happy :up:

mfkg - read a few of the threads in the past pages ... there is some solutions posted :up:

Quote from: Bloc on October 21, 2006, 01:09:33 AM
Ok, Akulion..this new free theme of mine called Leviathan has the Profile screen changed. First change the theme here:

http://www.tinyportal.net/smf/index.php?action=forum;theme=34

Then go to your profile and press the image that looks like this: (https://www.tinyportal.net/smf/Themes/leviathan_11rc3_tp/images/summary.gif)


WOW Bloc!!!! That is the most awesome option to have different layout options!!! Way out!!! :D
Title: Re: USER CP - An alternative to Profile Screen
Post by: Lesmond on October 21, 2006, 01:25:59 AM
Very Nice theme Bloc, and great work with the user cp Aku :up:


Just a side Note Bloc, where did you get the name "Leviathan" from? I had to have a look on Wikipedia and found This (http://"http://en.wikipedia.org/wiki/Leviathan")
Title: Re: USER CP - An alternative to Profile Screen
Post by: mfKG on October 21, 2006, 01:31:48 AM
ok, i catcht "my" Error, was my fault,...forgot in the index.template the ' ' in $txt['usercp'] ;)....

@bloc: hmmm...nothing happens to me, when i press the button in the Profile....
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 21, 2006, 01:42:35 AM
mfkg change the theme from the link block gave and then check out profile - the button is on top right hand corner :up:

Title: Re: USER CP - An alternative to Profile Screen
Post by: bloc on October 21, 2006, 01:47:34 AM
Yes, its only in the new theme - not in others.

Leviathan just sounded good for this theme - "forces of chaos".
Title: Re: USER CP - An alternative to Profile Screen
Post by: mfKG on October 21, 2006, 02:01:19 AM
hmm....i had changed the Theme (to Leviathan, its active right now), then i was going into the Profil, pressed the Button, but nothing happens, thats what i also done before (i postet above ;)),....

the three color blocks above after the "reset" button, should they change the color of the theme? they brings my to the index...

(edit: i use Opera 9.x)
Title: Re: USER CP - An alternative to Profile Screen
Post by: Ken. on October 21, 2006, 02:10:41 AM
It’s now installed on my live forum and uses the background theme of my web site & forumâ€Ã,¦ anyone who wants to take a look at the test page is welcome;
User name=testuser
pw=test


test forum (http://www.mykimbrell.com/oldFamilyForum/index.php)
Title: Re: USER CP - An alternative to Profile Screen
Post by: rctxtreme on October 21, 2006, 02:50:34 AM
Quote from: winrulesI was looking at your UserCP mod, and noticed a few things that should be fixed before approval. First is that it leaves a through files on uninstall (usercp.php, usercp.template.php, and the Usercp directory with the images in it). Second is it has a link to the TinyPortal shoutbox, but it doesn't say it is dependent on TinyPortal. You should either that that won't work it TinyPortal isn't installed, make two different packages, or have it check to see if TinyPortal is installed.

Thanks,
winrules

Oops...
Title: Re: USER CP - An alternative to Profile Screen
Post by: Mindriot on October 21, 2006, 04:48:00 AM
Quote from: mfKG on October 21, 2006, 01:31:48 AM
ok, i catcht "my" Error, was my fault,...forgot in the index.template the ' ' in $txt['usercp'] ;)....

@bloc: hmmm...nothing happens to me, when i press the button in the Profile....

No worky here either. Using either IE or FF.
Title: Re: USER CP - An alternative to Profile Screen
Post by: bloc on October 21, 2006, 08:04:47 AM
It was some errors..try refresh and press again.

The trouble on this site was that "index.php" is using another theme, so the change didn't reach Leviathan. But it should go to the forum index instead now.
Title: Re: USER CP - An alternative to Profile Screen
Post by: mfKG on October 21, 2006, 03:51:24 PM
I modified the usercp.template that way, u can put the Description into the Modification.english (or your language). Its prettier easyer to translate imo,....perhaps useful for someone (like me),.....
(but my german Translation isnt ready to share,....i'm a bad translater ;)))

hmmm....i tried it here, changed the Serverlanguege to English, but strange, there where no Txts in the UserCP, but why? i cant get it???... (with german it works all nice)
Title: Re: USER CP - An alternative to Profile Screen
Post by: knat on October 21, 2006, 04:59:47 PM
I modyfied this usercp to include a logoff button since i dont have any on my board..  ;D

yesterday it was working fine.. today its broken  :-\

here is the part of my code that contains the logoff button.. the error tels me it cant veryfi the refering url

<font face="Verdana" size="2"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '" target="_self">Log Af</a><br>
</b></font><font face="Verdana" size="1">Klik her for at logge af gapeindex.dk.</font></td>


support needed

Edit: Looked into it a little more.. 1 out of 10 times i got it to work. How can it work sometimes and not others times ?? can it have something to do with cookies ?

Edit again: Never mind, i fixed it. It was my cokies settings that was messed up
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 21, 2006, 11:38:56 PM
With Aku's permission, I'm posting a version of his Control Panel which (I believe) is both a bit more flexible (select entries per row; allow easier 'shuffling' of entries) and accounts for Board Settings and Permissions (if user can't change theme, entry shouldn't show up):

global $context, $scripturl, $modSettings, $ID_MEMBER, $txt;

$entries_per_row = 4; // Range 3-5 probably best
$admin_user = 1; // Member # of Forum Administrator for 'Contact' PM
$img_size = 80; // used for height AND width of 'icon'

reloadSettings();
loadLanguage('Profile');
list ($memID) = loadMemberData($ID_MEMBER, false, 'profile');
$context['user']['is_owner'] = $memID == $ID_MEMBER;

/////////////////////////////////////////////////////////////
//
//Ã,  linkÃ,  - construction to yield the part of the URL after 'index.php'
//Ã,  image - location of graphic 'icon'
//Ã,  title - entry 'name'
//Ã,  label - entry description

if (($context['user']['is_owner'] && allowedTo('profile_identity_own')) || allowedTo(array('profile_identity_any', 'manage_membergroups')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=account',Ã,  Ã,  'image' => 'usercp/ksysguard.png',Ã,  Ã,  'title' => 'My Account Info',
'label' => 'Click here if you want to change your account related information such as username, email, password or other sensitive details.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=theme',Ã,  Ã,  'image' => 'usercp/kivio.png',Ã,  Ã,  'title' => 'Look & Layout Options',
'label' => 'Click here to change the way the forum looks for you, options include the look and layout for the boards and posts.');

if ($modSettings['theme_allow'] || $context['user']['is_admin'])
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pick;sesc='.$context['session_id'],Ã,  Ã,  'image' => 'usercp/blockdevice.png',Ã,  Ã,  'title' => 'My Theme',
'label' => 'This screen will allow you to set your default theme which you wish to use every time you login.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=forumProfile',Ã,  Ã,  'image' => 'usercp/kuser.png',Ã,  Ã,  'title' => 'My Profile',
'label' => 'Click here to change the way your profile looks and appears to everyone.');

if (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=statPanel',Ã,  Ã,  'image' => 'usercp/kwalletmanager.png',Ã,  Ã,  'title' => 'My Stats',
'label' => 'Here you can check how many posts you have made, which games you are a champion in and other activity related info.');

if (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=showPosts',Ã,  Ã,  'image' => 'usercp/kedit.png',Ã,  Ã,  'title' => 'My Posts',
'label' => 'This option will show you all the posts you have made since you became a member of this site.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=notification',Ã,  Ã,  'image' => 'usercp/mailreminder.png',Ã,  Ã,  'title' => 'My Notifications',
'label' => 'This screen will allow you to change the type and frequency of notifications you get via e-mail when participating in threads.');

if (!empty($modSettings['enable_buddylist']) && $context['user']['is_owner'] && allowedTo(array('profile_extra_own', 'profile_extra_any')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=editBuddies',Ã,  Ã,  'image' => 'usercp/kdmconfig.png',Ã,  Ã,  'title' => 'Buddies',
'label' => 'This screen will allow you to select buddies to add to your list.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pmprefs',Ã,  Ã,  'image' => 'usercp/mail.png',Ã,  Ã,  'title' => 'My Messages Options',
'label' => '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.');

if (!$context['user']['is_guest'] && (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo(array('profile_view_any', 'moderate_forum', 'manage_permissions','tp_dlmanager','tp_blocks','tp_articles','tp_gallery','tp_linkmanager'))))
if($context['user']['is_owner'] || allowedTo('tp_blocks'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=tpshoutbox',Ã,  Ã,  'image' => 'usercp/messenger.png',Ã,  Ã,  'title' => 'Show My Shouts',
'label' => 'This screen will show a log of all the shouts you have made in the shoutbox.');

if ($context['allow_search'])
$cp_entry[] = array('link' => '?action=search',Ã,  Ã,  'image' => 'usercp/find.png',Ã,  Ã,  'title' => 'Search',
'label' => 'This screen will allow you to search for posts made in the board.');

if (allowedTo('pm_send'))
$cp_entry[] = array('link' => '?action=pm;sa=send;u='.$admin_user,Ã,  Ã,  'image' => 'usercp/agent.png',Ã,  Ã,  'title' => 'Contact Admin',
'label' => 'Still having problems?<br>Then contact the admin from here and submit your questions.');

/////////////////////////////////////////
// Karma Description Log
//if (($modSettings['karmaMode'] == '1') || ($modSettings['karmaMode'] == '2'))
// if ((!empty($modSettings['karmaisowner']) && ($context['user']['is_owner'])) || (empty($modSettings['karmaisowner'])) || ($context['user']['is_admin']))
// $cp_entry[] = array('link' => '?action=ownkarma;u='.$ID_MEMBER,Ã,  Ã,  'image' => '',Ã,  Ã,  'title' => $txt['who_change_my_karma'],
// 'label' => 'Show log of who who affected your '.$modSettings['karmaLabel'].'.');
/////////////////////////////////////////

/////////////////////////////////////////
// Awards Mod Badge Album
//loadLanguage('ManageAwards');
//if (isset($txt['pa_description']))
// $cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=awards',Ã,  Ã,  'image' => '',Ã,  Ã,  'title' => 'Badge Album',
// 'label' => 'Manage your Award badge album.');
/////////////////////////////////////////

/////////////////////////////////////////
// Logout
//$cp_entry[] = array('link' => '?action=logout;sesc='.$context['session_id'],Ã,  Ã,  'image' => '',Ã,  Ã,  'title' => 'Logout',
// 'label' => 'Log off the Forum.');
/////////////////////////////////////////

$cell_width = (int) (100 / $entries_per_row);
$row_ent = 0;

$line_1 = '';
$line_2 = '';
$line_3 = '';

echo '<table>';
foreach ($cp_entry as $ent) {

$line_1 .= '<td valign="top" width="'.$cell_width.'%" align="center" height="'.$img_size.'px"><a href="'.$scripturl.$ent['link'].'"><img border="0" src="'.$ent['image'].'" width="'.$img_size.'" height="'.$img_size.'"></a></td>';
$line_2 .= '<td class="windowbg3" style="font-size:small;font-weight:bold;text-align:center;vertical-align:top;padding:3px;"><a href="'.$scripturl.$ent['link'].'">'.$ent['title'].'</a></td>';
$line_3 .= '<td style="font-size:x-small;text-align:center;vertical-align:top;font-weight:bold;padding:3px;">'.$ent['label'].'</td>';

$row_ent = $row_ent + 1;
if ($row_ent == $entries_per_row) {
$row_ent = 0;
echo '<tr height="', $img_size, 'px">', $line_1, '</tr>';
echo '<tr height="1.3em">', $line_2, '</tr>';
echo '<tr height="125px">', $line_3, '</tr>';
$line_1 = '';
$line_2 = '';
$line_3 = '';
}
}
if ($row_ent > 0) {
$line_1 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
$line_2 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
$line_3 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
echo '<tr height="', $img_size, 'px">', $line_1, '</tr>';
echo '<tr height="1.3em">', $line_2, '</tr>';
echo '<tr height="125px">', $line_3, '</tr>';
}
echo '</table>';



EDIT: Fixed the error-causing $user_info reference. Note that I did NOT add the global, but instead changed to check the associated $context array entry (it just grates to pull in a whole additional structure just for a single value referenced once).
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 21, 2006, 11:43:12 PM
wow this is really awesome :D

Way to go J.A.Cortina :D

I just made tha match, u made the whole Cooking range stove :D :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: Mindriot on October 22, 2006, 01:28:45 AM
Quote from: Bloc on October 21, 2006, 08:04:47 AM
It was some errors..try refresh and press again.

The trouble on this site was that "index.php" is using another theme, so the change didn't reach Leviathan. But it should go to the forum index instead now.

Still not working for me here.

Regardless, I Love the Forum Resizing on that Theme. Great Stuff!  :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: mfKG on October 22, 2006, 03:06:19 AM
nice J.A.Cortina, but why not "outsourcing" the Text (ex. My Profile)? Would be much easier for translating/changing, then searching in the code........just my opinion ;)...
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 22, 2006, 03:38:58 AM
You are correct. Especially for 'multilingual' boards (where more than one language is expected to be actively used).

On the other hand, it makes some things problematic (or at least makes it something I'm not sure how to approach satisfactorily). For instance, I don't use the word 'karma' for karma functionality, so in the sample entry I added for that, I use a construction in the description (label) which references the word that I do use. Having a simple $txt entry for that description wouldn't be adequate.

Hey, I spent hours just trying to make sure that the results of the code would look correct in both FF and IE.  ;D
Title: Re: USER CP - An alternative to Profile Screen
Post by: Ken. on October 22, 2006, 04:17:28 AM
This latest version is great... my forum is set to use only one theme so the change to having that option removed fits well for me.
I only have one small change that needs to be made so that my background will look right, is it possible to remove the band of color that is behind each icon label as shown in the picture below?
In the screen shot the IE window on the left is showing my live site and the FF window on the right shows the test forumâ€Ã,¦ the test forum is showing the color bands that need to be removed so that it looks the same as the live site.
Thanksâ€Ã,¦ Ken
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 22, 2006, 04:21:27 AM
Find this line:
$line_2 .= '<td class="windowbg3" style="font-size:small;font-weight:bold;text-align:center;vertical-align:top;padding:3px;"><a href="'.$scripturl.$ent['link'].'">'.$ent['title'].'</a></td>';

and remove the 'class="windowbg3"'
Title: Re: USER CP - An alternative to Profile Screen
Post by: Ken. on October 22, 2006, 04:35:23 AM
Perfect!  ;D

Just one more thing... ;)
The change the bold text to regular do I just remove the font weight entries in the code here, or replace it with some other value?
$line_1 .= '<td valign="top" width="'.$cell_width.'%" align="center" height="'.$img_size.'px"><a href="'.$scripturl.$ent['link'].'"><img border="0" src="'.$ent['image'].'" width="'.$img_size.'" height="'.$img_size.'"></a></td>';
$line_2 .= '<td class="windowbg3" style="font-size:small;font-weight:bold;text-align:center;vertical-align:top;padding:3px;"><a href="'.$scripturl.$ent['link'].'">'.$ent['title'].'</a></td>';
$line_3 .= '<td style="font-size:x-small;text-align:center;vertical-align:top;font-weight:bold;padding:3px;">'.$ent['label'].'</td>';
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 22, 2006, 04:41:45 AM
Just remove them.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Ken. on October 22, 2006, 04:46:39 AM
Thanks... works good.  :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: Nokonium on October 22, 2006, 08:21:06 AM
I'm working with the custom action version and I thought, could I drop J A Cortina's code into Akulions function?

You can, it works  ;D

save as usercp.template.php


<?php
/*
User CP Page - J.A.Cortina version of Akulions original
*/
 
function template_main()
{
global $context$scripturl$modSettings$ID_MEMBER$txt;

$entries_per_row 4; // Range 3-5 probably best
$admin_user 1; // Member # of Forum Administrator for 'Contact' PM
$img_size 80; // used for height AND width of 'icon'

reloadSettings();
loadLanguage('Profile');
list (
$memID) = loadMemberData($ID_MEMBERfalse'profile');
$context['user']['is_owner'] = $memID == $ID_MEMBER;

/////////////////////////////////////////////////////////////
//
//  link  - construction to yield the part of the URL after 'index.php'
//  image - location of graphic 'icon'
//  title - entry 'name'
//  label - entry description

if (($context['user']['is_owner'] && allowedTo('profile_identity_own')) || allowedTo(array('profile_identity_any''manage_membergroups')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=account',    'image' => 'usercp/ksysguard.png',    'title' => 'My Account Info',
'label' => 'Click here if you want to change your account related information such as username, email, password or other sensitive details.');

if ((
$context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=theme',    'image' => 'usercp/kivio.png',    'title' => 'Look & Layout Options',
'label' => 'Click here to change the way the forum looks for you, options include the look and layout for the boards and posts.');

if (
$modSettings['theme_allow'] || $context['user']['is_admin'])
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pick;sesc='.$context['session_id'],    'image' => 'usercp/blockdevice.png',    'title' => 'My Theme',
'label' => 'This screen will allow you to set your default theme which you wish to use every time you login.');

if ((
$context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=forumProfile',    'image' => 'usercp/kuser.png',    'title' => 'My Profile',
'label' => 'Click here to change the way your profile looks and appears to everyone.');

if ((
$context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=statPanel',    'image' => 'usercp/kwalletmanager.png',    'title' => 'My Stats',
'label' => 'Here you can check how many posts you have made, which games you are a champion in and other activity related info.');

if ((
$context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=showPosts',    'image' => 'usercp/kedit.png',    'title' => 'My Posts',
'label' => 'This option will show you all the posts you have made since you became a member of this site.');

if ((
$context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=notification',    'image' => 'usercp/mailreminder.png',    'title' => 'My Notifications',
'label' => 'This screen will allow you to change the type and frequency of notifications you get via e-mail when participating in threads.');

if (!empty(
$modSettings['enable_buddylist']) && $context['user']['is_owner'] && allowedTo(array('profile_extra_own''profile_extra_any')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=editBuddies',    'image' => 'usercp/kdmconfig.png',    'title' => 'Buddies',
'label' => 'This screen will allow you to select buddies to add to your list.');

if ((
$context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pmprefs',    'image' => 'usercp/mail.png',    'title' => 'My Messages Options',
'label' => '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.');

if (!
$user_info['is_guest'] && (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo(array('profile_view_any''moderate_forum''manage_permissions','tp_dlmanager','tp_blocks','tp_articles','tp_gallery','tp_linkmanager'))))
if($context['user']['is_owner'] || allowedTo('tp_blocks'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=tpshoutbox',    'image' => 'usercp/messenger.png',    'title' => 'Show My Shouts',
'label' => 'This screen will show a log of all the shouts you have made in the shoutbox.');

if (
$context['allow_search'])
$cp_entry[] = array('link' => '?action=search',    'image' => 'usercp/find.png',    'title' => 'Search',
'label' => 'This screen will allow you to search for posts made in the board.');

if (
allowedTo('pm_send'))
$cp_entry[] = array('link' => '?action=pm;sa=send;u='.$admin_user,    'image' => 'usercp/agent.png',    'title' => 'Contact Admin',
'label' => 'Still having problems?<br>Then contact the admin from here and submit your questions.');

/////////////////////////////////////////
// Karma Description Log
//if (($modSettings['karmaMode'] == '1') || ($modSettings['karmaMode'] == '2'))
// if ((!empty($modSettings['karmaisowner']) && ($context['user']['is_owner'])) || (empty($modSettings['karmaisowner'])) || ($context['user']['is_admin']))
// $cp_entry[] = array('link' => '?action=ownkarma;u='.$ID_MEMBER,    'image' => '',    'title' => $txt['who_change_my_karma'],
// 'label' => 'Show log of who who affected your '.$modSettings['karmaLabel'].'.');
/////////////////////////////////////////

/////////////////////////////////////////
// Awards Mod Badge Album
//loadLanguage('ManageAwards');
//if (isset($txt['pa_description']))
// $cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=awards',    'image' => '',    'title' => 'Badge Album',
// 'label' => 'Manage your Award badge album.');
/////////////////////////////////////////

/////////////////////////////////////////
// Logout
//$cp_entry[] = array('link' => '?action=logout;sesc='.$context['session_id'],    'image' => '',    'title' => 'Logout',
// 'label' => 'Log off the Forum.');
/////////////////////////////////////////

$cell_width = (int) (100 $entries_per_row);
$row_ent 0;

$line_1 '';
$line_2 '';
$line_3 '';

echo 
'<table>';
foreach (
$cp_entry as $ent) {

$line_1 .= '<td valign="top" width="'.$cell_width.'%" align="center" height="'.$img_size.'px"><a href="'.$scripturl.$ent['link'].'"><img border="0" src="'.$ent['image'].'" width="'.$img_size.'" height="'.$img_size.'"></a></td>';
$line_2 .= '<td class="windowbg3" style="font-size:small;font-weight:bold;text-align:center;vertical-align:top;padding:3px;"><a href="'.$scripturl.$ent['link'].'">'.$ent['title'].'</a></td>';
$line_3 .= '<td style="font-size:x-small;text-align:center;vertical-align:top;font-weight:bold;padding:3px;">'.$ent['label'].'</td>';

$row_ent $row_ent 1;
if ($row_ent == $entries_per_row) {
$row_ent 0;
echo '<tr height="'$img_size'px">'$line_1'</tr>';
echo '<tr height="1.3em">'$line_2'</tr>';
echo '<tr height="125px">'$line_3'</tr>';
$line_1 '';
$line_2 '';
$line_3 '';
}
}
if (
$row_ent 0) {
$line_1 .= '<td colspan="'.($entries_per_row $row_ent).'"> </td>';
$line_2 .= '<td colspan="'.($entries_per_row $row_ent).'"> </td>';
$line_3 .= '<td colspan="'.($entries_per_row $row_ent).'"> </td>';
echo '<tr height="'$img_size'px">'$line_1'</tr>';
echo '<tr height="1.3em">'$line_2'</tr>';
echo '<tr height="125px">'$line_3'</tr>';
}
echo 
'</table>';
}
?>
Title: Re: USER CP - An alternative to Profile Screen
Post by: rctxtreme on October 22, 2006, 09:15:59 AM
Hrm should I update my (unapproved) package with that?
Title: Re: USER CP - An alternative to Profile Screen
Post by: Nokonium on October 22, 2006, 12:58:42 PM
JA's code fixed the 'member' error but I found an undefined index: user_info error. I think that I've found the fix.

Find

global $context, $scripturl, $modSettings, $ID_MEMBER, $txt;

Replace with

global $context, $scripturl, $modSettings, $ID_MEMBER, $txt, $user_info;
Title: Re: USER CP - An alternative to Profile Screen
Post by: Raven on October 22, 2006, 03:52:02 PM
Wow thanks J.A Cortina, thats really nice!
_____________________________________________

Quote from: J.A.Cortina on October 22, 2006, 04:21:27 AM
Find this line:
$line_2 .= '<td class="windowbg3" style="font-size:small;font-weight:bold;text-align:center;vertical-align:top;padding:3px;"><a href="'.$scripturl.$ent['link'].'">'.$ent['title'].'</a></td>';

and remove the 'class="windowbg3"'
A note, for those who want the band but are using Mirage, I suggest changing "windowbg3" to "catbg" as the "winbg3" is grey and hard to read on most schemes, with "catbg" it is easy to read and it also changes colour when you change the colour of the theme :)

See: http://www.bzfiend.com/raven/forum/index.php?page=8
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 22, 2006, 04:18:56 PM
Quote from: Raven on October 22, 2006, 03:52:02 PM
A note, for those who want the band but are using Mirage, I suggest changing "windowbg3" to "catbg" as the "winbg3" is grey and hard to read on most schemes, with "catbg" it is easy to read and it also changes colour when you change the colour of the theme :)

Hmm. Well, I chose the windowbg3 as it's the class used for sticky post cells (at least in the default theme). As such, it's usually the more 'pronounced' of the text cell backgrounds. I wouldn't think that it should be difficult to read.

But the presentation can be 'tweaked' to suit. With all cells having the specific attributes applied in their one specific place (with style attributes already in place for the two text portions to add to/modify), it should be fairly easy to play with it.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Raven on October 22, 2006, 05:19:39 PM
Yeah I know what you mean, the sticky cell in Mirage can actually cause problems as it is hard to read dark red on almost black, I keep meaning to change it but I keep forgetting :P
Title: Re: USER CP - An alternative to Profile Screen
Post by: JDMhustle on October 22, 2006, 09:44:48 PM
Quote from: Alan S on October 18, 2006, 08:55:57 PM



Open the index.php

Search For

'sticky' => array('LockTopic.php', 'Sticky'),

Add after

'usercp' => array('usercp.php', 'usercp'),


Nice code and write up but when i open up index.php in theme directory i get this:
<?php

// This file is here solely to protect your Themes directory.

// Look for Settings.php....
if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))
{
// Found it!
require(dirname(dirname(__FILE__)) . '/Settings.php');
header('Location: ' $boardurl);
}
// Can't find it... just forget it.
else
exit;

?>
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 22, 2006, 09:49:07 PM
Yes, that's a 'stub' index.php that's put in a couple of directories to make sure of redirection back to the forum root.

And your forum root is where the index.php is that needs to be modified.
Title: Re: USER CP - An alternative to Profile Screen
Post by: JDMhustle on October 22, 2006, 10:42:32 PM
stupid me ;D

Got it to work, excellent work guys!
http://forum.sirfanaticsholland.com/index.php?action=usercp
Title: Re: USER CP - An alternative to Profile Screen
Post by: JDMhustle on October 23, 2006, 05:32:03 PM
one question, is it possible to get the white background back? i see it has changed to theme background
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on October 23, 2006, 11:45:30 PM
Works great!  I just had to update my index.template.php file to all my 18 or so themes   :uglystupid2:
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 24, 2006, 12:56:52 AM
Quote from: RoarinRow on October 23, 2006, 11:45:30 PM
Works great!  I just had to update my index.template.php file to all my 18 or so themes   :uglystupid2:

u mean u do them manually?
u should get the Global Themes mod :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on October 24, 2006, 02:48:17 AM
Quote from: Aku on October 24, 2006, 12:56:52 AM
Quote from: RoarinRow on October 23, 2006, 11:45:30 PM
Works great!  I just had to update my index.template.php file to all my 18 or so themes   :uglystupid2:

u mean u do them manually?
u should get the Global Themes mod :up:

Hahaha, yeah I did them manually.  I'm all done, it wasn't too bad.  Looks great though!   :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on October 26, 2006, 03:56:10 AM
Quote from: fb on October 20, 2006, 10:34:26 AM
Quote from: daftdate on October 20, 2006, 09:29:29 AM
Ok at the risk of looking like a complete and utter newbie exactly what do i change with the


Instead of ' , $txt[79] , ' put USER CP


code do i replace the whole of the $txt[79] or part of it cause im doing it wrong.
I need to get some php lessons but have to learn C++ first as its a priority for work, then im going to try to get a life.  :)


You would remove all of it, and replace w/ your text:



<a href="', $scripturl, '?action=profile">USER CP</a>


 
Actually I left it <a href="', $scripturl, '?page=XX">USER CP</a>
never mind. I didnt do much w./ the code but didnt do that^
i changed the link and added 'UserCP'
Title: Re: USER CP - An alternative to Profile Screen
Post by: mandos on October 27, 2006, 02:51:06 PM
it looks great, nice job!

is it possible for USER-CP to be added in the next release of tinyportal?

thanks in advance :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: bloc on October 27, 2006, 04:00:08 PM
No, its already made as a template example in Leviathan theme and thats really where it belongs - as part of a theme. Its just a page of quick-links basically.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Assistance on October 27, 2006, 04:27:31 PM
my error log is getting
"Use of undefined constant UserCP - assumed 'UserCP'"

on every page, using JA's code

Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 27, 2006, 04:50:47 PM
My code doesn't have a constant (or variable or index) named UserCP.

The only time those characters are used at all (and only in all lowercase) are as part of the image location specifier (the subdir).

Are you sure you didn't change the entry in the index.template.php to something like:
?action=UserCP
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 27, 2006, 04:55:59 PM
By the way, I agree completely with Bloc's view on this.

As an article, it's fairly easily customized.

Building it in would make it something of a graphical menu 'block', requiring a chunk of programming for little (if any) gain, while inevitably putting constraints/limitations on what different people might want to do with it.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Assistance on October 27, 2006, 04:59:23 PM
Are you sure you didn't change the entry in the index.template.php to something like:
?action=UserCP

is exactly what i did, the caps is the problem?

edit nope

and the one i am using is the one from your post
With Aku's permission, I'm posting a version of his Control Panel
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 27, 2006, 05:08:33 PM
That's not how to change that. You need to:

Quoteinstead of ?action=profile put ?page=XX where XX is the numbr of the article you just created where you placed the user CP code

Instead of ' , $txt[79] , ' put USER CP

So where you put "?action=UserCP", you need to change to "?page=XX" (XX = article #).
Title: Re: USER CP - An alternative to Profile Screen
Post by: Assistance on October 27, 2006, 05:14:18 PM
$scripturl, '?page=39">' , usercp , '</a>

edit
and
put USER CP cause an error cause of the space

so i just have USERCP
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on October 27, 2006, 05:19:21 PM
Change:
$scripturl, '?page=39">' , usercp , '[/url]

To:
$scripturl, '?page=39">' , 'User CP', '</a>

That's the text string to use in the menu (has to be quoted), but the way it was put in was like a constant.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Assistance on October 27, 2006, 05:26:26 PM
oh I see, tyvm

its fixed with no errors (wow no errors, knocks on wood)
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 27, 2006, 05:28:36 PM
whos there?
Title: Re: USER CP - An alternative to Profile Screen
Post by: Nokonium on October 27, 2006, 06:13:25 PM
There is another way that works

http://www.tinyportal.net/smf/index.php?topic=9809.msg81762#msg81762
Title: Re: USER CP - An alternative to Profile Screen
Post by: tamasir on October 28, 2006, 11:37:30 AM
Aku!
I am very glad of it . Thanks.. Thanks.. To be in good order my User CP. ;D :laugh: :up:
tamasir~
Title: Re: USER CP - An alternative to Profile Screen
Post by: hypnoticstate on October 28, 2006, 07:44:35 PM
Is it just me, or when you install this mod and then try pm'ing the admins by way of the new control panel, it doesn't fill in the recipients name, ie the admins.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 28, 2006, 07:48:23 PM
the admin ID is set to 1 (member #1) by default

if u use a different ID for the Admin, then ull have to put their member # in there

works for me filling in my name :D lol
Title: Re: USER CP - An alternative to Profile Screen
Post by: tamasir on October 28, 2006, 08:34:20 PM
Aku!
Help! Help!

Error message:

Quote8: Undefined index: member
Fajl: /USER/xxxxxxx_hu/tamasirforum/Themes/default/TPortal.template.php (eval?)
Line: 75
Error Line: 6,9,12,15,19,22,25,28,34,37,40,43,47,50,53,56,62,64,72,75

Anybody will you help me ?
tamasir~
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 28, 2006, 08:38:13 PM
', $context['member']['id'], '

remove the above EXACTLY from EVERYWHERE in the code and that error will be gone..

ill update the code in the 1st post as well :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on October 28, 2006, 08:47:22 PM
Quote from: Aku on October 28, 2006, 07:48:23 PM
the admin ID is set to 1 (member #1) by default

if u use a different ID for the Admin, then ull have to put their member # in there

works for me filling in my name :D lol

Thanks for the reminder.  I updated mine as well.   :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on October 28, 2006, 09:00:53 PM
Aku, i have added this to my forum aswell, but now i get a lot of errors like this one

Quote8: Undefined index: member
File: /*******/forum/Themes/default/TPortal.template.php (main sub template - eval?)
Line: 90

Diffrent Lines in the same file, but i cant find whats causing it.
Any idea ???
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 28, 2006, 09:02:55 PM
lol G6 look 2 posts above :D

also ive updated the code in my 1st post now :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: Nokonium on October 28, 2006, 09:05:37 PM
If you use the custom action version, modified by J A C you will see member is changed to user, as long as you declare the missing global you will have no errors with that version.
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on October 28, 2006, 09:49:09 PM
 :uglystupid2:   I have to much going on in my head  :buck2:
Title: Re: USER CP - An alternative to Profile Screen
Post by: tamasir on October 28, 2006, 10:57:09 PM
Aku
Quote from: Aku on October 28, 2006, 08:38:13 PM
', $context['member']['id'], '

remove the above EXACTLY from EVERYWHERE in the code and that error will be gone..

ill update the code in the 1st post as well :up:
Thanks, thanks, thank you very much.
No error.
tamasir :up: :2funny:
Title: Re: USER CP - An alternative to Profile Screen
Post by: tamasir on October 28, 2006, 11:00:42 PM
Quote from: Aku on October 28, 2006, 09:02:55 PM
also ive updated the code in my 1st post now :up:
:2funny: :laugh: :2funny: Yes.Yes.Yes ;D ;)
tamasir
Title: Re: USER CP - An alternative to Profile Screen
Post by: copter on October 30, 2006, 04:22:06 PM
Thats actually nice :)

But some of the features on this CP arent available on smf 1.0.9

oh well we can replace them i think.
Title: Re: USER CP - An alternative to Profile Screen
Post by: akulion on October 30, 2006, 04:50:57 PM
upgrade to 1.1rc3 its a far lot better and its stable too - been using it with no problems along with 1000's others :up:

plus better themes for it, more mods and cooler features
Title: Re: USER CP - An alternative to Profile Screen
Post by: ScoobyDan on October 30, 2006, 10:12:31 PM
Quote from: nokonium on October 28, 2006, 09:05:37 PM
If you use the custom action version, modified by J A C you will see member is changed to user, as long as you declare the missing global you will have no errors with that version.

I changed the line
global $context, $scripturl, $modSettings, $ID_MEMBER, $txt;
to
global $context, $scripturl, $modSettings, $ID_MEMBER, $txt, $user;
but I'm still getting errors.

Did I misinterpret what you meant by "declare the missing global"?
Title: Re: USER CP - An alternative to Profile Screen
Post by: Nokonium on October 31, 2006, 06:07:52 AM
What error do you get?
Title: Re: USER CP - An alternative to Profile Screen
Post by: ScoobyDan on October 31, 2006, 07:11:26 AM
nokonium,

The error I'm getting is:
8: Undefined variable: user_info
File: /home/********/public_html/smf/Themes/default/languages/Profile.english.php (eval?)
Line: 61

I changed the line in 'usercp.template.php', if that helps.

Thanks for your support!
Title: Re: USER CP - An alternative to Profile Screen
Post by: Nokonium on October 31, 2006, 06:11:59 PM
A couple of follow up questions

What version of SMF?

What version of Tiny Portal?

Do you have usercp.php in Sources?

Do you have usercp.template.php in the default theme?

Have you added the code modification to the index.template of the theme that you are using?


// Edit Profile... [profile]

And find this under it


<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>

Replace that line with

<a href="', $scripturl, '?action=usercp">User CP</a>


OR

//Nokonium adapted
<a href="', $scripturl, '?action=usercp">' , $txt['cp_user'] , '</a>


AND

In  Index.english.php file in your languages directory.

Find

?>

Add before

// User Control Panel
$txt['cp_user'] = 'User CP';
Title: Re: USER CP - An alternative to Profile Screen
Post by: WSA on October 31, 2006, 08:06:18 PM
That is awesome
Title: Re: USER CP - An alternative to Profile Screen
Post by: ScoobyDan on November 01, 2006, 07:58:29 PM
nokonium,

Sorry, I should have added these details earlier ::)

SMF 1.1 RC3
TinyPortal v0.9.6beta

usercp.php in Sources CHECK
usercp.template.php in Themes/default CHECK
index.template.php modified as described CHECK

The Profile Control Panel works as expected in every way, but it still generates this one error.

Thanks for your help..

Daniel
Title: Re: USER CP - An alternative to Profile Screen
Post by: Nokonium on November 01, 2006, 08:51:48 PM
I think I know what the problem is

QuoteI changed the line
global $context, $scripturl, $modSettings, $ID_MEMBER, $txt;
to
global $context, $scripturl, $modSettings, $ID_MEMBER, $txt, $user;
but I'm still getting errors.

Replace

$user

with

$user_info

Title: Re: USER CP - An alternative to Profile Screen
Post by: ScoobyDan on November 01, 2006, 09:43:09 PM
nokonium,

Where is the smiley for smacking yourself on the forehead - one of those d'oh moments  ::)

It's obvious when you look at the error message ;D Maybe PHP isn't as hard as I thought it was! ;)

In case you hadn't realised - that sort it! ;D

Thanks again for your help

Daniel
Title: Re: USER CP - An alternative to Profile Screen
Post by: Assistance on November 01, 2006, 11:05:53 PM
Quote from: ScoobyDan on November 01, 2006, 09:43:09 PM
Where is the smiley for smacking yourself on the forehead - one of those d'oh moments  ::)


(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.myl.ro%2Fforum%2Fhtml%2Femoticons%2Fduh.gif&hash=92a6bb0aa4e6132a1251d1b51f7d9ec78822695d)
Title: Re: USER CP - An alternative to Profile Screen
Post by: Nokonium on November 02, 2006, 07:40:15 AM
It took me a while to realise that you had only added part of it.

We got there though  ;D
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on November 02, 2006, 01:53:37 PM
Edited my code post to fix this issue.

Note that I did NOT add the global. Instead, I changed the code to check the associated $context array entry (it just grates to pull in a whole additional structure just for a single value which is only referenced once).
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on December 27, 2006, 08:11:00 PM
Alan S,
your code didnt work.

I did everything you said.
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on December 27, 2006, 08:11:33 PM
Aku,
do you know how to make it be like
?action=usercp

Lets here your instructions! ;D
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on December 27, 2006, 08:17:55 PM
I got it to work. Never mind that last post ^
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on January 02, 2007, 05:11:46 AM
Oh wow! I love this.    This is pretty cool. It took me a minute to figure it out but i got it working now.

You guys rock!!!!!!
Title: Re: USER CP - An alternative to Profile Screen
Post by: CampCounselor on January 03, 2007, 02:54:27 PM
thank you, you are  a life saver the custom action works great
Title: Re: USER CP - An alternative to Profile Screen
Post by: CampCounselor on January 03, 2007, 02:55:05 PM
brianjw go to page 1 and you will find instructions on how to do this
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on January 04, 2007, 12:32:31 AM
Thats how i did it. lol :2funny:
Title: Re: USER CP - An alternative to Profile Screen
Post by: CampCounselor on January 04, 2007, 02:39:36 AM
i was talking about the custom action
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on January 04, 2007, 03:13:25 AM
exactly. i did that. thatz what im talkin about :2funny:
Title: Re: USER CP - An alternative to Profile Screen
Post by: CampCounselor on January 04, 2007, 04:17:33 AM
ok i was not sure. sorry i only had 5 hours of sleep last night and so i am dragging
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on January 05, 2007, 02:03:05 AM
i hate those kinds of nights :o lol :2funny:
Title: Re: USER CP - An alternative to Profile Screen
Post by: softtouch_ph on February 17, 2007, 03:33:11 AM
Its damn nice, but I have one problem. Because it is an article, it will be seen if you list articles... how can I prevent that people see this profile if they display articles?
Title: Re: USER CP - An alternative to Profile Screen
Post by: Sin69 on February 17, 2007, 03:56:41 AM
an alternative would be to install the custom action mod and paste the code into it rather than in an article.
Title: Re: USER CP - An alternative to Profile Screen
Post by: softtouch_ph on February 17, 2007, 04:02:43 AM
Oh yeah, thanks, thats an idea!
Title: Re: USER CP - An alternative to Profile Screen
Post by: wilsy on February 19, 2007, 02:58:53 PM
Hi all,

Great mod!

I have attached some transparent gif icons for use with this mod (see screenshot).

Use with the code below from JA Cortina, slightly modified to handle the gif extensions and to  set the font size of the descriptions from bold to normal: -


global $context, $scripturl, $modSettings, $ID_MEMBER, $txt;

$entries_per_row = 4; // Range 3-5 probably best
$admin_user = 1; // Member # of Forum Administrator for 'Contact' PM
$img_size = 64; // used for height AND width of 'icon'

reloadSettings();
loadLanguage('Profile');
list ($memID) = loadMemberData($ID_MEMBER, false, 'profile');
$context['user']['is_owner'] = $memID == $ID_MEMBER;

/////////////////////////////////////////////////////////////
//
//  link  - construction to yield the part of the URL after 'index.php'
//  image - location of graphic 'icon'
//  title - entry 'name'
//  label - entry description

if (($context['user']['is_owner'] && allowedTo('profile_identity_own')) || allowedTo(array('profile_identity_any', 'manage_membergroups')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=account',    'image' => 'usercp/ksysguard.gif',    'title' => 'My Account Info',
'label' => 'Click here if you want to change your account related information such as username, email, password or other sensitive details.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=theme',    'image' => 'usercp/kivio.gif',    'title' => 'Look & Layout Options',
'label' => 'Click here to change the way the forum looks for you, options include the look and layout for the boards and posts.');

if ($modSettings['theme_allow'] || $context['user']['is_admin'])
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pick;sesc='.$context['session_id'],    'image' => 'usercp/blockdevice.gif',    'title' => 'My Theme',
'label' => 'This screen will allow you to set your default theme which you wish to use every time you login.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=forumProfile',    'image' => 'usercp/kuser.gif',    'title' => 'My Profile',
'label' => 'Click here to change the way your profile looks and appears to everyone.');

if (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=statPanel',    'image' => 'usercp/kwalletmanager.gif',    'title' => 'My Stats',
'label' => 'Here you can check how many posts you have made and other activity related info.');

if (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=showPosts',    'image' => 'usercp/kedit.gif',    'title' => 'My Posts',
'label' => 'This option will show you all the posts you have made since you became a member of this site.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=notification',    'image' => 'usercp/mailreminder.gif',    'title' => 'My Notifications',
'label' => 'This screen will allow you to change the type and frequency of notifications you get via e-mail when participating in threads.');

if (!empty($modSettings['enable_buddylist']) && $context['user']['is_owner'] && allowedTo(array('profile_extra_own', 'profile_extra_any')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=editBuddies',    'image' => 'usercp/kdmconfig.gif',    'title' => 'Buddies',
'label' => 'This screen will allow you to select buddies to add to your list.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pmprefs',    'image' => 'usercp/mail.gif',    'title' => 'My Messages Options',
'label' => '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.');


if (!$context['user']['is_guest'] && (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo(array('profile_view_any', 'moderate_forum', 'manage_permissions','tp_dlmanager','tp_blocks','tp_articles','tp_gallery','tp_linkmanager'))))
if($context['user']['is_owner'] || allowedTo('tp_blocks'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=tpshoutbox',    'image' => 'usercp/messenger.gif',    'title' => 'Show My Shouts',
'label' => 'This screen will show a log of all the shouts you have made in the shoutbox.');

if ($context['allow_search'])
$cp_entry[] = array('link' => '?action=search',    'image' => 'usercp/find.gif',    'title' => 'Search',
'label' => 'This screen will allow you to search for posts made in the board.');

if (allowedTo('pm_send'))
$cp_entry[] = array('link' => '?action=pm;sa=send;u='.$admin_user,    'image' => 'usercp/agent.gif',    'title' => 'Contact Admin',
'label' => 'Still having problems?<br>Then contact the admin from here and submit your questions.');

/////////////////////////////////////////
// Karma Description Log
//if (($modSettings['karmaMode'] == '1') || ($modSettings['karmaMode'] == '2'))
// if ((!empty($modSettings['karmaisowner']) && ($context['user']['is_owner'])) || (empty($modSettings['karmaisowner'])) || ($context['user']['is_admin']))
// $cp_entry[] = array('link' => '?action=ownkarma;u='.$ID_MEMBER,    'image' => '',    'title' => $txt['who_change_my_karma'],
// 'label' => 'Show log of who who affected your '.$modSettings['karmaLabel'].'.');
/////////////////////////////////////////

/////////////////////////////////////////
// Awards Mod Badge Album
//loadLanguage('ManageAwards');
//if (isset($txt['pa_description']))
// $cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=awards',    'image' => '',    'title' => 'Badge Album',
// 'label' => 'Manage your Award badge album.');
/////////////////////////////////////////

/////////////////////////////////////////
// Logout
//$cp_entry[] = array('link' => '?action=logout;sesc='.$context['session_id'],    'image' => '',    'title' => 'Logout',
// 'label' => 'Log off the Forum.');
/////////////////////////////////////////

$cell_width = (int) (100 / $entries_per_row);
$row_ent = 0;

$line_1 = '';
$line_2 = '';
$line_3 = '';

echo '<table>';
foreach ($cp_entry as $ent) {

$line_1 .= '<td valign="top" width="'.$cell_width.'%" align="center" height="'.$img_size.'px"><a href="'.$scripturl.$ent['link'].'"><img border="0" src="'.$ent['image'].'" width="'.$img_size.'" height="'.$img_size.'"></a></td>';
$line_2 .= '<td class="windowbg3" style="font-size:small;font-weight:bold;text-align:center;vertical-align:top;padding:3px;"><a href="'.$scripturl.$ent['link'].'">'.$ent['title'].'</a></td>';
$line_3 .= '<td style="font-size:x-small;text-align:center;vertical-align:top;font-weight:normal;padding:3px;">'.$ent['label'].'</td>';

$row_ent = $row_ent + 1;
if ($row_ent == $entries_per_row) {
$row_ent = 0;
echo '<tr height="', $img_size, 'px">', $line_1, '</tr>';
echo '<tr height="1.3em">', $line_2, '</tr>';
echo '<tr height="125px">', $line_3, '</tr>';
$line_1 = '';
$line_2 = '';
$line_3 = '';
}
}
if ($row_ent > 0) {
$line_1 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
$line_2 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
$line_3 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
echo '<tr height="', $img_size, 'px">', $line_1, '</tr>';
echo '<tr height="1.3em">', $line_2, '</tr>';
echo '<tr height="125px">', $line_3, '</tr>';
}
echo '</table>';


Regards,

Wilsy.
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on February 19, 2007, 05:39:22 PM
Great, thanks for the update wilsy  :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on February 19, 2007, 05:55:41 PM
lol aku changed his name to The Game Pimp :D
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on February 19, 2007, 06:29:04 PM
Quote from: brianjw on February 19, 2007, 05:55:41 PM
lol aku changed his name to The Game Pimp :D

OMG!  He has too much time on his hands   :laugh:
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on February 19, 2007, 07:32:26 PM
he changed back :D haa
Title: Re: USER CP - An alternative to Profile Screen
Post by: clarkkent93 on February 19, 2007, 08:38:13 PM
Quote from: wilsy on February 19, 2007, 02:58:53 PM
Hi all,

Great mod!

I have attached some transparent gif icons for use with this mod (see screenshot).

Use with the code below from JA Cortina, slightly modified to handle the gif extensions and to  set the font size of the descriptions from bold to normal: -


global $context, $scripturl, $modSettings, $ID_MEMBER, $txt;

$entries_per_row = 4; // Range 3-5 probably best
$admin_user = 1; // Member # of Forum Administrator for 'Contact' PM
$img_size = 64; // used for height AND width of 'icon'

reloadSettings();
loadLanguage('Profile');
list ($memID) = loadMemberData($ID_MEMBER, false, 'profile');
$context['user']['is_owner'] = $memID == $ID_MEMBER;

/////////////////////////////////////////////////////////////
//
//  link  - construction to yield the part of the URL after 'index.php'
//  image - location of graphic 'icon'
//  title - entry 'name'
//  label - entry description

if (($context['user']['is_owner'] && allowedTo('profile_identity_own')) || allowedTo(array('profile_identity_any', 'manage_membergroups')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=account',    'image' => 'usercp/ksysguard.gif',    'title' => 'My Account Info',
'label' => 'Click here if you want to change your account related information such as username, email, password or other sensitive details.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=theme',    'image' => 'usercp/kivio.gif',    'title' => 'Look & Layout Options',
'label' => 'Click here to change the way the forum looks for you, options include the look and layout for the boards and posts.');

if ($modSettings['theme_allow'] || $context['user']['is_admin'])
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pick;sesc='.$context['session_id'],    'image' => 'usercp/blockdevice.gif',    'title' => 'My Theme',
'label' => 'This screen will allow you to set your default theme which you wish to use every time you login.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=forumProfile',    'image' => 'usercp/kuser.gif',    'title' => 'My Profile',
'label' => 'Click here to change the way your profile looks and appears to everyone.');

if (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=statPanel',    'image' => 'usercp/kwalletmanager.gif',    'title' => 'My Stats',
'label' => 'Here you can check how many posts you have made and other activity related info.');

if (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=showPosts',    'image' => 'usercp/kedit.gif',    'title' => 'My Posts',
'label' => 'This option will show you all the posts you have made since you became a member of this site.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=notification',    'image' => 'usercp/mailreminder.gif',    'title' => 'My Notifications',
'label' => 'This screen will allow you to change the type and frequency of notifications you get via e-mail when participating in threads.');

if (!empty($modSettings['enable_buddylist']) && $context['user']['is_owner'] && allowedTo(array('profile_extra_own', 'profile_extra_any')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=editBuddies',    'image' => 'usercp/kdmconfig.gif',    'title' => 'Buddies',
'label' => 'This screen will allow you to select buddies to add to your list.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pmprefs',    'image' => 'usercp/mail.gif',    'title' => 'My Messages Options',
'label' => '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.');


if (!$context['user']['is_guest'] && (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo(array('profile_view_any', 'moderate_forum', 'manage_permissions','tp_dlmanager','tp_blocks','tp_articles','tp_gallery','tp_linkmanager'))))
if($context['user']['is_owner'] || allowedTo('tp_blocks'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=tpshoutbox',    'image' => 'usercp/messenger.gif',    'title' => 'Show My Shouts',
'label' => 'This screen will show a log of all the shouts you have made in the shoutbox.');

if ($context['allow_search'])
$cp_entry[] = array('link' => '?action=search',    'image' => 'usercp/find.gif',    'title' => 'Search',
'label' => 'This screen will allow you to search for posts made in the board.');

if (allowedTo('pm_send'))
$cp_entry[] = array('link' => '?action=pm;sa=send;u='.$admin_user,    'image' => 'usercp/agent.gif',    'title' => 'Contact Admin',
'label' => 'Still having problems?<br>Then contact the admin from here and submit your questions.');

/////////////////////////////////////////
// Karma Description Log
//if (($modSettings['karmaMode'] == '1') || ($modSettings['karmaMode'] == '2'))
// if ((!empty($modSettings['karmaisowner']) && ($context['user']['is_owner'])) || (empty($modSettings['karmaisowner'])) || ($context['user']['is_admin']))
// $cp_entry[] = array('link' => '?action=ownkarma;u='.$ID_MEMBER,    'image' => '',    'title' => $txt['who_change_my_karma'],
// 'label' => 'Show log of who who affected your '.$modSettings['karmaLabel'].'.');
/////////////////////////////////////////

/////////////////////////////////////////
// Awards Mod Badge Album
//loadLanguage('ManageAwards');
//if (isset($txt['pa_description']))
// $cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=awards',    'image' => '',    'title' => 'Badge Album',
// 'label' => 'Manage your Award badge album.');
/////////////////////////////////////////

/////////////////////////////////////////
// Logout
//$cp_entry[] = array('link' => '?action=logout;sesc='.$context['session_id'],    'image' => '',    'title' => 'Logout',
// 'label' => 'Log off the Forum.');
/////////////////////////////////////////

$cell_width = (int) (100 / $entries_per_row);
$row_ent = 0;

$line_1 = '';
$line_2 = '';
$line_3 = '';

echo '<table>';
foreach ($cp_entry as $ent) {

$line_1 .= '<td valign="top" width="'.$cell_width.'%" align="center" height="'.$img_size.'px"><a href="'.$scripturl.$ent['link'].'"><img border="0" src="'.$ent['image'].'" width="'.$img_size.'" height="'.$img_size.'"></a></td>';
$line_2 .= '<td class="windowbg3" style="font-size:small;font-weight:bold;text-align:center;vertical-align:top;padding:3px;"><a href="'.$scripturl.$ent['link'].'">'.$ent['title'].'</a></td>';
$line_3 .= '<td style="font-size:x-small;text-align:center;vertical-align:top;font-weight:normal;padding:3px;">'.$ent['label'].'</td>';

$row_ent = $row_ent + 1;
if ($row_ent == $entries_per_row) {
$row_ent = 0;
echo '<tr height="', $img_size, 'px">', $line_1, '</tr>';
echo '<tr height="1.3em">', $line_2, '</tr>';
echo '<tr height="125px">', $line_3, '</tr>';
$line_1 = '';
$line_2 = '';
$line_3 = '';
}
}
if ($row_ent > 0) {
$line_1 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
$line_2 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
$line_3 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
echo '<tr height="', $img_size, 'px">', $line_1, '</tr>';
echo '<tr height="1.3em">', $line_2, '</tr>';
echo '<tr height="125px">', $line_3, '</tr>';
}
echo '</table>';


Regards,

Wilsy.

Is this code similar to Aku?  Is there a screenshot on what Aku's looks like?

I'm just covering my bases now so I ask less dumb questions later! :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: wilsy on February 19, 2007, 08:53:05 PM
Hi,

It's JA Cortina's code from earlier in the thread: -

http://www.tinyportal.net/index.php?topic=9809.msg82161#msg82161

Wilsy.
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on February 19, 2007, 09:13:29 PM
Quote from: clarkkent93 on February 19, 2007, 08:38:13 PM
Is this code similar to Aku?Ã,  Is there a screenshot on what Aku's looks like?
I'm just covering my bases now so I ask less dumb questions later! :)
Aku doesn't have this code on his website anymore because he swithced to vBulletin. If you would like to see the exact code he used to have; use the info below:
http://www.brianjwilson.com/index.php?action=usercp
Username: test
Password: test
Please remember that editing any part of the profile will cause the test account to be deleted. Do Not Post any messages with it. Only use it for viewing snippets and mods.
The code is the same thing aku has brought out to you, the only things that were modified differently are the images ;)
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on February 19, 2007, 11:43:23 PM
Aku's should come out looking just about the same. This was his original idea and he made up a block which was HTML code. I adapted it to be generated by a PHP script so that things like permission checking could be done so icons a user couldn't use didn't show up (for instance, if you don't allow theme changing, only the admin will have that show up).
Title: Re: USER CP - An alternative to Profile Screen
Post by: clarkkent93 on February 20, 2007, 03:07:43 AM
Quote from: J.A.Cortina on February 19, 2007, 11:43:23 PM
Aku's should come out looking just about the same. This was his original idea and he made up a block which was HTML code. I adapted it to be generated by a PHP script so that things like permission checking could be done so icons a user couldn't use didn't show up (for instance, if you don't allow theme changing, only the admin will have that show up).

If I use your code, should I still follow the instructions on the 1st page for setting this up?
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on February 20, 2007, 03:09:00 AM
Quote from: clarkkent93 on February 20, 2007, 03:07:43 AM
Quote from: J.A.Cortina on February 19, 2007, 11:43:23 PM
Aku's should come out looking just about the same. This was his original idea and he made up a block which was HTML code. I adapted it to be generated by a PHP script so that things like permission checking could be done so icons a user couldn't use didn't show up (for instance, if you don't allow theme changing, only the admin will have that show up).

If I use your code, should I still follow the instructions on the 1st page for setting this up?
Yes :coolsmiley:
Title: Re: USER CP - An alternative to Profile Screen
Post by: clarkkent93 on February 20, 2007, 04:08:45 AM
I've decided to use JA Cortina's code as this is more along the lines I'm looking for.  I'm trying to add the necessary code to my theme and can't seem to find exactly what was mentioned.

I'm using the Enterprise theme.  I've attached a copy of my template.  Even if you can just point me in the right place, I would appreciate it. 

I'm also hoping I started right by placing the main code in a php article (#8)?

Thanks for everybody's help. 

Bernard

Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on February 20, 2007, 04:45:38 AM
That code (I think you meant message #80), goes in an article (PHP article).

You'd need to get the graphics files and put them in a subdirectory as described in the first step of the first message in this thread.

Then you follow the instructions in that first message at step 3

The code from your file that you need to alter is in this block:
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td 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>' : '';
Title: Re: USER CP - An alternative to Profile Screen
Post by: clarkkent93 on February 20, 2007, 06:36:08 PM
Thanks JA!  That was just what I needed to finish.
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on February 24, 2007, 10:15:23 PM
Im after turning this into a modification for smf , Theres a few small changes though. I also plan to develop this mod further.

Version 1.0

- This doesnt use tp at all , It creates a user action ?action=usercp instead of the ?page=XX

- Instead of using articles , it uses 2 different files , usercp.php and usercp.template.php

- The shoutbox shouts option has been removed

- Instead of sending a pm to the admin you send a email to the webmaster address. The webmaster email is the one the admin account registered to the forum with.

___________________________________________________________________________________________________________________

Version 1.5 Roadmap

- Permissions for the user cp.

- Added support for tinyportal ,Will be able to add extra options to the usercp via the admin panel.


____________________________________________________________________________________________________________________

Permission to use the original code and to edit it was of course given by Aku.

Demo :

http://corkthings.com/testforum/index.php?action=usercp
User : test
Pass : test

http://custom.simplemachines.org/mods/index.php?mod=698

Since its not approved yet i have attached it to the post.

Mod should work with version 1.0.7 and above , however it has only been tested on 1.1.1 and 1.1.2

Dilber MC Compatibility Package Available Here (http://www.tinyportal.net/index.php?topic=9809.msg116138#msg116138)
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on February 24, 2007, 10:33:19 PM
The mod isn't working at all.  I log into that forum and to see what it look like but can't because the mod won't work...
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on February 24, 2007, 10:39:02 PM
I really dont know what you mean , I can see it perfectly , In my own account and in the test account.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on February 24, 2007, 10:41:26 PM
Well, I can't see it at all.. I log into the test account all that.  It's just put me at the home page of the forum....
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on February 24, 2007, 11:03:38 PM
I see it :) I like it but would rather have the shouts option too :D
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on February 24, 2007, 11:21:25 PM
I could see.  Got this error message when I click on 'My Theme':

Session verification failed. Please try logging out and back in again, and then try again.
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on February 24, 2007, 11:34:22 PM
Quote from: brianjw on February 24, 2007, 11:03:38 PM
I see it :) I like it but would rather have the shouts option too :D

Lol coming in 1.5
Quote from: RoarinRow on February 24, 2007, 11:21:25 PM
I could see.  Got this error message when I click on 'My Theme':

Session verification failed. Please try logging out and back in again, and then try again.

Hmmm , its not picking up the session id , i'll have a look at it now , thanks for notifying me.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on February 24, 2007, 11:53:16 PM
Oh, Lot's of icon on the homepage?
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on February 25, 2007, 12:03:57 AM
Quote from: Shadow Queen on February 24, 2007, 11:53:16 PM
Oh, Lot's of icon on the homepage?

Yes the usercp should look like this

http://custom.simplemachines.org/mods/index.php?action=download;mod=698;id=27870;image

Fixed the My Theme Error , turned out i was after forgetting one of the globals , $context in the usercp.template.php

I also added a permission fix , It came to my attention that if a guest knew the url of the user cp they could view it without having to register , Now if a guest goes to ?action=usercp all they can see is a blank page.

See my original mod post for the fixed mod attachment.
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on February 25, 2007, 12:06:58 AM
Quote from: Alan S on February 25, 2007, 12:03:57 AM
Quote from: Shadow Queen on February 24, 2007, 11:53:16 PM
Oh, Lot's of icon on the homepage?

Yes the usercp should look like this

http://custom.simplemachines.org/mods/index.php?action=download;mod=698;id=27870;image

Fixed the My Theme Error , turned out i was after forgetting one of the globals , $context in the usercp.template.php

I also added a permission fix , It came to my attention that if a guest knew the url of the user cp they could view it without having to register , Now if a guest goes to ?action=usercp all they can see is a blank page.

See my original mod post for the fixed mod attachment.

Cool, awesome work!   :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on February 25, 2007, 12:19:40 AM
Can't see the mod because a error...

The mod you have requested has not been approved yet for downloads.

But i am going to test it out on my test forum right now.
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on February 25, 2007, 01:26:30 AM
Instead of a blank page, I would rather it show a login screen saying you cannot view the User CP. Please login or register ;)

:D Brianjw :D
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on February 25, 2007, 01:45:21 AM
Quote from: brianjw on February 25, 2007, 01:26:30 AM
Instead of a blank page, I would rather it show a login screen saying you cannot view the User CP. Please login or register ;)

:D Brianjw :D

GOD! you people are never happy :P lol , yes i plan to include that in version 1.5 , expect that before the end of march , Got very big exams for the next 2 weeks so i dont think i'll be doing much coding during them
Title: Re: USER CP - An alternative to Profile Screen
Post by: Velocity on February 25, 2007, 04:04:35 AM
Ah...I was going to see if I could make this into a mod but someone already did.

oh well, even after I put it together I'll still have my own version of this  ;D
Title: Re: USER CP - An alternative to Profile Screen
Post by: wilsy on March 02, 2007, 11:16:15 AM
Hi Alan,

You are welcome to use the transparent gif's attached to my earlier post for your mod: -

http://www.tinyportal.net/index.php?topic=9809.msg111613#msg111613

The png's have transparency issues in some browsers.

Regards,

Wilsy.
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on March 02, 2007, 09:00:05 PM
Quote from: wilsy on March 02, 2007, 11:16:15 AM
Hi Alan,

You are welcome to use the transparent gif's attached to my earlier post for your mod: -

http://www.tinyportal.net/index.php?topic=9809.msg111613#msg111613

The png's have transparency issues in some browsers.

Regards,

Wilsy.
The only browser that I know of that has those problems is Internet Explorer. Only version 7 though. Here are the browsers that i know have the issues. ;)
Quote
BrowserVersion
Internet Explorer6
I will edit the above if needs to add a view browsers to the list but thats a reference guide :)
I use Internet Explorer 7 and it doens't have the issues so switch :D

Brianjw
Title: Re: USER CP - An alternative to Profile Screen
Post by: wilsy on March 03, 2007, 08:22:32 AM
Hi Brian,

Many people are still on IE6 and the PNG's do look 'messy' when viewd in this browser, although I fully agree that an upgrade will resolve this.

This page may be of assistance: -

http://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support

Regards,

Wilsy.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on March 03, 2007, 08:26:00 AM
I use IE6 and FireFox 2.0.0.2...It's look great in FireFox! Just letting you know...
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on March 03, 2007, 03:37:54 PM
I think anyone running IE6 should be upgrading to IE7 very soon. If you are a business running on a softare such as Gold mine do not upgrade to IE7 because thats the only one that currently isn't compatible with. ;)

Brianjw
Title: Re: USER CP - An alternative to Profile Screen
Post by: 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
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on March 04, 2007, 09:56:51 PM
What language are you using as your forum Default ?
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on March 04, 2007, 09:58:19 PM
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.
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on March 04, 2007, 10:00:06 PM
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?
Title: Re: USER CP - An alternative to Profile Screen
Post by: dazzler on March 04, 2007, 10:02:24 PM
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'];

Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on March 04, 2007, 10:08:21 PM
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>

'
;

}

?>


Title: Re: USER CP - An alternative to Profile Screen
Post by: dazzler on March 04, 2007, 10:14:00 PM
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
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on March 04, 2007, 10:33:58 PM
usercp.template.php is the file you should check in , not the index.template.php in Helios ;)
And Helios IS a multi color theme ;)
Title: Re: USER CP - An alternative to Profile Screen
Post by: dazzler on March 04, 2007, 10:38:00 PM
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

Title: Re: USER CP - An alternative to Profile Screen
Post by: dazzler on March 04, 2007, 10:49:38 PM
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!
Title: Re: USER CP - An alternative to Profile Screen
Post by: dazzler on March 04, 2007, 10:55:04 PM
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
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on March 07, 2007, 03:51:03 PM
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 (http://www.tinyportal.net/index.php?topic=9809.msg113209#msg113209) 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.
Title: Re: USER CP - An alternative to Profile Screen
Post by: binkles on March 07, 2007, 05:23:30 PM
Perfect - Thank a million  O0 O0 O0
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on March 07, 2007, 05:34:39 PM
No Problem  ;)
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 11, 2007, 02:14:42 PM
Hey Alan whats up man.....

I dloaded your zip and it works good on default theme. However im using DilberMC for the forum default.

When i type the URL (action=usercp) using dilbermc,it works but my question is.... do i change where it says "profile" to "usercp" in this button code to make it work from the nav bar?

// Edit Profile... [profile]
   if ($context['allow_edit_profile'])   
   echo'
            <td align="center" class="menubg' , $current_action == 'profile' ? '2' : '' , '">
               <a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>               
            </td>';
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 11, 2007, 02:39:17 PM
Quote from: bluedevil on March 11, 2007, 02:14:42 PM
Hey Alan whats up man.....

I dloaded your zip and it works good on default theme. However im using DilberMC for the forum default.

When i type the URL (action=usercp) using dilbermc,it works but my question is.... do i change where it says "profile" to "usercp" in this button code to make it work from the nav bar?

// Edit Profile... [profile]
   if ($context['allow_edit_profile'])   
   echo'
            <td align="center" class="menubg' , $current_action == 'profile' ? '2' : '' , '">
               <a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>               
            </td>';

Nevermind....hehehe it worked for dilbermc.

I replaced in the above button code "action=profile" to "action=usercp"  it works now.
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on March 11, 2007, 08:10:59 PM
Or you could just use this package to make it work with dilber mc.

http://www.tinyportal.net/index.php?action=dlattach;topic=9809.0;attach=9545
Title: Re: USER CP - An alternative to Profile Screen
Post by: Zetan on March 13, 2007, 01:06:13 PM
Don't know if this has been mentioned, or solved.

My Theme takes me to Summary and not Themes.

Look & Layout Options takes me to Look and Layout Options, with the option link to change themes.

ZTN

Title: Re: USER CP - An alternative to Profile Screen
Post by: Zetan on March 13, 2007, 02:12:23 PM
Okay found the problem in my Article.

Find:
if ($modSettings['theme_allow'] || $context['user']['is_admin'])
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pick;sesc='.$context['session_id'],    'image' => 'usercp/blockdevice.png',    'title' => 'My Theme',
'label' => 'This screen will allow you to set your default theme which you wish to use every time you login.');


In this line change: action=profile
action=profile;u='.$ID_MEMBER.';sa=pick;sesc='.$context

to: action=theme
action=theme;u='.$ID_MEMBER.';sa=pick;sesc='.$context

Easy fix, I'm sure it's been covered already.



ZTN
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on March 16, 2007, 12:19:12 AM
I use this mod and it's throwing out error's on the theme anyone eles is fine...On each theme I'm using...
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on March 16, 2007, 12:22:35 AM
Quote from: Shadow Queen on March 16, 2007, 12:19:12 AM
I use this mod and it's throwing out error's on the theme anyone eles is fine...On each theme I'm using...
Just use the manual one, its the one im  using (akus code) ;)
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on March 16, 2007, 12:24:50 AM
Yea, I unstall that mod from all the forum's i'm using it on.  Few week's back I think.
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 20, 2007, 02:00:05 AM
I get this on my error log.    (Alan's mod)

Quote8: Undefined index: member
File: /home/midwesta/public_html/Themes/default/usercp.template.php (main sub template - eval?)
Line: 73

...but works fine.   Any thoughts?
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on March 20, 2007, 11:01:54 AM
It's right where the text are shown in the template. Do you have any missing text strings or funny looking characters ?   
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on March 20, 2007, 05:43:38 PM
Im in the process of recoding this mod to make it more efficent and coding it to meet the SMF Mod coding guidelines. Should look a lot better when im done.
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 20, 2007, 08:45:08 PM
Quote from: G6Ã,â,,¢ on March 20, 2007, 11:01:54 AM
It's right where the text are shown in the template. Do you have any missing text strings or funny looking characters ?  

Im working on it as we speak.
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on March 20, 2007, 08:49:51 PM
There are a couple of versions in this board.  This is the one I'm using:

global $context, $scripturl, $modSettings, $ID_MEMBER, $txt;

$entries_per_row = 4; // Range 3-5 probably best
$admin_user = 3; // Member # of Forum Administrator for 'Contact' PM
$img_size = 64; // used for height AND width of 'icon'

reloadSettings();
loadLanguage('Profile');
list ($memID) = loadMemberData($ID_MEMBER, false, 'profile');
$context['user']['is_owner'] = $memID == $ID_MEMBER;

/////////////////////////////////////////////////////////////
//
//  link  - construction to yield the part of the URL after 'index.php'
//  image - location of graphic 'icon'
//  title - entry 'name'
//  label - entry description

if (($context['user']['is_owner'] && allowedTo('profile_identity_own')) || allowedTo(array('profile_identity_any', 'manage_membergroups')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=account',    'image' => 'usercp/ksysguard.gif',    'title' => 'My Account Info',
'label' => 'Click here if you want to change your account related information such as username, email, password or other sensitive details.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=theme',    'image' => 'usercp/kivio.gif',    'title' => 'Look & Layout Options',
'label' => 'Click here to change the way the forum looks for you, options include the look and layout for the boards and posts.');

if ($modSettings['theme_allow'] || $context['user']['is_admin'])
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pick;sesc='.$context['session_id'],    'image' => 'usercp/blockdevice.gif',    'title' => 'My Theme',
'label' => 'This screen will allow you to set your default theme which you wish to use every time you login.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=forumProfile',    'image' => 'usercp/kuser.gif',    'title' => 'My Profile',
'label' => 'Click here to change the way your profile looks and appears to everyone.');

if (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=statPanel',    'image' => 'usercp/kwalletmanager.gif',    'title' => 'My Stats',
'label' => 'Here you can check how many posts you have made and other activity related info.');

if (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo('profile_view_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=showPosts',    'image' => 'usercp/kedit.gif',    'title' => 'My Posts',
'label' => 'This option will show you all the posts you have made since you became a member of this site.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=notification',    'image' => 'usercp/mailreminder.gif',    'title' => 'My Notifications',
'label' => 'This screen will allow you to change the type and frequency of notifications you get via e-mail when participating in threads.');

if (!empty($modSettings['enable_buddylist']) && $context['user']['is_owner'] && allowedTo(array('profile_extra_own', 'profile_extra_any')))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=editBuddies',    'image' => 'usercp/kdmconfig.gif',    'title' => 'Buddies',
'label' => 'This screen will allow you to select buddies to add to your list.');

if (($context['user']['is_owner'] && allowedTo('profile_extra_own')) || allowedTo('profile_extra_any'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=pmprefs',    'image' => 'usercp/mail.gif',    'title' => 'My Messages Options',
'label' => '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.');


if (!$context['user']['is_guest'] && (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo(array('profile_view_any', 'moderate_forum', 'manage_permissions','tp_dlmanager','tp_blocks','tp_articles','tp_gallery','tp_linkmanager'))))
if($context['user']['is_owner'] || allowedTo('tp_blocks'))
$cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=tpshoutbox',    'image' => 'usercp/messenger.gif',    'title' => 'Show My Shouts',
'label' => 'This screen will show a log of all the shouts you have made in the shoutbox.');

if ($context['allow_search'])
$cp_entry[] = array('link' => '?action=search',    'image' => 'usercp/find.gif',    'title' => 'Search',
'label' => 'This screen will allow you to search for posts made in the board.');

if (allowedTo('pm_send'))
$cp_entry[] = array('link' => '?action=pm;sa=send;u='.$admin_user,    'image' => 'usercp/agent.gif',    'title' => 'Contact Admin',
'label' => 'Still having problems?<br>Then contact the admin from here and submit your questions.');

/////////////////////////////////////////
// Karma Description Log
//if (($modSettings['karmaMode'] == '1') || ($modSettings['karmaMode'] == '2'))
// if ((!empty($modSettings['karmaisowner']) && ($context['user']['is_owner'])) || (empty($modSettings['karmaisowner'])) || ($context['user']['is_admin']))
// $cp_entry[] = array('link' => '?action=ownkarma;u='.$ID_MEMBER,    'image' => '',    'title' => $txt['who_change_my_karma'],
// 'label' => 'Show log of who who affected your '.$modSettings['karmaLabel'].'.');
/////////////////////////////////////////

/////////////////////////////////////////
// Awards Mod Badge Album
//loadLanguage('ManageAwards');
//if (isset($txt['pa_description']))
// $cp_entry[] = array('link' => '?action=profile;u='.$ID_MEMBER.';sa=awards',    'image' => '',    'title' => 'Badge Album',
// 'label' => 'Manage your Award badge album.');
/////////////////////////////////////////

/////////////////////////////////////////
// Logout
//$cp_entry[] = array('link' => '?action=logout;sesc='.$context['session_id'],    'image' => '',    'title' => 'Logout',
// 'label' => 'Log off the Forum.');
/////////////////////////////////////////

$cell_width = (int) (100 / $entries_per_row);
$row_ent = 0;

$line_1 = '';
$line_2 = '';
$line_3 = '';

echo '<table>';
foreach ($cp_entry as $ent) {

$line_1 .= '<td valign="top" width="'.$cell_width.'%" align="center" height="'.$img_size.'px"><a href="'.$scripturl.$ent['link'].'"><img border="0" src="'.$ent['image'].'" width="'.$img_size.'" height="'.$img_size.'"></a></td>';
$line_2 .= '<td class="windowbg3" style="font-size:small;font-weight:bold;text-align:center;vertical-align:top;padding:3px;"><a href="'.$scripturl.$ent['link'].'">'.$ent['title'].'</a></td>';
$line_3 .= '<td style="font-size:x-small;text-align:center;vertical-align:top;font-weight:normal;padding:3px;">'.$ent['label'].'</td>';

$row_ent = $row_ent + 1;
if ($row_ent == $entries_per_row) {
$row_ent = 0;
echo '<tr height="', $img_size, 'px">', $line_1, '</tr>';
echo '<tr height="1.3em">', $line_2, '</tr>';
echo '<tr height="125px">', $line_3, '</tr>';
$line_1 = '';
$line_2 = '';
$line_3 = '';
}
}
if ($row_ent > 0) {
$line_1 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
$line_2 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
$line_3 .= '<td colspan="'.($entries_per_row - $row_ent).'"> </td>';
echo '<tr height="', $img_size, 'px">', $line_1, '</tr>';
echo '<tr height="1.3em">', $line_2, '</tr>';
echo '<tr height="125px">', $line_3, '</tr>';
}
echo '</table>';
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 20, 2007, 09:39:29 PM
Quote from: G6â„¢ on March 20, 2007, 11:01:54 AM
It's right where the text are shown in the template. Do you have any missing text strings or funny looking characters ?  


This is what shows in line 73


<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>


Im not sure whats missing.
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 20, 2007, 09:42:17 PM
Quote from: RoarinRow on March 20, 2007, 08:49:51 PM
There are a couple of versions in this board.  This is the one I'm using:



How come you have awards and karma on your file? you can see those from your profile?
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on March 20, 2007, 09:50:22 PM
Quote from: bluedevil on March 20, 2007, 09:42:17 PM
Quote from: RoarinRow on March 20, 2007, 08:49:51 PM
There are a couple of versions in this board.  This is the one I'm using:



How come you have awards and karma on your file? you can see those from your profile?

Not sure, that's just the entire code I got from here.  I didn't add that part.  I only change this part to my member ID:

$admin_user = 3;   // Member # of Forum Administrator for 'Contact' PM
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 20, 2007, 09:57:50 PM
Quote from: bluedevil on March 20, 2007, 09:39:29 PM
Quote from: G6Ã,â,,¢ on March 20, 2007, 11:01:54 AM
It's right where the text are shown in the template. Do you have any missing text strings or funny looking characters ?  


This is what shows in line 73


<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>


Im not sure whats missing.

I noticed when clicking on "my themes" it allows me to change my theme of course.  BUt when i change to whatever theme and want to change back i noticed that i changed everyone elses themes as well.

If its my profile,i should be able to change my own theme right?
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on March 20, 2007, 10:00:57 PM
Quote from: bluedevil on March 20, 2007, 09:57:50 PM
Quote from: bluedevil on March 20, 2007, 09:39:29 PM
Quote from: G6â„¢ on March 20, 2007, 11:01:54 AM
It's right where the text are shown in the template. Do you have any missing text strings or funny looking characters ?  


This is what shows in line 73


<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>


Im not sure whats missing.

I noticed when clicking on "my themes" it allows me to change my theme of course.  BUt when i change to whatever theme and want to change back i noticed that i changed everyone elses themes as well.

If its my profile,i should be able to change my own theme right?

yeah, going through the profile screen should just change your settings, not the forum's  :o
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on March 20, 2007, 10:07:40 PM
You code is definitely different than mine.  I just went to MAC and did a comparison.  Your does not have 'Show My Shouts' and your icons are different.
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 20, 2007, 10:13:41 PM
Quote from: RoarinRow on March 20, 2007, 10:07:40 PM
You code is definitely different than mine.  I just went to MAC and did a comparison.  Your does not have 'Show My Shouts' and your icons are different.


Nope.....cus this is a mod package made by AlanS.   Not Aku's script.
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 20, 2007, 10:15:51 PM
Went to the error log and found this after you checked your profile Ro!


8: Undefined index: member
File: /home/midwesta/public_html/Themes/default/usercp.template.php (main sub template - eval?)
Line: 73
Title: Re: USER CP - An alternative to Profile Screen
Post by: jacortina on March 20, 2007, 10:21:14 PM
RoarinRow is using my script implementation of Aku's straight HTML code. That is used in a TP article.

Alan S took a version of that and packaged it as a Custom Action page, I believe. That splits it into Source and Template.

But $context['member'][...] is wrong and is most likely what is causing the error. Change any of those in the code to $context['user'][...].
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on March 20, 2007, 10:30:56 PM
Quote from: J.A.Cortina on March 20, 2007, 10:21:14 PM
RoarinRow is using my script implementation of Aku's straight HTML code. That is used in a TP article.

Alan S took a version of that and packaged it as a Custom Action page, I believe. That splits it into Source and Template.

But $context['member'][...] is wrong and is most likely what is causing the error. Change any of those in the code to $context['user'][...].

Yes, exactly it was your code I used last.  Thanks!
Title: Re: USER CP - An alternative to Profile Screen
Post by: bluedevil on March 20, 2007, 10:38:06 PM
Quote from: J.A.Cortina on March 20, 2007, 10:21:14 PM
RoarinRow is using my script implementation of Aku's straight HTML code. That is used in a TP article.

Alan S took a version of that and packaged it as a Custom Action page, I believe. That splits it into Source and Template.

But $context['member'][...] is wrong and is most likely what is causing the error. Change any of those in the code to $context['user'][...].

WOW!  That did it. I tried my profile several times and no errors.  Thnx Cortina!!!

Here's line 79 changed:

<font face="Verdana" size="2"> <a href="', $scripturl, '?action=theme;sa=pick;u=', $context['user']['id'], ';sesc=', $context['session_id'], '"><b>My Theme</a><br>
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on March 27, 2007, 11:00:30 PM
I like this mod very much all that.  I would like to install this mod back on the forum...
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on April 21, 2007, 07:53:25 PM
I cant find this mod at the SMF Site at all
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on April 21, 2007, 10:45:59 PM
SMF has taken a while to approve mods lately. I had to complain just to get my mod finally approved after 3-4 weeks of waiting. :-\
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on April 21, 2007, 11:21:55 PM
wow, thats is long to wait
Title: Re: USER CP - An alternative to Profile Screen
Post by: brianjw on April 21, 2007, 11:33:24 PM
Yeah, thats what I said. I had to start a whole topic about it on there site and they finally approved the mod :P
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on April 21, 2007, 11:34:09 PM
thats good thought, But its shouldn't took that long to approved the mod..
Title: Re: USER CP - An alternative to Profile Screen
Post by: G6Cad on April 22, 2007, 02:26:38 PM
Depends from where the code comes from, some mods doesent belong to the poster and there for they need to check so the code actually is the posters and not some one elses ;)
Title: Re: USER CP - An alternative to Profile Screen
Post by: bloc on April 22, 2007, 04:22:49 PM
Quote from: Brianjw on April 21, 2007, 11:33:24 PM
Yeah, thats what I said. I had to start a whole topic about it on there site and they finally approved the mod :P
Not because of your topic no, only your turn in the queue caused that. You only achieved to annoy people that work with this every day.

The reason it takes a long time, is that mods are a very powerful way of enhancing SMF. Any hacker could quite easily make a mod that would unsecure SMF sites all over the place rapidly, if it just got released without any thorough checking. Of course it could have been released anyway..but having SMF team approving them at least tries to make sure it won't do any funny business on your site.

And on top of that, its a very skewed relationship between the time it takes to check it, how many can actually do the checking(and being capable of it) - and the amount of new ones. Be patient.
Title: Re: USER CP - An alternative to Profile Screen
Post by: wilsy on April 22, 2007, 05:35:11 PM
Good point Bloc - patience is an excellent quality that we should all have for people who devote their spare time to helping us  :)

Regards,

Wilsy.
Title: Re: USER CP - An alternative to Profile Screen
Post by: tick on April 22, 2007, 06:10:33 PM
Quote from: wilsy on April 22, 2007, 05:35:11 PM
Good point Bloc - patience is an excellent quality that we should all have for people who devote their spare time to helping us  :)

Regards,

Wilsy.

I agree.  Patience is something that some seem to lack.  I think it is very rude to try and rush people who so freely give there time.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on April 22, 2007, 08:13:53 PM
I do agree with bloc about that one onw.  Its hard to get them the mods to work correct on a forum all that and check it out all that.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Lord Anubis on April 22, 2007, 08:26:54 PM
Plus it takes time to make sure that the mod integrates well with other mods ;)

I would rather someone take time to ensure the safety of a mod, rather than just letting all the scripts get through
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on April 22, 2007, 08:35:19 PM
Samehere too :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: noxe on April 23, 2007, 12:33:43 AM
Thanks for this great mod, it worked perfectly in my TP+SMF site, using the Dilber MC theme :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on April 28, 2007, 12:00:08 AM
Been waiting 2 months to release the next version , The one that SMF will hopefully approve.

User Control Panel V1.1

Change Log

- Fixed , Serious issue fixed ensuring that the UserCp checks if someone is logged in or not before going onto the usercp.
- Package ID reformated
- Code has been rearranged and some rewritten
- Bugs fixed , Such as Member Id's not being picked up which caused massive problems in the error log.
- Hard text is no longer used , Now using modifications.english.php which contains the text strings.
- Usercp image directory moved from /usercp to /Themes/default/images/usercp
- Links now using smf system , IE $settings['images_url'] etc.......
- UserCp tab problem fixed.
- Various other small additions such as a welcome message.

Tested on a fresh 1.1.2 forum , Installed & Uninstalled perfectly without errors

New Package Attached Below With Screenshot

Download (http://www.tinyportal.net/index.php?topic=9809.msg128579#msg128579)
Title: Re: USER CP - An alternative to Profile Screen
Post by: RoarinRow on April 28, 2007, 12:12:37 AM
Very cool Alan!   :up:
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on April 28, 2007, 06:03:36 PM
Mod has been approved by SMF

Now available here

http://custom.simplemachines.org/mods/index.php?mod=698
Title: Re: USER CP - An alternative to Profile Screen
Post by: ianus on June 03, 2007, 02:20:33 PM
Greetings!

First:
Nice mod! I tried it on my test-board (SMF1.1.2 & TP0.9.7) and have no problems with install or use.

Second:
No need for my test-board anymore, so I use my FTP-prog to delete the hole thing.

Except the path themes/default/images/usercp and the including images.
I get an 550 error wich tells my, that I have no rights to delete.
Chmod for images is 666 for usercp 755 ââ,¬â€œ and again Permission denied while changing the chmod.
All other files are set to 777.

The question is, how can I delete the images and the rest of the (empty) files which remains?
Title: Re: USER CP - An alternative to Profile Screen
Post by: pvcblue on June 03, 2007, 02:54:04 PM
Quote from: ianus on June 03, 2007, 02:20:33 PM
Greetings!

First:
Nice mod! I tried it on my test-board (SMF1.1.2 & TP0.9.7) and have no problems with install or use.

Second:
No need for my test-board anymore, so I use my FTP-prog to delete the hole thing.

Except the path themes/default/images/usercp and the including images.
I get an 550 error wich tells my, that I have no rights to delete.
Chmod for images is 666 for usercp 755 ââ,¬â€œ and again Permission denied while changing the chmod.
All other files are set to 777.

The question is, how can I delete the images and the rest of the (empty) files which remains?


You need to uninstall your forum and the mysql thru youe cpanel for your hosting service, when you do this it deletes all files.
Title: Re: USER CP - An alternative to Profile Screen
Post by: ianus on June 03, 2007, 03:44:57 PM
Greetings!

Thanks for your answer, but this wonÃ,´t solve my problem.
My host doesenÃ,´t offer a cpanel.
So I have to work with phpmyadmin (@host) or the MysqlDumper (@domain-root) for database access.
The database is deleted completely with phpmyadmin.

To manage the files, I can use FileZilla, SmartFTP (free version) and FireFTP (Firefox plugin).
I have chosen www/forum1x and told FileZilla to delete all - and all folders deleted proper.
Only the path themes/default/images/usercp and the images inside of the usercp-folder stay intact.

So, the ââ,¬Å"how to deleteââ,¬Â is not my problem, but I canÃ,´t change Chmod (or delete) this few pictures or the folder they stored in.

Thanks a lot for your answer, but IÃ,´m still getting *smurf* ern, no getting *blue*
Title: Re: USER CP - An alternative to Profile Screen
Post by: tick on June 03, 2007, 04:01:12 PM
Go to your adimin panel and go to packages.  Select the options tab.   Then at the bottom you will see the option to make all files writable.  Select that on.   Then you should be able to delete the files that you want to.  After that you can change them back to whatever you want. :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: ianus on June 03, 2007, 04:17:18 PM
Well, I would love to do that, but..
Quote
I have chosen www/forum1x and told FileZilla to delete all - and all folders deleted proper.
Only the path themes/default/images/usercp and the images inside of the usercp-folder stay intact.

I try to upload my backup and see if SMF can do things which I canÃ,´t do via ftp.

Anyway, strange behaviour imho
Thanks for exchange of ideas.


[edit]
New install of SMF ->change settings in the manner described ->files&pictures are deleteable.
Nice!
Many thanks to pvcblueÃ,©â„¢ and Tick.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on June 12, 2007, 06:46:00 PM
Nice mod

Its working out great now but I am testing in on my test site.
Title: Re: USER CP - An alternative to Profile Screen
Post by: dazzler on June 13, 2007, 12:12:04 AM
I have been using it without fault, i dug out some old code i had to make it sit in its own box using my theme

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

best mod i have done! jobs cheers
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on June 13, 2007, 01:15:15 AM
The mod install fine on my test site but it didnt install fine on the main site.  Umm, One of the tes fail on the mod.  What can I do ???

   Execute Modification     ./Themes/default/index.template.php     Test failed
Title: Re: USER CP - An alternative to Profile Screen
Post by: IchBin on June 13, 2007, 01:44:36 AM
What mod? This isn't a mod thread Shadow. Its a custom code block code snippet.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on June 13, 2007, 01:45:57 AM
This mod User CP mod

The mod maker upload the mod on here and I am asking....I cant get any help at the main site over at SMF....

Edited

Opps I didnt know.  Sorry about that.  I just look back on the first page of this topc Ich
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on July 09, 2007, 04:21:25 PM
V1.2 released.

Link To Mod (http://custom.simplemachines.org/mods/index.php?mod=698)

*****************************
V1.1 - Initial Release
*****************************
V1.2

- Fixed installation errors on index.template
- Cleaned up instalation code
- Fixed bug on menu which ment the usercp tab was not highlighted when in usercp.
********************************

Note for V1.1 user's , Since no major changes in have been made in this release a upgrade is not required , If you do want to upgrade , Uninstall V1.1 , Upload V1.2 and apply it.

Note that since i have not included upgrade files in V1.2 any custom edits will be lost if you uninstall V1.1
Title: Re: USER CP - An alternative to Profile Screen
Post by: Shadow on July 13, 2007, 06:38:10 AM
Thanks for letting us plus old litte old me hehe lol :)
Title: Re: USER CP - An alternative to Profile Screen
Post by: dipper88 on August 17, 2007, 03:13:47 PM
First and foremost I want to give my props to Aku and everybody else, how created, coded, updated or improved this user cp.
I'm currently running it with manual installation as described on the first page's posts because stuff with the user cp mod didn't work satisfactorily, I only had a blank page.
Anyway, what I now want to do is to modify the standard profile section as to fit with this user cp and with my theme-settings - I have activated the left block panel in the profile screen, and so stuff with "Profile Info", "Modify Profile" etc. they bother me.
Yet I am new to smf and tp I'm experiencing little problems with orientate myself through all these thousands of documents. Therefore it would be very need if any of you tell me where to find the .php files I should take a closer look at (even if this sounds kinda silly to me).
Sure some of you might think this is too big for someone new, but I wanna give it a try. And I will have a closer look at the smf manual and the tp manual and many of code-lines over the weekend
Title: Re: USER CP - An alternative to Profile Screen
Post by: IchBin on August 17, 2007, 03:23:48 PM
I think you're looking to modify the Profile.template.php file.
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on December 23, 2007, 10:10:51 PM
Dont mean to be a bumper but i just thought i'd give a update.

V2.0 of the mod has been released

********************************

V2.0

- Added Admin Interface
- Added Ability to Enable/Disable User CP
- Added Ability to Disable Contacting Of Admin
- Added Ability to choose to use pm or email to contact admin
- Added Admin option to let users to switch to standard profile view
- Added 4 Customisable UserCP fields ( Use own icons/text/links )
- Added If UserCP is disabled , The Menu Button for the UserCp will automaticaly change back to profile.
- Edited Error Page For Guests
- Added User ID feature for admins ( Find out your UserID , Need for using admin pm contact option )
- Removed Unwanted Commenting Code + Added Code Explaination Comments
- Added Support For UTF8 ( English on Install )

********************************

Link To Mod (http://custom.simplemachines.org/mods/index.php?mod=698)
Title: Re: USER CP - An alternative to Profile Screen
Post by: CloverCreek on December 27, 2007, 06:57:38 PM
One question.

So far I am unable to limit which themes are shown as selectable within usercp. I have set the default theme in smf and disallowed user theme selection. Within TP I don't have any themes ticked given it only applies to the theme selector box anyway. Despite this usercp seems just to enumerate the themes installed in the themes folder. Is there a way (or plan for there to be a way) for only those themes I select to be visible?. Thanks
Title: Re: USER CP - An alternative to Profile Screen
Post by: alan s on December 27, 2007, 08:16:42 PM
The UserCP piggybacks on the actual SMF Profile. When a user clicks on "My Theme" in usercp , They are taken to the profile theme selection menu ( /index.php?action=theme;sa=pick;u=xx;sesc=xxxxxxxxxxxxxxxxxxx)

The SMF profile selection menu shows all of the installed themes on a forum.

So i suppose to answer the question a lot quicker , No you cannot select themes to be selected by users , and i do not plan on including that anytime soon , if ever ( If it is included in would be in V3.0 , which is a good while away )
Title: Re: USER CP - An alternative to Profile Screen
Post by: IchBin on December 27, 2007, 08:22:18 PM
Quote from: CloverCreek on December 27, 2007, 06:57:38 PM
One question.

So far I am unable to limit which themes are shown as selectable within usercp. I have set the default theme in smf and disallowed user theme selection. Within TP I don't have any themes ticked given it only applies to the theme selector box anyway. Despite this usercp seems just to enumerate the themes installed in the themes folder. Is there a way (or plan for there to be a way) for only those themes I select to be visible?. Thanks
You can limit which themes you want to be available, but its a custom code thing you'll have to do. I've seen it at SMF a long time ago. I'd do a search over there and see if you can find it.
Title: Re: USER CP - An alternative to Profile Screen
Post by: CampCounselor on January 02, 2008, 12:33:53 AM
User Control Panel -SMF (http://custom.simplemachines.org/mods/index.php?mod=698)
Title: Re: USER CP - An alternative to Profile Screen
Post by: a3des on October 15, 2008, 03:03:43 PM
Looks veri nice but for me it's just not working.
I have SMF 1.1.6 + TP 1.0.5 installed. link: www.skoda-club.ro
Installing the mod went fine except one failure in ModSettings.php wich i edited manualy.
After that I can see the pictures in CP but all that is related to profile leads to a blank page, everything else (search, themes, contact admin) are working fine.
Any help would be much appreciated.
Title: Re: USER CP - An alternative to Profile Screen
Post by: IchBin on October 15, 2008, 03:09:29 PM
Well this doesn't touch the profile. If you installed a mod, wouldn't that have been from some where else? All it does is create an article with all the images and links to the different parts of the profile. If you have a problem viewing you're profile section the problem is likely something else, which isn't related to this code snippet.
Title: Re: USER CP - An alternative to Profile Screen
Post by: a3des on October 15, 2008, 03:14:44 PM
I'm pretty sure you are right, last night I have update to almost identcal forums to SMF 1.1.6 .
Now I realise that in my forum wich use TP 1.0.5 Profile action isn't working at all, but in the other forum wich still use TP 0.983 it's ok with Profile action.
Any ideea where to look for help?
Title: Re: USER CP - An alternative to Profile Screen
Post by: IchBin on October 15, 2008, 03:26:59 PM
I have no idea what you've done on either of those installs. I'd start at SMF for help.
Title: Re: USER CP - An alternative to Profile Screen
Post by: Silver Knight on December 22, 2009, 01:10:06 PM
<Word Removed> it, stop using photobucket to show off stuff, it's crap! and expires images over long periods of time..

Support Edit:  by ZarPrime
Title: Re: USER CP - An alternative to Profile Screen
Post by: ZarPrime on December 22, 2009, 03:56:53 PM
Silver Knight,

Chill out Bro'.  This topic was opened over 3 years ago and last posted to over a year ago and the only photobucket image that I saw in the entire topic was from the original post.  There is really no reason to get all bent out of shape over something that may not even work properly anymore.  If you want to try it out and see what it looks like then, by all means, try it, but don't get all stressed out because an image is missing, especially at a time of the year when many people are already a little stressed out.

ZarPrime