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

Game.ruler

thanks a lot underdog, it just worked fine.
Please can you tell me 1 more thing, if there is any way to show only shoutbox in mobile theme, not other blocks?

PokémonS

Using SimplePortal 2.3.5

Hi, about shoutbox, where can I find the whisper (private chat) code?
I want to change whisper's shouttext to italicized.
きみと手をつなごう つらいときはもっと
ゼロからはじめよう ほら ほら 手をつなごう
みんな手をつなごう つらいときはもっと
力を合わせよう ほら ほら 手をつなごう

Chen Zhen


Game.ruler,

  That will require you to perform 2 edits & revert the previous edit I gave you to its default.

First change the previous edit back to its original default configuration.

File: Sources/Subs-Portal.php

find:

function sportal_init($standalone = false)
{
global $context, $sourcedir, $scripturl, $modSettings, $txt;
global $settings, $options, $boarddir, $maintenance, $sportal_version;


Replace with:

function sportal_init($standalone = false)
{
global $context, $sourcedir, $scripturl, $modSettings, $txt;
global $settings, $options, $boarddir, $maintenance, $sportal_version;

if ($settings['name'] == 'Core Theme')
$modSettings['sp_portal_mode'] = 2;





Find:

$blocks = getBlockInfo(null, null, true, true, true);
$context['SPortal']['blocks'] = array();
foreach ($blocks as $block)
{
if (!$context['SPortal']['sides'][$block['column']]['active'])
continue;


Replace with:

$blocks = getBlockInfo(null, null, true, true, true);
$context['SPortal']['blocks'] = array();
foreach ($blocks as $block)
{
if ($block['type'] != 'sp_shoutbox' && $settings['name'] == 'Core Theme')
continue;
elseif (!$context['SPortal']['sides'][$block['column']]['active'])
continue;





The above will disable the home portal page & only allow shoutbox block(s) to function elsewhere on your forum while using the Core theme. The portal will function normally for all other theme's.


My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Chen Zhen


PokémonS,

  Hmm.. Try this edit..

File: Sources/Subs-Portal.php

find:

foreach ($shouts as $shout)
{
if (preg_match('~^@(.+?): ~' . ($context['utf8'] ? 'u' : ''), $shout['text'], $target) && $smcFunc['strtolower']($target[1]) !== $smcFunc['strtolower']($user_info['name']) && $shout['author']['id'] != $user_info['id'] && !$user_info['is_admin'])
{
unset($shouts[$shout['id']]);
continue;
}


Replace with:

foreach ($shouts as $shout)
{
if (preg_match('~^@(.+?): ~' . ($context['utf8'] ? 'u' : ''), $shout['text'], $target) && $smcFunc['strtolower']($target[1]) !== $smcFunc['strtolower']($user_info['name']) && $shout['author']['id'] != $user_info['id'] && !$user_info['is_admin'])
{
unset($shouts[$shout['id']]);
continue;
}
elseif (preg_match('~^@(.+?): ~' . ($context['utf8'] ? 'u' : ''), $shout['text'], $target))
$shouts[$shout['id']]['text'] = '<i>' . $shouts[$shout['id']]['text'] . '</i>';


My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Chen Zhen

Quote from: blunted on November 12, 2012, 10:31:15 PM
was wondering if there is a way to change the structure of the link feature in shout box, for some reason my link referral protection only works 1/2 the time so i hoped to hard code the call in.

thank you

blunted,

File: Themes/default/PortalShoutbox.template.php

find:

if ($context['can_shout'])
echo '
<div class="shoutbox_input smalltext">
<input type="text" name="new_shout" id="new_shout_', $shoutbox['id'], '" class="shoutbox_input sp_float_left input_text"', $context['browser']['is_ie'] ? ' onkeypress="if (sp_catch_enter(event)) { sp_submit_shout(' . $shoutbox['id'] . ', \'' . $context['session_var'] . '\', \'' . $context['session_id'] . '\'); return false; }"' : '', ' />
<input type="submit" name="submit_shout" value="', $txt['sp_shoutbox_button'], '" class="sp_float_right button_submit" onclick="sp_submit_shout(', $shoutbox['id'], ', \'', $context['session_var'], '\', \'', $context['session_id'], '\'); return false;" />
</div>';


The second input is the shout button.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Game.ruler

-Underdog- You are the hero sir. This just worked perfectly again.
Thanks a lot for helping me. You r really genius.

PokémonS

Thanks -Underdog-, I edited some code and it works perfectly :D

きみと手をつなごう つらいときはもっと
ゼロからはじめよう ほら ほら 手をつなごう
みんな手をつなごう つらいときはもっと
力を合わせよう ほら ほら 手をつなごう

PokémonS

New problem, every week I got this error:

[11-Nov-2012 19:20:21 Asia/Jakarta] PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 10021050 bytes) in /home/pokemons/public_html/forum/Sources/Subs-Portal.php on line 755
[18-Nov-2012 07:14:29 Asia/Jakarta] PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 10021050 bytes) in /home/pokemons/public_html/forum/Sources/Subs-Portal.php on line 755


Subs-Portal.php Line 755
tourniquet = str_replace($finds, $replaces, $tourniquet);

From
function sp_query_string($tourniquet)
{
global $sportal_version, $context, $modSettings;

$fix = str_replace('{version}', $sportal_version, '<a href="http://www.simpleportal.net/" target="_blank" class="new_win">SimplePortal {version} &copy; 2008-2012, SimplePortal</a>');

if ((SMF == 'SSI' && empty($context['standalone'])) || empty($context['template_layers']) || WIRELESS || empty($modSettings['sp_portal_mode']) || strpos($tourniquet, $fix) !== false)
return $tourniquet;

$finds = array(
', Simple Machines LLC</a>',
', <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a>',
'class="copywrite"',
'class="copyright"',
);
$replaces = array(
', Simple Machines LLC</a><br />' . $fix,
', <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a><br />' . $fix,
'class="copywrite" style="line-height: 1em;"',
'class="copyright" style="line-height: 1.5em;"',
);

$tourniquet = str_replace($finds, $replaces, $tourniquet);

if (strpos($tourniquet, $fix) === false)
{
$fix = '<div style="text-align: center; width: 100%; font-size: x-small; margin-bottom: 5px;">' . $fix . '</div></body></html>';
$tourniquet = preg_replace('~</body>\s*</html>~', $fix, $tourniquet);
}

return $tourniquet;
}


Before this problem, I solved other problem with this method: http://www.simplemachines.org/community/index.php?topic=423482.msg2969724#msg2969724
きみと手をつなごう つらいときはもっと
ゼロからはじめよう ほら ほら 手をつなごう
みんな手をつなごう つらいときはもっと
力を合わせよう ほら ほら 手をつなごう

Game.ruler

Hi underdog, there is one more problem. Is there any way to make shoutbox block visible in header in mobile theme, and visible in left in pc theme.
Because in mobile theme due to only 1 shoutbox block in left looks odd. If it can be visible in header then it will be best.

Game.ruler

Please anyone tell me how to make footer copyright texts in only 1 single line.
Currently there are 4 lines of copyright.
1st for simplemachines, 2nd for simple portal, 3rd for xhtml rss wap2, and 4th for theme copyright.
i am able to make all in single line except simple portal line. I am not able to find it any of the php files.
Please help.

Howard43Willard

#4670
the same block's to side by side, mmm... centered like this






jeff2081

I am getting error:

Duplicate column name 'member_name'
File: ......install2.php

I was using 2.3.2 before and have completely uninstalled it before installing 2.3.5

Help would be appreciated? Thanks.

SD-X

Is SimplePortal 2.3.5 compatible with SMF 2.0.3? I don't see why not, since it worked fine in SMF 2.0.2, but I want to be sure before I go and update. :P

Zuća

Quote from: SugarD-x on December 17, 2012, 01:38:47 PM
Is SimplePortal 2.3.5 compatible with SMF 2.0.3? I don't see why not, since it worked fine in SMF 2.0.2, but I want to be sure before I go and update. :P

it works perfectly on smf 2.0.3

SD-X

Quote from: Zuća on December 18, 2012, 08:39:53 PM
Quote from: SugarD-x on December 17, 2012, 01:38:47 PM
Is SimplePortal 2.3.5 compatible with SMF 2.0.3? I don't see why not, since it worked fine in SMF 2.0.2, but I want to be sure before I go and update. :P

it works perfectly on smf 2.0.3
Awesome, thank you!

BCK

once i installed smf forum and added simple portal..i need to put /smf at end of url..after the .com   how can i get it to work without the /smf...so people can just use the url.com not url.com/smf       

thx in advance

NanoSector

Quote from: BCK on December 20, 2012, 09:05:04 AM
once i installed smf forum and added simple portal..i need to put /smf at end of url..after the .com   how can i get it to work without the /smf...so people can just use the url.com not url.com/smf       

thx in advance
Please move your forum files and run repair_settings.php.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

BCK

move forum files..please explain...what files..where etc..

SD-X

Quote from: BCK on December 20, 2012, 02:38:13 PM
move forum files..please explain...what files..where etc..
Move all of your forum's files to the new directory where you want them, and then run that file he mentioned.

For example, if your forum is at http://www.example.com/smf/, and you want it at http://www.example.com/, then you would move your files there, and run http://www.example.com/repair_settings.php.

Baloch

Hello there,

Yesturday I have upgraded smf but today I got Database and forum's version difference error so as per suggestion I have installed LARGE UPGRADE but before that uninstalled all modules.
After successful upgrade I have re-installed all modules but as I clicked to install Simple Portal it ask me to enter information of FTP USER ID and password.
As I clicked on proceed it generated 500 internal server error.
My hosting company said that SP require writable permission while its not allowed from hosting company. so they advice me to do this installation manually.
Here is the reply of my hosting company.

QuotePlease accept our apologies for the delay. First of all, please note that we do not provide support with the installation of 3rd party software as well as do not provide support with the tracing/debugging/coding/analyzing of 3rd part scripts/software.
However, we have checked the issue you have encountered more closely. Its main reason is that the installation of your 3rd party software requires that some folder should has a writable permissions. But the server your account is hosted on does not allow to execute scripts from folders which do not have 755 permissions and the scripts which do not have 644 permissions. It depends on the global sever configuration and this can not be changed at all.
We recommend you to contact the developers of your 3rd party scripts/software and consult with them whether you are able to install your scripts manually e.g. by copying them to the related folders, etc.
We hope this information will be useful for you.
please advice how to do that.

Looking forward
Raji

Advertisement: