SimplePortal

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

Previous topic - Next topic

WantSome

Hiya!

I'm getting the following error when I try to create a Top Member Stats block.  I'm trying to exclude inactive members, and this error pops up:

QuoteUnknown column 'lastLogin' in 'where clause'
File: /forum/Sources/PortalBlocks.php
Line: 899
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.2, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.

I went to look at PortalBlocks.php, and compared it to the one I have on my test forum (which works).  They seem the same.  To be safe, I uploaded a fresh version of the portalblocks.php from the official download but I'm still getting the above error.

If I don't try to limit the inactive users then I don't get this error, so I figure it has to be something to do with the lastlogin time, although I am not sure.

I should mention I'm on smf 2.0.2 and using simpleportal version 2.3.5.  I also don't think it's to do with my database version like the error message implies, but I need advice!

Is there any way to fix this?

perfec2

I want to put html text that I will like to display in board index only not repeating in all pages in that board e.g in introduction board, I write description and don't want that same description to be repeated in next page etc but only in board index when clicked introduction board to avoid duplication of same text. 
What would I put in "Custom Display Options"? 

johnpaul2k2

is there any way to edit any of my block to contain 4 or 6 or 8 or more small adverts like this

Angelina Belle

@WantSome -- what statement is on line 899 of your portalblocks.php?

@Baloch -- many users have encountered this problem when installing Simple Portal and other large mods on certain hosts.
The problem  is related to how SMF attempts to install the mods.  If it encounters a problem writing the directories, it will set the permissions "more permissive" until it thinks it has succeeded.

It should be possible to fix the problem by setting permission to 755 on directories and 644 on files, then doing the install.
At this point, all required files and directories should be writable by the SMF package manager, and it should not try to reset permissions.
The only remaining directory which MIGHT give a problem at this point MIGHT BE the "temp" directory.  For more information, please see
http://simpleportal.net/index.php?action=docs;area=solving_install_problems

@johnpaul -- yes.  It all depends on where your ads come from.
The simplest answer is -- use an HTML block to include the ad code.
Use a table to get them laid out properly.

If some php is required, you will need a php block.  Of course, that means using php to construct your HTML.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

PokémonS

Hi, I am still using SimplePortal 2.3.5 + SMF 2.0.2.

Now, I have a problem, users can chat in shoutboxes, but can`t delete their chat D:
きみと手をつなごう つらいときはもっと
ゼロからはじめよう ほら ほら 手をつなごう
みんな手をつなごう つらいときはもっと
力を合わせよう ほら ほら 手をつなごう

NanoSector

Hey PokemonS,

I don't know if there are permissions for the shoutbox in SP, but please try to check the permissions of your users or the settings of the shoutbox block.
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."

PokémonS

#4686
I have checked all the permissions and shoutboxes settings, but there are no permission like that D:

I make a new clean shoutbox but users still cannot delete their chat D:
きみと手をつなごう つらいときはもっと
ゼロからはじめよう ほら ほら 手をつなごう
みんな手をつなごう つらいときはもっと
力を合わせよう ほら ほら 手をつなごう

LOVELORD

I have problem with pages and blocks.. When I use HTML page or block... i cant post whole page... It have limited number of characters... SO can you tell me how to fix this?

Angelina Belle

The HTML block and HTML page was never envisioned to be used for really huge HTML content.

There are two ways to approach this, though.
1) Change the size of the field on the table (please search simpleportal.net for more information on this)
2) or else, store the contents (no html, head, or body tag) of the page in a file within your site, and use php or html to include the file.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

LOVELORD

I cant find on simpleportal.net website.. I cant use php block, becouse i have few flash players and they have ' and ; caracters and that make a lot of problem. just html work

Angelina Belle

I used a google search like this: https://www.google.com/search?q=site%3Asimpleportal.net+html+page+limit

The top returned result is: http://simpleportal.net/index.php?topic=3418.0
There are other possible solutions, but this one is easy to find and easy to understand.

Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

SD-X

Quote from: LOVELORD on January 07, 2013, 04:13:21 PM
I cant find on simpleportal.net website.. I cant use php block, becouse i have few flash players and they have ' and ; caracters and that make a lot of problem. just html work
Depending on the language used, sometimes you can switch between ' and " in HTML+PHP code to prevent conflicts.

LOVELORD

Quote from: SugarD-x on January 07, 2013, 04:38:52 PM
Quote from: LOVELORD on January 07, 2013, 04:13:21 PM
I cant find on simpleportal.net website.. I cant use php block, becouse i have few flash players and they have ' and ; caracters and that make a lot of problem. just html work
Depending on the language used, sometimes you can switch between ' and " in HTML+PHP code to prevent conflicts.

I use this code

<object data="http://www.domain.com/player/player_mp3_maxi.swf" type="application/x-shockwave-flash" width="200" height="20" align="middle">
    <param name="movie" value="http://www.domain.com/player/player_mp3_maxi.swf" />
    <param name="bgcolor" value="#ffffff" />
    <param name="FlashVars" value="mp3=http%3A//www.domain.com/lista/2012/50.mp3&amp;showvolume=1" />
</object>


And that makes conflict in php... ANd I dont now how to use that in php. I have over 50 players on my website, plus chart top list, and then page is broken. I dont know how to fix this problem. First i want to make custom action page, and this flash player make me problems. Then i try use simplepage html page.

SD-X

Quote from: LOVELORD on January 07, 2013, 04:44:24 PM
Quote from: SugarD-x on January 07, 2013, 04:38:52 PM
Quote from: LOVELORD on January 07, 2013, 04:13:21 PM
I cant find on simpleportal.net website.. I cant use php block, becouse i have few flash players and they have ' and ; caracters and that make a lot of problem. just html work
Depending on the language used, sometimes you can switch between ' and " in HTML+PHP code to prevent conflicts.

I use this code

<object data="http://www.domain.com/player/player_mp3_maxi.swf" type="application/x-shockwave-flash" width="200" height="20" align="middle">
    <param name="movie" value="http://www.domain.com/player/player_mp3_maxi.swf" />
    <param name="bgcolor" value="#ffffff" />
    <param name="FlashVars" value="mp3=http%3A//www.domain.com/lista/2012/50.mp3&amp;showvolume=1" />
</object>


And that makes conflict in php... ANd I dont now how to use that in php. I have over 50 players on my website, plus chart top list, and then page is broken. I dont know how to fix this problem. First i want to make custom action page, and this flash player make me problems. Then i try use simplepage html page.
A lot of times in PHP pages which contain HTML code, they will use an echo statement, which starts off using " and ends the HTML code with the same thing, to differentiate between languages. If the HTML within those characters contains the same characters, it will bug everything. Try switching all of the " to ' in that code you showed me, and see if it helps.

haryour

Can someone help on how to let simpleportal blocks show on SMF Gallery without using "allaction"?

Angelina Belle

What does a typical URL look like when looking at SMF Gallery pages?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

teos55

#4696
smf 2.0.3  default theme curve simple portal 2:3.5

After enabling " Top member stats"

Receiving :

http://m y s i te /index.php?
DB error: Unknown column 'lastLogin' in 'where clause'
File: /home/myuser/public_html/Sources/PortalBlocks.php
Satır: 899



code in portalblocks.php   882-889

// Okay load the data :D
$request = $smcFunc['db_query']('', '
SELECT
mem.id_member, mem.real_name, mem.avatar,
a.id_attach, a.attachment_type, a.filename,
{raw:field}
FROM {db_prefix}members as mem
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
{raw:where}
ORDER BY {raw:order} {raw:sort}
LIMIT {int:limit}', array(
'limit' => $context['common_stats']['total_members'] > 100 ? ($limit + 5) : $limit, // Prevent delete of user if the cache is avaible :D
'field' => $current_system['field'],
'where' => $where,
'order' => $current_system['order'],
'sort' => ($sort_asc ? 'ASC' : 'DESC'),
)
);



Any guidance ?

nb.   Looked through the DB. The table entry is "last_login"


lines  867-880
// Last active remove
if (!empty($last_active_limit))
{
$timeLimit = time() - $last_active_limit;
$where[] = "lastLogin > $timeLimit";
}
if (!empty($current_system['where']))
$where[] = $current_system['where'];

if (!empty($where))
$where = 'WHERE (' . implode(')
AND (', $where) . ')';
else
$where = "";




  Is this the same symptom, should I change "lastlogin" to "last_login"   ?
http://simpleportal.net/index.php?topic=11531.msg59051#msg59051


SOLVED :-)

The answer is YES  "lastlogin" should be changed to "last_login" in portalblocks.php

LOVELORD

Anybody know how to fix this:

I install Simple portal, and ater registration or login users are redirected to forum board, but i want to redirect users to portal, not to http://www.mydomain.com/index.php?action=forum i want to redirect user to index.php page... I look into register and loginbut i cant find solution for this.

teos55

Do you mean ...


Simple portal --> General settings --> Portal mode   ( 3 options there  Portal, integrated and standalone )

LOVELORD

Quote from: teos55 on January 12, 2013, 09:27:59 AM
Do you mean ...


Simple portal --> General settings --> Portal mode   ( 3 options there  Portal, integrated and standalone )

When I chose other portal mode then Portal  I dont have portal...

Advertisement: