News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SimplePortal

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

Previous topic - Next topic

noelchiew

#2240
Mystery solved! I was just tinkering around on my own I just found this out... if I were to enable the portal (while in maintenance mode as I don't want my members to use it yet), the images are all appearing. When I set it back to disable, the images are gone again. So I guess this is more of a bug?

Also after doing the above, all the errors don't appear anymore except for this:

Guest
Undefined index: cannot_sp_moderate
File: ...forum/Sources/Security.php
Line: 764

Which I found out to be Google when I checked the IP as I was curious why a guest would be causing this error. I don't think anything can be done about Google, I too get other errors from Google, I think it is just crawling the web? Maybe this 'bug' will be taken care of in the next version of SP? :)

Thanks for the help, appreciate it!

[SiNaN]

lorenzone92:

It should be something like this:


<meta name="description" content="';

if (!empty($context['standalone']))
echo 'This is the description of the portal';
else
echo 'This is the description of the forum';

echo '" />


noelchiew:

It is kind of bug. But you wouldn't use portal when it is disabled. So some functions are not loaded. When you are working on portal and you don't want others to see it, just turn on the portal maintenance and it should be fine.

For the error; are you constantly getting this error?
Former SMF Core Developer | My Mods | SimplePortal

noelchiew

At the moment, portal is now in maintenance mod and I still get errors from 'guests' and when I traced the IP I found them out to be from Google, Microsoft, Yahoo... are these just crawling the web for the web search engines?

http://ws.arin.net/whois/?queryinput=66.249.68.11
http://ws.arin.net/whois/?queryinput=65.55.208.82
http://ws.arin.net/whois/?queryinput=65.55.109.121
http://ws.arin.net/whois/?queryinput=72.30.142.254
http://ws.arin.net/whois/?queryinput=65.55.208.83


I checked my error log again and I am still getting these errors:
When a member views the who's online page:
Undefined index: portal_url
File: /home/cravchi7/public_html/forum/Themes/default/Who.template.php (eval?)
Line: 86

When a member views a member's profile page:
Undefined index: portal_url
File: /home/cravchi7/public_html/forum/Themes/default/Profile.template.php (eval?)
Line: 86

Are these 2 errors actually bugs that happens when the portal is in maintenance mode?

[SiNaN]

I see. As they won't be able to see the portal, similarly some things are not loaded for them. You can ignore those errors as they won't cause any issues. Once you finish customizing your portal, just clear you error log and you should be fine. This will be fixed with the release which will be out soon.
Former SMF Core Developer | My Mods | SimplePortal

noelchiew


MultiformeIngegno

Quote from: [SiNaN] on May 29, 2009, 04:17:19 AM
lorenzone92:

It should be something like this:


<meta name="description" content="';

if (!empty($context['standalone']))
echo 'This is the description of the portal';
else
echo 'This is the description of the forum';

echo '" />

Yeeaah!!! It works!! ..and you rock!! :D

Now.. another thing.. :P

How can I change the forum name to have something like this:
In forum display "Forum Name", in Portal "Forum Portal"...

I think that the code to edit is this:

<h1>';

if (empty($settings['header_logo_url']))
echo $context['forum_name_html_safe'];
else
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name_html_safe'], '" />';

echo '
</h1>


...but I don't know how to add the if (!empty($context['standalone'])) condition, 'cause it already has "if"...
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

[SiNaN]

Code (Find) Select
   if (empty($settings['header_logo_url']))
      echo $context['forum_name_html_safe'];


Code (Replace) Select
   if (empty($settings['header_logo_url']))
      echo empty($context['standalone']) ? $context['forum_name_html_safe'] : 'Forum Portal';
Former SMF Core Developer | My Mods | SimplePortal

MultiformeIngegno

Thanks!! :D

Now I'm trying to have.. for example.. an about page as in your site: http://simpleportal.net/index.php?action=about
But... not as an action (?action=about) but in an external file (example: about.html)...

Is it possible?
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

[SiNaN]

You could create a page with SSI. A sample code:

<?php

require_once('path/to/SSI.php');

obExit(true);

function
template_main()
{
echo 'Hello! I\'m some HTML code!';
}

?>
Former SMF Core Developer | My Mods | SimplePortal

TheListener

How do I add some colour to the main html welcome block?


MultiformeIngegno

#2250
Quote from: TheListener on May 30, 2009, 08:53:57 AM
How do I add some colour to the main html welcome block?
If you are in "Standalone" mode, open index.template.php, find the part you want to modify and add
if (!empty($context['standalone']))
   echo '<span style="something">YOUR COLOURED TEXT</span>';
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

[SiNaN]

Quote from: TheListener on May 30, 2009, 08:53:57 AM
How do I add some colour to the main html welcome block?

This is my uncolored text.

<span style="color: red;">Now this text is colored red. ;D</span>
Former SMF Core Developer | My Mods | SimplePortal

MultiformeIngegno

Quote from: [SiNaN] on May 30, 2009, 08:39:27 AM
You could create a page with SSI. A sample code:

<?php

require_once('path/to/SSI.php');

obExit(true);

function
template_main()
{
echo 'Hello! I\'m some HTML code!';
}

?>

Ook! :)
And how can I add a condition... example... how can I create something like this: if (!empty($context['aboutpage'])) to use in index.template.php...?
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

[SiNaN]

Code (Find) Select
obExit(true);

Code (Replace) Select
$context['aboutpage'] = true;

obExit(true);
Former SMF Core Developer | My Mods | SimplePortal

MultiformeIngegno

Ook!! :D
And how can I modify the "active button"? the page shows the "forum" button as active, how can I change it - for instance - to the "search" button (and show it as active)?
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

[SiNaN]

Code (Find) Select
require_once('path/to/SSI.php');

Code (Replace) Select
$_GET['action'] = 'search';

require_once('path/to/SSI.php');
Former SMF Core Developer | My Mods | SimplePortal

MultiformeIngegno

How can I add 2 conditions here:

if (empty($settings['header_logo_url']))
echo empty($context['standalone']) ? $context['forum_name_html_safe'] : 'RockCiclopedia';
else
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name_html_safe'], '" />';

... to have the name "About - RockCiclopedia" for the 'aboutpage'...? I tried with this but it duplicates the names...:

if (empty($settings['header_logo_url']))
echo empty($context['standalone']) ? $context['forum_name_html_safe'] : 'RockCiclopedia';
if (empty($settings['header_logo_url']))
echo empty($context['aboutpage']) ? $context['forum_name_html_safe'] : 'About - RockCiclopedia';
else
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name_html_safe'], '" />';


Unfortunately I'm not so expert with the syntax.. :(

Really thanks for all the replies your giving to me!! :)

P.S.:
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

[SiNaN]

Code (Find) Select

if (empty($settings['header_logo_url']))
echo empty($context['standalone']) ? $context['forum_name_html_safe'] : 'RockCiclopedia';
else
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name_html_safe'], '" />';


Code (Replace) Select
if (empty($settings['header_logo_url']))
{
if (!empty($context['standalone']))
echo 'RockCiclopedia';
elseif (!empty($context['aboutpage']))
echo 'About - RockCiclopedia';
else
echo $context['forum_name_html_safe'];
}
else
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name_html_safe'], '" />';


For further coding support, visit SMF Coding Discussion board.
Former SMF Core Developer | My Mods | SimplePortal

mrbolsonator

I am having a problem trying to remove a picture from all the articles. I am not very good with coding and cannot figure out how to delete it. Can anyone help?

www.fuelcrazyamerica.com

[SiNaN]

Which picture are you trying to remove? If you mean the category image, just edit the category and delete image URL in the picture URL text box.
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: