TinyPortal

Development => Block Codes => Topic started by: Lord Anubis on January 09, 2008, 03:35:13 AM

Title: Profile Links (For use with Ultimate Profile Mod)
Post by: Lord Anubis on January 09, 2008, 03:35:13 AM
Check out this beta mod for Ultimate Profiles...(Makes MySpace style Profiles)

(This mod is made by JovanT, any support for mod should be answered at the SMF site)

DEMO (http://nextsite.org/forum/index.php?action=profile;u=1) <--- Warning Nudity   


Get the mod here (http://www.simplemachines.org/community/index.php?topic=183574.0)  :)

I think this is a sweet mod

Well here's the Block Code

This will create a block that looks like:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Ftinyadminresources.com%2Fextras%2Fimagehost%2Fscript%2Fuploads%2F34f41311d1.jpg&hash=0ce32d206bf980d54e5a2b669b23303b540899ee)


BLOCK DEMO (http://tinyadminresources.com) - (Check out profile under the Mini User CP)
Instructions:

1. Download the attachment at the bottom and unzip the package
2. Upload the folder "ultprof" to the root of your forum
3. Insert the below code in a PHP block
4. Enjoy!

global $scripturl, $context;

echo '
<img src="/ultprof/profile.png"/> <a href="', $scripturl ,'?action=profile">My Profile</a><br />
<img src="/ultprof/custom.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=customized">Customize My Profile</a><br />
<img src="/ultprof/photos.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures;add">Add Profile Photo</a><br />
<br />
<img src="/ultprof/addphoto.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures">My Pictures</a><br />
<img src="/ultprof/buddy.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=buddies">My Buddies</a><br />
';


To add functionality for Felblog you can use this code (along with the blog.png):

global $scripturl, $context;

echo '
<img src="/ultprof/profile.png"/> <a href="', $scripturl ,'?action=profile">My Profile</a><br />
<img src="/ultprof/custom.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=customized">Customize My Profile</a><br />
<img src="/ultprof/photos.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures;add">Add Profile Photo</a><br />
<img src="/ultprof/addphoto.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures">My Pictures</a><br />
<img src="/ultprof/buddy.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=buddies">My Buddies</a><br />
<img src="/ultprof/blog.png"/> <a href="', $scripturl ,'?action=felblog;u=', $context['user']['id'] ,';sa=view">My Blog</a><br />
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: IchBin on January 09, 2008, 03:42:03 AM
Can't view your site as a guest.
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: Lord Anubis on January 09, 2008, 03:52:17 AM
Fixed :)
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: IchBin on January 09, 2008, 03:56:01 AM
been a while since I've seen that profile mod. It bit much IMO, but useful for certain groups. Menu works well with it though. :) :up:
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: Lord Anubis on January 09, 2008, 03:59:36 AM
I like some of the features, but yes it is a bit much...But as long as I can keep people away from MySpace this has my :up:
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: catchpen on January 09, 2008, 05:11:50 AM
Quote from: Lord Anubis on January 09, 2008, 03:59:36 AM
I like some of the features, but yes it is a bit much...But as long as I can keep people away from MySpace this has my :up:
Aint that the truth, still scratching my head on how it got popular - can you say geocities? lol.

The Ult. profile mod is cool, especially for hobby/music forums so users can show their work, if they know their bbc and html. I've seen a similar mod on a few vbulletin sites.

The mini user cp on your site coupled with this will clean up a side panel nicely.
...looking into it thanks!
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: Zetan on January 09, 2008, 05:43:23 AM
A note to add here.

If you are using a recent theme designed by Bloc, Invazion and Nemesis for example, which feature the new Compact and Full profile pages you will need to remove or at least rename the Profile.template.php file in the theme folder:

Example:
Themes / invazion114 / Profile.template.php~

The Ultimate Profile Mod will not work with these themes by default.

You will get this error:

QuoteUnable to load the 'customized' template.




Hi, Lord Anubis, you mentioned a new Profile tab in the Mini User CP block, any chance you can post the code and changes for that here too?
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: Lord Anubis on January 09, 2008, 01:24:04 PM
I will add the mini-user cp modified with this later today :up:
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: Zetan on January 09, 2008, 01:53:53 PM
Thanks  :up:
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: Lord Anubis on January 09, 2008, 04:49:46 PM
Well the Miniuser CP is StormLrdâ,,¢'s code so I will show how to edit his code

1. Go to this post on TinyPortal Media (http://www.tinyportalmedia.com/main/index.php/topic,418.0.html) - (You will need to login or register)

2. Get the Miniuser CP code and set up the code on your site, and make sure it is working

3. Now that the miniuser cp is working, search for:

<ul id="maintab" class="shadetabs">
<li class="selected"><a href="#" rel="tcontent1">User</a></li>


ADD AFTER

<li class="selected"><a href="#" rel="tcontent7">Profile</a></li>

4.  Now search for
<script type="text/javascript">
//Start Tab Content script for UL with id="maintab" Separate multiple ids each with a comma.
storminitializetabcontent("maintab")
</script>';


ADD BEFORE

<div id="tcontent7" class="tabcontent">';
global $scripturl, $context;
echo '

<img src="/ultprof/profile.png"/> <a href="', $scripturl ,'?action=profile">My Profile</a><br />
<img src="/ultprof/custom.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=customized">Customize My Profile</a><br />
<img src="/ultprof/photos.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures;add">Add Profile Photo</a><br />
<img src="/ultprof/addphoto.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures">My Pictures</a><br />
<img src="/ultprof/buddy.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=buddies">My Buddies</a><br />
</div>


5. Don't forget to upload the folder ultprof to the root of your forum and the shade.png and activeshade.png to the image folder of your theme  ;)

This can also be used to add other tabs like my SMFChess block  O0
Title: Re: Profile Links (For use with Ultimate Profile Mod)
Post by: texasflats on January 10, 2008, 10:25:41 PM
Installed flawlessly, thanks for the code!