News:

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

Main Menu

SimplePortal

Started by SimplePortal Team, March 10, 2008, 11:16:07 PM

Previous topic - Next topic

[SiNaN]

Meeturmaker:

Ignore the error and install. Then use the file attached to this post.

southeastsportsforum:

Thanks southeastsportsforum, it will be more fancy I hope. :)

asudhakar:

Thanks to Manu that she solved your first problem. For the second, it would be better if you ask for support in the support topic of mod that caused those errors.

runebergen:

Thanks runebergen, as I said before; we started now. Soon we will need some people to fill our Block Codes DB, be ready for that.

For All:

This morning we have coded a new add-on for SimplePortal which integrates it completely into your forum. That means, you can show your blocks on forum pages too. Also, you can select which on which action or board the block would be shown. To add; it is ultimately custom theme and install friendly. Now its being tested and I hope that we will include that feature in the next version; 2.1.
Former SMF Core Developer | My Mods | SimplePortal

runebergen

Quote from: [SiNaN] on August 20, 2008, 12:46:18 PM


For All:

This morning we have coded a new add-on for SimplePortal which integrates it completely into your forum. That means, you can show your blocks on forum pages too. Also, you can select which on which action or board the block would be shown. To add; it is ultimately custom theme and install friendly. Now its being tested and I hope that we will include that feature in the next version; 2.1.


WOW! :D

That sounds awesome! ;)))  Looking forwards to that! :D

Puffbuster

Having some (to my way of thinking) major problems with SimplePortal 2.0.4 ...

Before I was finally lead here ... I posted my history with the Mod in this thread:  http://www.simplemachines.org/community/index.php?topic=256337.0

And that's where I am today.  Right now I'm considering deleting my entire forum (assuming that the databases will be left intact) and reinstalling EVERYthing.  I really don't want to do that, though. (duh!)

I'm calling my host to ensure that I have the correct ftp info, but the abovementioned thread chronicles my experiences to date.  I didn't have the ftp issue until the fiasco with the .htaccess file.

Help?

[SiNaN]

#1123
First of all welcome Puffbuster. :)

Unfortunately I'm the only one who can't reproduce that error. I'm trying to figure out where the error could be, but I couldn't find it yet.

Maybe you can try other portal alternatives. TinyPortal doesn't have such a problem as far as I know. And said to be more functional than SimplePortal. The only thing is, its quite confusing for the starters.

Anyway, I don't want anybody to have problems because of my mod. I just can suggest uninstalling the mod completely. I can help with that to you. Just attach all the files that have been affected by SimplePortal and I'll take them back.

No worries, we can fix it. Hopefully...

Edit:

I think I've found the fix. Can you try replacing your Subs-SPortal.php with the one attached? It's in Sources directory. Then try editing or deleting a block. Would be glad if you can inform us about the result.
Former SMF Core Developer | My Mods | SimplePortal

Sudhakar Arjunan

Hi i have checked the Quick Search Box portal page both @ right and left side.

I found its taking more width then usual block.

Check out this page in Internet explorer http://forum.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

[SiNaN]

I'm aware of that, will decrease the width in the first update.
Former SMF Core Developer | My Mods | SimplePortal

Sudhakar Arjunan

Quote from: [SiNaN] on August 21, 2008, 07:23:47 AM
I'm aware of that, will decrease the width in the first update.

Are you telling about the first release 2.01 or the future update Author.

And do check this, i got error in my default theme only. Is issue related to Simple portal.


Parse error: syntax error, unexpected $end in .../Themes/default/MessageIndex.template.php on line 766

757: $buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0">' . $txt['smf258'] . '</a>';
758:
759: // How about new polls, can the user post those?
760: if ($context['can_post_poll'])
761: $buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll">' . $txt['smf20'] . '</a>';
762:
763: return implode('  |  ', $buttonArray);
764: }
765:

766: ?>

767:
768:

Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Puffbuster

SiNaN -

Thank you for your quick response.  I really don't want to NOT use SimplePortal, it's just giving me some headache right now.  I thought this morning to delete the mod from my forum, then download a new copy and apply it in the hope that the previous copy was damaged in some way.

But ... I'm not able to delete the existing mod using the package manager.

Now what?

I would really appreciate your help in getting this mod applied.

[SiNaN]

asudhakar:

I meant I will fix it in the next update.

The error is not related to SimplePortal. It doesn't make any change in Message Index template.

Puffbuster:

I remember the error you are getting, it must be the same as the errors reported in the previous pages. Changing the file I attached above should have been done the trick. I suggest first trying that.

If that doesn't work, what is the error you are getting when you try to uninstall it?
Former SMF Core Developer | My Mods | SimplePortal

Puffbuster

Looked at the Sources directory.  The file that you provided is NOT there.

When I attempt to delete the SimplePortal mod via the Package Manager - Browse Packages, it just shows as being there ... no error message.

I have the options to [Apply Mod] [list Files] [Delete]

When I click on [Apply Mod] I get sent to the aforementioned "FTP Information Required" page.  This did NOT happen in my first few attempts to apply the mod.  When I enter the requested FTP info, the page does nothing but erase the password block.  I have checked, double-checked and triple-checked that the FTP info is correct (it's the exact same settings I use for my WS_FTP program, which connects just fine).

My forum appears to be running just fine ... except that I can neither apply nor delete SimplePortal.  In just looking for the file that you provided, I'm beginning to assume that the Mod is NOT there ... hence the inability to delete it.  But in that case, would it still show up in the Browse Packages?

The SimplePortal Mod does NOT appear in the "Installed Packages" page either.

Just tried to upload the Mod again and I received the message:

QuoteThe file you are uploading already exists on the server. Please delete it first then try again.

And we're back to the circle ... Package Manager (Browse Packages) won't let me delete it.

When I select [list Files] for the Mod, I get the following:

Quote1.  arrow.gif (672 bytes)
   2. arrow1.gif (590 bytes)
   3. dot.gif (666 bytes)
   4. dot1.gif (339 bytes)
   5. install.php (3815 bytes)
   6. install.xml (15893 bytes)
   7. package-info.xml (2950 bytes)
   8. splogo.png (2276 bytes)
   9. SPortal.english-utf8.php (11553 bytes)
  10. SPortal.english.php (11553 bytes)
  11. SPortal.php (62736 bytes)
  12. SPortal.template.php (6959 bytes)
  13. SPortalAdmin.php (38936 bytes)
  14. SPortalAdmin.template.php (31454 bytes)
  15. SPortalArticle.template.php (25861 bytes)
  16. Subs-SPortal.php (11359 bytes)
  17. upgrade00.xml (9681 bytes)
  18. upgrade01.php (705 bytes)
  19. upgrade01.xml (876 bytes)
  20. upgrade02.php (1331 bytes)
  21. upgrade02.xml (38057 bytes)
  22. upgrade03.xml (2946 bytes)

Do I need to delete each individual file manually?  Is that even possible?  As I said before, in looking in the Sources directory for Subs-SPortal.php ... it's not there.

A possible source of confusion is that I'm also running a sub-domain and I'm not really up on how all of that works.  Actually, I have a forum directory in the "main" and another forum directory in the "sub" ... from what I'm seeing only the "main" actually is required, but until I understand everything a bit more fully I guess I'm staying confused for a bit.

I'm resetting file permissions on all the folders right now to try and re-apply the Mod.

[/list][/list]

[SiNaN]

Well if that doesn't work, try this:

1) Create a new directory named as "temp" in the Packages directory.
2) Set the chmod to 777.
3) Put something into that directory, make sure that directory is not empty. (maybe you can put a small picture there)
4) Then try installing mod.
Former SMF Core Developer | My Mods | SimplePortal

Malke

Thanks for a great portal.

I have a small problem though.

The article blocks are wider than the actual article table. So there is a space to the right of the text and avatar in the news update. Is there any way I can make this table 100%? I guess making the side blocks wider could fix it but I don't really wanna do that...

I'm attaching a part of a screenshot.

Thanks!

[SiNaN]

What's your browser? Can you link to your forum?
Former SMF Core Developer | My Mods | SimplePortal

tuguex

SiNaN, i change my forum theme, and now my index.template.php is diferent and i don't know how to put "Forum" button in the bar menu :S

Here is my index.template.php ;)
<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context, $settings, $options, $txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = false;




if(!
$context['user']['is_guest'] && isset($_POST['options']['theme_color']))
{
  include_once(
$GLOBALS['sourcedir'] . '/Profile.php');
 
makeThemeChanges($context['user']['id'], $settings['theme_id']);
 
$options['theme_color'] = $_POST['options']['theme_color'];
}
elseif (
$context['user']['is_guest'])
{
  if (isset(
$_POST['options']['theme_color']))
  {
     
$_SESSION['theme_color'] = $_POST['options']['theme_color'];
     
$options['theme_color'] = $_SESSION['theme_color'];
  }
  elseif (isset(
$_SESSION['theme_color']))
     
$options['theme_color'] = $_SESSION['theme_color'];
}


}

// The main sub template above the content.
function template_main_above()
{
       global
$context, $settings, $options, $scripturl, $txt, $modSettings;

if (isset(
$options['theme_color']))
 
$mycolor = $options['theme_color'];
else{
 
// Defaults.
 
$options['theme_color'] = isset($settings['default_theme_color']) ? $settings['default_theme_color'] : 'brown';
 
$mycolor=$options['theme_color'];
}

if(isset(
$settings['color_change_off']) && $settings['color_change_off']==1)
 
$options['theme_color'] = isset($settings['default_theme_color']) ? $settings['default_theme_color'] : 'brown';

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
, $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
<meta http-equiv="Content-Type" content="text/html; charset='
, $context['character_set'], '" />
<meta name="description" content="'
, $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />'
, '
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
, $settings['default_theme_url'], '/script.js?rc3"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
, $settings['theme_url'], '";
var smf_images_url = "'
, $settings['images_url'], '";
var smf_scripturl = "'
, $scripturl, '";
var smf_iso_case_folding = '
, $context['server']['iso_case_folding'] ? 'true' : 'false', ';
var smf_charset = "'
, $context['character_set'], '";
// ]]></script>
<title>'
, $context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
, $settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
, $scripturl, '?action=help" target="_blank" />
<link rel="search" href="'
. $scripturl . '?action=search" />
<link rel="contents" href="'
, $scripturl, '" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
, $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';
       
// If we're viewing a topic, these should be the previous and next topics, respectively.
       
if (!empty($context['current_topic']))
               echo
'
       <link rel="prev" href="'
, $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
       <link rel="next" href="'
, $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

       
// If we're in a board, or a topic for that matter, the index will be the board's index.
       
if (!empty($context['current_board']))
               echo
'
       <link rel="index" href="'
. $scripturl . '?board=' . $context['current_board'] . '.0" />';

       
// We'll have to use the cookie to remember the header...
       
if ($context['user']['is_guest'])
               
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

       
// Output any remaining HTML headers. (from mods, maybe?)
       
echo $context['html_headers'], '

       <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
               var current_header = '
, empty($options['collapse_header']) ? 'false' : 'true', ';

               function shrinkHeader(mode)
               {'
;

       
// Guests don't have theme options!!
       
if ($context['user']['is_guest'])
               echo
'
                       document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
       else
               echo
'
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
, $context['session_id'], '");';

       echo
'
                       document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                       document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

                       current_header = mode;
               }
       // ]]></script>
</head>
<body><div><table cellpadding="0" align="center" cellspacing="0" style="width: '
, (isset($settings['forum_width']) && !empty($settings['forum_width'])) ? $settings['forum_width'] : '100%' ,  ';"><tr><td>';
       
$topbox='<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="height: 16px; width: 22px;"><img src="'.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-info-topleft.gif" style="height: 16px; width: 22px; border: 0px; padding: 0px; margin: 0px;" alt="gfx" /></td><td style="height: 16px; background-image: url('.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-info-topmid.gif); "></td><td style="height: 16px; width: 27px;"><img alt="gfx" src="'.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-info-topright.gif" style="height: 16px; width: 27px; border: 0px; padding: 0px; margin: 0px;" /></td></tr><tr><td style="width: 22px; background-image: url('.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-info-midleft.gif); ">&nbsp;</td><td valign="top">';
       
$botbox='</td><td style="width: 27px; background-image: url('.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-info-midright.gif); ">&nbsp;</td></tr><tr><td valign="top" style="height: 14px; width: 22px;"><img alt="gfx" src="'.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-info-botleft.gif" style="height: 14px; width: 22px; border: 0px; padding: 0px; margin: 0px;" /></td><td style="height: 14px; background-image: url('.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-info-botmid.gif); ">&nbsp;</td><td valign="top" style="height: 14px; width: 27px;"><img alt="gfx" src="'.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-info-botright.gif" style="height: 14px; width: 27px; border: 0px; padding: 0px; margin: 0px;" /></td></tr></table>';

       
$leftbox='<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td valign="top" style="height: 44px; width: 124px;"><img alt="gfx" src="'.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-stat-left.gif" style="height: 44px; width: 124px; border: 0px; padding: 0px; margin: 0px;" /></td><td nowrap="nowrap" style="text-align: center; height: 44px; background-image: url('.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-stat-mid.gif); ">';
       
$rightbox='</td><td valign="top" style="height: 44px; width: 135px;"><img alt="*" src="'.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-stat-right.gif" style="height: 44px; width: 135px; border: 0px; padding: 0px; margin: 0px;" /></td></tr></table>';

       if(isset(
$settings['topbar']) && !empty($settings['topbar']))
              echo
'<div style="text-align: center; width: 99%">'.$settings['topbar'].'</div>';


   if(!isset(
$settings['color_change_off']) || (isset($settings['color_change_off']) && $settings['color_change_off']==0))
     echo
'
     <form action="'
, $scripturl, '" style="text-align: right; margin-right: 30px; margin-bottom: 2px; margin-top: 2px;" method="post" class="smalltext">
        <input style="border: solid 1px #808080; background-color: #503000; color: #503000; font-size: 6px;" type="submit" value="brown" name="options[theme_color]">
        <input style="border: solid 1px #808080; background-color: #600000; color: #600000; font-size: 6px;" type="submit" value="red" name="options[theme_color]">
        <input style="border: solid 1px #808080; background-color: #908000; color: #908000; font-size: 6px;" type="submit" value="golden" name="options[theme_color]">
        <input style="border: solid 1px #808080; background-color: #005000; color: #005000; font-size: 6px;" type="submit" value="green" name="options[theme_color]">
        <input style="border: solid 1px #808080; background-color: #000040; color: #000040; font-size: 6px;" type="submit" value="blue" name="options[theme_color]">
        <input style="border: solid 1px #808080; background-color: #606060; color: #606060; font-size: 6px;" type="submit" value="silver" name="options[theme_color]">
      </form>'
;

       echo
'<div id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '><div style="padding-right: 10px;">'.$topbox.'<table width="100%" cellpadding="0" cellspacing="0" border="0">';
        echo
'<tr><td width="45%" valign="bottom" style="padding-right: 10px;"><div style="padding-right: 0px;">';

       echo
'<table width="99%" cellpadding="4" cellspacing="5" border="0" style="margin-left: 2px;"><tr>';

       if (!empty(
$context['user']['avatar']))
               echo
'<td valign="top">', $context['user']['avatar']['image'], '</td>';

       echo
'<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;">
       '
;

       
// If the user is logged in, display stuff like their name, new messages, etc.
       
if ($context['user']['is_logged'])
       {
               echo
'
                                                       '
, $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';

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

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

               
// Are there any members waiting for approval?
               
if (!empty($context['unapproved_members']))
                       echo
'<br />
'
, $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

               
// Show the total time logged in?
               
if (!empty($context['user']['total_time_logged_in']))
               {
                       echo
'
                                                       <br />'
, $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['totalTimeLogged2'];

                       
// 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['totalTimeLogged3'];

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

               echo
'<br />
                                                       <a href="'
, $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
                                                       <a href="'
, $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>';

       }
       
// Otherwise they're a guest - so politely ask them to register or login.
       
else
       {
               echo
'
                                                       '
, $txt['welcome_guest'], '<br />

<script language="JavaScript" type="text/javascript" src="'
, $settings['default_theme_url'], '/sha1.js"></script>

<form action="'
, $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div style="text-align: right;">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
, $txt['smf53'], '</option>
<option value="1440">'
, $txt['smf47'], '</option>
<option value="10080">'
, $txt['smf48'], '</option>
<option value="43200">'
, $txt['smf49'], '</option>
<option value="-1" selected="selected">'
, $txt['smf50'], '</option>
</select>
<input type="submit" value="'
, $txt[34], '" /><br />
<span class="middletext">'
, $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</div>
</form>'
;
}

       echo
'
                                               </td></tr></table>'
;

       echo
'</div></td><td style="padding-right: 10px;" width="50%" align="right" >';
       if(isset(
$settings['userlogo']) && !empty($settings['userlogo']))
              echo
'<a href="index.php"><img src="'.$settings['userlogo'].'" border="0" alt="logo" /></a>';

       echo
' </td></tr></table>'.$botbox.'</div>';

       if (!empty(
$settings['enable_news']))
              echo
'<div style="padding-right: 10px;">'. $topbox.'<div style="padding: 6px; text-align: center;">'.$context['random_news_line'].'</div>'.$botbox.'</div>';

       
// news
           
echo '
                  </div>'
;
       
// stats
           
echo '<div style="padding-left: 0px;">'.$leftbox.'<table width="99%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" style="color: #88908a; font-size: 8pt; font-family: tahoma, helvetica, serif;"><b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>
                     '
, $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['totalMembers'], '</b>
                     '
,  $txt[19], '
                     - '
, $txt[656], ': <b> <a style="color: #b0b0b0" href="', $scripturl , '?action=profile;u=' , $modSettings['latestMember'] , '">' , $modSettings['latestRealName'] , '</a></b>
                     </td><td align="right" style="color: #b0b0b0; font-size: 8pt; font-family: tahoma, helvetica, serif;">'
.$context['current_time'].'</td></tr></table>'.$rightbox.'</div>';


               
// Show the menu here, according to the menu sub template.
echo '<table cellpadding="0" cellspacing="0" border="0" style="text-align: left; margin-left: 20px; background-image: url(' . $settings['images_url'] . '/pod/'.$options['theme_color'].'/pod-midbar.gif);" ><tr>';
echo
'<td style="width: 39%; background-color: black;"> </td><td><img src="' . $settings['images_url'] . '/pod/'.$options['theme_color'].'/pod-leftbar.gif" alt="gfx" style="margin: 0px 0;" border="0" /></td>';
echo
'<td><a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 0px 0;" border="0" /></a></td><td><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="width: 2px; height: 20px;margin: 0px 0;" /></td>';
               
template_menu();
echo
'</td><td style="background-color: black;width: 59%;"> </td></tr></table>';
       
// The main content should go here.  A table is used because IE 6 just can't handle a div.
       
echo '
       <table style="margin-top: 4px;" width="100%" cellpadding="0" cellspacing="0" border="0"><tr>'
;
        echo
'<td align="left" id="bodyarea" style="padding-left: 3px; padding-right: 8px; padding-top: 0px; padding-bottom: 10px;">';
}

function
template_main_below()
{
       global
$context, $settings, $options, $scripturl, $txt;

       
$leftboxbot3='<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-left: 8px; height: 58px; width: 72px;"><img alt="gfx" src="'.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-maxbotleft.gif" style="height: 58px; width: 72px; border: 0px; padding: 0px; margin: 0px;" /></td><td valign="top" nowrap="nowrap" style="text-align: center; height: 58px; background-repeat: repeat-x;background-image: url('.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-maxbotmid.gif); ">';
       
$rightboxbot3='</td><td valign="top" style="padding-right: 5px; height: 58px; width: 79px;"><img alt="gfx" src="'.$settings['images_url'].'/pod/'.$options['theme_color'].'/pod-maxbotright.gif" style="height: 58px; width: 79px; border: 0px; padding: 0px; margin: 0px;" /></td></tr></table>';

       echo
'</td>
       </tr></table>'
;

       
// Show the "Powered by" and "Valid" logos, as well as the copyright.  Remember, the copyright must be somewhere!
       
echo $leftboxbot3.'
<div style="padding-top: 15px;">
               <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%">
                       <tr>
                               <td valign="middle" align="center" style="white-space: nowrap;">
                                       '
, theme_copyright(), '
                               </td><td align="right"><span class="smalltext">'
;
       
// Show the load time?
       
if ($context['show_load_time'])
               echo
               
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'];

       echo
'<br /><b>Helios Multi</b> design by <a target="_blank" href="http://www.bloczone.net/smf">Bloc</a></span></td>
            </tr>
         </table></div>'
.$rightboxbot3;
       echo
'<div style="text-align: center;">
                            <a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
, $settings['images_url'], '/powered-mysql.gif" alt="', $txt['powered_by_mysql'], '" border="0"  /></a>
                            <a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
, $settings['images_url'], '/powered-php.gif" alt="', $txt['powered_by_php'], '" border="0"  /></a>
                                      <a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
, $settings['images_url'], '/valid-xhtml10.gif" alt="', $txt['valid_xhtml'], '" border="0" /></a>
                                       <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
, $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" border="0" /></a>

       </div>'
;


// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
{
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;
}

echo '
// ]]></script>'
;
}

       echo
'</td></tr></table></div>
<div id="ajax_in_progress" style="display: none;'
, $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
       </body>
</html>'
;
}


// Show a linktree.  This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
       global
$context, $settings, $options;

       
// Folder style or inline?  Inline has a smaller font.
       
echo '<span class="nav">';

       
// Each tree item has a URL and name.  Some may have extra_before and extra_after.
       
foreach ($context['linktree'] as $link_num => $tree)
       {

               
// Show something before the link?
               
if (isset($tree['extra_before']))
                       echo
$tree['extra_before'];

               
// Show the link, including a URL if it should have one.
               
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'];

               
// Show something after the link...?
               
if (isset($tree['extra_after']))
                       echo
$tree['extra_after'];

               
// Don't show a separator for the last one.
               
if ($link_num != count($context['linktree']) - 1)
                       echo
' &nbsp;|&nbsp; ';
       }

       echo
'</span>';
}

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
       global
$context, $settings, $options, $scripturl, $txt;

       
// Show the [home] and [help] buttons.

       
echo '<td><a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 0px 0;" border="0" />' : $txt[103]), '</a></td>';
       echo
'<td><a href="', $scripturl, '?action=help" >', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 0px 0;" border="0" />' : $txt[119]), '</a></td>';
echo
'
             
// How about the [Arcade] button?
   echo'

<td  align="center"><a href="', $scripturl, '?action=arcade">' , $txt['arcade'] , '</a></td>';

       // How about the [search] button?
       if ($context['
allow_search'])
               echo '
<td><a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 0px 0;" border="0" />' : $txt[182]), '</a></td>';

       // Is the user allowed to administrate at all? ([admin])
       if ($context['
allow_admin'])
               echo '
<td><a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 0px 0;" border="0" />' : $txt[2]), '</a></td>';

       // Edit Profile... [profile]
       if ($context['
allow_edit_profile'])
               echo '
<td><a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 0px 0;" border="0" />' : $txt[467]), '</a></td>';

       // The [calendar]!
       if ($context['
allow_calendar'])
               echo '
<td><a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 0px 0;" border="0" />' : $txt['calendar24']), '</a></td>';

       // If the user is a guest, show [login] and [register] buttons.
       if ($context['
user']['is_guest'])
       {
               echo '
<td><a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" style="margin: 0px 0;" border="0" />' : $txt[34]), '</a></td>';
               echo '
<td><a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" style="margin: 0px 0;" border="0" />' : $txt[97]), '</a></td>';
       }
       // Otherwise, they might want to [logout]...
       else{
             echo '
<td><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 0px 0;" border="0" />' : $txt[108]), '</a></td>';
             }

      // first button...is it on?
      if(isset($settings['
custombutton1_use'])  && $settings['custombutton1_use']==true){
         // is it memberonly?
           if(isset($settings['
custombutton1_member']) && $settings['custombutton1_member']==true){
               // it is, check if guest
               if($context['
user']['is_logged']){
                  // member, check if its not empty...
                  if(isset($settings['
custombutton1']) && !empty($settings['custombutton1']) && isset($settings['custombutton1_link']) && !empty($settings['custombutton1_link']))
                     echo '
<td><a href="'. $settings['custombutton1_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton1'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
               }
           }
           else{
                  // guests too, check if its not empty...
                  if(isset($settings['
custombutton1']) && !empty($settings['custombutton1']) && isset($settings['custombutton1_link']) && !empty($settings['custombutton1_link']))
                     echo '
<td><a href="'. $settings['custombutton1_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton1'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
           }
      }
      // second button...is it on?
      if(isset($settings['
custombutton2_use'])  && $settings['custombutton2_use']==true){
         // is it memberonly?
           if(isset($settings['
custombutton2_member']) && $settings['custombutton2_member']==true){
               // it is, check if guest
               if($context['
user']['is_logged']){
                  // member, check if its not empty...
                  if(isset($settings['
custombutton2']) && !empty($settings['custombutton2']) && isset($settings['custombutton2_link']) && !empty($settings['custombutton2_link']))
                     echo '
<td><a href="'. $settings['custombutton2_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton2'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
               }
           }
           else{
                  // guests too, check if its not empty...
                  if(isset($settings['
custombutton2']) && !empty($settings['custombutton2']) && isset($settings['custombutton2_link']) && !empty($settings['custombutton2_link']))
                     echo '
<td><a href="'. $settings['custombutton2_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton2'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
           }
      }
      // third button...is it on?
      if(isset($settings['
custombutton3_use'])  && $settings['custombutton3_use']==true){
         // is it memberonly?
           if(isset($settings['
custombutton3_member']) && $settings['custombutton3_member']==true){
               // it is, check if guest
               if($context['
user']['is_logged']){
                  // member, check if its not empty...
                  if(isset($settings['
custombutton3']) && !empty($settings['custombutton3']) && isset($settings['custombutton3_link']) && !empty($settings['custombutton3_link']))
                     echo '
<td><a href="'. $settings['custombutton3_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton3'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
               }
           }
           else{
                  // guests too, check if its not empty...
                  if(isset($settings['
custombutton3']) && !empty($settings['custombutton3']) && isset($settings['custombutton3_link']) && !empty($settings['custombutton3_link']))
                     echo '
<td><a href="'. $settings['custombutton3_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton3'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
           }
      }


      echo '
<td><img src="' . $settings['images_url'] . '/pod/'.$options['theme_color'].'/pod-rightbar.gif" alt="gfx" style="margin: 0px 0;" border="0" />';

}
// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = '
top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

if (empty($button_strip))
return '';

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['
test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '
<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';

$button_strip[$key] = $buttons[$key];
}

echo '
<td ', $custom_td, '>', implode($context['menu_separator'], $button_strip) , '</td>';
}

?>


[SiNaN]

Find:

        echo '<td><a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 0px 0;" border="0" />' : $txt[103]), '</a></td>';

Replace:

        echo '<td><a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 0px 0;" border="0" />' : $txt[103]), '</a></td>';
        echo '<td><a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="' . $txt['sp-forum'] . '" style="margin: 0px 0;" border="0" />' : $txt['sp-forum']), '</a></td>';


You should have a forum.gif image if you are using images on menu.
Former SMF Core Developer | My Mods | SimplePortal

Malke

Quote from: [SiNaN] on August 21, 2008, 03:50:20 PM
What's your browser? Can you link to your forum?

I use Firefox but I also checked it in IE. The screenshot is from IE but it looks the same in both.

The site is down for mainentance at the moment... Since I see that you are online right now I'll open it. Please let me know when you've seen it. It's www.deathrizzo.com.

Thanks for the quick reply! And good job with the portal!

tuguex

Quote from: [SiNaN] on August 21, 2008, 05:46:57 PM
Find:

        echo '<td><a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 0px 0;" border="0" />' : $txt[103]), '</a></td>';

Replace:

        echo '<td><a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 0px 0;" border="0" />' : $txt[103]), '</a></td>';
        echo '<td><a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="' . $txt['sp-forum'] . '" style="margin: 0px 0;" border="0" />' : $txt['sp-forum']), '</a></td>';


You should have a forum.gif image if you are using images on menu.

Thank's XD


[SiNaN]

Malke:

I cannot see the site right now, probably related to a problem with my connection. But I think I've found the bug:

../Themes/default/SPortal.template.php

Find:

<td style="padding: 5px;"colspan="2">';

Replace:

<td style="padding: 5px;" colspan="2">';

Find:

<div class="post">', !empty($article['category']['picture']['href']) ? '<div><img src="' . $article['category']['picture']['href'] . '" alt="' . $article['category']['name'] . '" width="90" align="right" /></div>' : '', $article['message']['body'], '<br/><br/>
</div>
</tr>


Replace:

<div class="post">', !empty($article['category']['picture']['href']) ? '<div><img src="' . $article['category']['picture']['href'] . '" alt="' . $article['category']['name'] . '" width="90" align="right" /></div>' : '', $article['message']['body'], '<br/><br/>
</div>
</td>
</tr>


This should fix it. Confirmed XHTML bug, thanks for the report. :)

tuguex:

You're always welcome. :)

Former SMF Core Developer | My Mods | SimplePortal

runebergen

#1138
Since you guys are working on maybe getting Simple Portal boxes on regular forum pages too, I've been going mad about how to use it  :D it will be phenomenal if implemented...

when thinking about it, I thought of something that might be cool... if possible, and wanted from the developers..

How about a random block that would rotate either between a given set of block that the user have choosen to add to "random", or just take any user activated block that has same position...

the idea is that say on top of forum page there would be a random block giving some cool info at each page visit...
(but such a random box could of course also be used at the Simple Portals front page, to make the content boxes change content at each visit)


such as

- Top Poster today
- New member today
- Todays birthday
- Most popular thread today
- Missing in Action - Longest away that returned today
- Best score on Arcade today
- Most friendly today (most added new buddies)
- Most loved today (most requested person for buddies)

etc etc...  could be any thing from fun facts, to plain stats :)

What ever the user wants to display :) I'm a fan of the "odd stories" from whats going on today at the communitu..  Funny stats, etc

(the functions would of course be user made boxes, that is the code within.. not asking for code for all those functions, but basically just a rotator function that will pick a random box, and display it at page load )


And other fun "stories" that might spice up the forum visit :)

Not only would it be fun, but it would also make Simple Portal DYNAMIC... as it would add the possibility to not show static boxes, but also dynamic generated ones (or random ones really).

:)





[SiNaN]

#1139
First of all thanks for detailed feature requests, I love them. But the problem is, we first should complete all the base functions for the portal before enhancing it. The only thing left is the forum-independent articles. Then we can start considering such functions.

Actually PHP blocks are making the portal dynamic enough. Let me give an example for random block:

<?php
// Birthdays function
function birthdays()
{
echo 'birthdays';
}

// Holidays function
function holidays()
{
echo 'holidays';
}

// Events function
function events()
{
echo 'events';
}

// Put all functions in an array
$functions = array('birthdays', 'holidays', 'events');

// Call a random function
$functions[rand(0,2)]();
?>


I hope it is simple and clear. :)
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: