ElkArte Community

Extending Elk => Addons => Topic started by: Spuds on May 04, 2014, 03:55:44 am

Title: [ADDON] SimplePortal
Post by: Spuds on May 04, 2014, 03:55:44 am
SimplePortal 1.0 Beta

License
This Elkarte addon is released under a BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause) license

Introduction
I don't think this one needs much introduction :D because if you have ever used a portal with SMF chances are you have tried and still use SimplepPortal. 

I'll provide some detail just to set a baseline, this is a port of SimplePortal 2.4 to ElkArte.

A port means I have not added (many) any features past what was already available in SimplePortal, and in fact actually did remove a few blocks since, until such time as those addons are available it did not make sense to keep them in the code.

I did add a few drag and drop capabilities since that is available in ElkArte, and since I had the luxury of not supporting older software installs I was able to consolidate functions to use what is available in the core, for example createList etc.

Now since SP 2.4 is still under development, I can safely claim all bugs with this code are due to @[SiNaN] and I'm sticking to that even if they are due to me refactoring things to work with Elk :P  OK in truth the SP code is awesome and I'm still working my way though several areas of it, there is a lot to learn and I'm not really a portal guy so I'm still leaning how some of the features are even used by the community.

Please consider this Alpha Beta code (mostly due to the code refactoring, switch to core code, theme, etc) and feel free to report and  provide fixes to bugs as you find them .... there will be bugs.

Repo / Download
https://github.com/SimplePortal/SimplePortal_ElkArte/releases/tag/v1.0.0-beta.2 (for ElkArte 1.0 only)
https://github.com/SimplePortal/SimplePortal_ElkArte/archive/development.zip (Current Test Version for 1.1 only)
Title: Re: [ADDON] SimplePortal
Post by: emanuele on May 04, 2014, 10:15:25 am
/me uses like to like this topic! :D
Title: Re: [ADDON] SimplePortal
Post by: phantom on May 04, 2014, 01:30:05 pm
Great work :) Nice to see built in articles with comment system :D

I had to manually change package - Elk is using lowercase names in folders - and there was Modification parse error because at bitbucket Sources and Themes directory have first letter uppercase.

I have one question - if site is using SMF + SP, and someone will convert SMF > Elk -  SP data will be updated (blocks, pages etc.) or it will be gone?
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on May 04, 2014, 01:54:28 pm
Spuds, you really did a great job with this one! I wish I could work on the Elkarte port with you guys but I guess I'm too old now to start learning ins and outs of yet another huge package. I even find it difficult to work on SMF version due to the long breaks I had to take. Anyway, I'm really glad to see SimplePortal being pulled to this direction. Looking forward to the day when both of the packages get the final tag sticked on them!

I have one question - if site is using SMF + SP, and someone will convert SMF > Elk -  SP data will be updated (blocks, pages etc.) or it will be gone?

I think the database structure hasn't been changed while porting the mod. So it shouldn't be difficult. That is unless the next version of SimplePortal goes through so many changes that I don't bother coding an upgrade script for the SMF version.
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on May 04, 2014, 05:45:42 pm
Best of luck to you, Spuds! I'm eager to try out a working Elk + SP site combination someday.
Title: Re: [ADDON] SimplePortal
Post by: Allan on May 04, 2014, 07:34:46 pm
I will be the first here I uploaded and went to install and I have and error in the source/Subs.php image attached.


Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 04, 2014, 10:17:23 pm
Hummm ... thats odd ... Is that with the latest code from the repo? (for the subs error)

The other two errors I suspect are permissions issues in extracting the package file.  Make sure your packages and packages/temp files are writable

ETA: Doh! Just read @phantom post about the case names ... what a rookie mistake! 
/me runs to fix that
Title: Re: [ADDON] SimplePortal
Post by: emanuele on May 04, 2014, 10:19:31 pm
I think you are using some "old" beta code, right?

ehhh... the code is (still) changing (somewhat) fast and I think Spuds used the latest master as base.
And for the next question (i.e. how to upgrade, yeah, I read minds :P) here it is the answer (http://www.elkarte.net/community/index.php?topic=1274.msg8609#msg8609)! :)
Title: Re: [ADDON] SimplePortal
Post by: Allan on May 04, 2014, 11:31:33 pm
Working on ftp the  upgraded files, will let you know how everything is when done.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 04, 2014, 11:33:10 pm
I fixed the wrongly cased directory's in the repo ... I had fixed my local some time back but for some reason bitbucket did not update as well, strange.  I could not rename them either so I had to mv them to temp and then mv temp back to the lowercase name for it to get changed.  Sometimes git has a mind of its own.

Working on ftp the  upgraded files, will let you know how everything is when done.
Cool .. let us know!
Title: Re: [ADDON] SimplePortal
Post by: Allan on May 04, 2014, 11:41:36 pm
Ok the install error is gone in the source/Subs.php but the Modification parse errors are still there as shown in the above image. I just downloaded the master and uploaded the root php files and the /source and /theme folders.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 05, 2014, 12:45:19 am
Ok the install error is gone in the source/Subs.php but the Modification parse errors are still there as shown in the above image. I just downloaded the master and uploaded the root php files and the /source and /theme folders.
Be sure and download the SP package again since I updated the repo directory names Themes -> themes and Sources -> sources
Title: Re: [ADDON] SimplePortal
Post by: Allan on May 05, 2014, 12:56:54 am
ok I will try that as well, thank you.


ETA: worked great no errors
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 05, 2014, 01:06:58 am
Woot ! (now you can find the bugs)
Title: Re: [ADDON] SimplePortal
Post by: Allan on May 07, 2014, 07:03:42 pm
I have been playing around and haven't encountered errors, I have added 2 custom boxes as well as using pre-made boxes as well. Still going to play around with the articles, so will be reporting back.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 08, 2014, 01:57:01 am
Great, thank you for kicking the tires on this  ;D   I'm sure you will some bugs, its inevitable.

I did make a few updates in the last couple of days,  fixed a few odd bugs, and converted most of the block images over to a sprite to lessen the http calls on the portal, added a way to reset the portal page layout,  and other small but needed stuff.
Title: Re: [ADDON] SimplePortal
Post by: Allan on May 08, 2014, 01:57:43 am
Sounds great, thank you.
Title: Re: [ADDON] SimplePortal
Post by: phantom on July 06, 2014, 08:23:39 pm
I'm using it for few days, noticed two errors:
Portal mode - Standalone gives error on portal main page:
Code: [Select]
Warning: require_once(/home/***/domains/***/public_html/forum/sources/PortalMain.php): failed to open stream: No such file or directory in /home/***/domains/***/public_html/index.php on line 26

Fatal error: require_once(): Failed opening required '/home/***/domains/***/public_html/forum/sources/PortalMain.php' (include_path='.:/usr/local/php54/lib/php') in /home/***/domains/***/public_html/index.php on line 26

and on portal homepage there are visible HTML tags

/edit

ok, four errors ::)

Third is wrong submenu placement. Search, Help, Calendar etc. buttons are under first menu button (which is for portal home), on SMf it is under Forum button.
 
last one is portal homepage and forum board index have the same (Forum) label.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on July 07, 2014, 03:43:25 am
Thanks for testing!

What is "standalone" mode supposed to do?

Yeah sorry for such a portal noob question, but I''ve made not pretense that I understand all the modes of the portal, I've only really worked on the front page mode since thats what I use.  How are "standalone" and "integration" used and what is the expected behavior?  I'm honestly not sure.  Once I understand I can then fix those entry points :D

Third is wrong submenu placement. Search, Help, Calendar etc. buttons are under first menu button (which is for portal home), on SMf it is under Forum button.
Thats just where I put it.  Are you wanting
just trying to understand as I put it as it kind of made sense to me but that does not mean its right :P
last one is portal homepage and forum board index have the same (Forum) label.
You mean the page title?  I need to go look.
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on July 07, 2014, 05:01:34 am
Thanks for testing!

What is "standalone" mode supposed to do?

Yeah sorry for such a portal noob question, but I''ve made not pretense that I understand all the modes of the portal, I've only really worked on the front page mode since thats what I use.  How are "standalone" and "integration" used and what is the expected behavior?  I'm honestly not sure.  Once I understand I can then fix those entry points :D

http://simpleportal.net/index.php?action=docs;area=set_up_standalone_portal
Title: Re: [ADDON] SimplePortal
Post by: phantom on July 07, 2014, 06:35:03 pm
Third is wrong submenu placement. Search, Help, Calendar etc. buttons are under first menu button (which is for portal home), on SMf it is under Forum button.
Thats just where I put it.  Are you wanting

  • The community button to take to you the boardindex and forum button to take you to the portal?
  • Or are you saying you want the forum button to be placed in front of the community button?
  • Or do you want all of the standard existing community dropdown items to be moved to forum button that the portal adds (and if so why ?)
just trying to understand as I put it as it kind of made sense to me but that does not mean its right :P
I was thinking that best option would be doing it like it's done here.

First is Home button (which would be it SimplePortal case portal Home button) without submenu.
Second is Forum home (board index) with submenu (Search, Help etc).

but maybe it's just me being used to how SMF + SP work together :)

last one is portal homepage and forum board index have the same (Forum) label.
You mean the page title?  I need to go look.
I wasn't clear about it.

I meant menu buttons - forum and portal home have the same name.
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on July 08, 2014, 12:06:44 am
Third is wrong submenu placement. Search, Help, Calendar etc. buttons are under first menu button (which is for portal home), on SMf it is under Forum button.
Thats just where I put it.  Are you wanting

  • The community button to take to you the boardindex and forum button to take you to the portal?
  • Or are you saying you want the forum button to be placed in front of the community button?
  • Or do you want all of the standard existing community dropdown items to be moved to forum button that the portal adds (and if so why ?)
just trying to understand as I put it as it kind of made sense to me but that does not mean its right :P
I was thinking that best option would be doing it like it's done here.

First is Home button (which would be it SimplePortal case portal Home button) without submenu.
Second is Forum home (board index) with submenu (Search, Help etc).

but maybe it's just me being used to how SMF + SP work together :)

That is how SP+SMF is supposed to work. SP did install a separate Home and Forum button on SMF, to be toggled in different portal modes.
Title: Re: [ADDON] SimplePortal
Post by: Smasher on July 11, 2014, 09:41:24 pm
Installed SimplePortal 2.4 on a clean install of ElkArte 1.0 RC 1. Gave me a file not found error on /sources/subs/BoardIndex.subs.php but still seemed to have installed correctly.
Title: Re: [ADDON] SimplePortal
Post by: Smasher on July 11, 2014, 11:13:00 pm
When I am doing a Custom PHP block it is displaying it two times. This has happened on both a Left Side and a Top block. I have also done a Custom HTML block on the front page with no issues.
 
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on July 11, 2014, 11:35:04 pm
If you went forward despite errors in the install, you shouldn't be reporting bugs based on that install.  Go back, uninstall it, and wait until Spuds figures out the install problem.

Do you have any other mods installed in your forum? Any that modify Boardindex.subs.php? Did you modify it yourself? Did you check if BoardIndex.subs.php is there via FTP?
Title: Re: [ADDON] SimplePortal
Post by: Smasher on July 11, 2014, 11:41:37 pm
If you went forward despite errors in the install, you shouldn't be reporting bugs based on that install.  Go back, uninstall it, and wait until Spuds figures out the install problem.

Do you have any other mods installed in your forum? Any that modify Boardindex.subs.php? Did you modify it yourself? Did you check if BoardIndex.subs.php is there via FTP?

Setup is a non modified ElkArte 1.0 RC 1 with no other mods installed. Basically installed ElkArte and right after installed SimplePortal.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on July 11, 2014, 11:53:07 pm
BoardIndex.subs.php was renamed to BoardsList.class.php just a little before RC1, and Spuds updated the SP package with the new file name about 4 days ago, may you downloaded it just slightly before the update?
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on July 11, 2014, 11:58:08 pm
If you went forward despite errors in the install, you shouldn't be reporting bugs based on that install.  Go back, uninstall it, and wait until Spuds figures out the install problem. Do you have any other mods installed in your forum? Any that modify Boardindex.subs.php? Did you modify it yourself? Did you check if BoardIndex.subs.php is there via FTP?
Setup is a non modified ElkArte 1.0 RC 1 with no other mods installed. Basically installed ElkArte and right after installed SimplePortal.
Ahh, seems it was changed a few commits back (https://bitbucket.org/spuds_/elk_simpleportal/commits/66319454288fb9fd7d5ed28f15bced292a255a89). Re-download SimplePortal and try installing it again (uninstall the old first).
Title: Re: [ADDON] SimplePortal
Post by: Spuds on July 12, 2014, 01:51:44 am
When I am doing a Custom PHP block it is displaying it two times. This has happened on both a Left Side and a Top block. I have also done a Custom HTML block on the front page with no issues.
I'll take a look and see why it may be doing that, I don't think thats related to the install error but as stated, do get the latest package and uninstall / reinstall as the rc1 install error was at least addressed.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on July 12, 2014, 04:17:50 am
Found one mistake that would cause double blocks outside of the portal page and fixed that.  It should fix issue you reported, so get the latest from the repo and let us know :D
Title: Re: [ADDON] SimplePortal
Post by: Smasher on July 12, 2014, 06:05:39 am
Found one mistake that would cause double blocks outside of the portal page and fixed that.  It should fix issue you reported, so get the latest from the repo and let us know :D

Everything is fine now... good install and the blocks are no longer doubled...

So happy to have stumbled across ElkArte and to find SimplePortal here also... one happy camper...
Title: Re: [ADDON] SimplePortal
Post by: phantom on July 12, 2014, 11:15:46 am
I was looking around in SP files and I think that I found fix for wrong URL and title in portal menu tab, here's my menu code:
Code: [Select]



//edit:
removed $scripturl, because now it is not used in my version

//edit2

doesn't work correctly with integration mode :|

//edit3
Now it works for me fine :D

Is someone needs solution for now here's button code:
Code: [Select]
function sp_integrate_menu_buttons(&$buttons)
{
global $txt, $scripturl, $modSettings, $context;

require_once(SUBSDIR . '/Portal.subs.php');
loadLanguage('SPortal', sp_languageSelect('SPortal'));

if ($modSettings['sp_portal_mode'] == 1)
$sportalurl = $scripturl;
elseif ($modSettings['sp_portal_mode'] == 3)
$sportalurl = $modSettings['sp_standalone_url'];
else
$sportalurl = '';

// Define the new menu item(s)
$buttons = elk_array_insert($buttons, 'home', array(
'portal' => array(
'title' => empty($txt['sp-portal']) ? 'Portal' : $txt['sp-portal'],
'data-icon' => '',
'href' => $sportalurl,
'show' => in_array($modSettings['sp_portal_mode'], array(1, 3)) && empty($context['disable_sp']),
'sub_buttons' => array(),
),
), 'after');
}

To move button to first position change after to before :)
Title: Re: [ADDON] SimplePortal
Post by: Smasher on July 14, 2014, 02:31:54 am
Not sure if this is related to settings on my computer or SimplePortal...
 
New Custom PHP Block >> Make an Error In PHP Code >> Add Block

The next screen you see is an error screen stating you had invalid code. This screen has a back button but when you click on it you get a "Document Expired" screen. Again I am not sure if this has to do with settings on my computer or not....
Title: Re: [ADDON] SimplePortal
Post by: Spuds on July 14, 2014, 11:22:19 pm
Quote
//edit3
Now it works for me fine :D
Missed your edit, thanks for the debugging :)

Quote
Not sure if this is related to settings on my computer or SimplePortal...
Its kind of a generic problem, not just the portal really.   The back button in that form is pretty much like hitting back on your browser, which may or may not work for various reasons.  I'll take a look and see if I can change the fatal error and redirect back to the edit page with the block but thats not going to be easy I feel.
Title: Re: [ADDON] SimplePortal
Post by: Smasher on July 14, 2014, 11:29:10 pm
Quote
Not sure if this is related to settings on my computer or SimplePortal...
Its kind of a generic problem, not just the portal really.   The back button in that form is pretty much like hitting back on your browser, which may or may not work for various reasons.  I'll take a look and see if I can change the fatal error and redirect back to the edit page with the block but thats not going to be easy I feel.
[/quote]

Was not really a big issue for me... just something I came across and thought I would share...
Title: Re: [ADDON] SimplePortal
Post by: emanuele on July 15, 2014, 02:30:14 pm
Quite OT
The back button in that form is pretty much like hitting back on your browser, which may or may not work for various reasons.
It may be a 1.1 goal to "deprecate"[1]the "fatal_lang_error" function. I think fatal errors should be for very, very serious matters like database errors, not for errors in saving settings, in that case I'd prefer to be able to send the user back to the settings page highlighting the problem/s and giving hint on how to solve it.
In the sense to use it only when really necessary
Title: Re: [ADDON] SimplePortal
Post by: Spuds on July 15, 2014, 02:39:44 pm
Can't argue with that ... its a bit silly that a form input mistake is fatal ... db or permissions I can see, but a form is another matter.
Title: Re: [ADDON] SimplePortal
Post by: phantom on July 21, 2014, 06:43:50 pm
Ok, I think I know why you are adding another forum button...

In English version forum homepage has title Community. SP adds Forum button and it's fine.
In Polish (and I guess in many others languages) Community is translated as Forum, as result after installing SP we have two Forum buttons.

And BTW, in latest commit there is broken, you added code that adds variable $sportal, but it's not changed in button href parameter :)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on July 21, 2014, 11:14:45 pm
Thanks, I'll get that fixed  ;D
Title: Re: [ADDON] SimplePortal
Post by: meetdilip on September 08, 2014, 05:08:17 pm
Download link is broken.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 08, 2014, 10:51:17 pm
Woops ! ... I need to pack up the latest and update the link  :-[  Will do soon!
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 10, 2014, 11:20:55 am
I have some questions about the simple portal; I am used to have it together with SMF, and (nearly) everything is working proper.

But it seems not to work well with Elkarte. At the moment I have not installed the portal, before I had a lot of problems with the portal, the shoutbox did not work proper, I could not collapse blocks in portal etc. etc. Maybe some of this mistakes have only depended on my not updated host.

But a member in the german support forum has installed the portal together with Elkarte, his host is up-to-date, he also made the update of Elkarte; I am still using RC2. He has still some of the same problems.

He told me, that by using the block "recent topics/recent posts", the posts are still not in correct order by time. I had noticed this as well before. Fixed Topics are shown there now, always at the top (they were not shown there in SMF at all). The other recent topics are displayd in the wrong order, always the oldest on the top . New Topics are shown on the bottom, (but they should be shown on the top) ore somewhere between. If the maximal numbers of posts is reached, then newer topics will not be displayed at all.

I think, this is a bug.

My second question ist about the version of Simple Portal. If you use it together with SMF, there is a newer one. This is confusing us a bit. Does this don't do any matter, because Simple Portal is a complete other thing, if you use it together with ElkArte?
Title: Re: [ADDON] SimplePortal
Post by: Lars on September 10, 2014, 01:59:07 pm
Hi Ruth :)
Yes, I have the problem with the recent topics on the portal page.
Nearly all topics are listed in a wrong order, see the screenshot (Heute = today, Gestern = yesterday).
There’s no chronological order. Neither from new to old nor from old to new. I myself would prefer an order from new (top) down to old (bottom).
Would someone please check where the error is?

- Lars
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 10, 2014, 05:42:39 pm
Would someone please check where the error is?

- Lars
The listing comes from SSI.php, SimplePortal uses ssi_recentTopics function to get the data.

Looking at it the code, the date shown in the listing would be the date the topic was started.  The display order however is based on when the last post was made to the topic.  So a topic with the most recent posting is shown at top, although the date shown is date of the topic creation.  So I believe whats displayed is correct, although completely confusing !

Right now SSI does not return the last update date, only the start date ... I think that should be added in 1.01, until then in SimplePortal we could hide the date to avoid the confusion?

But it seems not to work well with Elkarte. At the moment I have not installed the portal, before I had a lot of problems with the portal, the shoutbox did not work proper, I could not collapse blocks in portal etc. etc.
I'd ask that you be sure and install the latest code.  SP for ElkArte is still beta level so updates are continually being made.  I know I addressed those two issues some time ago.  I just did a fresh install and those functions appear to be working properly.
Fixed Topics are shown there now, always at the top (they were not shown there in SMF at all). The other recent topics are displayd in the wrong order, always the oldest on the top . New Topics are shown on the bottom, (but they should be shown on the top) ore somewhere between. If the maximal numbers of posts is reached, then newer topics will not be displayed at all.

I think, this is a bug.

I think this is what Lars stated as well, so I hope my above explanation explains it or are there other areas in question as well.

My second question ist about the version of Simple Portal. If you use it together with SMF, there is a newer one. This is confusing us a bit. Does this don't do any matter, because Simple Portal is a complete other thing, if you use it together with ElkArte?
SP for ElkArte is based on the SimplePortal 2.4 line which is still under development and yet to be released. 

The official released and stable version of SimplePortal is 2.3.x line.  There are new features that were added in 2.4 as well as some ElkArte specific features (just some D&D around the UI since the functions were available in Elk).  I've tried to keep on top of 2.3 fixes as well as 2.4 updates along with changes made to best integrate with ElkArte but there are bugs, most of them mine !
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 10, 2014, 06:55:32 pm
Thank you very much for your explanations, Spuds!

I'd ask that you be sure and install the latest code. 

Yes, I will do this...

Today I talked to my hoster, the server was always at PHP 5.3.1.6., when Elkarte was installed first - not a lower version as a did believe. So maybe the errors in my forum, that happend with ElkArte (and together with or without Simple Portal)  were just because there was first RC1, then  RC2...all mixed up. (Huh...difficult to write this in English für me...I think , no one will understand, what I am trying to say) ::)


The listing comes from SSI.php, SimplePortal uses ssi_recentTopics function to get the data.

Looking at it the code, the date shown in the listing would be the date the topic was started.  The display order however is based on when the last post was made to the topic.  So a topic with the most recent posting is shown at top, although the date shown is date of the topic creation.  So I believe whats displayed is correct, although completely confusing !

Right now SSI does not return the last update date, only the start date ... I think that should be added in 1.01, until then in SimplePortal we could hide the date to avoid the confusion?

I see! This block was always mad, I remember now! This block is quite confusing if you choose "recent topics". "Recent posts" was always working better.

With SMF/Simple Portal I use a "selfmade Script" (not by me)  ;)  in a PHP-block, which is based on "recent posts" (not on "recent topics") and it workes fine, the way I would like to work the block "recent topics". It shows the icon of the topic , the topic name, the board, etc. and  all the topics are in correct order. I would like to have something like this again, changed for ElkArte.

Lars, are the posts in your portal in the correct order by time, if you choose "recent posts" in this block?
Title: Re: [ADDON] SimplePortal
Post by: Lars on September 10, 2014, 07:19:57 pm
Thanks for your detailed explanations, Spuds! :)

Lars, are the posts in your portal in the correct order by time, if you choose "recent posts" in this block?

Yes, they are. From new descending to old.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 10, 2014, 10:46:38 pm
Great...then there is no bug at all, it is just that strange looking order of topics, if you  choose the "recent topics" in this block.

I think, that the fixed topics now are displayed in this block as well, makes things completly wrong. We cannot use this block for "recent topics" at all, it is not needful this way. For example, if the maximal number of topics we want to show in this block is 20 and  we have got 20 or more fixed topics in our forum, then not a single one other recent topic  will be displayed there.  ;)

In my opinion, it is the most necessary part of a portal, that there is a block which shows the recent topics quite well.

Maybe Spuds can help us with this code and transform it for ElkArte?  O:-)  I don't know, if this is possible and how much work it would be. I think, such block is a very needful thing and I would be very glad to use it.

I add a Screenshot, to see how it will look, if you create a PHP-Block and put that code into there.

Code: [Select]
global $context, $settings, $scripturl, $txt;
global $user_info, $modSettings, $smcFunc, $posts;
global $color_profile;

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] :  (isset($_GET['limit']) ? (int) $_GET['limit'] : 20);

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $smcFunc['db_query']('','
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})'). '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
                  $row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($request);

// Load recent topic posts colors =)
if(!empty($colorids) && sp_loadColors($colorids) !== false)
foreach($posts as $k => $p)
if(!empty($color_profile[$p['poster']['id']]['link']))
$posts[$k]['poster']['link'] = $color_profile[$p['poster']['id']]['link'];

$context['recent_topics']=$posts;

// Just return it.
if (empty($posts))
return $posts;

echo '
<div class="tborder">
<table cellspacing="0" width="100%">
<tr class="catbg">

</tr>
<tr>
<td style="padding: 5px;">
</td> ';
foreach ($posts as $post)
echo '
<tr>
<td align="center" valign="middle" nowrap="nowrap">
', $post['icon'], '
</td>
<td valign="middle" width="%100">
<div style="font-size: 11px;"><b>
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '</b></div><div style="font-size: 9px;">von ', $post['poster']['link'], ' in ', $post['board']['link'], ' </br> ', $post['time'], '

| Klicks: ', $post['views'], ' | Antworten: ', $post['replies'], '</font><hr>
</td>
</tr>';
echo '
</table></div>';
Title: Re: [ADDON] SimplePortal
Post by: meetdilip on September 11, 2014, 07:20:48 am
YouTube links showing as text than getting embedded when portal set as home page. Please check www.techiewiz.in  to see it first hand.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 11, 2014, 03:31:19 pm
Maybe Spuds can help us with this code and transform it for ElkArte?  O:-)  I don't know, if this is possible and how much work it would be. I think, such block is a very needful thing and I would be very glad to use it.

Give this a try and let me know if its what you want.
Code: [Select]
	global $context, $settings, $scripturl, $txt, $user_info, $modSettings, $posts, $color_profile;

$db = database();

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] : (isset($_GET['limit']) ? (int) $_GET['limit'] : 20);
$show_body = !empty($parameters[1]) ? $parameters[1] : false;

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $db->query('', '
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.id_last_msg >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})') . '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$color_ids = array();
while ($row = $db->fetch_assoc($request))
{
// Shorten the body if needed
if ($show_body)
{
$ellip = '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">…</a>';
$row['body'] = Util::shorten_html(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), 128, $ellip, false);
censorText($row['body']);
}

// Censor the subject.
$row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);
censorText($row['subject']);

// Collect the color ids :)
$color_ids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.png') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => Util::shorten_text($row['subject'], 25),
'preview' => $show_body ? $row['body'] : '',
'time' => standardTime($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.png" style="vertical-align: middle;" alt="' . $row['icon'] . '" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$db->free_result($request);

// Colorization
if (!empty($color_ids) && sp_loadColors($color_ids) !== false)
{
foreach ($posts as $key => $value)
{
if (!empty($color_profile[$value['poster']['id']]['link']))
$posts[$key]['poster']['link'] = $color_profile[$value['poster']['id']]['link'];
}
}

$context['recent_topics'] = $posts;

// Just return if we have no results
if (empty($posts))
return $txt['error_sp_no_posts_found'];

echo '
<div>';

foreach ($posts as $post)
{
echo '
<div style="display: table-cell; padding: 0 8px" class="centericon">
', $post['icon'], '
</div>
<div class="" style="display: table-cell">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts"> ' . $txt['new'] . '</span></a>';

echo '
<div class="middletext">
', $txt['by'], ' ', $post['poster']['link'], ' ', $txt['in'], ' ', $post['board']['link'], '
</br />
', $post['time'], ' | ', $txt['views'], ': ', $post['views'], ' | ', $txt['replies'], ': ', $post['replies'], '
</div>';

if ($show_body)
echo '
<div class="middletext">
', $post['preview'], '
</div>';

echo '
</div>
<hr>';
}

echo '
</div>';
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 11, 2014, 03:33:09 pm
YouTube links showing as text than getting embedded when portal set as home page. Please check www.techiewiz.in  to see it first hand.
Opps .. I'll need to load the embed JS for the portal, thanks for the bug report.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 11, 2014, 03:57:20 pm
Give this a try and let me know if its what you want.

Thank you very much, Spuds! This is so kind of you... :)  great!
I will try it as soon as possible. At the moment I cannot install the portal again...
But I am sure that Lars will try your code.

Thanks a lot for your work!
Title: Re: [ADDON] SimplePortal
Post by: Lars on September 13, 2014, 03:24:58 pm
I have a new problem with the portal. It‘s possible that it has to do with the final ElkArte version. Maybe there is something in the code of SimplePortal version 2.4 or in the ElkArte final version, that causes an error now.
I tried to do some changes in the blocks yesterday (in the admin center) and after this all blocks on the right side of the portal were gone. Also all blocks in the middle disappeared. Just the welcome message stayed there and below this is now this error message:
Fatal error: Call to undefined function shorten_text() in /www/htdocs/w00f7be5/for-elchtest/sources/subs/PortalBlocks.subs.php on line 1300

I've installed the complete forum new today (just a test forum) and the Simple Portal, too. All installations worked well but the blocks are still missing (see attachment). At the Moment there's a mix of English and German language because I haven't installed the German language for the portal till now, but the blocks are also gone away if all is in English.

Line 1300 of the PortalBlocks.subs.php is in this part:

Code: [Select]
               // Shorten the text if needed and try and fix the errors it causes.
               if (!empty($length))
               {
                       require_once(SUBSDIR . '/Post.subs.php');
                       $row['body'] = shorten_text($row['body'], $length, true);
                       preparsecode($row['body']);
               }

It's this row:
$row['body'] = shorten_text($row['body'], $length, true);

Can anyone see an error there?
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on September 14, 2014, 01:16:43 am
Which block is below the Welcome to SimplePortal block?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 14, 2014, 02:49:28 am
Be sure and use the latest package from here: https://bitbucket.org/spuds_/elk_simpleportal/downloads

The function shorten_text was moved in the 1.0 version of ElkArte, so calling that is a fatal error.  After which all blocks past that point  fail to load.

Title: Re: [ADDON] SimplePortal
Post by: Mstcool on September 14, 2014, 06:06:25 am
SP 2.4 is out? Or did you do the same thing like ElkArte did - Took the version they are working on and ported it? :p

Or forked it? Lol. :p
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 14, 2014, 02:22:50 pm
I installed the portal now again, and everything seems to be perfect now...

@Spuds,  your code is working great!  :)

I think, the font-size and the line-height can be easy canged in Portal.css? The block looks much too big at the moment. Or need this canging to be done in this code itself?

There is another problem I don't know how to solve  it at all:
If you use topic-icons, wich are a little smaller or bigger, then the posts get out of the line on the left side.
Could this be changed?
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 14, 2014, 03:03:30 pm
I canged the code a little, so it will take less space, but I don't know, what to do about the the line-hight and the alignment.

Code: [Select]
	global $context, $settings, $scripturl, $txt, $user_info, $modSettings, $posts, $color_profile;

$db = database();

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] : (isset($_GET['limit']) ? (int) $_GET['limit'] : 20);
$show_body = !empty($parameters[1]) ? $parameters[1] : false;

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $db->query('', '
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.id_last_msg >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})') . '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$color_ids = array();
while ($row = $db->fetch_assoc($request))
{
// Shorten the body if needed
if ($show_body)
{
$ellip = '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>';
$row['body'] = Util::shorten_html(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), 128, $ellip, false);
censorText($row['body']);
}

// Censor the subject.
$row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);
censorText($row['subject']);

// Collect the color ids :)
$color_ids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.png') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => Util::shorten_text($row['subject'], 25),
'preview' => $show_body ? $row['body'] : '',
'time' => standardTime($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.png" style="vertical-align: middle;" alt="' . $row['icon'] . '" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$db->free_result($request);

// Colorization
if (!empty($color_ids) && sp_loadColors($color_ids) !== false)
{
foreach ($posts as $key => $value)
{
if (!empty($color_profile[$value['poster']['id']]['link']))
$posts[$key]['poster']['link'] = $color_profile[$value['poster']['id']]['link'];
}
}

$context['recent_topics'] = $posts;

// Just return if we have no results
if (empty($posts))
return $txt['error_sp_no_posts_found'];

echo '
<div>';

foreach ($posts as $post)
{
echo '
<div style="display: table-cell; padding: 0 8px" class="centericon">
', $post['icon'], '
</div>
<div class="" style="display: table-cell">
<b><a href="', $post['href'], '">', $post['subject'], '</a></b>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts"> ' . $txt['new'] . '</span></a>';

echo '
<div class="smalltext">
', $txt['by'], ' ', $post['poster']['link'], ' ', $txt['in'], ' ', $post['board']['link'], '  Datum: ', $post['time'], '
</div>';

if ($show_body)
echo '
<div class="middletext">
', $post['preview'], '
</div>';

echo '
</div>
<hr>';
}

echo '
</div>';
Title: Re: [ADDON] SimplePortal
Post by: Lars on September 14, 2014, 05:03:16 pm
I had the old version installed because I didn’t realized that there was an update four days ago.
Now I’m using the newest version and everything is alright. :)
The recent topics were still in disorder, but since I’ve created a new block with the php code the entries are in chronological order.

I did some little changes in the code and now it looks like this:

(https://www.elkarte.net/community/imagecache.php?image=http%3A%2F%2Fimg5.fotos-hochladen.net%2Fuploads%2Fsprecenttopicqwlefsdbri.png&hash=7307073dda418852e2c42f24ae04a954" rel="cached" data-warn="External image, click here to view original" data-url="http://img5.fotos-hochladen.net/uploads/sprecenttopicqwlefsdbri.png)


The only thing I would like to know at the end is if there’s a way to reduce the distance between the text lines and the separator lines (marked with the red double arrows in the screenshot).
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 14, 2014, 07:44:57 pm
Lars, we can change the margin a little, so there will be less space between the horizontal lines

It is somewhere near line 303 in index. css:

Code: [Select]
hr {
margin: 12px 0;
height: 1px;
}

I will change it maybe like this:

Code: [Select]
hr {
margin: 2px 0;
height: 1px;
}
Title: Re: [ADDON] SimplePortal
Post by: Lars on September 14, 2014, 08:32:26 pm
Thanks, Ruth!
Does it change just the space on the portal or also somewhere in the forum?
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 14, 2014, 08:43:43 pm
I have not noticed anything important so far...not sure... ;)



Edit:

I think, I would prefere the more detailed version with three lines of text, also there will be more space for the board-titels.

So I added a third background in portal.css to get another line-height:

Code: [Select]
.portalbg3 {
padding: 10px 0;
background-color: #FDF5E6;
line-height: 1.2em;
}
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 15, 2014, 09:49:58 pm
The drag&drop of the blocks in the UI is awesome! :o
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 15, 2014, 10:33:20 pm
Yes, I do agree, it is very  comfortable to use it...it is made so clever. I like it very much.

I need some help with this, to keep the text on the left side always on the line, if some topicicons are bigger then others.

Can I change something here?

Code: [Select]
echo '
<div>';

foreach ($posts as $post)
{
echo '
<div style="display: table-cell; padding: 0 8px" class="centericon">
', $post['icon'], '
</div>
<div class="" style="display: table-cell">
<b><a href="', $post['href'], '">', $post['subject'], '</a></b>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts"> ' . $txt['new'] . '</span></a>';

echo '
<div class="smalltext">
', $txt['by'], ' ', $post['poster']['link'], ' ', $txt['in'], ' ', $post['board']['link'], '
</br />
', $post['time'], ' Uhr | ', $txt['views'], ': ', $post['views'], ' | ', $txt['replies'], ': ', $post['replies'], '
</div>';

if ($show_body)
echo '
<div class="middletext">
', $post['preview'], '
</div>';

echo '
</div>
<hr>';
}
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 15, 2014, 10:55:58 pm
Not sure TBH.
If it is the code Spuds posted few messages before, you may try using this instead:
Code: [Select]
	global $context, $settings, $scripturl, $txt, $user_info, $modSettings, $posts, $color_profile;

$db = database();

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] : (isset($_GET['limit']) ? (int) $_GET['limit'] : 20);
$show_body = !empty($parameters[1]) ? $parameters[1] : false;

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $db->query('', '
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.id_last_msg >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})') . '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$color_ids = array();
while ($row = $db->fetch_assoc($request))
{
// Shorten the body if needed
if ($show_body)
{
$ellip = '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>';
$row['body'] = Util::shorten_html(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), 128, $ellip, false);
censorText($row['body']);
}

// Censor the subject.
$row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);
censorText($row['subject']);

// Collect the color ids :)
$color_ids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.png') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => Util::shorten_text($row['subject'], 25),
'preview' => $show_body ? $row['body'] : '',
'time' => standardTime($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.png" style="vertical-align: middle;" alt="' . $row['icon'] . '" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$db->free_result($request);

// Colorization
if (!empty($color_ids) && sp_loadColors($color_ids) !== false)
{
foreach ($posts as $key => $value)
{
if (!empty($color_profile[$value['poster']['id']]['link']))
$posts[$key]['poster']['link'] = $color_profile[$value['poster']['id']]['link'];
}
}

$context['recent_topics'] = $posts;

// Just return if we have no results
if (empty($posts))
return $txt['error_sp_no_posts_found'];

echo '
<div>';

foreach ($posts as $post)
{
echo '
<div style="display: table-row">
<div style="display: table-cell; padding: 0 8px" class="centericon">
', $post['icon'], '
</div>
<div class="" style="display: table-cell">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts"> ' . $txt['new'] . '</span></a>';

echo '
<div class="middletext">
', $txt['by'], ' ', $post['poster']['link'], ' ', $txt['in'], ' ', $post['board']['link'], '
</br />
', $post['time'], ' | ', $txt['views'], ': ', $post['views'], ' | ', $txt['replies'], ': ', $post['replies'], '
</div>';

if ($show_body)
echo '
<div class="middletext">
', $post['preview'], '
</div>';

echo '
</div>
</div>';
}

echo '
</div>';

Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 15, 2014, 11:10:49 pm
Thank you very much, emanuele, yes, it is the same code Spuds wrote - I had only changed the font a little.

The text is now on the line - perfect! :)

But the horizontal border beetween the posts is missing.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 15, 2014, 11:26:07 pm
I have tried to add one...but it don't looks nice... :-[
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 16, 2014, 09:04:17 am
Instead of:
Code: [Select]
<div style="display: table-row">
something like:
Code: [Select]
<div style="display: table-row;border-bottom: 1px solid #000">
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 16, 2014, 10:35:28 am
Thank you very much, emanuele...

But it is not working... :( there are no borders shown...

Code: [Select]
	global $context, $settings, $scripturl, $txt, $user_info, $modSettings, $posts, $color_profile;

$db = database();

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] : (isset($_GET['limit']) ? (int) $_GET['limit'] : 20);
$show_body = !empty($parameters[1]) ? $parameters[1] : false;

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $db->query('', '
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.id_last_msg >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})') . '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$color_ids = array();
while ($row = $db->fetch_assoc($request))
{
// Shorten the body if needed
if ($show_body)
{
$ellip = '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>';
$row['body'] = Util::shorten_html(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), 128, $ellip, false);
censorText($row['body']);
}

// Censor the subject.
$row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);
censorText($row['subject']);

// Collect the color ids :)
$color_ids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.png') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => Util::shorten_text($row['subject'], 25),
'preview' => $show_body ? $row['body'] : '',
'time' => standardTime($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.png" style="vertical-align: middle;" alt="' . $row['icon'] . '" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$db->free_result($request);

// Colorization
if (!empty($color_ids) && sp_loadColors($color_ids) !== false)
{
foreach ($posts as $key => $value)
{
if (!empty($color_profile[$value['poster']['id']]['link']))
$posts[$key]['poster']['link'] = $color_profile[$value['poster']['id']]['link'];
}
}

$context['recent_topics'] = $posts;

// Just return if we have no results
if (empty($posts))
return $txt['error_sp_no_posts_found'];

echo '
<div>';

foreach ($posts as $post)
{
echo '
<div style="display: table-row; border-bottom: 1px solid #6394BD">
<div style="display: table-cell; padding: 0 8px" class="centericon">
', $post['icon'], '
</div>
<div class="" style="display: table-cell">
<b><a href="', $post['href'], '">', $post['subject'], '</a></b>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts"> ' . $txt['new'] . '</span></a>';

echo '
<div class="smalltext">
', $txt['by'], ' ', $post['poster']['link'], ' ', $txt['in'], ' ', $post['board']['link'], '
</br />
', $post['time'], ' Uhr | ', $txt['views'], ': ', $post['views'], ' | ', $txt['replies'], ': ', $post['replies'], '
</div>';

if ($show_body)
echo '
<div class="middletext">
', $post['preview'], '
</div>';

echo '
</div>
</div>';
}

echo '
</div>';

Such codes are very difficult to me...all those "divs"... ::) I never can figure it out how it works, if they are used...



Edit:

Maybe it would be much more easier to use topicincons, wich have all the same size.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 16, 2014, 01:24:21 pm
Okay, scrap the previous change, and try this:
Code: [Select]
		<div style="display: table-row">
<div style="display: table-cell; padding: 0 8px" class="centericon">
', $post['icon'], '
</div>
<div class="" style="display: table-cell">
to:
Code: [Select]
		<div style="display: table-row">
<div style="display: table-cell; padding: 0 8px;border-bottom:1px solid #000;" class="centericon">
', $post['icon'], '
</div>
<div class="" style="display: table-cell;border-bottom:1px solid #000;width:100%;">
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 16, 2014, 10:13:01 pm
Thanks a lot, emanuele, now the lines are shown. With dashed borders it looks better...
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 16, 2014, 10:13:21 pm
Is there any possibility to get the icons centered in this code?

I have tried several things with topicicons all at the same width - but they may not have a width more than 18 px, wich is too small for some of them. If the xx.png is more than 18px in height it will not be shown complete in the boards.  I  can change this here:

Code: [Select]
.topicicon:before {
height: 18px;
width: 18px;
}

But if I change it for example to a height of 20 px, I cannot use the topicicons.png from ElkArte at all...and need to change all of them. I think I will do this, if this is the only way to get this icons centered.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 16, 2014, 11:03:55 pm
Code: [Select]
text-align: center;
on the <div> containing the icon. ;)
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 16, 2014, 11:16:35 pm
I beg your pardon, emanuele...I am too stupid... O:-)  I have tried it for hours to get them centered.

Please tell me where exactly and how...

Code: [Select]
		<div style="display: table-row">
<div style="display: table-cell; padding: 0 8px;border-bottom:1px dashed #6394BD;" class="centericon">
', $post['icon'], '
</div>
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 16, 2014, 11:19:36 pm
Code: [Select]
		<div style="display: table-row">
<div style="display: table-cell; padding: 0 8px;border-bottom:1px dashed #6394BD;text-align: center;" class="centericon">
', $post['icon'], '
</div>
Something like that should work I think. ;)

inline styles are piling up at an worrying rate. lol
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 16, 2014, 11:29:44 pm
Yes! It worked!  :D   Hurrah! I am so happy now...

Thank you very much, Spuds and Emanuele for your help!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 17, 2014, 12:52:41 pm
I updated the package again: https://bitbucket.org/spuds_/elk_simpleportal/downloads just get the latest.  If fixes a couple of the issues that were reported:

1) video embed not working in board news blocks (and board selection was broken in the block)
2) BBC codes were not working in the shoutbox
3) old bbc images were used in the shoutbox
4) ignored users were still shown in the shoutbox
5) HR's had to much padding in the portal
6) pagination was not working in board news block
7) "other"

You can uninstall and reinstall with the new package or replace the following files with the new ones if you like
portal.css, Portal.subs.php, PortalBlocks.subs.php, portal.js, PortalShoutbox.template.php
Title: Re: [ADDON] SimplePortal
Post by: meetdilip on September 17, 2014, 01:38:32 pm
Thanks @Spuds
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 17, 2014, 07:06:53 pm
I cannot download this one:

Quote
elk-SimplePortal.zip   201.1 KB   spuds_   3   4 hours ago

It says Error 404



This one is just the update?

Quote
Download repository   4.7 MB
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 18, 2014, 01:25:43 am
Humm 404, maybe I closed my laptop a bit to quick !

I've re-uploaded the latest package. direct link https://bitbucket.org/spuds_/elk_simpleportal/downloads/elk-SimplePortal.zip?pk=442865

ETA: Updated again
Title: Re: [ADDON] SimplePortal
Post by: meetdilip on September 18, 2014, 02:53:49 am
Something is wrong. Please check the install at techiewiz.in
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on September 18, 2014, 09:16:37 am
There seems to be a typo committed in porting one of the latest fixes:

PortalBlocks.subs.php

Code: (Find) [Select]
 WHERE {query_see_board}
 AND ' . (empty($board) ? 't.id_first_msg >= {int:min_msg_id}' : 't.id_board IN ({array_int:current_board})') . ($modSettings['postmod_active'] ? '
 AND t.id_first_msg >= {int:min_msg_id}' : 't.id_board IN ({array_int:current_board})') . ($modSettings['postmod_active'] ? '
 AND t.approved = {int:is_approved}' : '') . '
 AND (t.locked != {int:locked} OR m.icon != {string:icon})

Code: (Replace) [Select]
 WHERE {query_see_board}
 AND ' . (empty($board) ? 't.id_first_msg >= {int:min_msg_id}' : 't.id_board IN ({array_int:current_board})') . ($modSettings['postmod_active'] ? '
 AND t.approved = {int:is_approved}' : '') . '
 AND (t.locked != {int:locked} OR m.icon != {string:icon})
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 18, 2014, 02:16:29 pm
Thanks for finding that, I added the new line but left the old one too  :-X
Something is wrong. Please check the install at techiewiz.in
@meetdilip I updated the download package, but all you need to do is replace the PortalBlocks.subs.php with the new one.
Title: Re: [ADDON] SimplePortal
Post by: meetdilip on September 18, 2014, 10:20:13 pm
Thanks @[SiNaN] , @Spuds . Working fine now. :)
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 04:43:33 pm
ElkArte 1.0 | SimplePortal 2.4

A bit of an issue. I want to use Simple Portal but without a front page so I selected the settings in the attached image #1:

Quote
Integration: This will disable the portal page. Blocks are only usable in forum.

and now all I see of my forum is what you see in attached image #2. None of the menu buttons work. Clicking any of them just reloads the page shown in attachment #2. Is there a way to disable the portal via phpmyadmin when you can't get to the admin settings?
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on September 21, 2014, 05:18:39 pm
Adding ?debug to your site URL should load the site without SimplePortal. Example:

Code: [Select]
domain.tld/index.php?debug
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 21, 2014, 05:23:10 pm
I didn't know that one about SP! Cool!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 21, 2014, 05:39:28 pm
Quote
A bit of an issue. I want to use Simple Portal but without a front page so I selected the settings in the attached image #1:
Thanks for the report, I'll take a look in a bit.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 05:52:16 pm
Adding ?debug to your site URL should load the site without SimplePortal. Example:

Code: [Select]
domain.tld/index.php?debug

Whew...thank you! I was able to get back into the package manager and uninstall.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 06:01:27 pm
Quote
A bit of an issue. I want to use Simple Portal but without a front page so I selected the settings in the attached image #1:
Thanks for the report, I'll take a look in a bit.

I got it uninstalled and deleted the data as well but now if I re-install I get the same thing. Before when I originally installed it, it was working with the front page. Now it is not.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 21, 2014, 06:13:37 pm
That is because you uninstalled the package before switching off the function previously (http://www.elkarte.net/community/index.php?topic=1399.msg12907#msg12907).
The "correct" way was to add the ?debug, go to the SP configuration page, disabled the integration and uninstall SP. This because settings in the settings table are usually not deleted by addons (because in 90% of the cases this is the intended behaviour, for example because the addon is unistalled as part of an upgrade of the addon itself).

Now if you are trying to install again SP, you should repeat the "?debug" trick suggested by [SiNaN], the go to admin > simple portal > configuration > general and change the portal mode from "integration" to something else. ;)
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 06:26:23 pm
Thanks emanuele....I have done as you suggested but now the display is messed up throughout the forum. See attached images.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 06:36:16 pm
After setting it back to front page mode with the messed up display I un-installed it again and removed all data and then went into the ElkArte settings table and removed the simple portal entries from it. Then re-installed again but the display is still messed up as shown above.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 21, 2014, 06:44:37 pm
Is there a link I can check?
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 07:11:20 pm
http://elk.b4print.com/index.php
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 21, 2014, 08:46:00 pm
hmm... the board index here looks good.

Try clearing the cache of your browser, looks like some (broken?) file left around...
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 08:55:58 pm
Yeah, I had already deleted the forum cache and browser cache and even switched to another browser that had never accessed the forum and it was still messed up. About the time you created the user account it started displaying right again. I had hoped you had did some kind of magic to fix it. But it does display correctly now unless I switch the portal mode to integration.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 21, 2014, 09:09:32 pm
And if you switch to integration mode you get the "empty" page of before?
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 09:18:07 pm
Yes.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 09:21:51 pm
I have enabled integration. You can take a look at it now. I will leave it enabled for the time being.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 09:52:44 pm
With integration enabled, if I create a block and set it to display on the forum the block displays....but the forum doesn't.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 21, 2014, 10:47:49 pm
Oh, sorry!!
Don't worry, I see the integration bug on my local install as well, but at the moment I'm not sure what to touch to fix it... :(
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 11:11:48 pm
 :D OK thanks. Good to know it it isn't just me.
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on September 21, 2014, 11:49:15 pm
It seems to be another fix that was ported incorrectly. Here's the fix:

sources/subs/Portal.subs.php

Code: (Find) [Select]
		else
$_GET['action'] = 'portal';
}

Code: (Replace) [Select]
	}
else
$_GET['action'] = 'portal';

Also, in Profiles admin list, you should use the label field for the name column. It would be nice to have the numbers for articles, blocks, categories, pages and shoutboxes centered and set to 0 if empty too.
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on September 21, 2014, 11:53:35 pm
I didn't know that one about SP! Cool!

You know its coded by me; so you shouldn't be surprised about all that coolweird stuff in there. :P We even had a cheerleader in it but Spuds removed it in his Elkarte port...
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 22, 2014, 12:32:51 am
It seems to be another fix that was ported incorrectly. Here's the fix:
I'm catching up with Ema! Bwaaaahahaha.  Thanks for the fix, I had just narrowed down where the issue was occurring but was not sure why.
Quote from: [SiNaN
Also, in Profiles admin list, you should use the label field for the name column. It would be nice to have the numbers for articles, blocks, categories, pages and shoutboxes centered and set to 0 if empty too.
Done, done and done, thanks for the input ... There are many places things are not centered in columns (in elk), that was a stylistic approach as far as I know.
You know its coded by me; so you shouldn't be surprised about all that coolweird stuff in there. :P We even had a cheerleader in it but Spuds removed it in his Elkarte port...
All easter eggs must die with fire ! :P ... Also let me fix this  ... Spuds removed it in histhe Elkarte port  ;)

PS Now I did leave some eggs in place, like the ones in the info/about area, so don't fret, there is still weird stuff in place!

Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 22, 2014, 02:50:34 am
Also, in Profiles admin list, you should use the label field for the name column. It would be nice to have the numbers for articles, blocks, categories, pages and shoutboxes centered and set to 0 if empty too.

I made the change to sources/subs/Portal.subs.php and that did fix the issue. Is the above something else I need to do? If so, I'm not sure how to accomplish this...non-programmer here.
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on September 22, 2014, 12:38:36 pm
Done, done and done, thanks for the input ... There are many places things are not centered in columns (in elk), that was a stylistic approach as far as I know.

Long text looks fine when aligned to sides, however, I think numbers and short text should be centered in tables. Also, I think it would be better if you used name field for the edit page. My intention was to allow for translation of the profile names through the use of $ prefix.

All easter eggs must die with fire ! :P ... Also let me fix this  ... Spuds removed it in histhe Elkarte port  ;)

PS Now I did leave some eggs in place, like the ones in the info/about area, so don't fret, there is still weird stuff in place!

lol Good to know that there is still part of me in there! The most stupid best one I had put in there was the Eliana Day but unfortunately I was forced to remove it. :P

I made the change to sources/subs/Portal.subs.php and that did fix the issue. Is the above something else I need to do? If so, I'm not sure how to accomplish this...non-programmer here.

They aren't really important. You wouldn't experience any issues if you didn't apply them.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 22, 2014, 04:35:39 pm
Maybe Spuds can help us with this code and transform it for ElkArte?  O:-)  I don't know, if this is possible and how much work it would be. I think, such block is a very needful thing and I would be very glad to use it.

Give this a try and let me know if its what you want.
Code: [Select]
 global $context, $settings, $scripturl, $txt, $user_info, $modSettings, $posts, $color_profile;

 $db = database();

 $exclude_boards = null;
 $num_recent = !empty($parameters[0]) ? $parameters[0] : (isset($_GET['limit']) ? (int) $_GET['limit'] : 20);
 $show_body = !empty($parameters[1]) ? $parameters[1] : false;

 if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
 $exclude_boards = array($modSettings['recycle_board']);
 else
 $exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

 $stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
 $icon_sources = array();
 foreach ($stable_icons as $icon)
 $icon_sources[$icon] = 'images_url';

 // Find all the posts in distinct topics.  Newer ones will have higher IDs.
 $request = $db->query('', '
 SELECT
 m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
 IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
 IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
 IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
 FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
 INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
 LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . (!$user_info['is_guest'] ? '
 LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:id_member})
 LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
 WHERE t.id_last_msg >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
 AND t.id_last_msg = m.id_msg
 AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
 AND b.id_board NOT IN ({array_int:exclude_boards})') . '
 AND {raw:query_see_board}
 AND ms.id_msg = t.id_last_msg
 ORDER BY t.id_last_msg DESC
 LIMIT {int:limit}',
 array(
 'id_member' => $user_info['id'],
 'exclude_boards' => $exclude_boards,
 'query_see_board' => $user_info['query_wanna_see_board'],
 'limit' => (int) $num_recent,
 )
 );
 $posts = array();
 $color_ids = array();
 while ($row = $db->fetch_assoc($request))
 {
 // Shorten the body if needed
 if ($show_body)
 {
 $ellip = '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">…</a>';
 $row['body'] = Util::shorten_html(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), 128, $ellip, false);
 censorText($row['body']);
 }

 // Censor the subject.
 $row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);
 censorText($row['subject']);

 // Collect the color ids :)
 $color_ids[$row['id_member']] = $row['id_member'];

 if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
 $icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.png') ? 'images_url' : 'default_images_url';

 // Build the array.
 $posts[] = array(
 'board' => array(
 'id' => $row['id_board'],
 'name' => $row['bName'],
 'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
 'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
 ),
 'topic' => $row['id_topic'],
 'poster' => array(
 'id' => $row['id_member'],
 'name' => $row['poster_name'],
 'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
 'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
 ),
 'subject' => $row['subject'],
 'short_subject' => Util::shorten_text($row['subject'], 25),
 'preview' => $show_body ? $row['body'] : '',
 'time' => standardTime($row['poster_time']),
 'timestamp' => forum_time(true, $row['poster_time']),
 'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
 'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
 'new' => !empty($row['is_read']),
 'new_from' => $row['new_from'],
 'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.png" style="vertical-align: middle;" alt="' . $row['icon'] . '" />',
 'views' => $row['num_views'],
 'replies' => $row['num_replies'],
 );
 }
 $db->free_result($request);

 // Colorization
 if (!empty($color_ids) && sp_loadColors($color_ids) !== false)
 {
 foreach ($posts as $key => $value)
 {
 if (!empty($color_profile[$value['poster']['id']]['link']))
 $posts[$key]['poster']['link'] = $color_profile[$value['poster']['id']]['link'];
 }
 }

 $context['recent_topics'] = $posts;

 // Just return if we have no results
 if (empty($posts))
 return $txt['error_sp_no_posts_found'];

 echo '
 <div>';

 foreach ($posts as $post)
 {
 echo '
 <div style="display: table-cell; padding: 0 8px" class="centericon">
 ', $post['icon'], '
 </div>
 <div class="" style="display: table-cell">
 <a href="', $post['href'], '">', $post['subject'], '</a>
 ', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><span class="new_posts"> ' . $txt['new'] . '</span></a>';

 echo '
 <div class="middletext">
 ', $txt['by'], ' ', $post['poster']['link'], ' ', $txt['in'], ' ', $post['board']['link'], '
 </br />
 ', $post['time'], ' | ', $txt['views'], ': ', $post['views'], ' | ', $txt['replies'], ': ', $post['replies'], '
 </div>';
 
 if ($show_body)
 echo '
 <div class="middletext">
 ', $post['preview'], '
 </div>';
 
 echo '
 </div>
 <hr>';
 }

 echo '
 </div>';


Do I need to change the code in a file somewhere for this to fix the recent topics order or should this code be placed in a custom PHP block?
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 22, 2014, 05:29:55 pm
Do I need to change the code in a file somewhere for this to fix the recent topics order ...

No...

...or should this code be placed in a custom PHP block?

Yes.  ;)
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 22, 2014, 06:18:44 pm
Thanks Ruth. I have it working now. My only wish is that it would be formatted as the normal Recent Topics left or right block but in the correct order.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 22, 2014, 10:54:12 pm
Quote
Long text looks fine when aligned to sides, however, I think numbers and short text should be centered in tables. Also, I think it would be better if you used name field for the edit page. My intention was to allow for translation of the profile names through the use of $ prefix.
I see, makes sense ... I'll back that edit out on the next push.

Quick question, what issue was being addressed in parse_bbc with the pufff edits ?
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on September 23, 2014, 12:02:27 am
From what I remember, when you pass an array of tags as $parse_tags when using parse_bbc(), it will (re)load all the tags regardless. When we were running parse_bbc() on a dozen of shouts with only selected tags passed by $parse_tags, it brought the server down to its knees. I had to implement my own caching-like mechanism to prevent that. Those are the puff edits.

There is also the parse_bbc('sp') edit made to that function, which is even better. It had taken me quite some time to figure out what was going on. The issue was reported here:

http://simpleportal.net/index.php?topic=8151.0
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 23, 2014, 01:54:20 am
Thanks, that helps. 

Those parse_bbc edits are some of the largest remaining source edits and I did not see a way to avoid those with a hook etc.  Not that I want to add many others hooks to my all time favorite function ;)

Do you think its maybe worth while add those puff edits to the core, seems like a decent improvement for addons etc and I don't immediately see any downside.

parse_bbc('sp')  LOL, I missed that one, that has to stay.  I still have a branch where I replaced parse_bbc with a OOP version, very robust and configurable.  Only slight downside was it was significantly slower (including parsing plain text) than whats there now :P I even tried two existing OOP libraries with the same results.  Some day I may redo it in Zephir just to see ..
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on September 23, 2014, 09:39:04 am
Thanks, that helps. 

Those parse_bbc edits are some of the largest remaining source edits and I did not see a way to avoid those with a hook etc.  Not that I want to add many others hooks to my all time favorite function ;)

Do you think its maybe worth while add those puff edits to the core, seems like a decent improvement for addons etc and I don't immediately see any downside.
If you think the changes are fine and useful, feel free to include them in the core. Being able to limit the tags that would be parsed is a really nice feature and indispensable for some mods. I even considered writing my own little basic parser before I came up with this fix. By the way, I'm not sure but I probably intend this line
Code: [Select]
			$parse_tag_cache = array($tags_cache_id => array($bbc_codes, $disabled));
to be this:
Code: [Select]
			$parse_tag_cache[$tags_cache_id] = array($bbc_codes, $disabled);

parse_bbc('sp')  LOL, I missed that one, that has to stay.  I still have a branch where I replaced parse_bbc with a OOP version, very robust and configurable.  Only slight downside was it was significantly slower (including parsing plain text) than whats there now :P I even tried two existing OOP libraries with the same results.  Some day I may redo it in Zephir just to see ..
Well, parse_bbc() is probably the function that needs a change the most; but it's too big mess with. So, good luck! :D
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 24, 2014, 03:27:18 am
Quote
Being able to limit the tags that would be parsed is a really nice feature and indispensable for some mods.
*nods* thats how I felt once one explained what issue was.  I think it should be in the core as it seems improper that an addon needs to install a patch so things work as they should.  I'll check your update as well, from a quick look I think you are right.

Quote
Well, parse_bbc() is probably the function that needs a change the most; but it's too big mess with. So, good luck! :D
Oh yes, and it certainly has the most impact to performance etc (it received a small speed boost through a few missing optimizations, but its at it limit).  Thats why I'm so tentative about it, lots of downside I'm afraid.



Title: Re: [ADDON] SimplePortal
Post by: morle800 on October 09, 2014, 10:10:20 am
Is it possible to set the portal so that it can be read with a mobile phone? It would make sense hide right and left at the phone see the tables .

I made a screen shoot .
Mobile phone is Sony Xperia Z with Android 4.4.4
Title: Re: [ADDON] SimplePortal
Post by: Spuds on October 09, 2014, 01:38:46 pm
It should be disabling the portal when on a mobile device, that is if Elk correctly sniffs the device as mobile (right now that is a browser sniff so its not as reliable as it could be).

Could you post what your user agent string is for the device, just curious as to why ElkArte may mis-identify it.  You can get that by going to http://whatsmyuseragent.com/



Title: Re: [ADDON] SimplePortal
Post by: emanuele on October 09, 2014, 02:14:12 pm
A long while ago, one thing I did with simple portal and "mobile" was to pile the blocks in a single column, then collapse all the blocks except the "main body", and finally attach an "on click" to the title of each block for expanding the block.
The result was not perfect (because of the order of appearance, but it was not so bad as well.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on October 09, 2014, 02:33:15 pm
Thats a good approach as well, may think about doing that instead of simply turning it off for mobile (not tablet) devices.   First step is to figure out why the "detection" is not working ... I tried the emulator in chrome with a Xperia selected as the device and it shut the portal off as expected so not sure. 

We could of course "dump" our detection class and use one like https://github.com/serbanghita/Mobile-Detect in 1.1
Title: Re: [ADDON] SimplePortal
Post by: overscan on November 28, 2014, 07:48:00 pm
So - on my test forum, it looks like html articles don't work - I get to see the html tags in the output as text.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on November 29, 2014, 01:10:33 am
So - on my test forum, it looks like html articles don't work - I get to see the html tags in the output as text.
This should address that issue, although I may still change how all those source variants are handled.  https://github.com/Spuds/Elk-SimplePortal/commit/ec544184a5344384e3e94602c6c3d250ef514a30

The commits after that one are an experiment in using the editor to handle the various source translations should one swap around.   Of course as with any translations some structure can/will get lost, but hey its just an experiment !
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on November 29, 2014, 01:52:15 pm
You shouldn't need to do that I believe. sportal_parse_content function handles parsing the content as necessary. However article previews don't seem to be using that, so that's the problem.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on November 29, 2014, 02:44:32 pm
Thanks for the hint, I'll take a look :D
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 15, 2014, 08:48:49 pm
I have translated the file SPortal.english.php into italian and then I renamed it into SPortal.italian.php and uploaded into themes/default/languages/italian but my translations are not visible.

If I remember well on SMF there was a package to install the translations of SP. How could I install my italian translation to SP on Elkarte? Thank you in advance.

p.s. Not a big deal, and maybe could have some string errors but I did it quick translation using the old SP translation from Darknico, if this could be useful I attach the italian translation of SPortal.italian.php.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 16, 2014, 01:24:10 am
Thanks ... I'll take a look when I get a couple of free moments, how SP does the languages was not something I've tested in the ElkArte version so could be some bugs !
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 16, 2014, 01:45:22 am
Take your time, for now I "solved" overwriting the content of english files ;)
Title: Re: [ADDON] SimplePortal
Post by: Lars on December 23, 2014, 05:04:50 pm
Where can I change the words "given" and "received" in the member information box? These appear on mouseover over the blue arrow icons.
I want to change them in German words but I can't find where I have to do it. I've searched unsuccessfully on all pages of the portal, the forum and on the language pages. :(
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 23, 2014, 06:49:26 pm
Thats because I forgot to add them so its just using the image name instead  :-[

In Portal.subs find the sp_embed_class function (~line 930).
Code: [Select]
		$default_title = array(
'dot' => $txt['sp-dot'],
'stars' => $txt['sp-star'],
'arrow' => $txt['sp-arrow'],
'modify' => $txt['modify'],
'delete' => $txt['delete'],
'delete_small' => $txt['delete'],
'history' => $txt['sp_shoutbox_history'],
'refresh' => $txt['sp_shoutbox_refresh'],
'smiley' => $txt['sp_shoutbox_smiley'],
'style' => $txt['sp_shoutbox_style'],
'bin' => $txt['sp_shoutbox_prune'],
'move' => $txt['sp_move'],
);
As you can see both 'given' => and 'received' => are missing, so they need to be added. 
Code: [Select]
		$default_title = array(
'dot' => $txt['sp-dot'],
'stars' => $txt['sp-star'],
'arrow' => $txt['sp-arrow'],
'modify' => $txt['modify'],
'delete' => $txt['delete'],
'delete_small' => $txt['delete'],
'history' => $txt['sp_shoutbox_history'],
'refresh' => $txt['sp_shoutbox_refresh'],
'smiley' => $txt['sp_shoutbox_smiley'],
'style' => $txt['sp_shoutbox_style'],
'bin' => $txt['sp_shoutbox_prune'],
'move' => $txt['sp_move'],
'given' => $txt['sp_likes_given'],
'received' => $txt['sp_likes_received'],
);

Then in your Sportal.language.php files add
Code: [Select]
$txt['sp_likes_given'] = 'Given';
$txt['sp_likes_received'] = 'Received';

Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 23, 2014, 07:16:31 pm
the words "given" and "received" in the member information box?
It's strange to me but my block looks different and there are no likes. I'll try to update everything on my localhost
Title: Re: [ADDON] SimplePortal
Post by: Lars on December 23, 2014, 07:26:14 pm

Done. Works fine now. Thank you, Spuds! :)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 23, 2014, 10:16:23 pm
the words "given" and "received" in the member information box?
It's strange to me but my block looks different and there are no likes. I'll try to update everything on my localhost
That just means its been updated (again).  I've tagged release so in the future folks know when to update.  Of course this is still a pre release since the port is still under development etc.   Get it here:

https://github.com/Spuds/Elk-SimplePortal/releases
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 31, 2014, 06:17:06 pm
I think I found a bug in Simple Portal ;)

I have a board news block with 8 news per page and 16 news totaly. So SP inserts the page numbers. I can't go to page 2, the link is wrong (index.php?news8=%1$d;start=8) and should be index.php?news8=8

you can see it in my live site skoda (link in my signature)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 31, 2014, 09:39:02 pm
Yup ...

In PortalBlocks.subs.php find (around line 1408)
Code: (find) [Select]
		$context['page_index']  = constructPageIndex($current_url . 'news' . $id . '=%1$d', $start, $limit, $per_page, false);

and change that false to a true
Code: (replace) [Select]
		$context['page_index'] = constructPageIndex($current_url . 'news' . $id . '=%1$d', $start, $limit, $per_page, true);

Title: Re: [ADDON] SimplePortal
Post by: radu81 on January 01, 2015, 01:10:22 pm
Thank you Spuds, that solved my problem ;)
Title: Re: [ADDON] SimplePortal
Post by: pixer on January 06, 2015, 09:04:52 am
Maybe if only my bad setup SP,
but when i try to change page and click on number 2 or next the page dont change,
always remains in the first page.  :-[

I use SP 2.4
Title: Re: [ADDON] SimplePortal
Post by: radu81 on January 06, 2015, 10:11:29 am
See the answer from spuds 2 posts below.;)
Title: Re: [ADDON] SimplePortal
Post by: pixer on January 06, 2015, 12:14:25 pm
See the answer from spuds 2 posts below.;)

Thanks!   O:-)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on January 07, 2015, 12:30:09 pm
I noticed that the cutoff tag (http://simpleportal.net/index.php?action=docs;area=the_cutoff_tag) is not working. Was this removed?

I found another small bug in SP. When I create a block "Board Statistics", the stats are showed correctly, but on Total users there is a link to index.php?action=mlist instead of index.php?action=memberlist.
To solve it we must edit /sources/subs/PortalBlocks.subs.php
on line 375 find
Code: [Select]
									<li ', sp_embed_class('portalstats'), '>', $txt['total_members'], ': <a href="', $scripturl . '?action=mlist">', comma_format($totals['members']), '</a></li>
and replace with:
Code: [Select]
									<li ', sp_embed_class('portalstats'), '>', $txt['total_members'], ': <a href="', $scripturl . '?action=memberlist">', comma_format($totals['members']), '</a></li>
Title: Re: [ADDON] SimplePortal
Post by: emanuele on January 07, 2015, 02:44:43 pm
Yep, I can see a small trace of the cutoff tag, but none in the places where it would give result.
I see an "articlelength" setting somewhere, but funnily enough I can't find it in my code. lol
Title: Re: [ADDON] SimplePortal
Post by: radu81 on January 07, 2015, 03:34:33 pm
I can set a max number of characters before a post is cut an that works. Is in the settings of block Board News, you need to create it first.

there is also "Maximum Characters" for articles block (I did not tested yet on elkarte)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on January 18, 2015, 12:16:24 am
Thats because I forgot to add them so its just using the image name instead  :-[

In Portal.subs find the sp_embed_class function (~line 930).
Code: [Select]
		$default_title = array(
'dot' => $txt['sp-dot'],
'stars' => $txt['sp-star'],
'arrow' => $txt['sp-arrow'],
'modify' => $txt['modify'],
'delete' => $txt['delete'],
'delete_small' => $txt['delete'],
'history' => $txt['sp_shoutbox_history'],
'refresh' => $txt['sp_shoutbox_refresh'],
'smiley' => $txt['sp_shoutbox_smiley'],
'style' => $txt['sp_shoutbox_style'],
'bin' => $txt['sp_shoutbox_prune'],
'move' => $txt['sp_move'],
);
As you can see both 'given' => and 'received' => are missing, so they need to be added. 
Code: [Select]
		$default_title = array(
'dot' => $txt['sp-dot'],
'stars' => $txt['sp-star'],
'arrow' => $txt['sp-arrow'],
'modify' => $txt['modify'],
'delete' => $txt['delete'],
'delete_small' => $txt['delete'],
'history' => $txt['sp_shoutbox_history'],
'refresh' => $txt['sp_shoutbox_refresh'],
'smiley' => $txt['sp_shoutbox_smiley'],
'style' => $txt['sp_shoutbox_style'],
'bin' => $txt['sp_shoutbox_prune'],
'move' => $txt['sp_move'],
'given' => $txt['sp_likes_given'],
'received' => $txt['sp_likes_received'],
);

Then in your Sportal.language.php files add
Code: [Select]
$txt['sp_likes_given'] = 'Given';
$txt['sp_likes_received'] = 'Received';


on next release, please remember to add it ;)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 18, 2015, 02:52:21 am
It will be ... I have a few changes for a .0.1 update, nothing major at all but a few tweaks like the above that have been IDed

Now the bigger update is still a ways off, probably with 1,1 itself
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 07, 2015, 11:18:02 pm
Updated package to address several issues reported on the 0.0.1 pre release. This one will now only install in ElkArte 1.0.2 and above as well.

1) cutoff tag was missing, its been added back
2) missing language strings for likes given/received on member block
3) wrong link to the member list
4) who's online list did not show proper portal actions
5) shoutbox block could spam the error log when a session times out
6) relative time did not work in the page or article sections
7) couple of minor block performance tweaks
8) various format tweaks here and there

No source edits changed so you can just replace your existing files with this, or uninstall and reinstall the new version. Your choice.

https://github.com/Spuds/Elk-SimplePortal/releases/tag/0.0.2

Still pre-release of course, since thats whats 2.4 is !
Title: Re: [ADDON] SimplePortal
Post by: meetdilip on February 08, 2015, 04:13:45 am
Thank you @Spuds
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 22, 2015, 11:03:16 am
I just uninstalled the old 2.4 version and installed the 2.4.1 version, I added a thread with [cutoff] tag and in the homepage I saw this
Fatal error: Call to undefined function preparsecode() in ...sources/subs/PortalBlocks.subs.php on line 1301
no other blocks from SP were displayed

On topic view the cutoff tag was displayed
Title: Re: [ADDON] SimplePortal
Post by: emanuele on February 22, 2015, 01:24:55 pm
Just before:
Code: [Select]
	$return = array();
$colorids = array();
5 lines above 1301:
https://github.com/Spuds/Elk-SimplePortal/blob/b43678156d338e9667d72c5f34ea9fcb2545058f/subs/PortalBlocks.subs.php#L1301

add:
Code: [Select]
require_once(SUBSDIR . '/Post.subs.php');
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 22, 2015, 02:46:01 pm
Well it did worked then, it cut it off  O:-)  ;D
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 22, 2015, 03:07:30 pm
Thanks Emanuele!
So it will be:
Code: [Select]
	$return = array();
$colorids = array();
while ($row = $db->fetch_assoc($request))
{
// Using the cutoff tag?
$limited = false;
if (($cutoff = Util::strpos($row['body'], '[cutoff]')) !== false)
{
$row['body'] = Util::substr($row['body'], 0, $cutoff);
require_once(SUBSDIR . '/Post.subs.php');
preparsecode($row['body']);
$limited = true;
}

that fixed the cutoff tag in portal, but in topic is still visible
skodaclub.it/index.php?topic=3328.0
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 22, 2015, 08:11:58 pm
another question:

on SP we can set permissions for blocks: Geusts, Members or Everyone. In SP for SMF I have also a "Custom" option where I can set a block for Moderators, Admin or other Custom Group. Was this removed form SP for Elkarte?


==edit==
found it  O:-)
Title: Re: [ADDON] SimplePortal
Post by: nhwood on February 23, 2015, 12:45:59 pm
Came across a few issues while using SimplePortal

 This isn't really an issue but I'd like help with changing the drop down menu items under Community to move under Forum and changing Community to Home.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 23, 2015, 11:08:38 pm
Thanks for the report(s) ... I'll take a look at these soon and get another small update together.
Title: Re: [ADDON] SimplePortal
Post by: nhwood on February 24, 2015, 01:41:01 am
I don't know if this applies to just me but my left side blocks come out scrambled on the mobile version of my site.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 24, 2015, 03:46:01 am
Thats two bugs really ... 1) it is supposed to disable the portal when its on mobile since 2) I have not worked out the media queries to format mobile or enable a show on mobile option for the blocks.
Title: Re: [ADDON] SimplePortal
Post by: nhwood on February 24, 2015, 11:46:23 pm
I noticed that the problem appeared when I changed my mobile browser settings to Desktop Mode.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on March 03, 2015, 11:46:49 pm
when using a block there is "No Body" option in "Style Option". If I use that option the borders and any other css property should not be ignored? If I remember well in smf were ignored

==edit==
I think is a bug, I tried in SMF and all borders, margins, background, shadows were removed
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 06, 2015, 01:11:14 am
Updated the first post with a 0.0.3 pre release, it should address some of the items posted since the 0.0.2 release.  You need to uninstall and re-install as it adds a new hook to address the cutoff tag showing in posts.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on March 06, 2015, 08:29:13 am
Thank you for this release Spuds! I can confirm that cutoff tag is working fine and also the "No body" options and styles
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 14, 2015, 10:32:40 am
in the old SP for SMF I could set a topic as article, but I cannot find this option into SP for Elkarte. Is this a bug or it was removed for some reason? TY
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 14, 2015, 02:14:45 pm
probably a bug ... where were / how were you able to do that?
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 14, 2015, 03:01:22 pm
I see the article are different, I can add php, html or bbc article in SP for Elkarte.

In Sp for SMF I can add topics as articles:
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 15, 2015, 11:56:42 pm
Looking at this a bit more, I believe what we have is correct since we are based on SP 2.4

One of the new features in 2.4 will be forum independent articles, where you have a separate way to add articles and comments vs the 2.3.x way of adding a new topic to a board and then marking that as an article. 

As such when you go to add an article it now expects you to enter one vs select a post.

I know all the specifics had not  been hashed out on the new system, but indeed this appears to be the proper direction.

Anyway feedback is welcome ;)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 16, 2015, 11:53:23 am
It's surely a more advanced system and in this way could be a good alternative to wp or any other blog software. I like it. I'm not in from of my pc now to make other tests but could be possible to list the articles from one category and make a list of available categories?
Title: Re: [ADDON] SimplePortal
Post by: gevv on May 20, 2015, 06:45:09 pm
Hi,

I installed  simple portal new forum (wedge to elkarte )  portal page blank
"""Integration Hooks Management""" enabled

I could not solve the problem
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 21, 2015, 12:34:19 am
Just so I check the right things, where did you get the portal package ?  Just want to make sure I don't have some old link running around.

Since you are getting a blank page, I'd guess its a fatal error, you should have something in your server error log. 

Should not be to difficult for us to solve, SP-elk is running on multiple sites at this point.
Title: Re: [ADDON] SimplePortal
Post by: gevv on May 21, 2015, 06:50:08 pm
Hi,
I downloaded the http://addons.elkarte.net

one line has an error code

Code: [Select]
[19-May-2015 23:29:23 Europe/Istanbul] PHP Notice:  Undefined offset: 5 in /xxx/public_html/elk/sources/subs/ScheduledTask.class.php on line 968
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 22, 2015, 02:28:39 am
That error is harmless in this instance. 

Send me a PM with the site address where I can take a look, I may be able to see something by visiting.  If you are willing, please set up a temp account with admin access so I can also take a look at how its enabled and let me know the uid/pass in the PM.  I'm sure its a simple issue, its just finding it that may take a moment.
Title: Re: [ADDON] SimplePortal
Post by: gevv on May 22, 2015, 07:50:41 pm
Hi,
Thank you for your interest

I sent the information PM
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 22, 2015, 11:32:06 pm
Got it and it should be fine now ... sent you a PM with the details :D
Title: Re: [ADDON] SimplePortal
Post by: gevv on May 23, 2015, 03:50:59 pm
Hi,

authorize a group just to add article how can?

do not delete the article  only publish and edit
Title: Re: [ADDON] SimplePortal
Post by: emanuele on May 24, 2015, 09:56:35 pm
As far as I can see, at the moment it's not possible, to be able to do that, the permission should be split.
I'm not sure how much work it would be.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on June 06, 2015, 03:38:12 pm
Spuds, great job on this, as I'm a heavy user of SimplePortal. :)

However, I have made a page, and if on mobile device, it seems besides the portal not showing, which is good for side blocks, the pages do not, either. How would I get it to show the pages on mobile devices?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 09, 2015, 03:07:26 pm
Darn, Well that sounds like a bug for sure ... did the page contain blocks as well or was it just a simple page?
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on June 09, 2015, 03:42:56 pm
Simple page.
I had to go into sources/subs/Portal.subs.php and remove the mobile from the list of disabled.

Find:
Code: [Select]
// Portal not enabled, or mobile, or debug, or maintenance, or .... then bow out now
if ($context['browser_body_id'] == 'mobile' || !empty($settings['disable_sp']) || empty($modSettings['sp_portal_mode']) || ((!empty($modSettings['sp_maintenance']) || !empty($maintenance)) && !allowedTo('admin_forum')) || isset($_GET['debug']) || (empty($modSettings['allow_guestAccess']) && $context['user']['is_guest']))

Replace with:

Code: [Select]
// Portal not enabled, or mobile, or debug, or maintenance, or .... then bow out now
if (!empty($settings['disable_sp']) || empty($modSettings['sp_portal_mode']) || ((!empty($modSettings['sp_maintenance']) || !empty($maintenance)) && !allowedTo('admin_forum')) || isset($_GET['debug']) || (empty($modSettings['allow_guestAccess']) && $context['user']['is_guest']))

Then, I set the side blocks to display: none; in themes/default/css/portal.css

Find:

Code: [Select]
#sp_left, #sp_right {
position: absolute;
}

Replace with:

Code: [Select]
#sp_left, #sp_right {
position: absolute;
display: none;
}

That also re-enabled pages to show, and Header, Footer, Top and Bottom blocks, as well.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on June 09, 2015, 06:59:57 pm
Sorry for double post, but another strange bug.
If have the Users Online Today addon installed, and set the Who's Online block to use it, it messes up the main forum Info Center, making so only users online today shows. Nothing else will show in reg info center, just that.... LOL
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 11, 2015, 02:01:17 pm
Sorry for the delay, been crazy busy these last few days.
 
First I can see that there is still an old link or two around on the download package, I'm trying to find them all and remove them!  I can see you have a slightly dated version of SP as I had moved the "mobile disable" to be a setting in the portal options so it was easy to enable or disable.  The new version also has a per-block "show on mobile" option, so you can turn off certain blocks when a mobile user visits.

What I'm thinking of doing is to bypass the mobile disable if a page or article has been requested.  The real intent of the disable was for a front page where you may have say 10-15 blocks and that is simply not going to do well on a smart phone, but it should allow you to have pages / articles.

The "latest master" package is here: https://github.com/SimplePortal/SimplePortal_ElkArte/releases/tag/v1.0.0-beta.1  

Have not had a chance to see what is going on with the Users Online Today thing,  but will check !
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on June 11, 2015, 03:47:46 pm
EDIT:

@Spuds

I have the newer SP installed now, and have it set to not show the blocks I have on left side, in each block, yet they still show.

For now, I'm okay with editing the @media screen and (max-width: 32em) section of portal.css with following changes:

Code: (Find) [Select]
#sp_right {
left: 0;
width: 100% !important;
display: block;
}
#sp_left {
left: 0;
width: 100% !important;
display: block;
}

Code: (Replace With) [Select]
#sp_right {
left: 0;
width: 100% !important;
display: none;
}
#sp_left {
left: 0;
width: 100% !important;
display: none;
}

Yes, I intentionally left the rest there, even if changed block to none, so when true fix is made, I can easily change it back.... LOL

After looking again, the check boxes for the Show on mobile: in block settings, do not have any effect, either way, on any block.
Either way have it, they show on mobile devices.

Pages show, though, so with my fix, it shows as I want it, pages and main blocks and no side on mobile. :)

Yet another Edit: @Spuds - I forked, and did pull request, as there was a fix for the Who's online block that I found. It was a height issue. :)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 12, 2015, 03:57:56 pm
Thanks for the PR, its been merged  ;)

On the mobile blocks issue, could you check that your db table "sp_blocks" has a column names "mobile_view" ... Just want to make sure it was not an upgrade thing I missed or if its some other issue.

Thanks for the CSS as well !

Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on June 12, 2015, 07:09:33 pm
Yes, it's at the bottom, @Spuds

Code: [Select]
12	mobile_view	tinyint(4)			No 	0
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 12, 2015, 09:02:42 pm
Could you check that the column was actually added, should be able to see it with phpmyadmin or other tool.   I'm still checking the code, I had made a few alterations just before B1
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on June 12, 2015, 10:14:35 pm
@Spuds

That's where I got that from. :P

It is taking the settings, into the DB. If I go look at the list of blocks, there's either a 0 or a 1 under the mobile view.
So it's not database, it seems.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on June 15, 2015, 01:17:32 pm
New bug, I think.
This may have to do with the newest, that you posted, as I never had this oddity before.

I set a new block, and had it set to be between 2 blocks.
However, even though it shows where I set it in block list, it appears at the bottom when look at the site.

Also, I can move blocks around all over, yet it will not reflect when looking at them on any page, action, etc. Just in the list are they changed.

I tried to move a block from bottom of left, to top of top, and it shows it at bottom of top blocks.

However, after checking, I just noticed it's only for me, they are showing wrong...
How do I reset the portal block order for members, in case they reset the order, when they could have?


EDIT:

I just found another oddity.
Last week, I had changed from Portal Front Page, to Integration.
That is why I think the above is an issue for me, as I tried moving the blocks around in the past on portal main page.
However, when not on Front Page mode, you can not move them anymore.

Now, after doing the upgrade, it seems if try to set back to Front Page, get this:

Quote
An Error Has Occurred
Unable to load the 'main' template.

Quote
Burke Knight
Today at 11:15:20 AM
Type of error: Template
Unable to load the 'main' template.
URL http://www.webmastershaven.net/index.php?
      
Burke Knight
Today at 11:09:02 AM
Type of error: Template
Unable to load the 'main' template.
URL http://www.webmastershaven.net/index.php?
      
Burke Knight
Today at 11:08:37 AM
Type of error: Template
Unable to load the 'main' template.
URL http://www.webmastershaven.net/index.php?http://www.webmastershaven.net/

Note how it added to the URL in each error.
Yet, the URL the browser said I was on, was just http://www.webmastershaven.net/index.php

Unknown why it added the ? to 2, and the whole thing again to the last one.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 16, 2015, 03:22:58 pm
I could see there being a problem with not being able to arrange the blocks while in integration mode.  Not 100% sure I can fix that either, I'll see what can be done, hummmm.  The arrangement would follow what was set in front page mode though. 

When in front page mode, if you have a custom arranged block layout, you should see a 3rd icon at the top right of the blocks, right with the collapse right / left icons, it will look like a small checkers board.  Click that will reset your block arrangement back to default, there is no global reset though.

ETA:  If you want to do some quick testing, the following should enable the DD in integration as well as front page mode.  Seems to work but need to do more testing when swapping modes etc. In portal.subs.php
Code: (find) [Select]
	// We use drag and sort blocks for the front page
if ($modSettings['sp_portal_mode'] == 1)
{
Code: (replace) [Select]
	// We use drag and sort blocks for the front page
if ($modSettings['sp_portal_mode'] <= 2)
{


Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on June 16, 2015, 04:41:15 pm
@Spuds

Seems to work. I'll keep eye on it, but looks good to me.

No errors, and no seemingly ill effects.  ;D



EDIT:
When in front page mode, if you have a custom arranged block layout, you should see a 3rd icon at the top right of the blocks, right with the collapse right / left icons, it will look like a small checkers board.  Click that will reset your block arrangement back to default, there is no global reset though.

I have it set to not allow side collapsing, so is there a way to make the 3rd button show, when set this way?

Also, if set to allow, does not show, when set to integrate.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on July 08, 2015, 04:28:16 pm
@Spuds

I have images showing, in custom BBC block. Now, when they show, they are able to be clicked, because of being resized.
Is there a way to make them not be click-able?

Doing as the BBC is the only way, to have them resize correctly, when viewing on mobile.
Here is link to the site, so can see what talking about:

http://www.deadman.cc.nf/

The 2 images, just under the linktree.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on July 09, 2015, 01:14:01 pm
I can't think of an existing way for that ... We could add a custom bbc code that prevents the resize on click, which I believe is done with the JS in the theme.js file.  Could even, maybe, just customize the img bbc tag with a nolink attribute or something like that?
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on July 09, 2015, 01:50:02 pm
Quote
Could even, maybe, just customize the img bbc tag with a nolink attribute or something like that?

That's an idea.  :)
Title: Re: [ADDON] SimplePortal
Post by: Flavio93Zena on July 09, 2015, 11:25:28 pm
Or even set a cursor: default instead of cursor: pointer. People won't click on them because the pointer doesn't "tell" them to :P
Title: Re: [ADDON] SimplePortal
Post by: emanuele on July 10, 2015, 12:35:58 am
Good point. :D
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on July 10, 2015, 01:16:07 am
True... Especially since no link shows when hovering over them.
Title: Re: [ADDON] SimplePortal
Post by: Flavio93Zena on July 10, 2015, 01:25:08 am
 8)
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on July 10, 2015, 02:14:18 am
@Spuds
Found another little bug, that may/may not be an issue in SP itself.
As I cant test in a SMF with SP, I'll have to hope someone else can.

When set a block to show using the Advanced Options, if do not check Post the block still shows on post page.
I had to add a Custom Display Option of: -~action|post
Title: Re: [ADDON] SimplePortal
Post by: cjazz on August 06, 2015, 08:15:22 pm
Why when adding a new custom html block to the "Header Block Section" the new block covers the full width of the portal template?  The problem then is that right hand side blocks gets pushed down below the full width custom block and should be adjacent to the centre block column.
Hope that makes sense?
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on August 06, 2015, 08:30:18 pm
Have you tried using the "Top" block position? From what I understand, I think that's what you want.
Title: Re: [ADDON] SimplePortal
Post by: cjazz on August 06, 2015, 08:59:19 pm
Have you tried using the "Top" block position? From what I understand, I think that's what you want.
Thank you again, it's very much appreciated.
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on August 06, 2015, 09:16:25 pm
You're welcome! Have fun using SimplePortal! ;)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on August 08, 2015, 06:45:49 pm
There is something I miss from the old simple portal, the ability to set a topic as article. I know that article system has been improved, but I still miss that feature
Title: Re: [ADDON] SimplePortal
Post by: radu81 on August 26, 2015, 09:37:50 am
Is there any way to disable comments on some articles or better in some article categories?
I would like to build some static content, I know I could use pages in SP but there are no categories for pages
Title: Re: [ADDON] SimplePortal
Post by: Flavio93Zena on August 26, 2015, 09:44:02 am
Hmm maybe I should tag Sinan, but the tag is not working... ? Wanted to, because it could be in the next version maybe.

EDIT: forgot brackets, @[SiNaN] :)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on September 26, 2015, 07:53:56 pm
Is there a way to list all articles from all categories? something like

Category 1
- Article 1
- Article 2
- Article 3

Category 2
- Article 4
- Article 5
- Article 6
....etc

==edit==
solved
Title: Re: [ADDON] SimplePortal
Post by: Graph on November 09, 2015, 03:51:50 am
I am not sure this is the right spot to ask this question (please tell me where better): I installed elk and SP and the portal does not show up on the iphone 6 in any orientation. (On the ipad is does, though.) The option to hide the portal on mobile is not ticked.

Well, I guess my question really is: is the behavior I witness so by chance or by design?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on November 09, 2015, 10:55:34 pm
There are two things needed (currently) to enable the portal for mobile devices.

1) Under general settings, make sure "Disable on mobile devices" is not checked.  This is the master portal setting as some admins don't want to try and show the portal on a phone.
2) Now for each block that you want to show on a mobile device, in that block definition check "Show on mobile:"

This allows you to selectively show certain blocks for mobile devices so they are not overwhelmed.  The portal try's to stack as best it can, it still needs to be converted to a div layout to improve its mobile responsiveness.
Title: Re: [ADDON] SimplePortal
Post by: Graph on November 09, 2015, 11:33:45 pm
Yes, step (2) is what I missed and all's good now that I checked those options. Thank you!
Title: Re: [ADDON] SimplePortal
Post by: kode54 on December 26, 2015, 09:11:00 am
Any chance of a flexible "multiple" portals system? Specifically, I wish to use a frontpage portal for the main part of a site, and configure its topic/post blocks to only show posts from select forums. Then I want to feature a block or two on a specific subforum's index page, containing a list of recent topics configured to that subforum and all of its nested subforums.

So: Frontpage, plus optional blocks on a specific subforum.

I already have this on an existing crufty IP Board 2.3.x installation, at https://hydrogenaud.io/, where the main site displays a main portal, and subforum 28 displays the foobar2000 subforum, along with a recent posts view for its children. This was managed through installation of a custom portal script, and custom theme bits that are required by the forum script. The theme bits are all mismanagable through IP Board's awful theme editor, where you create/edit bits by name, and contents are mixed HTML and PHP script which can reference arbitrary variables set by the code which instantiates them. Minor yuck.
Title: Re: [ADDON] SimplePortal
Post by: Keiro on December 26, 2015, 09:43:15 am
Hi.

Code: [Select]
Unknown column 'spb.style' in 'field list'
File: /home/user/public_html/sources/subs/Portal.subs.php
Line: 394

Note: Your database version is 1.0.5.

SimplePortal 2.4 © 2008-2014 as shown by footer. I had used 0.0.3 from your Github.

ETA: 0.0.2 has same issue. Testing 0.0.1... /ETA

ETA2: 0.0.1 also borkenated. So basically every one of the releases is broken for me. :c I must've grabbed one of the older copies prior to that table going into effect... ah well, I'm sure we'll fix it.

So... yeah. :P
Title: Re: [ADDON] SimplePortal
Post by: ahrasis on December 26, 2015, 03:38:41 pm
Any chance of a flexible "multiple" portals system? Specifically, I wish to use a frontpage portal for the main part of a site, and configure its topic/post blocks to only show posts from select forums. Then I want to feature a block or two on a specific subforum's index page, containing a list of recent topics configured to that subforum and all of its nested subforums.

So: Frontpage, plus optional blocks on a specific subforum.

I already have this on an existing crufty IP Board 2.3.x installation, at https://hydrogenaud.io/, where the main site displays a main portal, and subforum 28 displays the foobar2000 subforum, along with a recent posts view for its children. This was managed through installation of a custom portal script, and custom theme bits that are required by the forum script. The theme bits are all mismanagable through IP Board's awful theme editor, where you create/edit bits by name, and contents are mixed HTML and PHP script which can reference arbitrary variables set by the code which instantiates them. Minor yuck.

Interesting... We once managed to do that with PortaMX and its subforums mod while using SMF. However, no other portal mods is able to do that as we never try to tap into its code.

If I have a chance, may be I'll try to look into the possibilities of using subforums addon and simple portal addon to produce something similar.
Title: Re: [ADDON] SimplePortal
Post by: meetdilip on December 26, 2015, 03:57:26 pm
Is there any chance to make sidebar by Simple Portal act responsive. Last time I tried the sidebar overlapped on home page.
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on December 26, 2015, 04:31:09 pm
Any chance of a flexible "multiple" portals system? Specifically, I wish to use a frontpage portal for the main part of a site, and configure its topic/post blocks to only show posts from select forums. Then I want to feature a block or two on a specific subforum's index page, containing a list of recent topics configured to that subforum and all of its nested subforums.

So: Frontpage, plus optional blocks on a specific subforum.

I already have this on an existing crufty IP Board 2.3.x installation, at https://hydrogenaud.io/, where the main site displays a main portal, and subforum 28 displays the foobar2000 subforum, along with a recent posts view for its children. This was managed through installation of a custom portal script, and custom theme bits that are required by the forum script. The theme bits are all mismanagable through IP Board's awful theme editor, where you create/edit bits by name, and contents are mixed HTML and PHP script which can reference arbitrary variables set by the code which instantiates them. Minor yuck.

Interesting... We once managed to do that with PortaMX and its subforums mod while using SMF. However, no other portal mods is able to do that as we never try to tap into its code.

If I have a chance, may be I'll try to look into the possibilities of using subforums addon and simple portal addon to produce something similar.

Having blocks that only appear on certain boards/pages/custom URLs is definitely possible with SimplePortal.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on December 26, 2015, 04:48:15 pm
ETA2: 0.0.1 also borkenated. So basically every one of the releases is broken for me. :c I must've grabbed one of the older copies prior to that table going into effect... ah well, I'm sure we'll fix it.
For some reason (don't ask me the reason :P), I see that the code in the master branch uses "styles" (plural), while all the releases have "style" (singular). Could it be you grabbed the master first an a release later on?
As far as I can see, master is in active development, while the releases are rather "old" (0.0.3 is from March).
First thing I'd check the database to see what's the name of the column: "style" or "styles". If the latter then I guess you can grab the master zip (https://github.com/Spuds/Elk-SimplePortal/archive/master.zip) and upload the files you can find there (disclaimer: I don't know what are the differences between master and the tags, so maybe wait until Spuds replies :P).
Title: Re: [ADDON] SimplePortal
Post by: Keiro on December 26, 2015, 06:44:09 pm
ETA2: 0.0.1 also borkenated. So basically every one of the releases is broken for me. :c I must've grabbed one of the older copies prior to that table going into effect... ah well, I'm sure we'll fix it.
For some reason (don't ask me the reason :P), I see that the code in the master branch uses "styles" (plural), while all the releases have "style" (singular). Could it be you grabbed the master first an a release later on?
As far as I can see, master is in active development, while the releases are rather "old" (0.0.3 is from March).
First thing I'd check the database to see what's the name of the column: "style" or "styles". If the latter then I guess you can grab the master zip (https://github.com/Spuds/Elk-SimplePortal/archive/master.zip) and upload the files you can find there (disclaimer: I don't know what are the differences between master and the tags, so maybe wait until Spuds replies :P).

master.zip and all the releases do not work for me. I suspect I'll have to completely remove the SP data and then retry installing.

Edit: So "uninstalling" something like 3 or 4 times with several different SimplePortal versions finally got it to where it was uninstalled.

Then I tried reinstalling. SimplePortal now works. I don't know what happened but... I guess somewhere in one of those multiple uninstall attempts, I managed to unstick something just enough to get it fixed properly.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on December 28, 2015, 03:34:02 pm
@Spuds

Is there any way to do a reset on the customization of block layout for all members?
I have done some new blocks, and would like to be sure they are in the correct position.
Also, any way to totally disable members from drag and dropping the blocks?
I have it somewhat done, it seems, but the move icon still shows, when hover over the block titles.

Using:
SimplePortal 1.0.0 Beta 1 © 2008-2014

I have done some modifications to shoutbox, and other areas, so that's why on that particular version.
Title: Re: [ADDON] SimplePortal
Post by: phantom on December 28, 2015, 09:26:51 pm
I had similiar error as Keiro, but with different field:
Code: [Select]
Unknown column 'spb.visibility' in 'field list'
File: Portal.subs.php
Line: 400

Note: Your database version is 1.0.1.

Column 'visibility' does not exist in sp_blocks table.
Title: Re: [ADDON] SimplePortal
Post by: kode54 on January 09, 2016, 02:42:37 am
Having blocks that only appear on certain boards/pages/custom URLs is definitely possible with SimplePortal.
Yeah, I already noticed that, a bit late. Thanks.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on January 16, 2016, 02:33:05 pm
@Spuds

Is there any way to do a reset on the customization of block layout for all members?
I have done some new blocks, and would like to be sure they are in the correct position.
Also, any way to totally disable members from drag and dropping the blocks?
I have it somewhat done, it seems, but the move icon still shows, when hover over the block titles.

Using:
SimplePortal 1.0.0 Beta 1 © 2008-2014

I have done some modifications to shoutbox, and other areas, so that's why on that particular version.

Still need a fix for this, @Spuds
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 22, 2016, 02:37:00 am
Sorry been very busy with RL and trying to catch up ...

If a member did a custom block arrangement, there should be a little "grid" icon up where the right/left collapse buttons are.  That will reset the arrangement to the defaults (for that user).  There is not currently a master reset for all users,  one could be added.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on January 22, 2016, 03:10:16 am
Sorry been very busy with RL and trying to catch up ...

If a member did a custom block arrangement, there should be a little "grid" icon up where the right/left collapse buttons are.  That will reset the arrangement to the defaults (for that user).  There is not currently a master reset for all users,  one could be added.
Would you know what the link would be?
There's no icon, which means it may have gotten removed when we removed the ability to adjust the blocks, way back when.
I guess it stayed as set, when removed it.

Managed to find it in default, and nailed it.
But yes, a quick fix to reset all would be nice, if could tell me how some time. :)
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on February 13, 2016, 03:45:11 am
@Spuds
Okay, looks like a new error in logs for the portal, due to preg_replace.

Code: [Select]
Type of error: General
8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

sources/subs/PortalBlocks.subs.php
Line: 2009
Code: [Select]
$data = preg_replace('~<\!\[CDATA\[(.+?)\]\]>~eu', '\'#cdata_escape_encode#\' . Util::htmlspecialchars(\'$1\')', $data);

Attaching the file for you.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 13, 2016, 04:00:37 am
Ah thanks ... thought I got all of those ... Which version of SP do you have?   I was more than a little, umm sloppy, with the alpha/beta releases I did so I've caused my own mess there.

I do have a newer version that I really need to finish off ... kind of the RC1 for SP for Elk ... should have all of the latest SP 2.4 updates plus the Elk updates and various enhancements ... its getting close to the top of the list for me to finish off ... OK more like work on again  O:-)
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on February 13, 2016, 05:02:00 am
@Spuds, I have an older version, I think, but since did a lot of modifying of it....
version 1.0.0 Beta 1
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 13, 2016, 12:21:13 pm
The fix was done here: https://github.com/Spuds/Elk-SimplePortal/commit/c87c12db4dcb4fed984dca4dd4a4fe8a4b01c995
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on February 13, 2016, 01:31:56 pm
Worked like a charm! Thank you, @Spuds.
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 15, 2016, 02:44:17 pm
Any idea why the portal page is not displayed on phones?
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 15, 2016, 03:36:32 pm
maybe this can help http://www.elkarte.net/community/index.php?topic=1399.msg21617#msg21617
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 15, 2016, 04:12:08 pm
maybe this can help http://www.elkarte.net/community/index.php?topic=1399.msg21617#msg21617
I was running Simple Portal 2.4.1 and just updated to version 2.4.2.  I don't have the option to show on mobile devices under General Settings or under the block definitions, in either version of Simple Portal.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 15, 2016, 05:18:20 pm
The latest version should be this https://github.com/Spuds/Elk-SimplePortal/releases/tag/0.0.3
I still use the old version, let me know if it works ;)
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 15, 2016, 05:56:51 pm
The latest version should be this https://github.com/Spuds/Elk-SimplePortal/releases/tag/0.0.3
I still use the old version, let me know if it works ;)
That is the version I am using.  It is 2.4.2.  There are no options for mobile devices in it.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 15, 2016, 08:31:03 pm
I tried that file and I confirm it does not have the option to disable on mobile. I tried this version and now I see the option to disable on mobile:
http://www.elkarte.net/community/index.php?topic=1399.msg22320#msg22320
Uninstall first Simple Portal ( do not delete the data from database) delete the old package and install the new one.


(https://www.elkarte.net/community/imagecache.php?image=http%3A%2F%2Fi.imgur.com%2FDNbfGRt.png&hash=6da53cd98d0eacd68f064847c04d7ca2" rel="cached" data-warn="External image, click here to view original" data-url="http://i.imgur.com/DNbfGRt.png)

===edit===
I give up on this, I see the option to disable blocks on mobile, but my home page is blank with this version. Tested in localhost
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 15, 2016, 09:05:37 pm
Weird, the last configuration option I see on my site is resize images.
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 16, 2016, 03:02:34 pm
Another problem with Simple Portal is login into the forum from the User Info block.  Users get an error and most of the time it works the second time they try, but others have the hell of a time login in from that block.  The users get the following error:
Unable to verify referring URL. Please go back and try again.

Workaround: Disable User Info for Everybody and only enable it for Members.  That prevents the User Info login box to show up for Guests or members that are not logged in.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on February 17, 2016, 08:57:04 am
hmm... that's odd.
Do you have any "ajax-like" stuff for guests? (Chat, shoutbox, others?)
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 17, 2016, 04:04:00 pm
hmm... that's odd.
Do you have any "ajax-like" stuff for guests? (Chat, shoutbox, others?)
I do have a shoutbox, but it is disabled for guests.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 18, 2016, 02:24:43 pm
Sorry for the confusion on the mobile stuff ... and the version numbers ... fudge nuggets happens !

On the 0.0.3 version, there are (2) things to do for mobile .. the checkbox under settings is the "master" setting which just let you turn the portal should it detect its on a mobile (phone) device. 

If you choose to enable that, you MUST still choose which blocks you want to show on the mobile device.  To do that you need to enable "show on mobile" for that block under the specific blocks settings.  This allows you to not have to many blocks show up on a phone.

Not sure on the logon issue, will check.
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 18, 2016, 06:24:11 pm
I am on the 0.0.3 version and I don't have the options for mobile.  See the attached screenshots.  I have removed and reinstalled Simple Portal a few times already.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 19, 2016, 03:48:50 am
Please try the version from here: https://github.com/SimplePortal/SimplePortal_ElkArte/releases/tag/v1.0.0-beta.1

That is the latest beta, its newer than 0.0.3  ..  There will be a B2 in the next few weeks or so.
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 19, 2016, 05:02:37 am
Thanks a lot, that fixed the mobile devices issue.  I will test the login issue with B2.
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 19, 2016, 02:09:54 pm
FYI, the shoutbox stopped working on B1.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 19, 2016, 02:20:29 pm
I'll take a look at the SB now, give me a couple mins

ETA:
The B1 shoutbox seems to be working as expected to me, could you provide more details of whats not working?Ah now I see .. will post a fix for you in a bit

Quote
I will test the login issue with B2.
Do not use B2 in anything other than a development board.  It has quite a few changes from B1 and you will cause yourself problems.
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 19, 2016, 04:03:29 pm
You are right, shouts are working.  What happened with the upgrade is that the display order changed and the shouts were at the bottom of the shoutbox.  Sorry for the false alarm and thanks again!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 19, 2016, 04:04:46 pm
Actually I did find a case that caused them to stop working  :D  ;D  I'll give you a new template file to use to fix that in a bit.

ETA:  little bug in the shout template which could cause a JS parsing error ... Just replace your PortalShoutbox.template.php with the one below (its also now in the distro) ... it should be in your themes/default folder

Title: Re: [ADDON] SimplePortal
Post by: txcas on February 20, 2016, 01:58:58 am
Thanks again!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 02, 2016, 02:36:37 am
Sneak preview of B2 ... do NOT use on your production sites, just for early testing for those that want to help find (and fix) some bugs.

This is a rather large update, larger than should have been for a Beta1 to Beta2, but since I've been moving a bit slow on things these days and I wanted to get these features out before 2020, they are now in Beta 2 :P

So whats new:


Now some may be thinking, dude I needs to get me some of dat stuff ... so this is where you do it .. https://github.com/Spuds/Elk-SimplePortal/archive/B2.zip  Remember this is for testing only since its a big change code wise from B1.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on March 02, 2016, 04:05:40 am
@Spuds, nice! Will test it on one of my clones.

However, I'd like to make some suggestions.

1. PM in shoutbox, as the thread on the SP site: http://simpleportal.net/index.php?topic=12338.0
2. Way in admin, to disable and reset the custom block moving on main page. This is in case there's new blocks added, and the admin wants to reset everyone to default, due to them. Or, if the admin does not want members to move the blocks around.

EDIT:

@Spuds, We may have our first issue:

Quote
An Error Has Occurred
The database value you're trying to insert does not exist: id_block

Tested on clean fresh ElkArte 1.0.6 forum.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on March 02, 2016, 11:32:55 am
  • Its now Beta2 instead of Beta1, I know, holy crap right !
This is it!! :P

  • Profiles everywhere, well in more places.  [...] This goodness is from @[SiNaN]  and I ported it back from SP2.4
This is very, very, very nice to read!!
/me loves profiles!

  • Block Classes,
There is still a lot to do in that respect, but that is a very good start!

  • Replaced the main table structure with divs to help make it more responsive.  This is the top/left/right/bottom/header/footer areas.  Not tested in all areas so I expect some issues ...
Nice thing that too! :D
Title: Re: [ADDON] SimplePortal
Post by: emanuele on March 02, 2016, 11:39:54 am
Quote
An Error Has Occurred
The database value you're trying to insert does not exist: id_block

Tested on clean fresh ElkArte 1.0.6 forum.
In the error log there should be some more hints about file/function involved.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on March 02, 2016, 01:37:43 pm
@emanuele & @Spuds

Error Log:

Code: [Select]
Type of error: Critical
The database value you're trying to insert does not exist: id_block
Function: require
URL http://www.bkforum.cc.nf/index.php?action=admin;area=packages;sa=install2;package=Elk-SimplePortal-B2.zip;pid=0
public_html/bkforum.cc.nf/packages/temp/Elk-SimplePortal-B2/database.php
Line: 326

Type of error: Undefined
8: Undefined variable: block_ids
URL http://www.bkforum.cc.nf/index.php?action=admin;area=packages;sa=install2;package=Elk-SimplePortal-B2.zip;pid=0
public_html/bkforum.cc.nf/packages/temp/Elk-SimplePortal-B2/database.php
Line: 318

Type of error: Undefined
8: Undefined variable: block_ids
URL http://www.bkforum.cc.nf/index.php?action=admin;area=packages;sa=install2;package=Elk-SimplePortal-B2.zip;pid=0
public_html/bkforum.cc.nf/packages/temp/Elk-SimplePortal-B2/database.php
Line: 317

Type of error: Undefined
8: Undefined variable: block_ids
URL http://www.bkforum.cc.nf/index.php?action=admin;area=packages;sa=install2;package=Elk-SimplePortal-B2.zip;pid=0
public_html/bkforum.cc.nf/packages/temp/Elk-SimplePortal-B2/database.php
Line: 316

Type of error: Undefined
8: Undefined variable: block_ids
URL http://www.bkforum.cc.nf/index.php?action=admin;area=packages;sa=install2;package=Elk-SimplePortal-B2.zip;pid=0
public_html/bkforum.cc.nf/packages/temp/Elk-SimplePortal-B2/database.php
Line: 315

Type of error: Undefined
8: Undefined variable: block_ids
URL http://www.bkforum.cc.nf/index.php?action=admin;area=packages;sa=install2;package=Elk-SimplePortal-B2.zip;pid=0
public_html/bkforum.cc.nf/packages/temp/Elk-SimplePortal-B2/database.php
Line: 314

Type of error: Undefined
8: Undefined variable: block_ids
URL http://www.bkforum.cc.nf/index.php?action=admin;area=packages;sa=install2;package=Elk-SimplePortal-B2.zip;pid=0
public_html/bkforum.cc.nf/packages/temp/Elk-SimplePortal-B2/database.php
Line: 313

Type of error: Undefined
8: Undefined variable: block_ids
URL http://www.bkforum.cc.nf/index.php?action=admin;area=packages;sa=install2;package=Elk-SimplePortal-B2.zip;pid=0
public_html/bkforum.cc.nf/packages/temp/Elk-SimplePortal-B2/database.php
Line: 312

Type of error: Undefined
8: Undefined variable: block_ids
URL http://www.bkforum.cc.nf/index.php?action=admin;area=packages;sa=install2;package=Elk-SimplePortal-B2.zip;pid=0
public_html/bkforum.cc.nf/packages/temp/Elk-SimplePortal-B2/database.php
Line: 311
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 02, 2016, 02:15:19 pm
Sorry about that one, I'll get a fix out soon  :D

Use the database.php attached (or in the repo now), it should fix the error.  When I did my quick install test I neglected to remove my old tables so boom !
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on March 02, 2016, 03:07:59 pm
Installed. Now, get white page for portal "Front Page"
http://www.bkforum.cc.nf/index.php
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 02, 2016, 03:52:44 pm
Looks good ... clean ... minimalist ...  :P    Any errors in the php or site log?
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on March 02, 2016, 04:23:12 pm
Looks good ... clean ... minimalist ...  :P    Any errors in the php or site log?

No errors in the log. Just blank main page.
When get back to PC, will see what goes on integration.

EDIT:

Seems like the block settings pages, are also just blanks.
Again, no errors in log.
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on March 02, 2016, 09:29:36 pm
Quote
Block Classes, gone is the massive and gnarly PortalBlock.subs.php.  All blocks are now in separate files under the spblocks directory (under subs).   Now each block is its own class (and template) allowing much easier block creation and modification.  Adding a new block is as simple as creating a new block file and adding it to the directory.  SimplePortal will find the new file and allow you to use the block (for completeness you should add the block name and description to the language file).  This goodness is from @emanuele

You might as well call this SimplePortal 3.0 Beta.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 04, 2016, 12:28:01 am
EDIT:

Seems like the block settings pages, are also just blanks.
Again, no errors in log.
So far I'm not finding the problem on my local.  I know when it trys to upgrade its not as clean as it could be, due to the profiles, I'm still not sure how to approach that aspect.

Could you uninstall (and select the remove data associated with checkbox) and then reinstall ... I just want to be sure there are not SP tables or settings that could be messing things up.

If you still have blank pages (or even before you try to remove it), check what permission and visibility profiles are assigned to the blocks. 
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on March 04, 2016, 12:41:01 am
1. Visibility of blocks, would have no bearing on the non-sp content that also is not showing. XD
2. This was not an upgrade, it was a clean forum, SP this B2 version only.
3. Like stated above, block settings gives me blanks screen, so can not check them. However, they should be default, as never got to change them.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 04, 2016, 02:19:40 am
No idea then since I have nothing to go on ATM.

Fresh 1.0.6 install .. no changes at all ... installed SPB2 http://devel.spudsdesign.com/index.php
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on March 04, 2016, 09:40:31 am
Strange indeed... And even stranger, when go to uninstall, get one error showing:

38.    Delete File    ./sources/subs/PortalBlocks.subs.php    Modification parse error

How do you get that on a deletion? LOL
Title: Re: [ADDON] SimplePortal
Post by: emanuele on March 04, 2016, 10:47:37 am
Maybe, have a look at the permissions for that file, it sounds almost like it cannot be read by Elk...
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on March 04, 2016, 01:36:51 pm
Maybe, have a look at the permissions for that file, it sounds almost like it cannot be read by Elk...

@Spuds, Following the above, take a wild guess what I do not find in /sources/subs/

PortalBlocks.subs.php

Just checked the downloaded file from the post announcing the B2 release, and file is not in there, either.

EDIT: After getting the file from the repo, I can now see the main block list, but still white page on Front Page, and on block settings for each block.

EDIT 2: Deactivated all blocks. Made new one, and now have settings page for new block, and front page works.
Must be something went wrong due to that file being missing...

EDIT 3: Uninstalled, added the file to the package, re-uploaded and installed, and things right now. So confirms my edit #2. XD
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 04, 2016, 02:30:35 pm
Quote
38.    Delete File    ./sources/subs/PortalBlocks.subs.php    Modification parse error
Which means the install package you had was not the latest, I fixed that here: https://github.com/Spuds/Elk-SimplePortal/commit/125886dfa5b265ac12b43714d8c6acb7f51bbe92  It can't delete that file since it no longer exists or is used in B2.

Make sure you are not using the zip file from the master branch, you need to use the one from the B2 branch.  https://github.com/Spuds/Elk-SimplePortal/archive/B2.zip

Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on March 04, 2016, 03:10:00 pm
Quote
38.    Delete File    ./sources/subs/PortalBlocks.subs.php    Modification parse error
Which means the install package you had was not the latest, I fixed that here: https://github.com/Spuds/Elk-SimplePortal/commit/125886dfa5b265ac12b43714d8c6acb7f51bbe92  It can't delete that file since it no longer exists or is used in B2.

Make sure you are not using the zip file from the master branch, you need to use the one from the B2 branch.  https://github.com/Spuds/Elk-SimplePortal/archive/B2.zip



Well, I'd downloaded the package from the post you made: http://www.elkarte.net/community/index.php?topic=1399.msg23984#msg23984
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 04, 2016, 03:27:20 pm
Thats the correct link (both times), but when its updated you need to download it again to, well get the updates.  Anyway point is PortalBlocks.subs is gone, don't add it .. and when you uninstall use the checkbox to remove the tables or the installer will be in update mode not install mode.
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on March 05, 2016, 07:53:38 pm
Make sure you are not using the zip file from the master branch, you need to use the one from the B2 branch.  https://github.com/Spuds/Elk-SimplePortal/archive/B2.zip
Why not tag your release commits?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 05, 2016, 09:07:31 pm
I do, check the repo  ;)  ... but in this case it was
Quote
Sneak preview of B2

Maybe I should have tagged it 1.0.0 Beta 2 Alpha 1  :P  It has not even been merged into the master branch.

Since it was a sizable change for a Beta rev I just wanted to get some tire kicks done before I packed it up formal ... I regret doing that now.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on March 05, 2016, 09:42:25 pm
xD
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on March 05, 2016, 11:48:18 pm
I do, check the repo  ;)  ... but in this case it was
Quote
Sneak preview of B2

Maybe I should have tagged it 1.0.0 Beta 2 Alpha 1  :P  It has not even been merged into the master branch.

Since it was a sizable change for a Beta rev I just wanted to get some tire kicks done before I packed it up formal ... I regret doing that now.

Nah, I wouldn't regret it. I'd just call it Beta 2 RC. :P

But what I mean about tags is:
https://github.com/Spuds/Elk-SimplePortal/tags
https://github.com/SimplePortal/SimplePortal_ElkArte/tags
:P

I don't see it. Nor under Releases on either repo. Do you have a hidden repo/branch I can't see?
Title: Re: [ADDON] SimplePortal
Post by: niloc on June 21, 2016, 12:28:23 pm
@Spuds this SimplePortal addon isn't meant for ElkArte 1.1 right? Just checking, cause yeah it doesn't seem to be installing in my 1.1 beta. :/
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 21, 2016, 12:41:14 pm
Sorry, right now its 1.0 only.   I have not tested it at all in 1.1 (or any of my addons for that matter).
Title: Re: [ADDON] SimplePortal
Post by: niloc on June 21, 2016, 01:29:22 pm
Cools. No worries. Just checking.. I think you won't have enough time to get this done and stabilize 1.1 at the same time.. haha.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on June 22, 2016, 08:26:59 am
I installed the portal yesterday again in my testforum, which is new and not-migrated. ;)

There are a few bugs in portal, as I believe...a few things in the sources, ore maybe three strings are missing in the language file, for everyone, guests and members) Because, if I edit a profile it says for example $_everyone not everyone, as it should be. (see  screenshots)

Also if I just look at the profiles in portal, there are always errors in the log, like this: ...sources/admin/PortalAdminProfiles.controller.php

The error says, that there are no profiles.

The portal is working perfekt in my migrated forum, so maybe those errors are not important. But I don't know if I can ignore them. I am a bit afraid to install other modifications there because of the errors in the log.



Title: Re: [ADDON] SimplePortal
Post by: niloc on June 22, 2016, 12:25:59 pm
Was this for 1.1 or 1.07 btw?
Title: Re: [ADDON] SimplePortal
Post by: Ruth on June 22, 2016, 01:31:37 pm
It is ElkArte 1.0.7
Title: Re: [ADDON] SimplePortal
Post by: Ruth on July 14, 2016, 10:22:28 pm
I don't want to annoy and I do not want to be "forceful" (dont know, if I can say so in English),  ;)  I just would like to know...

@Spuds are you still working on the SimplePortal (or anybody else)?

Or is it finished and done for you?

Would it be possible to use the portal in future, together with 1.0.8 or 1.1.?

There are a few bugs in portal, yesterday I found another, which is very irritating to me and is leading to some errors in the log (Very difficult to explain, the portal block "Theme select" is not working proper and will create a second ElkArte Default Theme in the admin panel)

As far as I use the portal (but I don't use any feature) everything seems to work, as it should work or could be done somehow. So I think, that the bugs/errors in portal are not very serios and can be ignored? But I am not sure about this...

I would like to have everything "perfect", O:-)  without errors and I would like to finish the translation of the portal-language-files in a perfect way, but I can't do this, because there is is something wrong or missing in portal.

Title: Re: [ADDON] SimplePortal
Post by: emanuele on July 14, 2016, 10:28:34 pm
The first step to have everything as much perfect as possible is report the issues encountered.
Without knowing there is a bug, it's impossible to fix it. ;D

Now you have reported the bug and I'm pretty sure Spuds will fix it. :P
/me can't fix bugs because he prefers to create new ones! LOL
Title: Re: [ADDON] SimplePortal
Post by: Ruth on July 14, 2016, 10:44:31 pm
/me can't fix bugs because he prefers to create new ones! LOL

I know... ;) And I really do like your signature, Emanuele, I always smile, if I see it. :)

I have reported some of the irritations in portal here as well German language files for SimplePortal (http://www.elkarte.net/community/index.php?topic=3692.msg26237#msg26237), but there was no reaction... :'(

So I thought, that maybe Spuds is no longer working with this addon. O:-)
Title: Re: [ADDON] SimplePortal
Post by: Ruth on July 15, 2016, 09:47:06 am
I found that one:

(http://www.elkarte.net/community/index.php?action=dlattach;topic=1399.0;attach=3822;image)

It has nothing to do with the portal. It was wrong in index.german. php

On line 294 there was:

Code: [Select]
$txt['welcome_guest'] = 'Willkommen, <strong>%1$s</strong>. Bitte <a href="%2$s">melde dich an</a>.';

But it should be this:
Code: [Select]
$txt['welcome_guest'] = 'Welcome, <strong>Guest</strong>. Please <a href="{login_url}">login</a>.';

I changed it that way:
Code: [Select]
$txt['welcome_guest'] = 'Willkommen, <strong>Gast</strong>. Bitte <a href="{login_url}">melde dich an</a>.';

And now it is working.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on July 15, 2016, 10:24:03 am
From which language file are those three strings coming from?

$_everyone
$_guests
$_members

They are not in one of the portal language files and not in index.english.php

Edit: They are in SPortalAdmin.english.php, of course  ;) ...but they are not working proper:

$txt['sp_admin_profiles_guests'] = 'Gäste';
$txt['sp_admin_profiles_members'] = 'Mitglieder';
$txt['sp_admin_profiles_everyone'] = 'Alle';

I have tried to change them a few times, but it did not work. There are always errors about the profiles in portal.

Title: Re: [ADDON] SimplePortal
Post by: live627 on July 16, 2016, 12:59:28 am
If the language files work the same as in SMF, they are cached.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on July 16, 2016, 02:15:53 am
Sorry, I don't understand this...what do you mean by "cached"?

I think, there were no special "permission profiles" for SimplePortal with SMF, this is new with ElkArte. Those three strings are new in SPortalAdmin.english.php. In the SMF-File are strings like this for the shoutbox and for the pages, but they work in a different way, as the permission profiles do in ElkArte.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on July 19, 2016, 08:49:36 am
Since where language files are cached in SMF?
Nope, language files are not cached (AFAIR at least).

I feel in this period Spuds is rolling around with a poor internet connection, so he is keeping his online activity to a minimum.
If I'll get a chance I'll try to have a look at the issues (after the releases). Feel free to bump the topic if it doesn't happen because most likely I forgot.... xD)
Title: Re: [ADDON] SimplePortal
Post by: Ruth on July 19, 2016, 11:12:02 am
Poor Spuds...thank you, Emanuele.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 05, 2016, 02:01:24 am
Yes bad internet which results in overuse of my mobile data plan, so I have to temporarily let some things slide  :(

I'm still working on the portal, there is a Beta 2 that I've been running live on a site and its been working very well.  I still have to fix the B1 to B2 upgrade as best I can so others can use it without to many manual tweaks.

I'll check on those language strings to see why they are not being translated,k I tracked this on github so when I have time and bandwidth I'll take a look :D



 
Title: Re: [ADDON] SimplePortal
Post by: goosekeeper on January 09, 2017, 12:18:48 am
First of all, wonderful community and great work. 

I'm having difficulty with Simple Portal on mobile. 

Specifically "Pages" are not handling width correctly.  Any ideas?

(https://www.elkarte.net/community/imagecache.php?image=http%3A%2F%2Fwww.runningrum.com%2Fsources%2Fimages%2FIMG_0115.PNG&hash=3a05f265fd0f727e6f93a6622cbe92dc" rel="cached" data-warn="External image, click here to view original" data-url="http://www.runningrum.com/sources/images/IMG_0115.PNG)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 09, 2017, 01:10:39 am
I'm not sure how that page would even look on mobile :/

I feel you would need to write your own media queries (you can target that page ID) and create a specific layout for a proper mobile view..

For a custom page SP (by default) can really only set a width/font size type items as it has no real idea what the content and layout that is placed inside.
Title: Re: [ADDON] SimplePortal
Post by: shaitan on February 02, 2017, 10:43:59 pm
Hello,

Search box pointing to action=serch2  (SMF format).

Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 02, 2017, 11:48:13 pm
Thanks for the report, I'll fix it in B2
Title: Re: [ADDON] SimplePortal
Post by: shaitan on February 03, 2017, 10:17:38 pm
Another (not seen in the subjet).

Menu => Page List
Don't show link for pages created.

(don't lost time to answer me about that).


Question about B2:
Should we retrieve  the function to link a part of subject to the portal ?



Title: Re: [ADDON] SimplePortal
Post by: shaitan on February 22, 2017, 07:30:22 pm
French translation in attachment.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 22, 2017, 10:47:46 pm
Awesome ... I've added it to the Beta 2 version which I'm trying to get out soon!
Title: Re: [ADDON] SimplePortal
Post by: radu81 on March 30, 2017, 10:41:57 pm
On my first forum migrated to elkarte I still use the old version of Simple Portal 2.4 and the portal is disabled for mobile phones. I want to add some articles (or maybe pages, I am still undecided) but with this version the pages and articles are not displayed on mobile (I get redirected to forum index) That's a bug and took me years to discover it.  :D
On my newest forum which uses Simple Portal 1.0.0 beta 1 pages and articles are displayed correctly on mobile phones.

I would like to know if there is a way to update SP from 2.4 to 1.0.0 beta 1. A  few months ago I tried to uninstall 2.4 version then install the 1.0 beta 1, I don't remember exactly what happened but it didn't work. I also tried to delete data from database during the uninstall process and start from scratch, but without success. 

p.s. what about the beta 2 version? I see it's not indicated for a live site, if it hasn't known or major bugs I will test it on my forum and report eventually bugs.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 30, 2017, 11:26:03 pm
I've been running B2 for some time (now on 2 sites)  ;)  Having someone else run it would be awesome since I just don't get to test all of the areas so its hard to get full debug.  I made some final *cough* tweaks to B2 in the last couple of months, actually just pushed a couple of minor updates today. 

The main delay in B2 was the update path, and thats one of the things I tried to improve.  This week I did an 2.4->B2 update and it went very well for how I had that site setup. 

The main "gotcha" to look for is how it converts to the new display and style profiles.  It does its best to match back to the standard ones, and what it can't find it creates as imported profiles.  So when its done you will want to go through your blocks and make sure the permissions/views/style profiles are correct, and if you had some custom ones, rename the imported names to something descriptive.

Anyway please give it a whirl, attached is the latest
Title: Re: [ADDON] SimplePortal
Post by: Decent_946 on March 31, 2017, 03:52:41 pm
Hello There Everyone,

I have been using this add-on and it is really amazing . You guys are doing great work!

But i am having a very little problem.

well actually, I am sending you two images. In the 1st image, You'll notice that after every  spoiler ( click toshow/hide ) there is no any kind of line spacing. While in 2nd picture you'll find there a little space.

Actually, In 1st picture. I have created a topic in the forum while the 2nd image is a page of the simple portal. I guess it is problem of portals template preview. Where they are using line-height to add space between two lines/images. But i have tried removing them. But still no luck.

Image 1: http://i.imgur.com/ycLZrou.jpg
Image 2: http://i.imgur.com/cOom72a.jpg

A little help would be appreciated!

Thank You!

EDIT:

One more request, I want to remove that white borders present as a outside layot of each block.
can be found in this image what i am talking about: http://i.imgur.com/F7CClaP.png

Thank you once again!
Title: Re: [ADDON] SimplePortal
Post by: radu81 on March 31, 2017, 05:18:17 pm
Thank you Spuds, I just installed this addon on a test forum.

For now just a small bug in Board News block, I show 24 items in 3 pages, I cannot go to page 2 or 3
It goes to domain.tld/index.php?start=10;news8=%1$d;start=10 instead of domain.tld/?news8=10



One more request, I want to remove that white borders present as a outside layot of each block.
can be found in this image what i am talking about: http://i.imgur.com/F7CClaP.png
I did not tested but I think you need to go in ACP > Simple Portal > Profiles > Add style profile
and create a new profile which you will need to apply to that block
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 31, 2017, 05:45:34 pm
Hello There Everyone,

I have been using this add-on and it is really amazing . You guys are doing great work!

But i am having a very little problem.

well actually, I am sending you two images. In the 1st image, You'll notice that after every  spoiler ( click toshow/hide ) there is no any kind of line spacing. While in 2nd picture you'll find there a little space.

Actually, In 1st picture. I have created a topic in the forum while the 2nd image is a page of the simple portal. I guess it is problem of portals template preview. Where they are using line-height to add space between two lines/images. But i have tried removing them. But still no luck.

Image 1: http://i.imgur.com/ycLZrou.jpg
Image 2: http://i.imgur.com/cOom72a.jpg

A little help would be appreciated!

Thank You!
I'm not quite understanding the issue ... is it that the spoiler text wrapped ?
EDIT:

One more request, I want to remove that white borders present as a outside layot of each block.
can be found in this image what i am talking about: http://i.imgur.com/F7CClaP.png

Thank you once again!
I think for no border at all you will need to edit the portal.css file ... it should be the .sp_block_section .. look for
Code: [Select]
 border 1px solid #ccc; 
and change that
Code: [Select]
border 1px transparent;
You may also have to changae the box-shadow (in that same .sp_block_section) to be transparent.


Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 31, 2017, 05:46:27 pm
Quote
For now just a small bug in Board News block, I show 24 items in 3 pages, I cannot go to page 2 or 3
It goes to domain.tld/index.php?start=10;news8=%1$d;start=10 instead of domain.tld/?news8=10
I'll take a look !

ETA:
open the file BoardNews.block.php (/subs/spblocks) on line 262 find:
Code: (find) [Select]
			$context['sp_boardNews_page_index'] = constructPageIndex($current_url . 'news' . $id . '=%1$d', $start, $limit, $per_page, false);
Code: (replace) [Select]
			$context['sp_boardNews_page_index'] = constructPageIndex($current_url . 'news' . $id . '=%1$d', $start, $limit, $per_page, true);

So change that last false to a true
Title: Re: [ADDON] SimplePortal
Post by: Decent_946 on March 31, 2017, 06:01:10 pm
I'm not quite understanding the issue ... is it that the spoiler text wrapped ?
Its not spoilers issue. I just want that SPACE ( DARK BLACK BAR ) to be removed !





I think for no border at all you will need to edit the portal.css file ... it should be the .sp_block_section .. look for
Code: [Select]
 border 1px solid #ccc; 
and change that
Code: [Select]
border 1px transparent;
You may also have to changae the box-shadow (in that same .sp_block_section) to be transparent.
I'll try this one. Thank you!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 31, 2017, 06:14:43 pm
Quote
Its not spoilers issue. I just want that SPACE ( DARK BLACK BAR ) to be removed !
Oh that ...
Edit the index_dark.css in your theme directory.

Find the .spoiler {} section (~line 393)
Change the
Code: [Select]
background-color: #1a1a1a;
to either
Code: [Select]
background-color: #1e1e1e;
or
Code: [Select]
background-color: transparent;
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 01, 2017, 12:03:24 am
So change that last false to a true
yep, that worked, thank you!

  • Updated the news block to use the enhanced block that emanuele posted.  Basically it shows the good old block, but in addition if there is an attachment or image in the post, it shows that as a leading left floated image in the post.  This gives it a bit of a blog look to the block.
what about this? did you test it on your website? The previous block made by Emanuele works fine with SP 2.4 and beta 1.
Now no image is displayed, I selected the option "Display first attachment:" 
In elkarte error log I see only some undefined offset errors
Title: Re: [ADDON] SimplePortal
Post by: emanuele on April 01, 2017, 12:45:25 am
Did I do a block? :o
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 01, 2017, 01:41:28 am
Quote
what about this? did you test it on your website? The previous block made by Emanuele works fine with SP 2.4 and beta 1.
Now no image is displayed, I selected the option "Display first attachment:"
In elkarte error log I see only some undefined offset errors
Open up BoardNews.block.php, in the setup function find
Code: (find) [Select]
		$attachments = !empty($parameters['attachments']);
Code: (replace) [Select]
		$attachments = !empty($parameters['attachment']);
so just drop that 's' and it should be  8)

Title: Re: [ADDON] SimplePortal
Post by: Decent_946 on April 01, 2017, 08:00:00 am
Quote
Its not spoilers issue. I just want that SPACE ( DARK BLACK BAR ) to be removed !
Oh that ...
Edit the index_dark.css in your theme directory.

Find the .spoiler {} section (~line 393)
Change the
Code: [Select]
background-color: #1a1a1a;
to either
Code: [Select]
background-color: #1e1e1e;
or
Code: [Select]
background-color: transparent;
Thank you so much sir!! 😊
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 01, 2017, 10:28:10 am
Did I do a block? :o
yes and it's a nice one ;) http://www.elkarte.net/community/index.php?topic=2387.msg17894#msg17894


so just drop that 's' and it should be  8)
Thanks again, it works now.
I will do other tests, then I will update my forums ;)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 04, 2017, 11:55:24 am
Don't know if I should post here or in the Localization board, but in attachment the italian translation (removed useless lines and added the missing lines)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 05, 2017, 01:34:35 am
I am still testing the beta 2 and I think I found a bug  :D
In SP beta 1 version, on mobile, the order of blocks are: header blocks, left blocks and right blocks.
In SP beta 2 version, on mobile, the order of blocks are: left blocks, right blocks and header blocks.

I don't use left blocks, I only use header + right blocks and I noticed that on tablet (less than 765px width) the right block is displayed on left and next to it the header blocks. On mobile I see first the right blocks and then the header blocks.

Is this a bug or is there any reason of this behaviour? thank you
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 05, 2017, 02:16:24 am
I'm pretty sure B1 was still using a table layout with some CSS hacks to make it kind of responsive.  

B2 I converted everything over to a div layout so it would be easier to use CSS media querys. 

I'm Not sure on what order I set it up as, or if there is a correct one to start with when they get "stacked".  I guess it would be header->left->top->bottom->right->footer ????
Title: Re: [ADDON] SimplePortal
Post by: Antechinus on April 05, 2017, 03:16:49 am
Depends what result you want. IIRC (not having used SP live myself) your header and footer blocks are full width, with top and bottom blocks being sandwiched between the right and left blocks.

If that is the case, I'd be inclined to mark them up as header->left->top->right->bottom->footer. Alternatively, header->top->left->right->bottom->footer might work, but I have a feeling it'd be harder to arrange the presentation (haven't thought it through much yet).

Although you could argue for other arrangements. It shouldn't matter that much if you are disabling the blocks on mobile, or simply stacking them vertically on mobile. I'd just go with whatever gives the simplest and most flexible CSS for the full desktop version, and let them stack however they like on small screens. They'll all be the same width then anyway.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 06, 2017, 01:44:44 am
 I guess it would be header->left->top->bottom->right->footer ????
Yes, that's the order set in SPortal beta 2.

I don't know which could be the ideal order or if is there any that may feet most forums, but in the last years using Joomla and several templates I noticed that usually they are all set in this order: header > top > bottom > left > right >footer
Here just a quick example found using Google images:
desktop: (https://templates.joomla-monster.com/joomla30/jm-personal-site/images/features/positions-desktop.jpg) and mobile (https://templates.joomla-monster.com/joomla30/jm-personal-site/images/features/positions-mobile.jpg)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 07, 2017, 11:10:40 am
Sorry if I insist on this, but is there any chance that Sportal will be modified to show on mobile this order of blocks?
Header > Top > Left > Right > Bottom > Footer?
IMO this is more flexibile, and if someone wants to show first the left and right blocks it's just enough to use the bottom block instead of top block for Board news. As it is set now, Top and Bottom blocks are not having much sense to exist, they are identical.
Usually the left and right blocks are "static" blocks" and is better to show first the latest news rather than the classic blocks we set on left/right (statistics, staff block, social pages, who's online, etc...)


Another think I found is that using article bbc the tables are not rendered correctly (see attached)
 

EDIT
After saving the article bbc table code is changed from: 
Code: [Select]
[table][tr][td][b]Dimensioni esterne[/b][/td]
[td]
[/td]
[/tr]
[tr][td]Lunghezza [mm][/td]
[td]4697[/td]
[/tr]
[tr][td]Larghezza [mm][/td]
[td]1882[/td]
[/tr]
[tr][td]Altezza [mm][/td]
[td]1655[/td]
[/tr]
[tr][td]Passo [mm][/td]
[td]2791[/td]
[/tr]
[tr][td]Altezza libera da terra [mm][/td]
[td]187 {188}[/td]
[/tr]
[tr][td]Carreggiata anteriore [mm][/td]
[td]1586[/td]
[/tr]
[tr][td]Carreggiata posteriore [mm][/td]
[td]1576[/td]
[/tr]
[/table]

to:

Code: [Select]
[table][tr][td][b]Dimensioni esterne[/b][/td]
[/tr]
[/table]
[table][tr][td]
[/td]
[/tr]
[/table]

[table][tr][td]Lunghezza [mm][/td]
[/tr]
[/table]
[table][tr][td]4697[/td]
[/tr]
[/table]

[table][tr][td]Larghezza [mm][/td]
[/tr]
[/table]
[table][tr][td]1882[/td]
[/tr]
[/table]

[table][tr][td]Altezza [mm][/td]
[/tr]
[/table]
[table][tr][td]1655[/td]
[/tr]
[/table]

[table][tr][td]Passo [mm][/td]
[/tr]
[/table]
[table][tr][td]2791[/td]
[/tr]
[/table]

[table][tr][td]Altezza libera da terra [mm][/td]
[/tr]
[/table]
[table][tr][td]187 {188}[/td]
[/tr]
[/table]

[table][tr][td]Carreggiata anteriore [mm][/td]
[/tr]
[/table]
[table][tr][td]1586[/td]
[/tr]
[/table]

[table][tr][td]Carreggiata posteriore [mm][/td]
[/tr]
[/table]
[table][tr][td]1576[/td]
[/tr]
[/table]
Title: Re: [ADDON] SimplePortal
Post by: emanuele on April 07, 2017, 01:19:35 pm
Just something I noticed while installing B2, I'm not sure if it can be considered a bug or not because I had a very old install. Anyway the column "mobile_view" was not present in the database and the installer choked.
I just added a check for it in:
Code: [Select]
		// Add visibility profile col to sp_blocks
$db_table->db_add_column('{db_prefix}sp_blocks', array('name' => 'visibility', 'type' => 'mediumint', 'size' => 8, 'default' => 0, 'unsigned' => true));

if (isset($block_cols['mobile_view']))
{
// Read in the "old" data
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 08, 2017, 12:12:27 am
Sorry if I insist on this, but is there any chance that Sportal will be modified to show on mobile this order of blocks?
Header > Top > Left > Right > Bottom > Footer?
I've tweaked the css and template so this can be achieved, however it will only work on modern browsers, an no I will not do anything for browsers that this does not work with. 

There is also one change on the desktop layout that this causes, the bottom / top blocks are no longer constrained to  be the same width.  This means if the right or left blocks don't stop the bottom blocks from reaching the right or left side, then it will (see pictures)
IMO this is more flexibile, and if someone wants to show first the left and right blocks it's just enough to use the bottom block instead of top block for Board news.
There is never going to be a right answer here, no matter what, someone will think another way makes more sense. 

Remember that an option for showing things where you want is to use the mobile view.  You can always show a right block on desktop, and then that same block could appear in the bottom section only for mobile.  You just place the same block in two places, one shows on mobile, one does not.


Another think I found is that using article bbc the tables are not rendered correctly (see attached)
Have not looked into this yet
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 08, 2017, 12:58:23 am
Thanks for your answer Spuds.

Quote
Remember that an option for showing things where you want is to use the mobile view. You can always show a right block on desktop, and then that same block could appear in the bottom section only for mobile.  You just place the same block in two places, one shows on mobile, one does not.
I already thought about a similar trick duplicating blocks and set them to be visible only on mobile, but there is no way (or at least I did not found it) ... If a block is set to be visible on mobile automaticaly will be displayed in desktop version too. What is missing is a "hide on desktop option" am I right?

Quote
There is never going to be a right answer here, no matter what, someone will think another way makes more sense. 
I agree on this, it's more like a personal taste...  Probably the order I prefer is just because using other CMS I get used to this order of blocks

regarding the tables into bbcode articles I just found this: I created the article using a normal post, then  copied the bbcode and pasted into bbc article. Once saved the article the bbcode is not modified. The table bbcode get changed in article edit if I use the preview option.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 08, 2017, 02:39:28 am
regarding the tables into bbcode articles I just found this: I created the article using a normal post, then  copied the bbcode and pasted into bbc article. Once saved the article the bbcode is not modified. The table bbcode get changed in article edit if I use the preview option.
Thanks for the details, I was about to say I can't make it happen :D

Edit PortalAdminArticles.controller.php find and delete the following (starting at line 319) .. the preparsecode is already taken care of at that point, so doing it again is not a good idea.
Code: (delete) [Select]
			// Fix any bbc errors they have created
if ($context['article']['type'] === 'bbc')
{
preparsecode($context['article']['body']);
}

While you are at it ... edit Portal.subs.php around line 575
Code: (find) [Select]
	if (!empty($_GET['article']) && (empty($context['current_action']) || $context['current_action'] === 'portal'))
{
$article_info = sportal_get_articles($_GET['article'], true, true);
}
Code: (replace) [Select]
	if (!empty($_GET['article']) && (empty($context['current_action']) || $context['current_action'] === 'portal'))
{
require_once(SUBSDIR . '/PortalArticle.subs.php');
$article_info = sportal_get_articles($_GET['article'], true, true);
}
So add that require_once or clicking on an article on a portal page will 500 yer server.

Just something I noticed while installing B2, I'm not sure if it can be considered a bug or not because I had a very old install. Anyway the column "mobile_view" was not present in the database and the installer choked.
That must have been an old install, but then again who knows, trying to update these beta's is one glorious pain in the butt.  I've put a check in place to skip that column if its not found, should work now!


Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 08, 2017, 09:43:12 am
That solved the problem with tables in article  8)
In topic view tables are displayed with borders, in article view tables are without borders.


I already thought about a similar trick duplicating blocks and set them to be visible only on mobile, but there is no way (or at least I did not found it) ... If a block is set to be visible on mobile automaticaly will be displayed in desktop version too. What is missing is a "hide on desktop option" am I right?
Please don't forget about this  O:-)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 08, 2017, 02:39:53 pm
If you want to test the new mobile layout ..... use the attached css / template

Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 08, 2017, 08:44:55 pm
Works fine for me  ;D thank you!!!
Whan you say it won't work with old browsers, but how old?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 08, 2017, 10:43:54 pm
Since I'm only using (flex box) for the media query's the "recent" comment is only be relevant for mobile devices.  The two most relevant ones are .... android >=4.4 and ios safari >=9.2 so really it would have to be an old brick not to work.

Now if it was desktop, well all of IE is out, you need at least Edge 14 ... FX and Chrome, well any version since 2013/2014 or so ... pretty safe in that area as well.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 09, 2017, 12:23:53 am
Don't have such an old device to test, but I will upgrade soon SP on my forum with this version. If my members will complain I'll use the version you provided initially and I will disable right blocks on mobile. Problem solved! 

I did a test with IE11 & win 10 and everything seems fine, even resizing the window the blocks are displayed correctly. I also test with one small block on TOP position and other blocks on the right, works perfect on desktop.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 09, 2017, 12:50:11 am
On my local I have the "fix" for the tables not formatting as they do when in a post ... easy fix of adding the right class to the outer div of articles, but it does effect a 2-3 files.  If there are no other issues that you see, I'll post an updated package with the fixes so far.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 09, 2017, 12:55:16 am
I can test that too ;)
Title: Missing Simple Portal portal page on cellphone
Post by: Auctor Lucan on April 10, 2017, 01:13:13 am
I made a search for Simple Portal's portal page and mobile view and I ended up with nothing, so I'll bring this up in belief that it is actually a bug. Check attachment.

My portal page is completely blank in mobile view, and if I pick the option "Disable on mobile devices" in the settings for Simple Portal, then the portal page is not just missing from the phone view, but also on the computer view.

So, I like SimplePortal, but do I really have to have the first page of my site completely blank when the site has a visitor using a phone?

If anyone can help me with what I need to do to make the portal page work on a cellphone, I would be really happy.

Best,

Auctor Lucan
Title: Re: [ADDON] SimplePortal
Post by: emanuele on April 10, 2017, 01:07:52 pm
Merged with SP topic, better to report problems here.
Also, if you read back a bit there should be some explanations at why it doesn't who.
Mainly go the admin > sp > ??? > profiles
and set the proper visualization options to show on mobile.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 10, 2017, 01:57:54 pm
I think you are running Beta 1? ... Mobile view was a two part process, 1) was the "master" switch on the configuration page, and once enabled, you have to go to each "block" and choose to "Show on mobile" or not .... looks like you have the master switch on, but have not selected which blocks you want to show.

Beta 2 makes things a bit easier in that regard, but I have not pushed that out yet
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 10, 2017, 02:09:24 pm
I can test that too ;)
This should have all the fixes we have discussed to date
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 11, 2017, 01:31:02 am
This should have all the fixes we have discussed to date
I just installed that version on my live site  8)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 12, 2017, 09:54:13 am
I am having some errors in elkarte log with an RSS block, I use php 5.6.30


Type of error: Generale
8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
https://www.skodaclub.it/index.php?https://www.skodaclub.it/
File: /public/sources/subs/spblocks/RssFeed.block.php
Line: 122


and on line 122 I have:
Code: [Select]
121: $data = str_replace(array("\n", "\r", "\t"), '', $data);
==>122: $data = preg_replace('~<\!\[CDATA\[(.+?)\]\]>~eu', '\'#cdata_escape_encode#\' . Util::htmlspecialchars(\'$1\')', $data);
123:
124: // Find all the feed items
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 12, 2017, 02:23:07 pm
Looks like a regression error from when the blocks were separated from the monolithic PortalBlocks file in to thier own files.

Anyway replace that line with
Code: [Select]
		$data = preg_replace_callback('~<\!\[CDATA\[(.+?)\]\]>~u', create_function('$m', 'return "#cdata_escape_encode#" . Util::htmlspecialchars($m[1]);'), $data);
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 12, 2017, 04:50:26 pm
Thanks Spuds, no more errors with RSS block ;)
Title: Re: [ADDON] SimplePortal
Post by: live627 on May 21, 2017, 11:48:17 pm
Whenever I try to edit a PHP page (click the tools icon) it gets executed.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 21, 2017, 11:58:47 pm
a small bug when trying to edit a visibility profile: I created a visibility profile to show a bbc block on my contact page, is working fine, but I don't see the condition query I wrote when I try to edit the profile, it's empty:
Title: Re: [ADDON] SimplePortal
Post by: live627 on May 25, 2017, 08:38:44 am
Another error

Code: [Select]
8: A non well formed numeric value encountered

Create/edit block
Preview it
Title: Re: [ADDON] SimplePortal
Post by: radu81 on June 03, 2017, 11:05:42 am
while I like the new articles system I still miss the old function to promote topics to articles. With the new article system is not possible to attach images, the only way is to use an ftp manager, but I don't like the idea to give such details to members or moderators. Uploading images externally is a huge risk, I already lost thousands of images with imageshack,
Is there a chance we can see the old feature convert topic to article or upload images as attachments into articles?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 05, 2017, 03:06:28 pm
I'll look into these bugs in the next few days and see if they still exist in the latest, thanks for the reports.

while I like the new articles system I still miss the old function to promote topics to articles. With the new article system is not possible to attach images, the only way is to use an ftp manager, but I don't like the idea to give such details to members or moderators. Uploading images externally is a huge risk, I already lost thousands of images with imageshack,
Is there a chance we can see the old feature convert topic to article or upload images as attachments into articles?
The "latest" version which I'm still doing work on, now has the ability to add attachments to articles :D 

I also updated the article block to work like the enhanced news block, so if there is an image attachment, you have the option to show the first image that as part of the text.   Of course when 1.1 gets finished and we have ILA it will be even easier, but its a good stop gap.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on June 05, 2017, 03:22:47 pm
Wow, great news, thank you Spuds! TBH I wasn't  expected this answer  8) 8) 8)
Title: Re: [ADDON] SimplePortal
Post by: Ruth on June 07, 2017, 10:03:55 am
Will the new version of the portal be finished, when ElkArte 1.1. is ready to use, Spuds?

And what is about the portal language files? The "old ones", I am using at the moment, have still some mistakes and parts to change in there. I would like to translate those language-files again into german, if everything is done.

I am asking because since a few days Opera (my favorite browser)  is making a mess with the styling in my forum, ::)  if I use a higher resolution. I have to do a lot of changes in my themes/custom.css now, but I would like to wait until ElkArte 1.1 and the portal ist ready, to install the portal again and to do all necessary changes at the same time, if possible. ;)

Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 08, 2017, 04:00:00 pm
Will the new version of the portal be finished, when ElkArte 1.1. is ready to use, Spuds?
Difficult to say really.  First step is to finish the updates for B2 or maybe call it RC1 since its been in beta for years LOL.  Then I have to make sure it works with 1.1, ..... I have not done any 1.1 testing with it at all.


And what is about the portal language files? The "old ones", I am using at the moment, have still some mistakes and parts to change in there. I would like to translate those language-files again into german, if everything is done.

I am asking because since a few days Opera (my favorite browser)  is making a mess with the styling in my forum, ::)  if I use a higher resolution. I have to do a lot of changes in my themes/custom.css now, but I would like to wait until ElkArte 1.1 and the portal ist ready, to install the portal again and to do all necessary changes at the same time, if possible. ;)


I wonder what changed with Opera to cause problems ... Opera is based on Chrome these days so I'm kind of surprised its causing layout issues for you.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on June 08, 2017, 09:42:31 pm
Okay...I just wanted to know, Spuds..  ;) So I will wait with working on the language files again until "RC1" is finished.

Quote
I wonder what changed with Opera to cause problems ... Opera is based on Chrome these days so I'm kind of surprised its causing layout issues for you.

I don't understand it also. It has nothing to do with ElkArte 1.0.10, because  my test forum is still running with 1.0.9 and shows the same mistakes since a few days in Opera with my big-sized resolution in browser and PC.  And I see almost the same mistakes here or in Jorins forum. Hardly to see them here, because I have much darker colors in my forums. It is very disturbing there for me.

But first I want to have a look with Opera from the PC/Laptop of my friend, if it will look the same there. I will show a few screenshots in an another topic then. Maybe I did something wrong with my themes/custom.css? But everything in forum is still looking fine in other resolutions, even with Opera.
Title: Re: [ADDON] SimplePortal
Post by: Trax on July 21, 2017, 04:34:49 pm
Come on then give me a clue as to why the portal does not work on mobile screens?

I've looked through this thread for the last day going back and forwards and cannot for the life of me get the portal to display on mobile as you can see > http://prntscr.com/fyjfal

I'm using the latest version of Elkarte with SP beta 2, i was using beta 1 until i found the 2nd version in this thread.

Quote
I think you are running Beta 1? ... Mobile view was a two part process, 1) was the "master" switch on the configuration page, and once enabled, you have to go to each "block" and choose to "Show on mobile" or not .... looks like you have the master switch on, but have not selected which blocks you want to show.

I've uninstalled it, deleted the data, reinstalled it, checked for  the "Master" switch and the "Show on mobile" and these settings do not seem to exist.

Ps It works fine on a pc and a tablet screen, it's just this mobile screen i can't seem to figure out so any help or advice to point me in the right direction would be much appreciated.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on July 21, 2017, 10:50:51 pm
If you have beta 2, you have to set the "visibility profile".
Go to: admin > simple portal > profiles > visibility profile list
there you get a list of all the "visibility profiles", and next to each the number of blocks what have a certain profile.
When you edit a visibility profile, you have a check box "Show on mobile", that, as the name says, will enable all the blocks with that visibility profile on mobile devices. ;D
Title: Re: [ADDON] SimplePortal
Post by: Trax on July 21, 2017, 11:03:36 pm
If you have beta 2, you have to set the "visibility profile".
Go to: admin > simple portal > profiles > visibility profile list
there you get a list of all the "visibility profiles", and next to each the number of blocks what have a certain profile.
When you edit a visibility profile, you have a check box "Show on mobile", that, as the name says, will enable all the blocks with that visibility profile on mobile devices. ;D

Thanks @emanuele 

I can't believe it was something so simple  ::) I probably looked everywhere except there :P 
Title: Re: [ADDON] SimplePortal
Post by: emanuele on July 22, 2017, 12:06:10 am
It's probably not the first place you get to look at indeed. :P
Title: Re: [ADDON] SimplePortal
Post by: Spuds on July 30, 2017, 07:47:59 pm
Whenever I try to edit a PHP page (click the tools icon) it gets executed.
Seems to work fine in the latest beta, I must have fixed it at some point or its something with particular settings
Another error

Code: [Select]
8: A non well formed numeric value encountered

Create/edit block
Preview it
Fixed

a small bug when trying to edit a visibility profile: I created a visibility profile to show a bbc block on my contact page, is working fine, but I don't see the condition query I wrote when I try to edit the profile, it's empty:

Fixed
Title: Re: [ADDON] SimplePortal
Post by: radu81 on October 16, 2017, 09:32:50 am
@spuds I know you are working on a new version of Simple Portal, so you have an idea when it will be ready and compatible with Elkarte 1.1 ?
Title: Re: [ADDON] SimplePortal
Post by: tacticool on October 19, 2017, 11:30:09 pm
The simpleportal website has been down for a while. Will it be back online again?
Title: Re: [ADDON] SimplePortal
Post by: emanuele on October 20, 2017, 08:22:50 am
Yep, it's almost a couple of weeks.
That's a good question, I don't have any direct contact with anyone, I know there were some serious problems with the servers (well, it was considered to be fixed, but I guess they are having them again, otherwise I don't understand), I don't know... :-\
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on October 22, 2017, 12:59:01 am
Have a bit of an issue. I uninstalled simple portal and now when I try to access my forum all I get is page with the message "Unable to load the 'Portal' template." which seems a little off since I had just uninstalled it. Any ideas on how to get the forum back?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on October 22, 2017, 05:42:33 pm
Have a bit of an issue. I uninstalled simple portal and now when I try to access my forum all I get is page with the message "Unable to load the 'Portal' template." which seems a little off since I had just uninstalled it. Any ideas on how to get the forum back?
Adding ?debug to your site URL should load the site without SimplePortal. Example:

Code: [Select]
domain.tld/index.php?debug
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on October 22, 2017, 06:35:52 pm
Thanks. That allowed to get back into admin and then got fixed by uninstalling again and re-installing. Guess the first uninstall got messed up somehow.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on October 22, 2017, 06:38:32 pm
Made a copy of my site with all addons uninstalled  including SP. Then installed 10.1.1 update. SP now shows lots of errors if I try to install so did not install. Will it be updated to use with 10.1.1?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on October 22, 2017, 10:48:32 pm
It will get it updated for 1.1, I'm just just a bit lagging!
Title: Re: [ADDON] SimplePortal
Post by: vbgamer45 on October 27, 2017, 07:17:11 pm
Spuds do you have any knowledge of what is going on with simpelportal site? Do they need help with hosting I can provide that if needed.
Title: Re: [ADDON] SimplePortal
Post by: AlexanderLiebrecht on October 27, 2017, 09:33:15 pm
I just want to install the SimplePortal under ElkArte v1.1. Unfortunately not yet compatible and the Issues page in the Addon directory still not available.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on October 27, 2017, 09:37:22 pm
Spuds is working on the new version of Simple Portal which will be compatible with Elkarte 1.1 version. We need to be patient  ;)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on October 28, 2017, 02:14:02 am
Spuds do you have any knowledge of what is going on with simpelportal site? Do they need help with hosting I can provide that if needed.
Unfortunately I have no direct knowledge of what is occurring.  At one point a server change / software update was made (w/o some human error on recent backups) and lost some amount of data.  After that the site came back with an old DB but was alive. 

Now all I know is "Unable to get valid NS records from simpleportal.net nameservers" which means (AFAIK) there is no NS record for simpleportal on the nameserver that the simpleportal record is pointing to (legendofdevira.net)
Spuds is working on the new version of Simple Portal which will be compatible with Elkarte 1.1 version. We need to be patient  ;)
This .. I'm trying to catch up as best I can.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on November 14, 2017, 05:55:39 pm
Just wanted to report that progress has been made for SP and ElkArte 1.1 :D ... thanks to the help from @live627 and @emanuele !

I believe I have most things working now,  the effort is in the development branch on GitHub https://github.com/SimplePortal/SimplePortal_ElkArte/tree/development

One thing to note, this REQUIRES ElkArte 1.1.1, there are a couple of issues getting everything running on 1.1.0 so no portal for that :(  Yes I could make it work, but then I'm left with a one off version so not gonna do it,  So once 1.1.1 is buttoned up, I'll get this finalized and released.  If you wanted to test, you would need to get the branch of ElkArte from the 1.1.1 patch branch and then install the portal on that.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on November 14, 2017, 06:00:33 pm
Good idea to concentrate on 1.1 version ;) I am looking forward to test it. Thanks Spuds!
Title: Re: [ADDON] SimplePortal
Post by: radu81 on November 15, 2017, 05:25:51 pm
@Spuds‍ I installed a clean version of elkarte 1.1.1 from here https://github.com/elkarte/Elkarte/tree/patch_1-1-1 , downloaded the package of SP from link above, I installed SP, but there is no "Simple Portal" menu on ACP.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on November 15, 2017, 09:35:43 pm
Thanks, I'll take a look at that.  Was busy getting it to run but never went back and tried a clean install  O:-)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on November 16, 2017, 03:17:31 pm
Argh ... I forgot that there is still a needed "fix" for 1.1.1 that is not yet in that branch.  It has to do with how SSI is loaded, so right now now SSI, no Portal ... There are a couple of directions we can take, and once that is settled and committed to the 1.1.1 patch branch then you will be able test.  Sorry for the confusion  :(
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 10, 2017, 06:00:30 pm
I see sp net now has the maintenance page up, seems like someone is doing some work to bring it back to life.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 10, 2017, 06:48:58 pm
Great news!
Title: Re: [ADDON] SimplePortal
Post by: emanuele on December 10, 2017, 08:27:08 pm
Great!
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 12, 2017, 02:32:30 pm
I did 2 tests, using the development files linked above:

1) clean install Elkarte 1.1.1, no errors during install, but in the homepage of my portal I get this:

2) a 1.0.x version of my forum upgraded to elkarte 1.1.1, the addon installs fine, it keeps the old pages and the old blocks from Sportal, but in the homepage:
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 16, 2017, 03:54:46 pm
Thanks, been down with da flu or some such crud, have not had a chance to look into this just yet.   The blank homepage is just a visibility conversion issue, probably would just need to review your blocks and viability profiles.  The update tries its best to convert things over but its a bit of a guess to get it right.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 17, 2017, 11:11:48 pm
It was my fault @Spuds‍ I had 2 Simple Ads blocks enabled, but I did not have the addon installed, disabled that blocks seems to work fine. I still have some problems, but first I need to do more tests, I will let you know.

== edit ==
For now seems to work fine. If you upgraded from Elkarte 1.0.x and Simple Portal, I suggest to disable all existing blocks, and enable them one by one.

The only thing I can report by now, is that the [cutoff] tag is displayed on topic view. The tag "cuts" correctly the text in the board news block.
Title: Re: [ADDON] SimplePortal
Post by: txcas on December 26, 2017, 06:56:02 pm
Is SimplePortal now ready for ElkArte 1.1.1?  This is the add-on I am waiting for to upgrade to 1.1.1.
Title: Re: [ADDON] SimplePortal
Post by: hartiberlin on January 19, 2018, 02:43:08 pm
I just tested the SP version 1.00 RC1 
and it just says at the homepage then:


An Error Has Occurred
in_array() expects parameter 2 to be array, null given

What is the latest version that works with Elkarte 1.1.1 and SSL ?
It says, latest version is 2.3.7
but is that only the version for SMF ?


Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on January 19, 2018, 05:13:56 pm
Simple Portal is not updated for 1.1.1 yet. Also the link here at this forum for Simple Portal is for ElkArte only. Where did you download the Simple Portal file that you installed?
Title: Re: [ADDON] SimplePortal
Post by: radu81 on January 19, 2018, 05:45:34 pm
I just tested the SP version 1.00 RC1
and it just says at the homepage then:

  • SMF - Just Installed!

An Error Has Occurred
in_array() expects parameter 2 to be array, null given

I already mentioned here (https://www.elkarte.net/community/index.php?topic=4868.msg35438#msg35438)that SP has an error:
p.s. I see you are using a portal on your forum, for elkarte you can use Simple Portal, download it from here https://github.com/SimplePortal/SimplePortal_ElkArte/tree/development . Pay attention, there is a small bug[1] with the Login block, so for now do not use the Login block on your portal

Disable the login block and the error will disappear.
Otherwise Emanuele posted a temporary solution on the italian SMF & Elkarte forum (http://www.italiansmf.net/forum/index.php?topic=2469.msg18654#msg18654)

File: sources\Load.php
Replace:
Code: [Select]
// Custom profile fields as well

with:

Code: [Select]
if (empty($context['admin_features']))
{
    $context['admin_features'] = array();
}
// Custom profile fields as well

The latest version of SP is https://github.com/SimplePortal/SimplePortal_ElkArte/tree/development
it works with 1.1, but as you can see there are some small bugs

Simple Portal 2.3.7 is reffered to Simple Portal for SMF
more info here https://github.com/SimplePortal/SimplePortal_ElkArte/issues/20
Title: Re: [ADDON] SimplePortal
Post by: hartiberlin on January 20, 2018, 01:43:56 pm
Hmm, I applied this patch and the left and right blocks are not shown...
It seems the left blocks are somehow wrapped into the uppen blocks...

Look here:
https://dasalteberlin.de/index.php?topic=4.0
the Test Gallery Block is in the upper block section , although I have put them to the left side...

Only on the Frontpage it does how now all correct it seems here:
https://dasalteberlin.de/index.php

Also there is a hooks error:

Title: Re: [ADDON] SimplePortal
Post by: emanuele on January 20, 2018, 07:19:18 pm
Provided:

You may try changing:
Code: [Select]
<div id="sp_center_top" class="sp_main_cell">
to:
Code: [Select]
<div id="sp_center_top" class="sp_main_cell" '
, !empty($modSettings['rightwidth']) || !empty($modSettings['leftwidth']) ? ' style="width: calc(100% - ' . (!empty($modSettings['rightwidth']) ? $modSettings['rightwidth'] . 'px - 20px' : '0') . ' - ' .
(!empty($modSettings['leftwidth']) ? $modSettings['leftwidth'] . 'px - 20px' : '0') . ')"', '>
in Portal.template.php.

It MAY work.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on January 20, 2018, 08:13:29 pm
I forgot a bit, you should also add a
Code: [Select]
display: inline-block;
to the #sp_left, #sp_right, #sp_center_top, #sp_center_bottom definition (porta.css line 332).
Title: Re: [ADDON] SimplePortal
Post by: emanuele on January 21, 2018, 09:28:14 am
Actually, I have made things fairly complex for nothing I think: a simple use of display: table/row/cell should be more than enough to have the blocks aligned without touch the code... I'll try when I'm back to the desktop.
Title: Re: [ADDON] SimplePortal
Post by: hartiberlin on January 23, 2018, 03:47:03 pm
Many thanks emanuele,
Hmm, pretty confusing now all...
so should I still use to edit the files as shown in Reply #365
and don´t use Reply #366 ?

Title: Re: [ADDON] SimplePortal
Post by: kode54 on January 31, 2018, 04:10:09 am
There seems to be a bug in the latest development version: It displays the full forums list on the main portal page, which is being inlined in the middle of the left column, just below where the center column ends, but not confined to the center column.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on January 31, 2018, 07:52:28 pm
I am a bit confused too.  I installed the portal today in my testforum and everything is looking as it should do. And all my "old" portal blocks had been "converted"! Wow! :)

I am using the portal as frontpage, using portalblocks on both sides in portal and on the top and the bottom in forum.

I just added width: 22%; here in portal.css (and left the settings for the width for the left and right blocks in SP empty), as I had it before:

Code: [Select]
#sp_left {
float: left;
padding-right: .5em;
height: 100%;
width: 22%;
}
#sp_right {
float: right;
padding-left: .5em;
height: 100%;
width: 22%;
}

And I added Emanueles code in Radus post for the User-Info in sources\Load.php on line 977.

Everything is working until now, nothing seems "out of line" to me and no errors in the log.

A few icons are missing, that's all I noticed until now.


Title: Re: [ADDON] SimplePortal
Post by: radu81 on January 31, 2018, 11:25:26 pm
The icons should be visible, I see them all on my test forum. Try to investigate with your browser inspector if you see something strange.
If you find something else that isn't working properly or other bugs related to Simple portal just report it here ;) 
Title: Re: [ADDON] SimplePortal
Post by: kode54 on February 01, 2018, 02:43:06 am
Here is what happens on our forum, Hydrogen Audio, when viewing the portal. It now inlines the forum listing, incorrectly for our layout.

Title: Re: [ADDON] SimplePortal
Post by: emanuele on February 01, 2018, 09:39:27 am
@kode54 this is the same bug as reported by hartiberlin and for which I proposed a fiw/workaround in:
https://www.elkarte.net/community/index.php?topic=1399.msg35539#msg35539
and
https://www.elkarte.net/community/index.php?topic=1399.msg35541#msg35541
Title: Re: [ADDON] SimplePortal
Post by: Ruth on February 05, 2018, 02:27:16 am
The icons should be visible, I see them all on my test forum.

They are all there in default, Radu. They are just missing in my theme. I have to upload them there. It was always like this first, when I installed the portal, as I remember.




Two questions I have until now:

1.
If the portalblock "Theme Selection" is enabled, it is "disturbing" my custom php-block for recent topics. This block is showing a "Timeformat" (Zeitformat) instead of the dates of the last posts there. If "Theme Selection" is  disabled, this custom php-block is working perfect - in both themes, in the default and in my theme.

 A bug?




2.
In the "Visibility Profiles List" there are some possibilities looking like this: $_converted_6
They seem to work, this one means maybe "show on portal and forum"?



Can I edit them by myself? O:-)
Title: Re: [ADDON] SimplePortal
Post by: Ruth on February 05, 2018, 09:43:53 pm
I had a look in the new language files and a look again on those $_converted_6 etc.

This seems to be the "old settings" for the portalblocks, which could be done here under "advanced options" in the old version of the portal:



So I think, I can edit all those "converted profiles" now  or create new profiles in the visibility profiles list here.
So "$_converted_6" will become the profile "Show on portal and forum":


Title: Re: [ADDON] SimplePortal
Post by: emanuele on February 06, 2018, 02:48:52 am
Stupid question: i you click on the "edit" icon under actions does it give you the possibility to change the name?
If not, then I think it can be changed from the db as last resort.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on February 06, 2018, 06:14:49 am
if you click on the "edit" icon under actions does it give you the possibility to change the name?

I made a try, Emanuele. This is what I see, if I use the edit-icon in the visibility profile list:



I changed the name from "$_converted_6" to "Visible in portal and forum" and I also selected for this profile "Show on mobile":



And it is working without any error. It replaced that "$_converted_6" in the profile list and in the dropdown menue.

Those are a kind of "custom settings" or "custom profiles", therefore they are not in the language files from SimplePortal.
I will change the other profiles with this $ the same way.
Title: Re: [ADDON] SimplePortal
Post by: emanuele on February 06, 2018, 02:29:37 pm
Judging from the name, I think they are coming from the conversion silently done by SP during the upgrade.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on February 06, 2018, 06:57:04 pm
Yes...

I just wonder, how this was possible?

I deinstalled the "old portal" in my testforum before the update to 1.1.1. I also deleted all my themes. So I  thought, that everything in the portal had gone.

But in the new version of the portal I installed after the update all my "old portal blocks" were there again, with their settings for permissions, visibility and styling. The blocks with "custom visibilities" were getting those $ and the portalblocks with a custom styling were all "converted" to the default styling. So I just have to edit the old blocks and change their styling profiles or create new profiles for my custom stylings and I have to edit the new portal.css of course for some changing and adding there.

I am very glad about it, because this means less work for me.  ;)

But how could a new installed portal "remember" all this settings?
I hope, I did nothing wrong during the update to 1.1.1.... ::)
Title: Re: [ADDON] SimplePortal
Post by: emanuele on February 06, 2018, 10:28:49 pm
You uninstalled, but most likely you didn't tick the "remove the tables from the database" during the uninstall.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 07, 2018, 12:27:09 am
You can rename those $-converted, or better you need to rename them, otherwise it will be difficult for you to recognize the profiles. Spuds explained that the new version of Simple Portal tries to create those visibility profiles based on your settings from your previous version of Simple portal. He also mentioned that the conversion of those profile may not work in some cases, in my test forum worked and imported everything without problems.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on February 07, 2018, 01:09:11 pm
Thank you both, Emanuele and Radu.

Quote
You uninstalled, but most likely you didn't tick the "remove the tables from the database" during the uninstall.

No, I did not touch anything from the database, I would not dare to do this. O:-)

It seems a kind of "magic" ;)  to me, that all this portalblocks were converted. It is really great.

There are a few more $-converted profiles in my portal as there should be. More than I remember, I had used there ever. Some are looking just the same about the settings as others do, if I edit them (maybe they were just different in "show on mobile" or "don't show on mobile") and some were maybe not used at all, because  there is a "0 blocks" in the listing.  I think, I will delete them in my testforum.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on February 11, 2018, 08:16:16 pm
This topic is getting to much pages, ;)  maybe someone wrote it already:

The drag & drop action is not working for the portalblocks, not in the adminpanel, it just seems to work.
 A moved block will be in the list on the new place, but not in portal.
There is an "Undefined offset error" in the log on line 837 in sources/admin/PortalAdminBlocks.controller.php 
(...index.php?action=xmlhttp;sa=blockorder;xml)

And in portal itself I cannot move a block from the right column to the left side, just to the middle.
There is also no way back to the right.
This little reset-button is missing. I have to delete such blocks, I have tried to move and create new ones.

New portalblocks  are always on the bottom. The dropdown-menu is not working for them, to give them another place.



Edit:

Those issuses are only with my first admin-account there. :o  With another admin-account ( or a test-account or as a guest) the portalblocks are displayed in  correct order, the same order as on the block-list in the admin panel..
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 16, 2018, 10:17:09 pm
Is Spuds gone?  Is this addon dead?
Title: Re: [ADDON] SimplePortal
Post by: emanuele on February 17, 2018, 09:05:33 am
IIRC Spuds is sick, I'm just with my mobile phone since a week and no idea when the land line will be fixed, so...
Title: Re: [ADDON] SimplePortal
Post by: hartiberlin on February 20, 2018, 01:40:23 pm
Too bad, I hope we soon have a stable SimplePortal version that is compatible with Elkarte 1.1.1.
Title: Re: [ADDON] SimplePortal
Post by: Jorin on February 20, 2018, 02:24:25 pm
IIRC Spuds is sick, I'm just with my mobile phone since a week and no idea when the land line will be fixed, so...

Get well soon, @Spuds!

Btw: Why is every mentioned name two times in the list?
Title: Re: [ADDON] SimplePortal
Post by: kode54 on February 21, 2018, 02:36:00 am
Found the icon issue:

Code: [Select]
                        'data-icon' => '',

Shouldn't that be a style name instead, like i-forum or such?
Title: Re: [ADDON] SimplePortal
Post by: Ruth on February 21, 2018, 12:11:32 pm
Yes, something like this is missing, kode54

Get well soon, Spuds!

Too bad, I hope we soon have a stable SimplePortal version that is compatible with Elkarte 1.1.1.

I think, the portal is already working nearly perfekt, most of the issues I had with one account in my testforum are completly gone now . (It was just something about the permissions, a four year old  portal-bug, which was somehow "converted" for this account)

So I think, a complete new installation of the portal will not cause such a lot of problems. ;)
I will start with the german translation for the SimplePortal language files this week.
Title: Re: [ADDON] SimplePortal
Post by: txcas on March 06, 2018, 01:26:06 am
Oh boy, critical security fixes on 1.1.2 and I can't upgrade until this addon is fixed. :(
Title: Re: [ADDON] SimplePortal
Post by: kode54 on March 06, 2018, 01:51:02 am
I already did, and it didn't break this addon.
Title: Re: [ADDON] SimplePortal
Post by: txcas on March 06, 2018, 03:14:13 am
I already did, and it didn't break this addon.
I tested it and it breaks for me.
Title: Re: [ADDON] SimplePortal
Post by: kode54 on March 06, 2018, 05:21:21 am
Are you using 1.0 beta 2, the latest release, instead of the one from 2015 that's linked in the first post of the topic?
Title: Re: [ADDON] SimplePortal
Post by: txcas on March 06, 2018, 03:15:16 pm
Yes, I removed all addons, upgraded to 1.1.1, and reinstalled the addons.  SimplePortal gets messed up after the upgrade.  Tested 1.1.2 upgrade today and the dev version of this addon.  I get in_array() expects parameter 2 to be array, null given on the portal page.
Title: Re: [ADDON] SimplePortal
Post by: txcas on March 06, 2018, 11:29:26 pm
I found the problem, the Member Info block is broken.
Title: Re: [ADDON] SimplePortal
Post by: kode54 on March 07, 2018, 02:39:12 am
Oh, right, the portal breakage. I was experiencing portal breakage as early as 1.1.1, which I upgraded to from 1.0.10. Breakage includes the mere existence of trying to display the full forum list on the portal index, which I don't want, and the fact that said forum list attaches to the bottom of the central column, but doesn't fill just the central column, but instead the entire width of the page. I assumed this was just the portal add-on's fault, and never looked into trying to fix it. I also considered updating the forum more important than the minor consideration of cosmetic bugs or theme consistency.
Title: Re: [ADDON] SimplePortal
Post by: txcas on March 13, 2018, 10:32:54 pm
The dev version is definitely broken in many places.  Among other things, enabling the portal changes the recent post button to display the portal page.  Anyone willing to fix this addon for a fee?
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on March 17, 2018, 05:24:28 pm
Are you using 1.0 beta 2, the latest release, instead of the one from 2015 that's linked in the first post of the topic?

Where can I get 1.0 beta 2 (or later if it exists)?
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on March 18, 2018, 07:33:42 pm
Provided:
  • I'm a disaster with CSS
  • what I'm suggesting may or may not work
  • there may be an easier way to achieve the same

You may try changing:
Code: [Select]
<div id="sp_center_top" class="sp_main_cell">
to:
Code: [Select]
<div id="sp_center_top" class="sp_main_cell" '
, !empty($modSettings['rightwidth']) || !empty($modSettings['leftwidth']) ? ' style="width: calc(100% - ' . (!empty($modSettings['rightwidth']) ? $modSettings['rightwidth'] . 'px - 20px' : '0') . ' - ' .
(!empty($modSettings['leftwidth']) ? $modSettings['leftwidth'] . 'px - 20px' : '0') . ')"', '>
in Portal.template.php.

It MAY work.

I have just upgraded to 1.1.3 and I have managed to get SimplePortal installed without any errors. But my forum is not displaying between the left and/or right blocks. It drops all the way down underneath the left and right blocks. I tried the above fix but when I replace the code above in Portal.template.php I get this error and the forum does not display. I did also make the change in portal.css shown in emanuele's follow up post to the one above. Any ideas on how to resolve this portal issue?

Edited to add a screenshot of what I am talking about:

Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 30, 2018, 05:31:29 pm
Doing some work on this to get the issues reported fixed.  Right now I have addressed the following:


I'm currently working on the overall "block" layout issues.  In the 1.1 version I had dropped the dated table layout and changed everything to divs.  This worked great when used only as a front page but when you started adding blocks wherever you wanted on whatever page you desired, well things did not work / look as intended.

I see two solutions for this ...
1) one is the use of display: table / table row on the divs.  This kind of turns them back into tables but they are divs ... call it a stepping stone.   Good in that it will work with all browsers, bad in that its still basically a none responsive table layout.
2) convert over to a flex layout.  This should allow the most fluid / responsive layout but does leave some browsers out .. I think ie10 and maybe ie11 will have some issues.

If anyone has other ideas (or has other issues not posted here) let me know.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on March 31, 2018, 04:18:54 pm
Where can one get the latest with those fixes?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 31, 2018, 08:46:46 pm
I just pushed the current fixes (as above) to the development branch on GitHub.   https://github.com/SimplePortal/SimplePortal_ElkArte/tree/development
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 01, 2018, 06:32:49 am
I just pushed the current fixes (as above) to the development branch on GitHub.   https://github.com/SimplePortal/SimplePortal_ElkArte/tree/development

Fresh install of Elkarte 1.1.3 with Simple Portal from the link above. Portal set to 'Integration'. Boards still drop down below left/right blocks. See attached image.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 01, 2018, 03:40:48 pm
Set the portal mode to disabled .. save .. set it back to integration ... save

Is it still broken at that point ?
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 01, 2018, 04:49:06 pm
Well that kind of fixed it after I emptied the forum cache and browser cache. On the fresh install of the forum it looks fine but on my live forum it leaves a blank area for the right sidebar even though I have no right blocks created. I even turned the option to off for right blocks but I still get the blank space for a right sidebar.

Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 01, 2018, 05:16:32 pm
What is weird now is that the blank spot for the right sidebar now has an ad there:



Even though I do NOT have any right blocks created at all. And I do not have any ads enabled in any other blocks in Simple Portal.



I do have ads enabled in the SimpleAds add-on but none assigned to right side.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 01, 2018, 05:33:15 pm
OK what seems to be happening is footer blocks are showing up in the right sidebar and right sidebar blocks are not showing up at all.

(I disabled all ads in SimpleAds to eliminate that as a cause)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 01, 2018, 05:36:45 pm
OK good info ... its probably a result of the the flexbox layout that I'm currently testing.   Do you still have a width set for the right side box (even though you don't have anything assigned?)  

I still need to test this with simple ads, there are A LOT of things between the forum / ads / portal all trying to fit / create some grid layout and its difficult to get them to play well together and still have a chance in it being marginally  responsive.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 01, 2018, 06:34:06 pm
I tried it both ways for the right sidebar with a width of 200px, 0px, and leaving it blank all with the same result. It seems that Simple Ads has the same problem. If I assign an ad to 'Above Footer' in SimpleAds it shows up in the right position and assigning something to 'Right' in SimpleAds and it disappears completely. And assigning an ad to 'Left' in SimpleAds shows to the left of my recent topics left block from Simple Portal instead of under it. Also my Google ads appear blank sometimes with apparently no rhyme or reason in both SimplePortal and SimpleAds. It never did that before upgrading the forum to 1.1.3.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 01, 2018, 07:28:41 pm
Yup ... footer blocks are flexing up to the right side when the right side if disabled ... Grrrr .... its the flexbox stuff I'm trying out.

Just finished fixing the drag/drop block arrangement in the control panel, so now I'm back on the layout issue.

ETA Looks like that was caused by a misplaced closing div ... I pushed that fix and the d&d update ... also an uninstall tweak to prevent some ugliness.  For testing the formatting you can just replace the portal.template file with the updated one in the dev branch in the repo.

Title: Re: [ADDON] SimplePortal
Post by: txcas on April 02, 2018, 03:03:01 am
When the portal is used and you click on the New Posts button, it refreshes the portal page and adds the new post to the bottom of the page.  Clicking on New Replies is working as intended.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 02, 2018, 04:04:51 am
With the latest version of SP there is no footer on the home page (portal mode:front page)

p.s. I like more the old SP credits near "powered by elkarte" instead of a new line at the end of the footer

Edit there is something wrong with the footer in topic view:
X
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 02, 2018, 11:15:34 am
I am trying to make a new custom_besocial.css file for my forum, nothing special just some color changes. I have a test forum running elkarte 1.1.3 and only latest version of SP installed, no other addons. If I activate the portal and go to my forum index and the width of the window is less than 1000px I see this:

You can see it on https://sss.ovh/sk2018/index.php?action=forum
If portal is disabled it displays fine. How can I solve this? Thank you
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 02, 2018, 02:51:06 pm
Try: Disable portal in portal settings and save. Enable portal and save. Clear forum cache from admin and then clear browser cache. Also if you have any portal blocks in the footer area they display in the right side block area. At the moment right side blocks do not display anywhere.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 02, 2018, 09:59:37 pm
I disabled all blocks, I cleared the forum and browser cache, I enabled and disabled SP, but nothing changed, I still have the problem described above.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 02, 2018, 10:26:08 pm
I pushed a few more updates to the repo, it should fix a couple of the above reports.

1) the credits line was not inserting to the right area, it was also not following the proper language files
2) more flexbox EXPERIMENT updates, should correct a few more layout issues, but its still a work in progress

When the portal is used and you click on the New Posts button, it refreshes the portal page and adds the new post to the bottom of the page.  Clicking on New Replies is working as intended.
I can't reproduce this error, is anyone else seeing this behavior?
Title: Re: [ADDON] SimplePortal
Post by: Ruth on April 02, 2018, 11:01:14 pm
I have no problems with the blocks with SimplePortal 1.0.0 RC1 and ElkArte 1.1.3 in my testforum. I am using the portal as frontpage.

But I am using percent, not pixel for the width of the wrapper and for the width of the left and right portal blocks.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 02, 2018, 11:34:57 pm
I pushed a few more updates to the repo, it should fix a couple of the above reports.
Thanks for the update, that fix the footer and the other problems I reported 8)
Suggestion: delete browser & forum cache

I can't reproduce this error, is anyone else seeing this behavior?
Cannot reproduce with this version, I am not sure but I think I saw something similar with an older release.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 03, 2018, 05:49:19 am
I pushed a few more updates to the repo, it should fix a couple of the above reports.

1) the credits line was not inserting to the right area, it was also not following the proper language files
2) more flexbox EXPERIMENT updates, should correct a few more layout issues, but its still a work in progress

Thanks for the fixes. It is looking much better now. I realize it is still a work in progress but I just want to add a display issue I am seeing. When the width of browser window falls under 1280px the forum starts breaking out of the template like this:



Then if the browser windows goes under 1080 px the forum drops underneath the sidebar like this:



If I disable SimplePortal the forum does not break out of the template. It only happens when SimplePortal is enabled.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on April 03, 2018, 12:41:38 pm
I installed the latest version of SP now in my testforum.

The blocks on the right side are now dropping under the blocks in the middle of the portal, if I use my theme.

If I use the default, the blocks from the right side in portal are all displayed on the left side in portal. There are no blocks on the right side.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 03, 2018, 03:18:41 pm
Try clearing your forum cache and your browser cache and see if that fixes it.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on April 03, 2018, 03:40:30 pm
I did this a few times, b4pjoe. I also deactivated every block in portal, etc.

Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 03, 2018, 03:42:29 pm
Thanks for the fixes. It is looking much better now. I realize it is still a work in progress but I just want to add a display issue I am seeing. When the width of browser window falls under 1280px the forum starts breaking out of the template like this:

Then if the browser windows goes under 1080 px the forum drops underneath the sidebar like this:

If I disable SimplePortal the forum does not break out of the template. It only happens when SimplePortal is enabled.
Strange, I'm not seeing that behavior.  I know at one point it was breaking out of the side so it must be a a config issue.  How are you using SP (front page, integration, etc) and what are your left/right block settings (width, etc)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 03, 2018, 03:43:38 pm
I installed the latest version of SP now in my testforum.

The blocks on the right side are now dropping under the blocks in the middle of the portal, if I use my theme.

If I use the default, the blocks from the right side in portal are all displayed on the left side in portal. There are no blocks on the right side.
Could you provide me your settings as well .. I think you are using frontpage mode and % widths the blocks?
Title: Re: [ADDON] SimplePortal
Post by: Ruth on April 03, 2018, 03:49:46 pm
Could you provide me your settings as well .. I think you are using frontpage mode and % widths the blocks?

Yes, Spuds: frontpage and in portal.css 22% width for the left and the right blocks

Not entry for the width in the portal settings in the admin panel
 (I tested a little with this before, but there was not the expected result)

Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 03, 2018, 04:01:24 pm
Thanks for the fixes. It is looking much better now. I realize it is still a work in progress but I just want to add a display issue I am seeing. When the width of browser window falls under 1280px the forum starts breaking out of the template like this:

Then if the browser windows goes under 1080 px the forum drops underneath the sidebar like this:

If I disable SimplePortal the forum does not break out of the template. It only happens when SimplePortal is enabled.
Strange, I'm not seeing that behavior.  I know at one point it was breaking out of the side so it must be a a config issue.  How are you using SP (front page, integration, etc) and what are your left/right block settings (width, etc)

SP is set at Integration and my left blocks are set at 240px and right blocks are set at 200px in SP settings. I do not ever use right blocks though.

Here are the add-ons I have installed. My Google ad code is in SP blocks. All I am using SimpleAds for is a place to put my site header at the very top of the page. There isn't a block in Simple Portal that will put my image header at the very top is why I am using Simple Ads for that. I would put my ad code in SimpleAds but it doesn't place the left block like Simple Portal does.

Edit to add: My test forum which is a fresh install of Elk 1.1.3 with only SimplePortal installed with no Google ads doesn't break out of the template when it gets smaller than 1280 px.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 03, 2018, 04:13:18 pm
After a little more testing...I added my Google ad blocks to my fresh install forum with only SP installed and it now breaks out of the template when the size of the browser window drops less than 1280px.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 03, 2018, 07:50:50 pm
Could you provide me your settings as well .. I think you are using frontpage mode and % widths the blocks?

Yes, Spuds: frontpage and in portal.css 22% width for the left and the right blocks

Not entry for the width in the portal settings in the admin panel
 (I tested a little with this before, but there was not the expected result)
Yes the % setting for the blocks was not working, it *should* be fixed in the latest development version.  You can try setting them in the SP admin panel and removing or commenting out whatever you have added to portal.css.  See if that fixes the problem you are seeing.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 03, 2018, 07:51:24 pm
After a little more testing...I added my Google ad blocks to my fresh install forum with only SP installed and it now breaks out of the template when the size of the browser window drops less than 1280px.
Could you provide your ad code or is it just a standard adsense js item?  I assume you are placing it in a custom html block.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 03, 2018, 08:30:40 pm
After a little more testing...I added my Google ad blocks to my fresh install forum with only SP installed and it now breaks out of the template when the size of the browser window drops less than 1280px.
Could you provide your ad code or is it just a standard adsense js item?  I assume you are placing it in a custom html block.

It is Google AdSense code text/image responsive display ads. And yes it is in a custom html block. I will PM the AdSense code to you.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on April 03, 2018, 09:09:48 pm
Yes the % setting for the blocks was not working, it *should* be fixed in the latest development version.  You can try setting them in the SP admin panel and removing or commenting out whatever you have added to portal.css.  See if that fixes the problem you are seeing.

This is working perfect for the default, Spuds.  :) All blocks are on their place now and have the width, they should have - if I rezise in browser to 90% . It was just not working in my resolution before.

So I think, I will need a new portal.css for my theme or adding to the "old portal.css" all those flex-stuff, which is now in the portal.css of the default....and I have to change something about the media-thing.


Edit:

"In theory" it may work somehow for my theme...but I can't figure it out... :( 
The main menu is looking different now with the changes...
Title: Re: [ADDON] SimplePortal
Post by: txcas on April 05, 2018, 08:13:01 pm
I pushed a few more updates to the repo, it should fix a couple of the above reports.

1) the credits line was not inserting to the right area, it was also not following the proper language files
2) more flexbox EXPERIMENT updates, should correct a few more layout issues, but its still a work in progress

When the portal is used and you click on the New Posts button, it refreshes the portal page and adds the new post to the bottom of the page.  Clicking on New Replies is working as intended.
I can't reproduce this error, is anyone else seeing this behavior?
Spuds try it at http://www.65creedmoor.com.  I upgraded to the lastest dev version and still see the problem.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 05, 2018, 11:27:09 pm
another thing wich breaks the design are the long links inside posts (only with portal enabled). They should be displayed on two or more lines. I cannot find a long link now on my forum, but it's also present on @txcas‍ forum http://www.65creedmoor.com/index.php?topic=9225.msg98596#msg98596
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 05, 2018, 11:45:04 pm
Spuds try it at http://www.65creedmoor.com.  I upgraded to the lastest dev version and still see the problem.
Could you PM me a test account?
another thing wich breaks the design are the long links inside posts (only with portal enabled). They should be displayed on two or more lines. I cannot find a long link now on my forum, but it's also present on @txcas‍ forum http://www.65creedmoor.com/index.php?topic=9225.msg98596#msg98596
This is similar to the problem reported by b4pjoe ... please add
Code: [Select]
overflow: auto;
to the portal.css in the #sp_center {} declaration around line 350 or so .... I just pushed that update to the development version this afternoon.

Title: Re: [ADDON] SimplePortal
Post by: ahrasis on April 06, 2018, 02:00:23 am
Good job @Spuds. I kinda waiting for this to become stable before adding support for it in Multi Tenancy Addon because I think each domain should have its own portal later on. I will be testing SimplePortal again soon.
Title: Re: [ADDON] SimplePortal
Post by: txcas on April 08, 2018, 03:55:09 pm
I found one more issue. I use visibility profiles to select only a few blocks to be displayed on mobile devices. The settings are not getting evaluated, every active block shows up on mobile devices.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 10, 2018, 04:18:16 pm
Thanks for the report, I'm looking in to that.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on April 17, 2018, 02:29:39 pm
All blocks are on their place now and have the width, they should have - if I resize in browser to 90% .

I can't handle this issue in my resolution on my PC and in browser,  :( also not in the default. The blocks from the right side will be displayed on the left side and the middle of the portal will get to much width. Even if I deactivate the blocks on the right side, the blocks in the middle stay in in the same width....which is too much.

It will look the same if I use pixel for the wrapper and for the width of the block settings in the admin panel, instead of percent. I tried about this in my testforum.

Maybe it would look proper on a "normal screen" with my resolution but not on mine, which is a little shorter.

At the moment I think, it would not be possible to use the portal at all in future :-\  and I have to stay with my live forum with ElkArte 1.0.10.  I need this "big" resolution...and some of our members too.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 17, 2018, 03:46:27 pm
Another css small bug which I did not report is in topic view, there isn't much space between the higher breadcrumb and the page numbers, so page numbers are "cut". Using Inspector will be easy to solve.
Title: Re: [ADDON] SimplePortal
Post by: hartiberlin on April 24, 2018, 05:34:16 pm
@Spuds

Will this soon be released to fully work with version 1.1.3 or the 1.1.4 version which seems to be coming out soon ?

Many thanks man for your hard work.
Fully appreciated.

Regards, Stefan.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 10, 2018, 10:51:52 am
When creating or editing a visibility profile I cannot expand the fields: Select action, Select Boards, Select Pages, Select Articles. In chrome Inspector I see this error:
Code: [Select]
index.php?action=admin;area=portalprofiles;sa=addvisibility:857 Uncaught ReferenceError: sp_collapseObject is not defined
    at HTMLAnchorElement.onclick (index.php?action=admin;area=portalprofiles;sa=addvisibility:857)

Is this a bug or it's only me having this problem?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 10, 2018, 02:31:06 pm
Seems to be working fine on my local ... are you sure portal.js is being loaded?
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 10, 2018, 03:30:22 pm
portal.js exists in themes\default\scripts but it's not loaded
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 10, 2018, 03:47:23 pm
It should load then, even if using a custom theme. 

Just to rule out other things, are you running the latest set of files from the repo (https://github.com/SimplePortal/SimplePortal_ElkArte/tree/development)  ...  you don't need to reinstall just overwrite the files, mostly just the sources ones.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 10, 2018, 04:11:47 pm
I am not using a custom theme, itìs just the BeSocial version wit a custom css.

I did overwrited all the files in the proper folders, and looking at the filesize seems to be the same files. Nothing changed, portal.js is not loaded
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 10, 2018, 04:47:46 pm
Thats very peculiar ... do you have a site I can see this behavior (and test id) ... just strange its not happening on my local.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 11, 2018, 12:35:40 am
I found it! you can reproduce this only if you have enabled the option "Disable on mobile devices" in S Portal > General settings 8)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 11, 2018, 02:27:32 am
Confirmed !
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 19, 2018, 01:57:07 am
I've pushed several fixes and updates to the dev branch.

The mobile issue just above ^^^ should be fixed
Fixed several issues with the article attachment system (mostly caused by the needed 1.1.3 updates)
Added ajax to the block, article, pages, etc activate on/off button
Cleaned up a few more style to css things

Still open is the problem with older versions of Safari on iOS ... I will get to this but not for several more days :(
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 21, 2018, 01:20:07 am
The mobile issue just above ^^^ should be fixed
I confirm, it works fine now.

Still open is the problem with older versions of Safari on iOS ... I will get to this but not for several more days :(
I disabled the portal on mobile for now,  not the best solution but at least my members with iOS <= 10 can access the forum.

Fixed several issues with the article attachment system (mostly caused by the needed 1.1.3 updates)
I like the actual article system but I miss more the old behavior of SMF SPortal to promote topics as articles. I don't understand why put so much effort into article system replicating the attachments system when they already exists into topics and can be easily placed inline.  The main vantages using topics as articles are (imho):
I know we already discussed about this, and until now I'm the only one asking for this :(

https://www.elkarte.net/community/index.php?topic=5231.0
Is there a way to display a block on registration page and a different block on contact page? With elkarte 1.0 I was able to do it.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 22, 2018, 11:09:39 am
Found another one  ;D  When editing a visibility profile the query doesn't get saved. If I enter ~sa|contact only ~sa| will be saved.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 22, 2018, 02:12:05 pm
I'm on it :D
Title: Re: [ADDON] SimplePortal
Post by: Mc Fly on May 23, 2018, 11:07:03 am
Has anyone tested the portal with disabled guest access?  ;)

There is an undefined error in Portal.Subs.php at line 34.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 23, 2018, 04:46:20 pm
I have the "disabled guest access" issue corrected on my local.  I'll push updates for this and the visibility profile wildcard issue mentioned above later today.

Here they are:
https://github.com/SimplePortal/SimplePortal_ElkArte/pull/28/commits/bc6407f63c6854cb00e5f1a7695451829ffb6de7
and
https://github.com/SimplePortal/SimplePortal_ElkArte/pull/29/commits/5413ad62c61f10ea9d4d02a98dce91f863764c6b
Title: Re: [ADDON] SimplePortal
Post by: hartiberlin on June 07, 2018, 06:13:38 pm
Where is the latest release of Simple portal which includes these above fixes for
Elkarte 1.1.3 ?

Is it this one ?
https://github.com/SimplePortal/SimplePortal_ElkArte/releases/tag/v1.0.0-beta.2


If not, could you please release a new beta version with these fixes above ?

Many thanks.

Regards, Stefan.
Title: Re: [ADDON] SimplePortal
Post by: hartiberlin on June 07, 2018, 06:46:31 pm
Would be cool, if it would also work with the 1.1.4 version to be released this evening by Emanuele.
Many thanks.

Let me know, I could test it this evening..
Many thanks.
Regards, Stefan.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 07, 2018, 11:04:31 pm
The latest with the fixes is in the development branch on github ... I think there may be a couple of minor changes still on my local that I need to push, but 1.1.4 has been taking priority.

https://github.com/SimplePortal/SimplePortal_ElkArte/archive/development.zip

GitHub branch zip files are nested folders, so you should unzip the above file and then navigate to the base simpleportal folder and create a new zip of just that directory as the nesting can muss up the package manager.  Call you zip file something unique like spimpeportal_test.zip so its clear its not an "official" release.
Title: Re: [ADDON] SimplePortal
Post by: hartiberlin on June 07, 2018, 11:58:18 pm
?? So I must add these files to the official simpleportal ZIP file and zip it all up or how ??
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 08, 2018, 12:07:42 am
Maybe its best to just wait for me to release a new version for testing as using the development code can be confusing.
Title: Re: [ADDON] SimplePortal
Post by: Mattmax on August 31, 2018, 11:07:00 am
Third is wrong submenu placement. Search, Help, Calendar etc. buttons are under first menu button (which is for portal home), on SMf it is under Forum button.
Thats just where I put it.  Are you wanting

  • The community button to take to you the boardindex and forum button to take you to the portal?
  • Or are you saying you want the forum button to be placed in front of the community button?
  • Or do you want all of the standard existing community dropdown items to be moved to forum button that the portal adds (and if so why ?)
just trying to understand as I put it as it kind of made sense to me but that does not mean its right :P
I was thinking that best option would be doing it like it's done here.

First is Home button (which would be it SimplePortal case portal Home button) without submenu.
Second is Forum home (board index) with submenu (Search, Help etc).

but maybe it's just me being used to how SMF + SP work together :)

That is how SP+SMF is supposed to work. SP did install a separate Home and Forum button on SMF, to be toggled in different portal modes.


On my elkkarte (1.1.5) and SP (developer-version from github) there a the same Button " Forum" and "Forum". The fist one should be the Home-Button (Portal) an the seceond one the Forum-Button.

I found here this, but I found no way to fix /change it.
I found this
Title: Re: [ADDON] SimplePortal
Post by: txcas on September 10, 2018, 10:03:28 pm
Hey @Spuds, can you release a new version with the latest updates?
Title: Re: [ADDON] SimplePortal
Post by: Auctor Lucan on November 29, 2018, 09:52:29 am
I also need this! :)

Hey @Spuds, can you release a new version with the latest updates?
Title: Re: [ADDON] SimplePortal
Post by: Auctor Lucan on November 30, 2018, 09:04:34 am
Can I install the Beta 1 version of Simple Portal, and then use Filezilla to replace the installed files with the files in this development zip? Thanks in advance for your reply! :)

The latest with the fixes is in the development branch on github ... I think there may be a couple of minor changes still on my local that I need to push, but 1.1.4 has been taking priority.

https://github.com/SimplePortal/SimplePortal_ElkArte/archive/development.zip

GitHub branch zip files are nested folders, so you should unzip the above file and then navigate to the base simpleportal folder and create a new zip of just that directory as the nesting can muss up the package manager.  Call you zip file something unique like spimpeportal_test.zip so its clear its not an "official" release.
Title: SP Main Template error
Post by: Auctor Lucan on December 18, 2018, 09:17:07 am
Well, I have been trying to figure this one out for some time but at this point I am hoping someone might give me new ideas.

I use Simple Portal on my page, and I am not sure when the error occurred, but I have the attached error message showing in the Blocks. It's not the Footer Blocks, but the bottom of the center ones. Problem is I don't know what it's referring to, and there is nothing in my Error log to help me out.

Hoping someone has encountered this before!
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 18, 2018, 09:58:08 am
@Auctor Lucan‍ I merged here your topic since it's related to Sportal

I've seen this error too, but I don't remeber how I solved. If you just updated from elkarte 1.0 to 1.1 try to open and save all blocks and/or disable/enable them. Try also enable/disable the portal from SP settings.

Also check that you are using the latest version https://github.com/SimplePortal/SimplePortal_ElkArte/archive/development.zip
Title: Re: [ADDON] SimplePortal
Post by: lordmortimer on February 15, 2019, 05:25:20 pm
Hello people from ElkArte :)

I just upgraded my SP version to the one linked above and I'm currently facing two issues:

1) The "New post" icon appears when somebody already read that post. When a post is actually unread, SP shows no icon at all. This issue was there even with the previous version.

2) Right side blocks show under the top or bottom ones. This is a new problem I didn't have with the previous version.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 17, 2019, 03:42:47 am
I'm not sure I understand the first issue, is that inside of one of SP blocks?

I believe I set it up so the right side will "float" under the other blocks when the screen narrows, what happens when you use a full screen on your browser?
Title: Re: [ADDON] SimplePortal
Post by: lordmortimer on February 18, 2019, 07:01:43 pm
I'm not sure I understand the first issue, is that inside of one of SP blocks?
Anytime I have an issue I always forget to specify something. Always. Sorry >_>
Yes. It's the Recent Post/Topic block, with Posts and Full options enabled.

I believe I set it up so the right side will "float" under the other blocks when the screen narrows, what happens when you use a full screen on your browser?
The Recent Posts/Topics block from above is the one I'm using in the Top Blocks position. If I add a Right Side Block, this one goes under the Recent Topics block if I'm full screen. By switching to a little window it goes under all the others on the left.
It happens even if I put the Recent Posts block in Bottom position instead of Top.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 19, 2019, 12:37:06 am
Thanks for the clarification, let me see if I can reproduce the error.
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on March 31, 2019, 06:08:57 pm
Thanks again for all your hard work Spuds!  I'm testing this on a low traffic production site before going to the larger ones.

One item encountered is an int expected database error. In subs/PortalArticle.subs.php, changing

Code: [Select]
$request = $db->query('', '
SELECT
views, comments
FROM {db_prefix}sp_articles
WHERE id_article = {int:article_id}
$query[] = 'spa.id_article = {int:article_id}';
$parameters['article_id'] = (int) $article_id;
}

to

Code: [Select]
$request = $db->query('', '
SELECT
views, comments
FROM {db_prefix}sp_articles
WHERE id_article = {string:article_id}
$query[] = 'spa.id_article = {int:article_id}';
$parameters['article_id'] = (int) $article_id;
}

"seems" to fix it. Is that a proper fix?

Also, I'm having issues inlining attached images in articles. Is there a means to do so? Edit: they work fine for images attached in forum threads, or hosted elsewhere. They don't work for images attached to the article itself.  

Is there a way to give blocks custom styling (i.e. no background at all)?  Nevermind, figured out it's as easy as creating a custom style profile!  ;D

Some blocks are hidden on mobile, at least in Chrome. Is there a way to remedy?

Sorry for the million questions. Thanks again!  8)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 01, 2019, 10:20:49 pm
I need to look into a couple of those items ... which package did you install?  I want to make sure I'm looking at the right stuff.
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on April 01, 2019, 10:59:51 pm
I need to look into a couple of those items ... which package did you install?  I want to make sure I'm looking at the right stuff.
 
 This one:

https://github.com/SimplePortal/SimplePortal_ElkArte/archive/development.zip

Listed as the version for 1.1 in the first post.  8)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 01, 2019, 11:32:00 pm
Dang, that would be the latest ... Need to see what I missed adding from my local
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on April 02, 2019, 02:48:24 am
Dang, that would be the latest ... Need to see what I missed adding from my local
 
 Thanks spuds. You da man!
Title: Re: [ADDON] SimplePortal
Post by: russena on April 02, 2019, 07:02:20 pm
Where can I download the translation of files into Italian SPortalAdmin and SPortalhelp for version 1.0.0.rc1?
Thank you
Title: Re: [ADDON] SimplePortal
Post by: Antechinus on March 02, 2020, 02:00:26 pm
Code: [Select]
#sp_center {
    flex: 1 1 auto;
    overflow: auto;
    padding: 2px;
}
No can do. Auto overflow chops the sidebar menu flyouts at the bottom. Needs to be some other solution to whatever problem auto was supposed to fix.

If you were trying to clear floats, then this should work:
Code: [Select]
#sp_center::after{
display: block;
clear: both;
content: "";
}
Which is your bog standard Elk clearfix, of course.

Also, typos in portal.css:
Code: [Select]
.sp_online_flow {
overflow: auto;
max-height: 150px;;
height: auto !important;
}

.sp_rss_flow {
overflow: auto;
max-height: 300px;;
height: 300px !important;
}
Should be single semi-colons, not double. ;)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 07, 2020, 11:50:19 am
I am not using Articles on my forum, in the past I did create some articles but never published them. Today I tried to add a new article and I am getting this error:

    Type of error: Critical
    Wrong value type sent to the database. Integer expected. (id_article)
    Function: attachmentsSizeForArticle
    /index.php?action=admin;area=portalarticles;sa=edit
    File: /sources/subs/PortalArticle.subs.php
    Line: 688

Code: [Select]
674: 	function attachmentsSizeForArticle($id_article, $include_count = true)
675: {
676: $db = database();
677:
678: if ($include_count)
679: {
680: $request = $db->query('', '
681: SELECT
682: COUNT(*), SUM(size)
683: FROM {db_prefix}sp_attachments
684: WHERE id_article = {int:id_article}
685: AND attachment_type = {int:attachment_type}',
686: array(
687: 'id_article' => $id_article,
688: 'attachment_type' => 0,
689: )
690: );