collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 237
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Author Topic: Removal of top member area from all SP pages  (Read 6017 times)

0 Members and 1 Guest are viewing this topic.

Offline Sam12345

  • Semi Newbie
  • *
  • Posts: 45
  • SMF Version: 2 RC5
  • SP Version: 2.3
Removal of top member area from all SP pages
« on: April 02, 2011, 11:29:22 AM »
Dear all
I just installed a new theme for my forum and I am designing a website with Simple Portal around the forum. Everything seems to be working well. I am wondering if I can hide the top member area completely from the pages but retain it on the forum. Please have a look at http://www.clinicalresearchsociety.org and let me know if you can help.
Thanks in advance.
Cheers!
Sam

Offline Sam12345

  • Semi Newbie
  • *
  • Posts: 45
  • SMF Version: 2 RC5
  • SP Version: 2.3
Re: Removal of top member area from all SP pages
« Reply #1 on: April 04, 2011, 12:55:14 PM »
Anybody?
Angelina?

Thanks....
Sam

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Removal of top member area from all SP pages
« Reply #2 on: April 04, 2011, 01:53:42 PM »
All I see at that URL is Invitation for Council Membership. I cannot see what you are talking about.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Sam12345

  • Semi Newbie
  • *
  • Posts: 45
  • SMF Version: 2 RC5
  • SP Version: 2.3
Re: Removal of top member area from all SP pages
« Reply #3 on: April 05, 2011, 08:23:22 AM »
Dear Angelina
Thanks for getting back :)
Please have a look at this. http://www.clinicalresearchsociety.org/index.php?page=page2885 This is a SP page. If you see, there is a user box sitting between the logo and the main content area below. This box has the search field in it as well as field for logging in. After login, the same box displays user avatar and other information related to the member including unread posts, etc. I need to remove this box from all SP pages but would like to have it available on the forum pages. This user box is defined in the index.template.php that I have attached to this post. I hope this makes the situation a little more clear.
Thanks for helping out!
Regards
Sam
« Last Edit: April 05, 2011, 08:28:39 AM by Sam12345 »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Removal of top member area from all SP pages
« Reply #4 on: April 05, 2011, 10:01:59 AM »
This may require some tricky customization.
I'm not so good with the REQUEST array.  But the SimplePortal developers are.

So, if I were doing this myself, I think I would
  • Create a SimplePortal block custom php block to contain everything in that box.
  • Set the Advanced display parameters for that block.
  • Where index.template.php now does that box, have it call SimplePortal stuff, a la blocks-in-blocks
  • Bob's your Uncle
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Sam12345

  • Semi Newbie
  • *
  • Posts: 45
  • SMF Version: 2 RC5
  • SP Version: 2.3
Re: Removal of top member area from all SP pages
« Reply #5 on: April 05, 2011, 11:58:22 AM »
Hi Angeline
Thanks for your response. I tried to strip off the code for the user area from index.template.php and it gets removed from all pages. Then I put the code in a custom php block  but I am getting a syntax error message. What could I be doing wrong. O have the code below for your reference. Please suggest anything that comes to your mind.

Thanks
Sam  :nervous-happy:

Code: [Select]
<div id="userbox">
<div id="time-stats">
', $context['current_time'],'<span>', $txt['latest_member'], ': ', $context['common_stats']['latest_member']['link'], '</span>
</div>
<div id="searchbox">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input class="searchinput" type="text" name="search" value="', $txt['forum_search'], '" onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['forum_search'], '\';" />
<input id="searchbutton" class="pngbg" type="submit" name="submit" value="" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '
</form>
</div>
<div id="memb-login">';
if ($context['user']['is_logged'])
{
if(!empty($context['user']['avatar']))
echo '
<div class="memb-avat">'.$context['user']['avatar']['image'].'</div>';

echo '
<ul>';

echo '<li class="memb-name">', $txt['hello_member_ndt'], ' ', $context['user']['name'],',</li>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '
<li>', $txt['msg_alert_you_have'], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'],'</li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li>[<strong>', $txt['maintenance'], '</strong>]';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '[<a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] , '', $txt['approve'], '</a> ]</li>';

echo '
<li><a href="', $scripturl, '?action=unread">', $txt['view_unread'], '</a> &bull;
<a href="', $scripturl, '?action=unreadreplies">', $txt['view_replies'], '</a> &bull;
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['user']['id'], '">', $txt['view_own_posts'], '</a></li>';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
<li>', $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged5'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged6'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged7'], '</li>';
}
echo '
</ul>';
}

// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div id="log-username">
<input class="log-input" name="user" type="text" onfocus="if(this.value==\'', $txt['username'], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt['username'], '\';" value="', $txt['username'], '" />
</div>
<div id="log-password">
<input class="log-input" name="passwrd" type="password" onfocus="if(this.value==\'', $txt['password'], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt['password'], '\';" value="', $txt['password'], '" />
</div>
<input id="loginbutton" type="submit" value="" name="submit" />
<input type="hidden" name="cookielength" value="-1" />
</form>
<a id="register" href="', $scripturl, '?action=register"></a>';
}

echo '
</div>
</div>
« Last Edit: April 05, 2011, 12:24:05 PM by Sam12345 »

Offline Sam12345

  • Semi Newbie
  • *
  • Posts: 45
  • SMF Version: 2 RC5
  • SP Version: 2.3
Re: Removal of top member area from all SP pages
« Reply #6 on: April 05, 2011, 12:49:46 PM »
I tried disabling validation of php in general setting and made the new block to appear on some pages but then it is giving me the following error where it should normally place itself

Parse error: syntax error, unexpected '<' in /home1/******/public_html/Sources/PortalBlocks.php(3351) : eval()'d code on line 1

I tried starting the code with 'echo and ending with '; but that only makes it appear but not functional. I am breaking my head over this...trying to read stuff all over but no success as of now :(
« Last Edit: April 05, 2011, 03:07:03 PM by Sam12345 »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Removal of top member area from all SP pages
« Reply #7 on: April 05, 2011, 11:31:37 PM »
You need to begin with echo '. And, in the index.template.php, you'll need to make sure that the string is terminated properly where you ripped the code out of it.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Sam12345

  • Semi Newbie
  • *
  • Posts: 45
  • SMF Version: 2 RC5
  • SP Version: 2.3
Re: Removal of top member area from all SP pages
« Reply #8 on: April 06, 2011, 11:08:20 AM »
Hello AB
I just need a little extra help with the closing of the string. I am not good at PHP at all although I have been running this SMF forum for three years. Should have invested a little more time on learning it. Anyways, in the interim, I may need some more instructions from you as to how to make this box function the way it should without any errors. At this time the status is as follows:

When I put the code in the custom PHP box as is seen in this example http://www.clinicalresearchsociety.org/index.php?page=page2163 , the new box looks diff from the native box that is there in the index.template.php. Most of the HTML elements seem to be parsed but the PHP is not working. After logging in, the upper native box shows all the info about the member and other stuff, but this custom php box does not change at all ( Please see attached screnshot). I need some help here and I promise to keep learning so I can help myself more in the future :)

Thanks as always!
Sam  :nervous-happy:
« Last Edit: April 06, 2011, 11:16:11 AM by Sam12345 »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Removal of top member area from all SP pages
« Reply #9 on: April 06, 2011, 02:12:41 PM »
First, I would try, at the top of your block,
Code: [Select]
global $context, $scripturl, $txt;And maybe some other missing global variables that I missed seeing.


It would be easier to call the function ssi_login from SSI.php, but it would certainly look different.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Sam12345

  • Semi Newbie
  • *
  • Posts: 45
  • SMF Version: 2 RC5
  • SP Version: 2.3
Re: Removal of top member area from all SP pages
« Reply #10 on: April 06, 2011, 02:47:56 PM »
« Last Edit: April 06, 2011, 02:50:01 PM by Sam12345 »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Removal of top member area from all SP pages
« Reply #11 on: April 07, 2011, 10:08:08 AM »
Glad to help.
You probably don't want that block at http://www.clinicalresearchsociety.org/login/

Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Sam12345

  • Semi Newbie
  • *
  • Posts: 45
  • SMF Version: 2 RC5
  • SP Version: 2.3
Re: Removal of top member area from all SP pages
« Reply #12 on: April 07, 2011, 10:15:11 AM »
You are so right. Took it out !! :)
Thanks again.... and I assure you that this is not the last time you heard from me....
Till then...Have a great one!
Sam

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Removal of top member area from all SP pages
« Reply #13 on: April 07, 2011, 07:44:52 PM »
Glad to help.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?