News:

Wondering if this will always be free?  See why free is better.

Main Menu

Ultimate Profile

Started by JovanT, March 12, 2009, 12:14:40 PM

Previous topic - Next topic

Sci-Fi_Fan

Quote from: Brack1 on September 06, 2011, 11:53:00 AM
Quote from: Branko. on September 06, 2011, 11:47:20 AM
This option does not exist in this modification...What kind of activities do you think?

darn beaten to it.  :)

Sci Fi Fan Somehow I managed to ad the bar to the Ultimate profile but ended up in the top left corner so it can be done.

I can't remember how I did it tho.  :(

I am also wanting to add the Next Post Level mod to this one.

Ah, well thanks for replying anyway, Brack1! :)
ShadowFleet.org - more than just a Star Trek RPG!

Kindred

unless mods are specifically designed to work together, you will have to learn some coding of your own in order to tie mods from different authors together...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sci-Fi_Fan

Quote from: Kindred on September 06, 2011, 12:03:16 PM
unless mods are specifically designed to work together, you will have to learn some coding of your own in order to tie mods from different authors together...

I realize that, and I have some basic skills, but I wanted to post here first to see if anyone has managed to do it or would know exactly which code to edit.
ShadowFleet.org - more than just a Star Trek RPG!

TheListener

Quote from: Kindred on September 06, 2011, 12:03:16 PM
unless mods are specifically designed to work together, you will have to learn some coding of your own in order to tie mods from different authors together...

Must be one of the most unhelpful replies I have ever seen.


Suki

But it is true Brack,  as a forum admin you have to be able to do and/or understand a minimal level of php and /or php syntax.

The vast majority of mods just concentrate in work with the default theme and nothing else.

to add things to this mod, the mod author gave us some tools to work on, in Ultimate profile.template.php you can add your own block of code/text:


$column_layout = array(
'top' => array(
//'summary',
),
'left' => array(
'summary',
'user_info',
'contact',
'buddies',
),
'right' => array(
'pictures',
'about_me',
'interests',
'media',
'other_info',
),
'bottom' => array(
'write_comment',
'show_comments',
),
);


here you can specify where do you want to show your block, lets say you want to add a block before the "about_me" block, then you will add it before this:

      'about_me',

like this:

   'right' => array(
      'pictures',
      'my_custom_block',
      'about_me',



and then at the end of the file you will add your function, the function must start with up_block_   otherwise it will not work, so our function will be  up_block_my_custom_block


function up_block_my_custom_block(){


echo = 'Hi, I\'m a custom text block just above the about me one.';


}


since it its a function you can have whatever you want on it, html, php, flash, etc as well as have all the SMF variables if you globalize the necessary functions.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

TheListener

Thanks MAS

Coding to me is enough to make my head explode.

Even the tutorials i have seen elsewhere look gibberish to me.

I'll give it a go.

Wish me luck  ???

Suki

This function should do the trick for showing the Activity bar, you only need to call it wherever you want to be placed:


function up_block_Activity_bar(){

global $modSettings, $txt, $context;


echo '
<div id="up_Activity_bar">
<div class="windowbg creator">
<span class="topslice"><span></span></span>
<div class="content">
<dl>';
echo '
<dt>', !empty($modSettings['activitybar_label']) ? $modSettings['activitybar_label'] : $txt['activitybar_standardlabel'], ':</dt>
<dd><div class="activity_holder" style="width: ', !empty($modSettings['activitybar_max_width']) ? $modSettings['activitybar_max_width'] : 139, 'px;"><div class="activity_bar" style="width: ', $context['activitybar']['width'], 'px;"><div class="activity_percentage smalltext">', $context['activitybar']['percentage'], '%</div></div></div></dd>';

echo '
</dl>
</div>
<span class="botslice"><span></span></span>
</div>
</div>';

return true;

}



for example, if you want that to appear below the user_info  then just add  Activity_bar  below this:

   'left' => array(
      'summary',
      'user_info',



like this:

   'left' => array(
      'summary',
      'user_info',
      'Activity_bar',


Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

TheListener

It's the second part i was having the problems with.


Suki

did it work?  it was untested.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

TheListener

Sure did.

Is in a block all on its own.

TheListener

Thanks to MAS I managed to add the next post level mod (borrowed some code from the profile template)

Next step is to include it in the same box as the activity bar.

Suki

just add another <dt></dt>

<dd></dd>  to the activity_bar function.

if you can copy paste the code you're using for that mod I can include it on the function.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

TheListener

I sort of er cheated by using the code you gave  :-[
Also I forgot the activity bar mod is now yours.

Anyways here ya go:

function up_block_Next_post_level(){

global $modSettings, $txt, $context;


   if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
      echo '
               <dt>', $txt['location'], ':</dt>
               <dd>', $context['member']['location'], '</dd>';

         // Start of Next Post Level Mod
      if(!empty($context['member']['next_post_level']))
         echo '<dt>'.$txt['nextpostlevel_next'].'</dt>
            <dd>'. $context['member']['next_post_level'] .'</dd>';
    // End of Next Post Level Mod

   echo '
               </dl>
            </div>
            <span class="botslice"><span></span></span>
         </div>
      </div>';
         
   return true;

}

Suki

If you want the next post code to be inside the same block as the activity bar  then all you need is this:


if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
      echo '
               <dt>', $txt['location'], ':</dt>
               <dd>', $context['member']['location'], '</dd>';

         // Start of Next Post Level Mod
      if(!empty($context['member']['next_post_level']))
         echo '<dt>'.$txt['nextpostlevel_next'].'</dt>
            <dd>'. $context['member']['next_post_level'] .'</dd>';
    // End of Next Post Level Mod


you dont actually need the whole function,  the function is there only if you want to add a separate block,  so the activity_bar funciton will look something like this:


function up_block_Activity_bar(){

global $modSettings, $txt, $context;


echo '
<div id="up_Activity_bar">
<div class="windowbg creator">
<span class="topslice"><span></span></span>
<div class="content">
<dl>';
echo '
<dt>', !empty($modSettings['activitybar_label']) ? $modSettings['activitybar_label'] : $txt['activitybar_standardlabel'], ':</dt>
<dd><div class="activity_holder" style="width: ', !empty($modSettings['activitybar_max_width']) ? $modSettings['activitybar_max_width'] : 139, 'px;"><div class="activity_bar" style="width: ', $context['activitybar']['width'], 'px;"><div class="activity_percentage smalltext">', $context['activitybar']['percentage'], '%</div></div></div></dd>';

if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
<dt>', $txt['location'], ':</dt>
<dd>', $context['member']['location'], '</dd>';

// Start of Next Post Level Mod
if(!empty($context['member']['next_post_level']))
echo '
<dt>'.$txt['nextpostlevel_next'].'</dt>
<dd>'. $context['member']['next_post_level'] .'</dd>';
// End of Next Post Level Mod

echo '
</dl>
</div>
<span class="botslice"><span></span></span>
</div>
</div>';

return true;

}
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

TheListener

So I should of added the code before the last echo and dl

Suki

sure or just replace the entire function with the one I posted.


function up_block_Activity_bar(){

global $modSettings, $txt, $context;


echo '
<div id="up_Activity_bar">
<div class="windowbg creator">
<span class="topslice"><span></span></span>
<div class="content">
<dl>';
echo '
<dt>', !empty($modSettings['activitybar_label']) ? $modSettings['activitybar_label'] : $txt['activitybar_standardlabel'], ':</dt>
<dd><div class="activity_holder" style="width: ', !empty($modSettings['activitybar_max_width']) ? $modSettings['activitybar_max_width'] : 139, 'px;"><div class="activity_bar" style="width: ', $context['activitybar']['width'], 'px;"><div class="activity_percentage smalltext">', $context['activitybar']['percentage'], '%</div></div></div></dd>';

if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
<dt>', $txt['location'], ':</dt>
<dd>', $context['member']['location'], '</dd>';

// Start of Next Post Level Mod
if(!empty($context['member']['next_post_level']))
echo '
<dt>'.$txt['nextpostlevel_next'].'</dt>
<dd>'. $context['member']['next_post_level'] .'</dd>';
// End of Next Post Level Mod

echo '
</dl>
</div>
<span class="botslice"><span></span></span>
</div>
</div>';

return true;

}
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

TheListener

No worries MAS I did that.

:)

Just making sure I was on the right path.

UKShark

Quote from: OChaos on September 05, 2011, 09:19:40 AM
Quote from: UKShark on September 04, 2011, 03:38:34 PM
After installing this mod the title bars for each section appear to be cropped and not showing fully,

I had the same problem with ezPortal, please see the thread below...

http://www.simplemachines.org/community/index.php?topic=271882.msg3002449#msg3002449

I'm assuming it'd be the same sort of fix, could we get it addressed for an update asap?



Thank you for the link.  I just installed this and was wondering how to fix it also, this link pointed me in the right direction.  Here's how for those that want to fix it.

Edit the UltimateProfile.template.php file located in Themes/default to reflect the following.
find (I did a search on "catbg" to find each section

<div id="some_id_here">
<h3 class="catbg">
                        <span class="left"></span>
some code here
</h3>


replace it with

<div id="some_id_here">
               <div class="cat_bar">
<h3 class="catbg">
some code here
</h3>
                </div>


Thanks for the help. It has worked on all sections except for the 'Add Comments' section.

I thought I might need to change the Profile.template.php file...

From this...

<h3 class="catbg">
<span class="left"></span>
', $context['member']['name'] ,': ', $txt['profile_comment_add'], '
</h3>


To this...

<div class="cat_bar">
<h3 class="catbg">
<span class="left"></span>
', $context['member']['name'] ,': ', $txt['profile_comment_add'], '
</h3></div>


However that hasn't worked unfortunately.

Any ideas?

Katsulynx

Hey there,
I am using the Ultimate Profile for some time now and was quite pleased, but now, there is something disturbing me. The Media Box is not able to accept my iframe-html links. I tried to fix that and worked myself trough the docouments of ultimate profile and the database, but... I was not even able to find where the content of the media box is saved in the database! I mean, one of my profiles has a content in its media box which is shown correctly on my page but it seems like it is saved nowhere...

What I now want to is changing the media box so it accept Iframe or at least the table-tag, is there any way to?
Thanks in advantage

Suki

This mod sues http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/   to sanitize any data, including the Media box, without doing a check, I will guess that html lawed is blocking your html code.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: