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: 238
  • 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]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Complete forum index being showed in Portal.(?)  (Read 6574 times)

0 Members and 1 Guest are viewing this topic.

Offline patalete

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1-1
  • SP Version: 2.2.2
Complete forum index being showed in Portal.(?)
« on: October 18, 2009, 05:48:54 PM »
This is kinda weirdo...

We were running SMF RC 1.2 with SP 2.2.2 without problems and errors.

Today we went through the update to SP 2.3.1 so we uninstalled 2.2.2 first, cleanup some missing lines from index.php to allow forum work as regular SMF.

Installed SP 2.3.1 with some lines error at installation..

exactly at ./sources/subs.php
Find
Code: [Select]
// Action and board are both empty... BoardIndex!Replace
Code: [Select]
// Go catch it boy! Catch it!
$sp_action = sportal_catch_action();
if ($sp_action)
return $sp_action;

// Action and board are both empty... BoardIndex!


That lines couldnt be added with pacakge installer and cant find a place to add them manually.

After installation now the  Portal is showing the blocks as usual but now between the articles and the footer, it is showing the complete "forum" index layout making the portal page awfull large and long..

We never had that layout before with 2.2.2 and it seems there are no option to enable/disable that behaviour so I assume is something worng/missing in index.php  itself...

Here you can see the site, thepsyfamily.net, basically we just want the portal (Home) with the articles and blocks but not with the whole forum showing there below articles...
Im at a dead point now so where to look now in order to fix it?

Also we are getting some error in logs like
Code: [Select]
: Undefined index: sp-make_article

File: html/forum/Themes/psythemev1/Display.template.php (main sub template - eval?)
Line: 648

or

Code: [Select]
8: Undefined index: can_make_article

File: /html/forum/Themes/psythemev1/Display.template.php (main sub template - eval?)
Line: 130

thanks

Offline Norv

  • Comrade
  • *
  • Posts: 30
  • SP Version: None
Re: Complete forum index being showed in Portal.(?)
« Reply #1 on: October 18, 2009, 06:03:50 PM »

Installed SP 2.3.1 with some lines error at installation..

exactly at ./sources/subs.php
Find
Code: [Select]
// Action and board are both empty... BoardIndex!Replace
Code: [Select]
// Go catch it boy! Catch it!
$sp_action = sportal_catch_action();
if ($sp_action)
return $sp_action;

// Action and board are both empty... BoardIndex!


That lines couldnt be added with pacakge installer and cant find a place to add them manually.


Note that the code above cannot be found in Subs.php, but instead, in index.php from the forum directory.
Please open index.php from the forum directory and replace manually the lines as exactly you say above.

Offline patalete

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1-1
  • SP Version: 2.2.2
Re: Complete forum index being showed in Portal.(?)
« Reply #2 on: October 18, 2009, 06:39:24 PM »
yeah thats right,
but where are supposed those lines to be added...cause the reference line its not present in our index.php

and any idea about the other errors codes? most of them are happening with guests...

---edit---

Found the place from older backups...now it seems to be working...
will keep an eye on it and check for errors.

thanks

btw simplemachines package parser says SP 2.3.1 its not compatible with RC1.2 when tryin to execute it in order to see the code changes.
« Last Edit: October 18, 2009, 06:51:30 PM by patalete »

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Complete forum index being showed in Portal.(?)
« Reply #3 on: October 19, 2009, 01:40:30 AM »
Did you manage to resolve all the errors?

btw simplemachines package parser says SP 2.3.1 its not compatible with RC1.2 when tryin to execute it in order to see the code changes.

Unfortunately the SMF customization site uses a version of the package version detection function (from the SMF 2RC2 Charter Release) that has some issues, so it won't parse SP 2.3.1 (or 2.3) for SMF 2RC1.2, despite the fact that SimplePortal installs fine for SMF 2RC1.2.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline patalete

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1-1
  • SP Version: 2.2.2
Re: Complete forum index being showed in Portal.(?)
« Reply #4 on: October 19, 2009, 10:09:33 AM »
I see you guys are aware of that issue. :)

About the undefinex errors  there have been like 12hrs since last one appeared in logs. so by now seems to be running Ok.

now derrailing... how its supposed I can configure the layout of articles in portal? so it show articles from All categories based on posting dates and without grouping them by categories into blocks?

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Complete forum index being showed in Portal.(?)
« Reply #5 on: October 20, 2009, 04:21:20 AM »
now derrailing... how its supposed I can configure the layout of articles in portal? so it show articles from All categories based on posting dates and without grouping them by categories into blocks?

At the moment, doing that would require some hard-coded edits. Although the point of articles, is that you can choose which topics are articles and limit the number shown on the portal. So you should be able to have only the latest articles/news on the portal, either by restricting the number of articles that are shown, or by removing old articles (removing them as articles, not as topics).
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline patalete

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1-1
  • SP Version: 2.2.2
Re: Complete forum index being showed in Portal.(?)
« Reply #6 on: October 20, 2009, 05:22:15 AM »
Yep I understand the point of having them categorized and grouped together.

but when you browse a site you understand that the deeper you go scrolling the older the news are..

but in SP case..if You keep scrolling down you keep finding newer articles mixed with older ones....

Not all people always realize about the new articles in different categories.

This is my case I feel it not "natural" and people miss articles due think they have already read them all, seeing that the first one haven't changed but that maybe there is another one that is new into other category that its not showing up in the initial screen without scrolling down... ;P

Also as every category has its own custom Icon it makes it easy to identify whether that article belongs to in case of having all categories mixed and sorted only by date.

then I must request this feature to be available in future versions by default  ;D
If not a long and hard change in code could you point out how to do it?
 Im willing to try it if you can tell me how it would be..

something like,
Sort portal articles based on Date / Sort portal articles based on date & grouped by category.


thanks
« Last Edit: October 20, 2009, 05:24:44 AM by patalete »

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Complete forum index being showed in Portal.(?)
« Reply #7 on: October 20, 2009, 05:33:06 AM »
Hmm, okay I see what you mean.

Although each category can have its own custom image, so that should help people to know where each article comes from.

How would you want to group articles by category? Grouping by category and keeping them in the same list would make it confusing as old articles from a certain category would come before newer articles from a different category.

I think the best way to archieve what you want, would be to have separate lists, one for each category. Or something similar.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline patalete

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1-1
  • SP Version: 2.2.2
Re: Complete forum index being showed in Portal.(?)
« Reply #8 on: October 20, 2009, 01:03:56 PM »
dunno if I really explained myself what I had on mind, english is not my mother language.

lets try visually :P

say we have cataegories: A, B, C...
say the articles dates: 1,2,3,4... (bigger means newer)

so currently SP does this..

A4
A3
A2
A1
---
B3
B2
B1
---
C2
C1

so if you have set to show 3 articles per category you will be seeing 3x3=9 articles in 3 different blocks.

what I do would like to see is

A4
B4
C4
A3
C3
B3
C2
A2
B2
.....

so If I set a maximum of ..say..6 articles on portal..it will show only the 6 msot recent ones even if they belong to different categories..

Like any other regular blog style...all would be shown in portal  only one list.

so what really matters is the article date no matter the category as it will be visible with its own custom icon and maybe then if you click the category icon you will be lead to a new page with category articles also sorted by date from newer to older..

better now? :D

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Complete forum index being showed in Portal.(?)
« Reply #9 on: October 20, 2009, 10:33:49 PM »
I believe that the edit below does what you want, or at least its similar. Basically, you can set how many articles you want per page. The first page will show the latest 6 articles, the second page the next 6 articles, etc. On each page, the 6 relevant articles will be sorted by category.

Replace this code (sources/PortalArticles.php):
Code: [Select]
$article_request = $smcFunc['db_query']('','
SELECT
a.id_article, a.id_category, a.id_message, a.approved, c.name as cname, c.picture, m.id_member,
IFNULL(mem.real_name, m.poster_name) AS poster_name, m.icon, m.subject, m.body, m.poster_time,
m.smileys_enabled, t.id_topic, t.num_replies, t.num_views, t.locked, b.id_board, b.name as bname,
mem.avatar, at.id_attach, at.attachment_type, at.filename
FROM {db_prefix}sp_articles AS a
INNER JOIN {db_prefix}sp_categories AS c ON (c.id_category = a.id_category)
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = a.id_message)
INNER JOIN {db_prefix}topics AS t ON (t.id_first_msg = a.id_message)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_board)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}attachments AS at ON (at.id_member = mem.id_member)
WHERE {query_see_board}
AND a.approved = {int:approved}
AND publish = {int:publish}
ORDER BY a.id_message DESC' . (empty($modSettings['articleperpage']) ? '' : '
LIMIT {int:start}, {int:end}'),
array(
'approved' => 1,
'publish' => 1,
'start' => $context['start'],
'end' =>  $modSettings['articleperpage'],
)
);

With this code:
Code: [Select]
$article_id_request = $smcFunc['db_query']('','
SELECT
a.id_article
FROM {db_prefix}sp_articles AS a
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = a.id_message)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_board)
INNER JOIN {db_prefix}sp_categories AS c ON (c.id_category = a.id_category)
WHERE {query_see_board}
AND a.approved = {int:approved}
AND publish = {int:publish}
ORDER BY a.id_message DESC' . (empty($modSettings['articleperpage']) ? '' : '
LIMIT {int:start}, {int:end}'),
array(
'approved' => 1,
'publish' => 1,
'start' => $context['start'],
'end' =>  $modSettings['articleperpage'],
'guest' => 0,
)
);
$article_ids = array();
while($row = $smcFunc['db_fetch_assoc']($article_id_request))
$article_ids[] = $row['id_article'];
$smcFunc['db_free_result']($article_id_request);

$article_request = $smcFunc['db_query']('','
SELECT
a.id_article, a.id_category, a.id_message, a.approved, c.name as cname, c.picture, m.id_member,
IFNULL(mem.real_name, m.poster_name) AS poster_name, m.icon, m.subject, m.body, m.poster_time,
m.smileys_enabled, t.id_topic, t.num_replies, t.num_views, t.locked, b.id_board, b.name as bname,
mem.avatar, at.id_attach, at.attachment_type, at.filename
FROM {db_prefix}sp_articles AS a
INNER JOIN {db_prefix}sp_categories AS c ON (c.id_category = a.id_category)
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = a.id_message)
INNER JOIN {db_prefix}topics AS t ON (t.id_first_msg = a.id_message)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_board)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}attachments AS at ON (at.id_member = mem.id_member)
WHERE a.id_article IN ({array_int:articles})
ORDER BY a.id_category',
array(
'approved' => 1,
'publish' => 1,
'start' => $context['start'],
'end' =>  $modSettings['articleperpage'],
'articles' => $article_ids,
)
);
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline patalete

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1-1
  • SP Version: 2.2.2
Re: Complete forum index being showed in Portal.(?)
« Reply #10 on: October 21, 2009, 05:37:33 AM »
OMG so fast :D

Will be adding the changes later today and report back with results.

Thank you :)

---edit---

got some time to perform the changes now..
 and it seems to be working fine and without errors or warnings, except for the articles being sorted by date from older (top) to newer (bottom) instead newer in top of portal and older at the bottom

Also still the sorting by category its not exactly what I mean..

after the previous edits, we have 3 categories currently at portal,(News,Technology, Games) layout is as this:

News-Newer
News-Old
News-Older
----
Tech-Older
Tech-Old
Tech-New
Games-Older
Games-Old
Games-New
« Last Edit: October 21, 2009, 07:44:52 AM by patalete »

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Complete forum index being showed in Portal.(?)
« Reply #11 on: October 22, 2009, 01:33:32 AM »
For the last query, change this:
Code: [Select]
ORDER BY a.id_categoryTo this:
Code: [Select]
ORDER BY a.id_category, a.id_message DESC
That will ensure that the articles on each page are listed by category then age.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline patalete

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1-1
  • SP Version: 2.2.2
Re: Complete forum index being showed in Portal.(?)
« Reply #12 on: October 22, 2009, 06:25:01 AM »
Thats (90%) it!  >:-D

I finally got what we were thinking of:

Find:
Code: [Select]
ORDER BY a.id_category, a.id_message DESCReplace:
Code: [Select]
ORDER BY a.id_message DESC, a.id_category
 8)

thank you!

I think more people could be interested in this style of Articles layout..would be cool having it available from an option at SP Admin settings or something :P

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Complete forum index being showed in Portal.(?)
« Reply #13 on: October 23, 2009, 01:38:57 AM »
Well, as far as I can see, performing that edit, will just make it sort by the age of the article regardless of the category... Which means it should be the same as leaving the function unedited.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline patalete

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2 RC1-1
  • SP Version: 2.2.2
Re: Complete forum index being showed in Portal.(?)
« Reply #14 on: October 24, 2009, 07:57:42 AM »
yep but with the last edit done articles started sorting in a different way of "sorted by date" than without the edit..and that was the behaviour we were looking for :)

or maybe I were too sleepy to notice it in previous edits. :P

thanks