ElkArte Community

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

Title: [ADDON] SimplePortal
Post by: Spuds on May 03, 2014, 09:55:44 pm
SimplePortal 1.0.3

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

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

A port means I retained all existing functionality of the parent, and then added some new features over what was already available.  A few old blocks were removed as, until such time as those addons are available, it did not make sense to keep them in the code.

New features include
- Independent article system, supporting BBC, HTML, Markdown and PHP for your writing needs
- Drag and drop capabilities in the Admin Panel so you can simply move a block to a new area.
- Improved mobile capabilities, you can define which blocks appear on mobile devices.
- New <div> flex layout replaces the older table layout.  Of course its a responsive design as well.
- Your users can drag and drop the blocks on the main portal page, so they can build a layout to suit their needs.  A reset to default is included as well.
- Consolidation of functions to use what is available in the ElkArte core for a smaller footprint. 
- Code updates to run on PHP 8.x
- New block management.  You can now simply add blocks by placing a block module in the spblocks directory,  the new block will be found and made available. Code edits are no longer needed.
- Inline attachment support for the article system
- The portal is installed as a core feature, to allow easy on/off support and only 1 source edit.

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 RC GA code and feel free to report and  provide fixes to bugs if you find them.

Repo / Download
https://github.com/SimplePortal/SimplePortal_ElkArte/releases/download/1.0.3/elk_simple_portal-1.0.3.zip (Current Release Version for ElkArte 1.1.7+ only)

Older Forum Support
These older version will have some bugs, but its the only way to have SP on an old forum.  No support, but they do work.
https://github.com/SimplePortal/SimplePortal_ElkArte/releases/download/v1.0.0-RC1/elk_simple_portal-rc1.zip (Version for ElkArte 1.1.0 - 1.1.6 only)
https://github.com/SimplePortal/SimplePortal_ElkArte/releases/tag/v1.0.0-beta.2 (for ElkArte 1.0 only)
Title: Re: [ADDON] SimplePortal
Post by: emanuele on May 04, 2014, 04:15:25 am
/me uses like to like this topic! :D
Title: Re: [ADDON] SimplePortal
Post by: Adrek on May 04, 2014, 07:30:05 am
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, 07:54:28 am
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!

Quote from: phantom – 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, 11:45:42 am
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, 01: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, 04: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, 04: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, 05: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, 05: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.

Quote from: Allan – 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, 05: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 04, 2014, 06:45:19 pm
Quote from: Allan – 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 04, 2014, 06:56:54 pm
ok I will try that as well, thank you.


ETA: worked great no errors
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 04, 2014, 07:06:58 pm
Woot ! (now you can find the bugs)
Title: Re: [ADDON] SimplePortal
Post by: Allan on May 07, 2014, 01: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 07, 2014, 07:57:01 pm
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 07, 2014, 07:57:43 pm
Sounds great, thank you.
Title: Re: [ADDON] SimplePortal
Post by: Adrek on July 06, 2014, 02: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 06, 2014, 09:43:25 pm
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

Quote from: phantom – 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
Quote from: phantom – 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 06, 2014, 11:01:34 pm
Quote from: Spuds – 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: Adrek on July 07, 2014, 12:35:03 pm
Quote from: Spuds –
Quote from: phantom – 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 :)

Quote from: Spuds –
Quote from: phantom – 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 07, 2014, 06:06:44 pm
Quote from: phantom –
Quote from: Spuds –
Quote from: phantom – 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, 03: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, 05: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, 05: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, 05:41:37 pm
Quote from: Eliana Tamerin – 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, 05: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, 05:58:08 pm
Quote from: Smasher –
Quote from: Eliana Tamerin – 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 11, 2014, 07:51:44 pm
Quote from: Smasher – 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 11, 2014, 10:17:50 pm
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, 12:05:39 am
Quote from: Spuds – 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: Adrek on July 12, 2014, 05: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 13, 2014, 08:31:54 pm
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, 05:22:19 pm
Quote//edit3
Now it works for me fine :D
Missed your edit, thanks for the debugging :)

QuoteNot 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, 05:29:10 pm
QuoteNot 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, 08:30:14 am
Quite OT
Quote from: Spuds – 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, 08:39:44 am
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: Adrek on July 21, 2014, 12: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, 05:14:45 pm
Thanks, I'll get that fixed  ;D
Title: Re: [ADDON] SimplePortal
Post by: meetdilip on September 08, 2014, 11:08:17 am
Download link is broken.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 08, 2014, 04: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, 05: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, 07:59:07 am
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, 11:42:39 am
Quote from: Lars – 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?

Quote from: Ruth – 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.
Quote from: Ruth – 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.

Quote from: Ruth – 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, 12:55:32 pm
Thank you very much for your explanations, Spuds!

Quote from: 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) ::)


Quote from: Spuds – 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, 01:19:57 pm
Thanks for your detailed explanations, Spuds! :)

Quote from: Ruth – 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, 04: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, 01: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, 09:31:19 am
Quote from: Ruth – 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, 09:33:09 am
Quote from: meetdilip – 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, 09:57:20 am
Quote from: Spuds – 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, 09:24:58 am
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 13, 2014, 07:16:43 pm
Which block is below the Welcome to SimplePortal block?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 13, 2014, 08:49:28 pm
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, 12: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, 08:22:50 am
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, 09:03:30 am
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, 11:03:16 am
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:

(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, 01: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, 02: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, 02: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, 03: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, 04: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, 04: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, 05: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, 05: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, 03: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, 04: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, 07:24:21 am
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, 04: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, 04: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, 05: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, 05: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, 05: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, 05: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, 06:52:41 am
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, 07:38:32 am
Thanks @Spuds
Title: Re: [ADDON] SimplePortal
Post by: Ruth on September 17, 2014, 01:06:53 pm
I cannot download this one:

Quoteelk-SimplePortal.zip   201.1 KB   spuds_   3   4 hours ago

It says Error 404



This one is just the update?

QuoteDownload repository   4.7 MB
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 17, 2014, 07:25:43 pm
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 17, 2014, 08:53:49 pm
Something is wrong. Please check the install at techiewiz.in
Title: Re: [ADDON] SimplePortal
Post by: [SiNaN] on September 18, 2014, 03: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, 08:16:29 am
Thanks for finding that, I added the new line but left the old one too  :-X
Quote from: meetdilip – 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, 04:20:13 pm
Thanks @[SiNaN] , @Spuds . Working fine now. :)
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 10:43:33 am
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:

QuoteIntegration: 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, 11:18:39 am
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, 11:23:10 am
I didn't know that one about SP! Cool!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 21, 2014, 11:39:28 am
QuoteA 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, 11:52:16 am
Quote from: [SiNaN] – 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, 12:01:27 pm
Quote from: Spuds –
QuoteA 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, 12: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, 12: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, 12: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, 12:44:37 pm
Is there a link I can check?
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 01:11:20 pm
http://elk.b4print.com/index.php
Title: Re: [ADDON] SimplePortal
Post by: emanuele on September 21, 2014, 02: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, 02: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, 03: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, 03:18:07 pm
Yes.
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 21, 2014, 03: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, 03: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, 04: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, 05: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, 05: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, 05:53:35 pm
Quote from: emanuele – 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 21, 2014, 06:32:51 pm
Quote from: [SiNaN] – 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: [SiNaNAlso, 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.
Quote from: [SiNaN] – 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 21, 2014, 08:50:34 pm
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.

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, 06:38:36 am
Quote from: Spuds – 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.

Quote from: Spuds – 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

Quote from: b4pjoe – 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, 10:35:39 am
Quote from: Spuds –
Quote from: Ruth – 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, 11:29:55 am
Quote from: b4pjoe – Do I need to change the code in a file somewhere for this to fix the recent topics order ...

No...

Quote from: b4pjoe – ...or should this code be placed in a custom PHP block?

Yes.  ;)
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on September 22, 2014, 12: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, 04:54:12 pm
QuoteLong 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 22, 2014, 06:02:27 pm
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 22, 2014, 07:54:20 pm
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, 03:39:04 am
Quote from: Spuds – 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);

Quote from: Spuds – 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 23, 2014, 09:27:18 pm
QuoteBeing 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.

QuoteWell, 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, 04: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, 07:38:46 am
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, 08:14:12 am
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, 08:33:15 am
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, 01: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 28, 2014, 07:10:33 pm
Quote from: overscan – 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, 07:52:15 am
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, 08:44:32 am
Thanks for the hint, I'll take a look :D
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 15, 2014, 02: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 15, 2014, 07:24:10 pm
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 15, 2014, 07:45:22 pm
Take your time, for now I "solved" overwriting the content of english files ;)
Title: Re: [ADDON] SimplePortal
Post by: Lars on December 23, 2014, 11:04:50 am
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, 12: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, 01:16:31 pm
Quote from: Lars – 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, 01:26:14 pm

Done. Works fine now. Thank you, Spuds! :)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 23, 2014, 04:16:23 pm
Quote from: radu81 –
Quote from: Lars – 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, 12: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, 03: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, 07:10:22 am
Thank you Spuds, that solved my problem ;)
Title: Re: [ADDON] SimplePortal
Post by: pixer on January 06, 2015, 03: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, 04:11:29 am
See the answer from spuds 2 posts below.;)
Title: Re: [ADDON] SimplePortal
Post by: pixer on January 06, 2015, 06:14:25 am
Quote from: radu81 – See the answer from spuds 2 posts below.;)

Thanks!   O:-)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on January 07, 2015, 06:30:09 am
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, 08:44:43 am
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, 09:34:33 am
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 17, 2015, 06:16:24 pm
Quote from: Spuds – 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 17, 2015, 08:52:21 pm
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, 05: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 07, 2015, 10:13:45 pm
Thank you @Spuds
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 22, 2015, 05: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, 07:24:55 am
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, 08:46:01 am
Well it did worked then, it cut it off  O:-)  ;D
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 22, 2015, 09:07:30 am
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, 02: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, 06:45:59 am
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, 05: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 23, 2015, 07:41:01 pm
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 23, 2015, 09:46:01 pm
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, 05: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, 05: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 05, 2015, 07:11:14 pm
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, 02: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, 04: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, 08:14:45 am
probably a bug ... where were / how were you able to do that?
Title: Re: [ADDON] SimplePortal
Post by: radu81 on May 14, 2015, 09:01:22 am
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, 05: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, 05: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, 12: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 20, 2015, 06:34:19 pm
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, 12: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 21, 2015, 08:28:39 pm
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, 01: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, 05: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, 09:50:59 am
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, 03: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, 09:38:12 am
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, 09:07:26 am
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, 09:42:56 am
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, 12: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, 08:01:17 am
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, 09:47:46 am
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, 09:57:56 am
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, 01: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, 03: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, 04: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, 07:17:32 am
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:

QuoteAn Error Has Occurred
Unable to load the 'main' template.

QuoteBurke 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, 09:22:58 am
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, 10:41:15 am
@Spuds

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

No errors, and no seemingly ill effects.  ;D



EDIT:
Quote from: Spuds – 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, 10:28:16 am
@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, 07:14:01 am
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, 07:50:02 am
QuoteCould 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, 05: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 09, 2015, 06:35:58 pm
Good point. :D
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on July 09, 2015, 07:16:07 pm
True... Especially since no link shows when hovering over them.
Title: Re: [ADDON] SimplePortal
Post by: Flavio93Zena on July 09, 2015, 07:25:08 pm
 8)
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on July 09, 2015, 08:14:18 pm
@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, 02: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, 02: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, 02:59:19 pm
Quote from: [SiNaN] – 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, 03:16:25 pm
You're welcome! Have fun using SimplePortal! ;)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on August 08, 2015, 12: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, 03: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, 03: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, 01: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 08, 2015, 09:51:50 pm
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, 04: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, 05: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, 03: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, 03: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, 09:38:41 am
Quote from: kode54 – 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, 09:57:26 am
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, 10:31:09 am
Quote from: ahrasis –
Quote from: kode54 – 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, 10:48:15 am
Quote from: Keiro – 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, 12:44:09 pm
Quote from: emanuele –
Quote from: Keiro – 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, 09:34:02 am
@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: Adrek on December 28, 2015, 03: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 08, 2016, 08:42:37 pm
Quote from: Eliana Tamerin – 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, 08:33:05 am
Quote from: Burke Knight – @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 21, 2016, 08:37:00 pm
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 21, 2016, 09:10:16 pm
Quote from: Spuds – 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 12, 2016, 09:45:11 pm
@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 12, 2016, 10:00:37 pm
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 12, 2016, 11:02:00 pm
@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, 06:21:13 am
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, 07:31:56 am
Worked like a charm! Thank you, @Spuds.
Title: Re: [ADDON] SimplePortal
Post by: txcas on February 15, 2016, 08:44:17 am
Any idea why the portal page is not displayed on phones?
Title: Re: [ADDON] SimplePortal
Post by: radu81 on February 15, 2016, 09:36:32 am
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, 10:12:08 am
Quote from: radu81 – 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, 11:18:20 am
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, 11:56:51 am
Quote from: radu81 – 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, 02: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.


(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, 03: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, 09:02:34 am
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, 02: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, 10:04:00 am
Quote from: emanuele – 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, 08:24:43 am
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, 12: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 18, 2016, 09:48:50 pm
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 18, 2016, 11:02:37 pm
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, 08:09:54 am
FYI, the shoutbox stopped working on B1.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 19, 2016, 08:20:29 am
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

QuoteI 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, 10:03:29 am
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, 10:04:46 am
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 19, 2016, 07:58:58 pm
Thanks again!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 01, 2016, 08:36:37 pm
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 01, 2016, 10:05:40 pm
@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:

QuoteAn 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, 05:32:55 am
Quote from: Spuds –
  • Its now Beta2 instead of Beta1, I know, holy crap right !
This is it!! :P

Quote from: Spuds –
  • 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!

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

Quote from: Spuds –
  • 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, 05:39:54 am
Quote from: Burke Knight –
QuoteAn 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, 07:37:43 am
@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, 08:15:19 am
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, 09:07:59 am
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, 09:52:44 am
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, 10:23:12 am
Quote from: Spuds – 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, 03:29:36 pm
QuoteBlock 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 03, 2016, 06:28:01 pm
Quote from: Burke Knight – 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 03, 2016, 06:41:01 pm
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 03, 2016, 08:19:40 pm
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, 03: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, 04: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, 07:36:51 am
Quote from: emanuele – 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, 08:30:35 am
Quote38.    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, 09:10:00 am
Quote from: Spuds –
Quote38.    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, 09:27:20 am
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, 01:53:38 pm
Quote from: Spuds – 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, 03:07:31 pm
I do, check the repo  ;)  ... but in this case it was
QuoteSneak 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, 03:42:25 pm
xD
Title: Re: [ADDON] SimplePortal
Post by: Eliana Tamerin on March 05, 2016, 05:48:18 pm
Quote from: Spuds – I do, check the repo  ;)  ... but in this case it was
QuoteSneak 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, 06:28:23 am
@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, 06:41:14 am
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, 07:29:22 am
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, 02: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, 06:25:59 am
Was this for 1.1 or 1.07 btw?
Title: Re: [ADDON] SimplePortal
Post by: Ruth on June 22, 2016, 07:31:37 am
It is ElkArte 1.0.7
Title: Re: [ADDON] SimplePortal
Post by: Ruth on July 14, 2016, 04: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, 04: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, 04:44:31 pm
Quote from: emanuele – /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, 03: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, 04: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 15, 2016, 06:59:28 pm
If the language files work the same as in SMF, they are cached.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on July 15, 2016, 08:15:53 pm
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, 02: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, 05:12:02 am
Poor Spuds...thank you, Emanuele.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on September 04, 2016, 08:01:24 pm
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 08, 2017, 06:18:48 pm
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?

(http://www.runningrum.com/sources/images/IMG_0115.PNG)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 08, 2017, 07:10:39 pm
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, 04:43:59 pm
Hello,

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

Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 02, 2017, 05:48:13 pm
Thanks for the report, I'll fix it in B2
Title: Re: [ADDON] SimplePortal
Post by: shaitan on February 03, 2017, 04: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, 01:30:22 pm
French translation in attachment.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 22, 2017, 04: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, 04: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, 05: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, 09:52:41 am
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, 11:18:17 am
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


Quote from: Decent_946 –
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, 11:45:34 am
Quote from: Decent_946 – 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 ?
Quote from: Decent_946 – 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, 11:46:27 am
QuoteFor 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, 12:01:10 pm
Quote from: Spuds – 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 !





Quote from: Spuds – 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, 12:14:43 pm
QuoteIts 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 March 31, 2017, 06:03:24 pm
Quote from: Spuds – So change that last false to a true
yep, that worked, thank you!

Quote from: Spuds –
  • 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 March 31, 2017, 06:45:25 pm
Did I do a block? :o
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 31, 2017, 07:41:28 pm
Quotewhat 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, 02:00:00 am
Quote from: Spuds –
QuoteIts 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, 04:28:10 am
yes and it's a nice one ;) http://www.elkarte.net/community/index.php?topic=2387.msg17894#msg17894


Quote from: Spuds – 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, 05: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 04, 2017, 07:34:35 pm
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 04, 2017, 08:16:24 pm
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 04, 2017, 09:16:49 pm
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 05, 2017, 07:44:44 pm
Quote from: Spuds –  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, 05: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)
(Link-4698)  (Link-4700)

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, 07:19:35 am
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 07, 2017, 06:12:27 pm
Quote from: radu81 – 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)
Quote from: radu81 – 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.

Quote from: radu81 –
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 07, 2017, 06:58:23 pm
Thanks for your answer Spuds.

QuoteRemember 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?

QuoteThere 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 07, 2017, 08:39:28 pm
Quote from: radu81 – 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.

Quote from: emanuele – 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, 03: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.


Quote from: radu81 – 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, 08:39:53 am
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, 02: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, 04: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 08, 2017, 06:23:53 pm
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 08, 2017, 06:50:11 pm
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 08, 2017, 06:55:16 pm
I can test that too ;)
Title: Missing Simple Portal portal page on cellphone
Post by: Auctor Lucan on April 09, 2017, 07:13:13 pm
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, 07:07:52 am
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, 07:57:54 am
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, 08:09:24 am
This should have all the fixes we have discussed to date
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 10, 2017, 07:31:02 pm
Quote from: Spuds – 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, 03: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, 08:23:07 am
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, 10:50:26 am
Thanks Spuds, no more errors with RSS block ;)
Title: Re: [ADDON] SimplePortal
Post by: live627 on May 21, 2017, 05: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, 05: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, 02: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, 05: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, 09:06:28 am
I'll look into these bugs in the next few days and see if they still exist in the latest, thanks for the reports.

Quote from: radu81 – 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, 09:22:47 am
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, 04: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, 10:00:00 am
Quote from: Ruth – 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.

Quote from: Ruth –
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, 03: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.

QuoteI 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, 10:34:49 am
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.

QuoteI 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, 04: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, 05:03:36 pm
Quote from: emanuele – 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 21, 2017, 06:06:10 pm
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, 01:47:59 pm
Quote from: live627 – 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
Quote from: live627 – Another error

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

Create/edit block
Preview it
Fixed

Quote from: radu81 – 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, 03: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, 05: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, 02: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 21, 2017, 06:59:01 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?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on October 22, 2017, 11:42:33 am
Quote from: b4pjoe – 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, 12: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, 12: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, 04: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, 01: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, 03: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, 03: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 27, 2017, 08:14:02 pm
Quote from: vbgamer45 – 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)
Quote from: radu81 – 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, 11:55:39 am
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, 12: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, 11:25:51 am
@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, 03: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, 09:17:31 am
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, 12: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, 12:48:58 pm
Great news!
Title: Re: [ADDON] SimplePortal
Post by: emanuele on December 10, 2017, 02:27:08 pm
Great!
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 12, 2017, 08:32:30 am
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:
(Link-5340)
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:
(Link-5342)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 16, 2017, 09:54:46 am
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, 05: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, 12: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, 08:43:08 am
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, 11:13:56 am
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, 11:45:34 am
Quote from: hartiberlin – 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:
Quote from: radu81 – 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, 07:43:56 am
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, 01: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, 02: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, 03: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, 09:47:03 am
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 30, 2018, 10:10:09 pm
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, 01: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, 05: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 January 31, 2018, 08:43:06 pm
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, 03: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 04, 2018, 08:27:16 pm
Quote from: radu81 – 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.

(Link-5527) (Link-5529)


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?

(Link-5533) (Link-5531)


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"?

(Link-5535) (Link-5537)

Can I edit them by myself? O:-)
Title: Re: [ADDON] SimplePortal
Post by: Ruth on February 05, 2018, 03: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:

(Link-5539)

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":

(Link-5541)
Title: Re: [ADDON] SimplePortal
Post by: emanuele on February 05, 2018, 08:48:52 pm
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, 12:14:49 am
Quote from: emanuele – 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:

(Link-5541)

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

(Link-5543)

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, 08:29:37 am
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, 12: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, 04: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 06, 2018, 06:27:09 pm
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, 07:09:11 am
Thank you both, Emanuele and Radu.

QuoteYou 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, 02: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, 04:17:09 pm
Is Spuds gone?  Is this addon dead?
Title: Re: [ADDON] SimplePortal
Post by: emanuele on February 17, 2018, 03: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, 07:40:23 am
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, 08:24:25 am
Quote from: emanuele – 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 20, 2018, 08:36:00 pm
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, 06:11:32 am
Yes, something like this is missing, kode54

Get well soon, Spuds!

Quote from: hartiberlin – 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 05, 2018, 07:26:06 pm
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 05, 2018, 07:51:02 pm
I already did, and it didn't break this addon.
Title: Re: [ADDON] SimplePortal
Post by: txcas on March 05, 2018, 09:14:13 pm
Quote from: kode54 – 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 05, 2018, 11:21:21 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?
Title: Re: [ADDON] SimplePortal
Post by: txcas on March 06, 2018, 09:15:16 am
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, 05:29:26 pm
I found the problem, the Member Info block is broken.
Title: Re: [ADDON] SimplePortal
Post by: kode54 on March 06, 2018, 08:39:12 pm
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, 05: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, 12:24:28 pm
Quote from: kode54 – 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, 02:33:42 pm
Quote from: emanuele – 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:

(Link-5668)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 30, 2018, 11:31:29 am
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, 10:18:54 am
Where can one get the latest with those fixes?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 31, 2018, 02: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, 12:32:49 am
Quote from: Spuds – 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, 09:40:48 am
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, 10:49:06 am
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.

(Link-5676)
Title: Re: [ADDON] SimplePortal
Post by: b4pjoe on April 01, 2018, 11:16:32 am
What is weird now is that the blank spot for the right sidebar now has an ad there:

(Link-5678)

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.

(Link-5680)

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, 11:33:15 am
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, 11:36:45 am
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, 12: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, 01: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 01, 2018, 09:03:01 pm
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 01, 2018, 10:04:51 pm
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:
(Link-5682)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 02, 2018, 05: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:
(Link-5684)
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, 08:51:06 am
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, 03: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, 04: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

Quote from: txcas – 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, 05: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, 05:34:57 pm
Quote from: Spuds – 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

Quote from: Spuds – 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 02, 2018, 11:49:19 pm
Quote from: Spuds – 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:

(Link-5709)

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

(Link-5711)

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, 06:41:38 am
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, 09:18:41 am
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, 09:40:30 am
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, 09:42:29 am
Quote from: b4pjoe – 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, 09:43:38 am
Quote from: Ruth – 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, 09:49:46 am
Quote from: Spuds – 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, 10:01:24 am
Quote from: Spuds –
Quote from: b4pjoe – 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, 10:13:18 am
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, 01:50:50 pm
Quote from: Ruth –
Quote from: Spuds – 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, 01:51:24 pm
Quote from: b4pjoe – 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, 02:30:40 pm
Quote from: Spuds –
Quote from: b4pjoe – 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, 03:09:48 pm
Quote from: Spuds – 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, 02:13:01 pm
Quote from: Spuds – 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

Quote from: txcas – 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, 05: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, 05:45:04 pm
Quote from: txcas – 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?
Quote from: radu81 – 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 05, 2018, 08:00:23 pm
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, 09:55:09 am
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, 10:18:16 am
Thanks for the report, I'm looking in to that.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on April 17, 2018, 08:29:39 am
Quote from: Ruth – 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, 09:46:27 am
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, 11:34:16 am
@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, 04: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, 08:31:06 am
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, 09:30:22 am
portal.js exists in themes\default\scripts but it's not loaded
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 10, 2018, 09:47:23 am
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, 10:11:47 am
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, 10:47:46 am
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 10, 2018, 06:35:40 pm
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 10, 2018, 08:27:32 pm
Confirmed !
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 18, 2018, 07:57:07 pm
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 20, 2018, 07:20:07 pm
Quote from: Spuds – The mobile issue just above ^^^ should be fixed
I confirm, it works fine now.

Quote from: Spuds – 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.

Quote from: Spuds – 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, 05: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, 08:12:05 am
I'm on it :D
Title: Re: [ADDON] SimplePortal
Post by: McFly on May 23, 2018, 05: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, 10:46:20 am
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, 12: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, 12: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, 05: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, 05: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 07, 2018, 06:07:42 pm
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, 05:07:00 am
Quote from: Eliana Tamerin –
Quote from: phantom –
Quote from: Spuds –
Quote from: phantom – 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, 04: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, 03:52:29 am
I also need this! :)

Quote from: txcas – Hey @Spuds, can you release a new version with the latest updates?
Title: Re: [ADDON] SimplePortal
Post by: Auctor Lucan on November 30, 2018, 03: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! :)

Quote from: Spuds – 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, 03: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, 03: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, 11:25:20 am
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 16, 2019, 09:42:47 pm
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, 01:01:43 pm
Quote from: Spuds – 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.

Quote from: Spuds – 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 18, 2019, 06:37:06 pm
Thanks for the clarification, let me see if I can reproduce the error.
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on March 31, 2019, 12: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, 04: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, 04:59:51 pm
Quote from: Spuds – 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, 05: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 01, 2019, 08:48:24 pm
Quote from: Spuds – 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, 01: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, 08:00:26 am
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, 05: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: );
Title: Re: [ADDON] SimplePortal
Post by: Antechinus on February 08, 2021, 05:38:14 pm
Oi @Spuds  :D

The issues link from the SP page on the Elk Add-ons site is a 404 now. Needs updating to whatever the new url is.

https://addons.elkarte.net/feature/Simple-Portal.html
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 08, 2021, 05:46:05 pm
Issues ??? Can't be any issues, so no link :P  

Looks like i never updated that link when I moved the code to the SimplePortal team, its here: https://github.com/SimplePortal/SimplePortal_ElkArte/issues

Thats where you can give me a kick in the keister!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 19, 2021, 02:01:20 pm
Well fresh off the heals of RC1, here is a preliminary RC2! (OK its been almost 3 years lol)

Whats new in RC2?

So give this a test and let me know what else I broke and I may fix it before another 3 years passes  :-X
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 19, 2021, 02:23:57 pm
can be used on elkarte 1.1.6 or requires 1.1.7? (like Levertine Gallery)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 19, 2021, 04:21:45 pm
Thats a good question.

 it should run on 1.1.6 BUT one  item that I know will not work are lightbox images for any portal article inline images.  The image should be there but it will not expand.   Now the edit for 1.1.6 to fix that is:

https://github.com/elkarte/Elkarte/commit/e989172a51ea5006661d77f7a57409fc9f38d8c9

basically just add an &

I've only been running this on 1.1.7 so I think that is the only breaking item.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 21, 2021, 08:49:59 pm
Here is another update to rc2 ...
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 26, 2021, 03:33:01 am
I just updated to Elk 1.1.7 and Simple Portal RC2.

Compared to the previous version of SP, there is a difference in Board News Block: if I have an image attachment displayed full screen at the end of the topic with tag [attach align=middle type=image]xxx[/attach] the thumbnail won't be displayed in board index. Is this wanted or it's a bug?

If I don't use [attach align=middle type=image]xxx[/attach] inside the topic the thumbnail is displayed correctly in board index.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on April 26, 2021, 09:53:15 am
That is how I intended it to work with ILA. (it has the same behavior with articles)

My thought was,
- if someone is using ILA in a message, then they placed the image where they want it. 
- If no ILA tags, and there are attachments, and you have show first attachment option enabled then and only then use it.

Perhaps we could change that so if the ILA tag is found before cutoff length use it else use the attachment?
Title: Re: [ADDON] SimplePortal
Post by: radu81 on April 26, 2021, 11:55:24 am
Quote from: Spuds – Perhaps we could change that so if the ILA tag is found before cutoff length use it else use the attachment?
That would be nice 8)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 08, 2021, 02:49:26 pm
Here are the latest updates to RC2, if I don't get a rush of error reports I'll do some final updates I have in mind, polish this up and call it GA

Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 09, 2021, 12:06:53 pm
I forgot to include the updated language strings (specifically Markdown) ... so the package above has been replaced.
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on June 03, 2021, 10:03:48 pm
I has found a bugz!  :D

The platform: 

SP RC2
nginx 1.21.0
php 7.4
mariadb 10.6.1



The bugz:

Adding an article works fine. Editing an article fails with the error message:


Code: [Select]
Invalid argument supplied for foreach()


Thanks for keeping this project alive @Spuds
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 03, 2021, 10:13:52 pm
Thanks for the report, I'll take a look in the AM and see what is going on.

Would look now but to busy enjoying a Left Hand Galactic Cowboy, I'm adding it to my approved beer list :D  If you like a darker stout then you must try.  It also has a Nitro charge so you get the super creamy texture, just like the good pubs.

QuoteBlast off into the stratosphere and grab a fistful of stars! Smoother than Solo and darker than the Dark Side, Galactic Cowboy is brewed for cosmic adventure. With notes of bittersweet chocolate and black coffee, this high-octane stout is the fuel you need to wrangle the universe

MALT   2-Row, Special B, Chocolate, Dark Chocolate, C-40, Rolled Oats, Flaked Barley
HOPS   Cascade, Comet, Galaxy.

Title: Re: [ADDON] SimplePortal
Post by: badmonkey on June 03, 2021, 10:54:58 pm
Quote from: Spuds – Thanks for the report, I'll take a look in the AM and see what is going on.

Would look now but to busy enjoying a Left Hand Galactic Cowboy, I'm adding it to my approved beer list :D  If you like a darker stout then you must try.  It also has a Nitro charge so you get the super creamy texture, just like the good pubs.

QuoteBlast off into the stratosphere and grab a fistful of stars! Smoother than Solo and darker than the Dark Side, Galactic Cowboy is brewed for cosmic adventure. With notes of bittersweet chocolate and black coffee, this high-octane stout is the fuel you need to wrangle the universe

MALT 2-Row, Special B, Chocolate, Dark Chocolate, C-40, Rolled Oats, Flaked Barley
HOPS Cascade, Comet, Galaxy.


And you have proper priorities!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 04, 2021, 08:29:52 am
Quote from: badmonkey – I has found a bugz!  :D

The platform:

SP RC2
nginx 1.21.0
php 7.4
mariadb 10.6.1

The bugz:

Adding an article works fine. Editing an article fails with the error message:

Code: [Select]
Invalid argument supplied for foreach()
I have several articles on my test setup and they are editing fine.  Was this a "fresh" install and the first and only article / category in the system?  Also could you supply the line/file of that error. 

ETA: Also any attachments and what type of article, bbc/html/etc was it?

In the meantime I'm going to zero out my test setup and see if I can get the same behavior.
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on June 04, 2021, 10:56:33 am
I'll get back to you on the error details. 

The install is an oldie using several patches up to 1.1.7.  There are several existing articles, all BBC with attachments. 
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on June 04, 2021, 11:00:43 am
From the error log:

Code: [Select]
	Type of error: Undefined
Notice: Undefined offset: 3
https://www.site.com/index.php?action=admin;area=portalarticles;sa=edit
File: /home/www/web3/web/sources/subs/PortalAdmin.subs.php
Line: 857


The same error occurs on a different yet similar install.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 05, 2021, 05:44:30 pm
I don't have an answer just yet, article attachments certainly was updated/extended in this version.

Is this occurring when you try to save your edit or does the edit page not even appear?

If the edit page is showing up, does it show the existing attachments or is that area blank?
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on June 05, 2021, 05:54:41 pm
Quote from: Spuds – I don't have an answer just yet, article attachments certainly was updated/extended in this version.

Is this occurring when you try to save your edit or does the edit page not even appear?

If the edit page is showing up, does it show the existing attachments or is that area blank?


Hey Spuds! The edit page loads. The attachments load in the editor as well. Everything is fine until the Save.

For what it's worth, don't rush to fix it. I made manual edits in the database to accomplish the immediate goal. Enjoy your weekend! Come to this at your leisure. ;)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 06, 2021, 09:38:24 am
Could you attach your PortalAdmin.subs.php file, I just want to make sure we are on the same file level or If I packaged it up wrong.  I really don't see how its throwing that notice.

Also when you go to save the edit, its not saving?  If no,  could you check your server error log for additional info.  The reason I ask is  that error is simply a notice (which should not be showing) but its just a notice which would not stop execution at that point.
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on June 06, 2021, 08:38:04 pm
Here's the PortalAdmin.subs.php file from one of the installs. Correct, edits fail to save the information delta. Nothing shows in the server error logs???
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 06, 2021, 08:55:54 pm
Well on a positive note, it does show I made an edit in that area post RC2 and thats why my local install will not show the error.  What you have, in case you were not aware, has a bug !  Sorry about that, guess I lost track about that change with all the other things I've been updating!

Change 
Code: [Select]
		// They may have chosen to [attach] to an existing image
$currentAttachments = sportal_get_articles_attachments($article_info['id']);
foreach ($currentAttachments[$article_info['id']] as $attachment)
{
// Replace ila attach tags with the new valid attachment id and [spattach] tag
$article_info['body'] = preg_replace('~\[attach(.*?)\]' . $attachment['id_attach'] . '\[\/attach\]~', '[spattach$1]' . $attachment['id_attach'] . '[/spattach]', $article_info['body']);
}

To:
Code: [Select]
		// They may have chosen to [attach] to an existing image
$currentAttachments = sportal_get_articles_attachments($article_info['id']);
if (!empty($currentAttachments[$article_info['id']]))
{
foreach ($currentAttachments[$article_info['id']] as $attachment)
{
// Replace ila attach tags with the new valid attachment id and [spattach] tag
$article_info['body'] = preg_replace('~\[attach(.*?)\]' . $attachment['id_attach'] . '\[\/attach\]~', '[spattach$1]' . $attachment['id_attach'] . '[/spattach]', $article_info['body']);
}
}
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 06, 2021, 09:10:24 pm
On second thought, let me repackage what I currently have in case I made more changes that I don't remember ! ... Be back in a bit!

Looking at the change log on github, looks like I made a couple of last min fixes, including the one @badmonkey reported.  So here is what is currently in the repo.  Sorry about this!

ETA removed attachment, get the current release https://github.com/SimplePortal/SimplePortal_ElkArte/releases
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on June 06, 2021, 10:00:49 pm
Thanks Spuds! You da man! Treat yourself to a cold one, you've earned it!
Title: Re: [ADDON] SimplePortal
Post by: radu81 on June 07, 2021, 05:33:41 am
Quote from: Spuds – Looking at the change log on github, looks like I made a couple of last min fixes, including the one @badmonkey reported.
I just test it and I confirm it solves the problem, I had the same error reported by @badmonkey‍ 
Title: Re: [ADDON] SimplePortal
Post by: kode54 on November 01, 2021, 06:58:17 pm
There appears to be a bug in SimplePortal's draggable sections. Once a section is dragged out of a sidebar, it can't be dragged back into the sidebar. The change persists permanently.

Edit: Disregard this, I only just noticed that there have been not one, but two releases since 1.0.0 RC1.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on November 02, 2021, 09:09:43 am
That issue could still be there, but there is a "reset" blocks function (small icon along with the collapse right / left) that will allow a user to put things back to normal should the blocks gets messed up.
Title: Re: [ADDON] SimplePortal
Post by: kode54 on November 02, 2021, 04:59:16 pm
Apparently, a user is having trouble making the reset blocks button appear at all. They had to log out and back in just to make the sidebar collapse button appear, but the reset blocks button won't appear.
Title: Re: [ADDON] SimplePortal
Post by: Steeley on November 02, 2021, 09:44:00 pm
Quote from: kode54 – Apparently, a user is having trouble making the reset blocks button appear at all. They had to log out and back in just to make the sidebar collapse button appear, but the reset blocks button won't appear.

Ahhh... so now we know who broke the internet...  ;D
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on November 03, 2021, 07:16:42 am
Quote from: Steeley –
Quote from: kode54 – Apparently, a user is having trouble making the reset blocks button appear at all. They had to log out and back in just to make the sidebar collapse button appear, but the reset blocks button won't appear.

Ahhh... so now we know who broke the internet...  ;D


Facebook?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on November 03, 2021, 10:38:04 am
Just to note the icon will not be visible if they have not changed the block arrangement from the default.

Other than that, the icon is and SVG icon and is defined in portal.css, so make sure that you have the latest loading, or at least have the
Code: [Select]
.icon.reset::before 
definition in there and they flush their cache.

If its still not there, I can only think that somehow the system is not detecting they moved the blocks around, so they could try moving yet another one (and do a page refresh, the icon is not ajax ATM).  The command is protected by the session id, so if needed we could put in a temp work around so they can just follow a reset link w/o the needed for the session id
Title: Re: [ADDON] SimplePortal new french translation
Post by: augras on January 09, 2022, 04:09:11 am
Hi,
I tried SimplePortal and there are a lot of translations were missing  : so the new files for the french translation are here.
.php files are not autorised now here ?

EDIT : i made a change, see the next post for the files https://www.elkarte.net/community/index.php?topic=1399.msg43071#msg43071
Title: Re: [ADDON] SimplePortal
Post by: augras on January 09, 2022, 04:48:27 am
I have some questions about SimplePortal.

- User informations block

What is Total messages number ?
It's absolutely not the total messages of the user.

- Board stats block

Simultaneous connections : the number is not good (i get 512 only with 40 users)


I get some errors with SimplePortal on Elkarte1.1.8.

- Who is online block :

When there is a refresh to x seconds the block is reduced and the page must be refresh to get again who is online, but x seconds after....
Type d'erreur: Non défini
Notice: Undefined offset: 0
https://augras.eu/puppy_forum/index.php?
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/WhosOnline.block.php
Ligne: 130

- Board stats block

Type d'erreur: Non défini
Notice: Undefined index: boards
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 121
      
Type d'erreur: Non défini
Notice: Undefined index: categories
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 120
      
Type d'erreur: Non défini
Notice: Undefined index: topics
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 119   
   
Type d'erreur: Non défini
Notice: Undefined index: posts
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 118
      
Type d'erreur: Non défini
Notice: Undefined index: members
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 117

- portal.subs.php

admin
Type d'erreur: Générale
Notice: Constant SPORTAL_STALE already defined
https://augras.eu/puppy_forum/index.php?action=admin;area=theme;sa=list;th=1;b2fo4gRXIylE=jAQ77G5zEJkLqPep1C1Lf09lYB0xj3SC
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/Portal.subs.php
Ligne: 62
      
admin
Type d'erreur: Générale
Notice: Constant SPORTAL_VERSION already defined
https://augras.eu/puppy_forum/index.php?action=admin;area=theme;sa=list;th=1;b2fo4gRXIylE=jAQ77G5zEJkLqPep1C1Lf09lYB0xj3SC
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/Portal.subs.php
Ligne: 61

- PortalAdminBlocks.controller.php

admin   
Type d'erreur: Non défini
Notice: Undefined index: block_row
https://augras.eu/puppy_forum/index.php?action=admin;area=portalblocks;sa=edit
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/admin/PortalAdminBlocks.controller.php
Ligne: 572


A suggestion for the recents messages/subjects block :
the number of messages/subjects can be define but is it possible to get a link "see more" to display the next x messages/subjects define ?

Philippe



Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 09, 2022, 10:51:07 am
Quote from: augras – I have some questions about SimplePortal.

- User informations block

What is Total messages number ?
It's absolutely not the total messages of the user.
It is the number of personal messages the user has.  SP simply reports what ElkArte says the user has. 
Quote from: augras – - Board stats block

Simultaneous connections : the number is not good (i get 512 only with 40 users)
I have not idea what this is, are you using a custom block?  The number of connections is not part of SP that I am aware.
Quote from: augras – I get some errors with SimplePortal on Elkarte1.1.8.

- Who is online block :

When there is a refresh to x seconds the block is reduced and the page must be refresh to get again who is online, but x seconds after....
Type d'erreur: Non défini
Notice: Undefined offset: 0
https://augras.eu/puppy_forum/index.php?
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/WhosOnline.block.php
Ligne: 130

- Board stats block

Type d'erreur: Non défini
Notice: Undefined index: boards
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 121
      
Type d'erreur: Non défini
Notice: Undefined index: categories
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 120
      
Type d'erreur: Non défini
Notice: Undefined index: topics
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 119   
   
Type d'erreur: Non défini
Notice: Undefined index: posts
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 118
      
Type d'erreur: Non défini
Notice: Undefined index: members
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 117
I'm not seeing this on any of test site (for board stats), still curious if you have some custom code you entered in that file?
Quote from: augras – - portal.subs.php

admin
Type d'erreur: Générale
Notice: Constant SPORTAL_STALE already defined
https://augras.eu/puppy_forum/index.php?action=admin;area=theme;sa=list;th=1;b2fo4gRXIylE=jAQ77G5zEJkLqPep1C1Lf09lYB0xj3SC
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/Portal.subs.php
Ligne: 62
      
admin
Type d'erreur: Générale
Notice: Constant SPORTAL_VERSION already defined
https://augras.eu/puppy_forum/index.php?action=admin;area=theme;sa=list;th=1;b2fo4gRXIylE=jAQ77G5zEJkLqPep1C1Lf09lYB0xj3SC
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/Portal.subs.php
Ligne: 61

- PortalAdminBlocks.controller.php
I'll put in a fix to prevent that, seems like SP is being called twice so I'll have to check that theme list area in the ACP
Quote from: augras –
admin   
Type d'erreur: Non défini
Notice: Undefined index: block_row
https://augras.eu/puppy_forum/index.php?action=admin;area=portalblocks;sa=edit
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/admin/PortalAdminBlocks.controller.php
Ligne: 572
I'm Guessing you chose a block location (before/after) but not the block itself.  I'll have to add additional user input checking.
Quote from: augras –
A suggestion for the recents messages/subjects block :
the number of messages/subjects can be define but is it possible to get a link "see more" to display the next x messages/subjects define ?
If I understand what you are asking, you would have to create a custom block with your "more" button.  I'd then likely create a custom page to display when the more is pressed so that it looked like you were still on the portal.
Title: Re: [ADDON] SimplePortal
Post by: augras on January 09, 2022, 11:48:09 am
Quote from: Spuds –
Quote from: augras – I have some questions about SimplePortal.

- User informations block

What is Total messages number ?
It's absolutely not the total messages of the user.
It is the number of personal messages the user has.  SP simply reports what ElkArte says the user has.

Ok, thank you : i will change the translation. But the english must be Total personal messages Personal messages and  not Total messages.

Quote from: Spuds –  
Quote from: augras – - Board stats block

Simultaneous connections : the number is not good (i get 512 only with 40 users)
I have not idea what this is, are you using a custom block?  The number of connections is not part of SP that I am aware.

No custom block and no personal code, it's the normal block, the last line.

Quote from: Spuds –
Quote from: augras – - Who is online block :

When there is a refresh to x seconds the block is reduced and the page must be refresh to get again who is online, but x seconds after....
Type d'erreur: Non défini
Notice: Undefined offset: 0
https://augras.eu/puppy_forum/index.php?
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/WhosOnline.block.php
Ligne: 130

I think you haven't seen this error with the Who is online block

Quote from: Spuds –
Quote from: augras – - Board stats block

Type d'erreur: Non défini
Notice: Undefined index: boards
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 121
      
Type d'erreur: Non défini
Notice: Undefined index: categories
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 120
      
Type d'erreur: Non défini
Notice: Undefined index: topics
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 119   
   
Type d'erreur: Non défini
Notice: Undefined index: posts
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 118
      
Type d'erreur: Non défini
Notice: Undefined index: members
https://augras.eu/puppy_forum/index.php?https://augras.eu/puppy_forum/
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/BoardStats.block.php
Ligne: 117
I'm not seeing this on any of test site (for board stats), still curious if you have some custom code you entered in that file?

No custom code. And i have a lot of pages with these errors, it's not just one.

Quote from: Spuds –
Quote from: augras – - portal.subs.php

admin
Type d'erreur: Générale
Notice: Constant SPORTAL_STALE already defined
https://augras.eu/puppy_forum/index.php?action=admin;area=theme;sa=list;th=1;b2fo4gRXIylE=jAQ77G5zEJkLqPep1C1Lf09lYB0xj3SC
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/Portal.subs.php
Ligne: 62
      
admin
Type d'erreur: Générale
Notice: Constant SPORTAL_VERSION already defined
https://augras.eu/puppy_forum/index.php?action=admin;area=theme;sa=list;th=1;b2fo4gRXIylE=jAQ77G5zEJkLqPep1C1Lf09lYB0xj3SC
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/Portal.subs.php
Ligne: 61

- PortalAdminBlocks.controller.php
I'll put in a fix to prevent that, seems like SP is being called twice so I'll have to check that theme list area in the ACP

Ok, thank you.

Quote from: Spuds –
Quote from: augras –
admin   
Type d'erreur: Non défini
Notice: Undefined index: block_row
https://augras.eu/puppy_forum/index.php?action=admin;area=portalblocks;sa=edit
Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/admin/PortalAdminBlocks.controller.php
Ligne: 572
I'm Guessing you chose a block location (before/after) but not the block itself.  I'll have to add additional user input checking.

I think you are right : i have this error only one time.

Quote from: Spuds –
Quote from: augras –
A suggestion for the recents messages/subjects block :
the number of messages/subjects can be define but is it possible to get a link "see more" to display the next x messages/subjects define ?
If I understand what you are asking, you would have to create a custom block with your "more" button.  I'd then likely create a custom page to display when the more is pressed so that it looked like you were still on the portal.

As you say, i would like to stay still on the portal. You think about to create a custom html block with a "more" button ? And the "more" button open a custom page : but i don't really know how to create this page with the next messages/subjetcs.
Title: Re: [ADDON] SimplePortal
Post by: augras on January 09, 2022, 12:15:34 pm
I made a change in the translation : the new files !
(one change in SPortal.french.php on line 54 : Messages personnels and not Total des messages).
Philippe
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 09, 2022, 02:19:34 pm
Thanks for the updated translation :cool:

I believe the majority of the errors you have reported are due to permissions (including the who's online going blank).  But what I feel is happening is that you have enabled blocks for everyone, including guest, but then in your forums permissions you don't allow them to see these things.   The portal should be dealing more gracefully with these type of contradictions, so that is a todo for me (but TBH its very low on my list, I have many things I want to work on)

So attached are two files, this should stop the stats block error and the who block from going blank.

Regarding the "Simultaneous connections" aka "Most Online (ever)"  ... This value is set in your database, its found in the settings table, the index is mostOnline  You will need to use phpmyadmin or adminer or ... and change that value to something other than 512.  Looking at your page stats here:  https://augras.eu/puppy_forum/index.php?action=stats you can see that it says "Connexions simultanées:   512 - Mercredi 04 Décembre 2019, 01:38:23"   %12 is a suspicious number, like a bad import or ??? but anyway its not a SP issue, its what your forum has for the value.

ETA: Of course adding attachments is broken (still) so I can't attach the files just yet
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 09, 2022, 02:42:40 pm
Looks like a zip file works but php did not ...

Well there are two files in that archive, both go in your subs/spblocks directory, just overwrite them.  That should help with the issues.
Title: Re: [ADDON] SimplePortal
Post by: augras on January 10, 2022, 06:15:50 am
Quote from: Spuds – I believe the majority of the errors you have reported are due to permissions (including the who's online going blank).  But what I feel is happening is that you have enabled blocks for everyone, including guest, but then in your forums permissions you don't allow them to see these things.   The portal should be dealing more gracefully with these type of contradictions, so that is a todo for me (but TBH its very low on my list, I have many things I want to work on)
The blocks are on the portal and not in the forum and enabled for everyone, including guests.
Only one block is enabled on the portal and everywhere in the forum.

Quote from: Spuds – Regarding the "Simultaneous connections" aka "Most Online (ever)"  ... This value is set in your database, its found in the settings table, the index is mostOnline  You will need to use phpmyadmin or adminer or ... and change that value to something other than 512.  Looking at your page stats here:  https://augras.eu/puppy_forum/index.php?action=stats you can see that it says "Connexions simultanées:   512 - Mercredi 04 Décembre 2019, 01:38:23"   %12 is a suspicious number, like a bad import or ??? but anyway its not a SP issue, its what your forum has for the value.
Thank you, il will do that.

Quote from: Spuds – ETA: Of course adding attachments is broken (still) so I can't attach the files just yet
There is a message and it seems .php files are not in the list of authorized files... maybe it's just that, but some others are allowed.

Thank you,
Philippe
Title: Re: [ADDON] SimplePortal
Post by: augras on January 10, 2022, 06:17:38 am
Quote from: Spuds – Looks like a zip file works but php did not ...

Well there are two files in that archive, both go in your subs/spblocks directory, just overwrite them.  That should help with the issues.
Thank's again.
I will do that tonight when i will be back at home,
Philippe
Title: Re: [ADDON] SimplePortal
Post by: augras on January 10, 2022, 12:35:34 pm
The 2 files are in place and it seems to solve the problem : no errors at this time in the log... i was nearly 50 pages.
Il will make a feedback in a few days.
Thank's a lot.
I'm going to "play" with phpmyadmin to solve my problem with the Simultaneous connections.
Title: Re: [ADDON] SimplePortal
Post by: augras on January 10, 2022, 12:54:43 pm
Quote from: Spuds – Regarding the "Simultaneous connections" aka "Most Online (ever)"  ... This value is set in your database, its found in the settings table, the index is mostOnline  You will need to use phpmyadmin or adminer or ... and change that value to something other than 512.  Looking at your page stats here:  https://augras.eu/puppy_forum/index.php?action=stats you can see that it says "Connexions simultanées:   512 - Mercredi 04 Décembre 2019, 01:38:23"   %12 is a suspicious number, like a bad import or ??? but anyway its not a SP issue, its what your forum has for the value.
I got it and put a 9 !
Thank you.

Any errors at this time in the logs.
Title: Re: [ADDON] SimplePortal
Post by: augras on January 12, 2022, 07:15:57 am
Hi,
as the terminator this error is back !

Code: [Select]
Type d'erreur: Non défini
    Notice: Undefined offset: 0

    https://augras.eu/puppy_forum/index.php?action=PortalRefresh;sa=whos;api

    Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/spblocks/WhosOnline.block.php
    Ligne: 130

The WhosOnline block works still fine after your new file but the error is coming back : it seems it's only when i'm whith my admin account (no error with others accounts).
Philippe
Title: Re: [ADDON] SimplePortal
Post by: augras on January 14, 2022, 02:30:25 am
Hi,
It seems this error is only when someone is connected and there is a robot also : the difference between a user and a robot is that the robot has no avatar and maybe the error is coming from that.
It's ok with Guests, but Guests are not displayed in the user list : Robots are displayed
(Link-7997)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 14, 2022, 06:51:56 pm
Thanks for the additional details.  I'm still looking in to why that is happening.
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on January 17, 2022, 11:38:47 pm
How might one add a block for searching article content?
Title: Re: [ADDON] SimplePortal
Post by: augras on January 18, 2022, 07:30:36 am
There is a block Quick search : is it what you are looking for ?
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on January 18, 2022, 11:24:06 am
Quote from: augras – There is a block Quick search : is it what you are looking for ?
Correct me if I'm wrong, but I think it only searches forum content, i.e. posts. That's true of the search page itself. Or is the QS block different? Could be worth a try....:)
Title: Re: [ADDON] SimplePortal
Post by: augras on January 18, 2022, 12:05:07 pm
I made the test and you are right : it's only in posts, not in article or other content.
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on January 18, 2022, 01:50:20 pm
Quote from: augras – I made the test and you are right : it's only in posts, not in article or other content.
Thanks for the suggestion and feedback! It was worth a shot anyway.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 19, 2022, 03:41:25 pm
I'd have to take a look to see if those could be indexed by the basic search function, if so then we could create a custom block to do article searches. 

As it stands I don't think there is anything in place to do this.

ETA I added this as an enhancement request, not sure when I can get to it though, 2.0 is one needy baby!
Title: Re: [ADDON] SimplePortal
Post by: badmonkey on January 19, 2022, 04:49:47 pm
Quote from: Spuds – I'd have to take a look to see if those could be indexed by the basic search function, if so then we could create a custom block to do article searches. 

As it stands I don't think there is anything in place to do this.

ETA I added this as an enhancement request, not sure when I can get to it though, 2.0 is one needy baby!
I could imagine 2.0 is rather needy! It's certainly a higher priority than the article search. ;)
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 12, 2022, 03:43:44 am
Forum Link (https://www.allpointswh.com/)

Okay, got it doing a portal page, but right now I also used the Ultimate Menu mod.
I'd like to get rid of the forum tab in the menu, as Community tab works for me, as long as can set it to action=forum
Especially since Community tab already has a bunch of items in drop down.
I had made an item in front, that also has drop down, but itself goes to the portal.

What need:
1. A way to make the Community tab in menu go to action=forum
2. Get rid of Forum tab, since Community will be it.
Thank you.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 12, 2022, 10:53:57 am
It looks like you figure it out?  When I went to site (looks good btw) community goes to the forum and there is no forum tab .... maybe that is just a guest thing?
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 12, 2022, 01:31:00 pm
I had to tweak the lang file. :p
Still issues with the Ultimate menu, since it does not like play fair with SP.
Where can I actually edit the forum menu?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 12, 2022, 02:09:01 pm
Old School hacking can be done in Menu.subs.php in the loadDefaultMenuButtons() function.
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 12, 2022, 02:28:56 pm
Quote from: Spuds – Old School hacking can be done in Menu.subs.php in the loadDefaultMenuButtons() function.

What about the forum tab made by SP?
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 12, 2022, 02:36:24 pm
That should be in the sp_integrate_menu_buttons() function in the ManageSPortalModule.controller.php file which I think currently lives in sources/admin
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 12, 2022, 02:51:08 pm
(https://bk.cc.nf/smileys2/Phew.gif)

That was some heavy bit of work, but I think I got it done.

(https://bk.cc.nf/Smileys/thankyou.gif)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 12, 2022, 05:51:15 pm
Awesome, glad you got it sorted :clap:
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 13, 2022, 01:54:57 pm
User info block seems to give this when click into field:

QuoteThis form is not secure. Autofill has been turned off.

(Link-9930)

Any way to fix this?
Title: Re: [ADDON] SimplePortal
Post by: Arantor on March 14, 2022, 05:03:19 am
Well, the cPanel link goes to an HTTP site not an HTTPS site and I don’t even see the form tag for the login form so definitely don’t see how that’s going to work in a secure fashion since for it to not show the warning it needs to be in a form tag with an action whose URL starts with HTTPS…
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 14, 2022, 06:22:26 am
Quote from: Arantor – Well, the cPanel link goes to an HTTP site not an HTTPS site and I don’t even see the form tag for the login form so definitely don’t see how that’s going to work in a secure fashion since for it to not show the warning it needs to be in a form tag with an action whose URL starts with HTTPS…

You may have mistaken what login form I meant.
The cPanel one I am waiting on fix for from server guys.
The one I need help here with, is the forum login form in the SP User Info block.
Title: Re: [ADDON] SimplePortal
Post by: Arantor on March 14, 2022, 11:58:03 am
No, I wasn’t mistaken. If you read what I said you’ll note I referred to the login form that doesn’t have a form tag (so the browser doesn’t know if it’s secure). While I was looking at the markup trying to work out what was going on,  I happened to notice the cPanel one.
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 14, 2022, 03:07:46 pm
Quote from: Arantor – Well, the cPanel link goes to an HTTP site not an HTTPS site and I don’t even see the form tag for the login form so definitely don’t see how that’s going to work in a secure fashion since for it to not show the warning it needs to be in a form tag with an action whose URL starts with HTTPS…

Yes, I see where the original code for the cPanel login was missing the closing form tag.
Guess it caused the issue with the user info form, due to be above it.
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 14, 2022, 07:31:23 pm
Here's another question for someone:

I remember there used to be addons for SP, like Shoutbox Tags.
Has anyone ported any of these over?
I especially would like to have the shoutbox tags back. :)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 18, 2022, 06:42:57 pm
What do you mean by  Shoutbox Tags ?
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 19, 2022, 02:03:56 pm
Where can do @username tagging.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 19, 2022, 06:52:54 pm
Ah .. that, thanks for the reminder.

I'll need to check into that, for some reason I have a foggy memory of there being some large issue with that functionality.  Be nice if it tied into the sites @username functions, that way you could get a notification of your choice.
Title: Re: [ADDON] SimplePortal
Post by: Hometutor on May 28, 2022, 02:46:59 pm
Where do I remove the greeting from the front page

Welcome to SimplePortal!....

rick
Title: Re: [ADDON] SimplePortal
Post by: Hometutor on May 28, 2022, 03:19:06 pm
Quote from: Hometutor – Where do I remove the greeting from the front page

Welcome to SimplePortal!....

rick

Found it Simpleportal>Block List
Title: Re: [ADDON] SimplePortal
Post by: Hometutor on May 29, 2022, 01:10:16 am
Any idea why I have two search boxes since I installed Simpleportal? It's not the quick search I moved that.

https://gottac.info/ucaninvest2/index.php

Rick
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 29, 2022, 08:33:42 am
That search bar is added by call_template_callbacks('th', $context['theme_header_callbacks']); line in index.template.php. 

Did you make any edits in that file? 

IF you did, you could try turning off the show quick search option in the admin control panel or rename the template_th_search_bar function in index.template.php, just remove the "th" from the name so it will not be called by the above function.
Title: Re: [ADDON] SimplePortal
Post by: Hometutor on May 29, 2022, 12:47:06 pm
That unfortunately made no difference.  I did note there's only 1 search box in the admin section.  No edits were made.

Rick
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 29, 2022, 02:07:58 pm
I'll setup a "fresh" site with SP and see how that could occur, should be easy to find.
Title: Re: [ADDON] SimplePortal
Post by: Hometutor on June 08, 2022, 05:43:07 pm
Any luck?

Rick
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 08, 2022, 10:00:02 pm
Its on my list ... will be tomorrow. Had to :firefighter: some 2.0 issues
Title: Re: [ADDON] SimplePortal
Post by: Spuds on June 09, 2022, 08:12:17 am
I don't have a fix for you just yet, but its the "forum menu" block that is causing the issue.  Disable that and the issue will go away. 

I'm honestly dubious that the menu block has any usefulness

ETA:   .elk_simple_portal-1.0.1.zip  (342.88 KB) 1.0.1 package version which should fix the double search issue and a few other minor issues reported over time.
Title: Re: [ADDON] SimplePortal
Post by: Hometutor on June 24, 2022, 07:05:32 pm
Quote from: Spuds – I don't have a fix for you just yet, but its the "forum menu" block that is causing the issue.  Disable that and the issue will go away. 

I'm honestly dubious that the menu block has any usefulness

ETA:  [attachurl]10031[/attachurl] 1.0.1 package version which should fix the double search issue and a few other minor issues reported over time.

Thank you I appreciate all your hard work.

Rick
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on December 04, 2022, 12:02:57 pm
Working on the Visibility Profiles List and finding one thing.
While I can set blocks to not show on Mobile, is there a way to set them to only show on mobile?
Title: Re: [ADDON] SimplePortal
Post by: Vague Whiner on December 06, 2022, 08:55:34 pm
Planning to make a "knowledge base" for a small community that would include discussion forums and also RSS/Atom feed aggregation and blogs for couple active writers. My initial idea was to use ElkArte as forums (since I have good experiences with it in the past), FreshRSS (https://freshrss.org/) for the feed aggregation and then some simplex'n'small CMS thing for the blogs.

But then thought to take a look into addons of ElkArte and came by SP, but didn't quite make it from the documentation or talks about the addon (whether SMF or ElkArte) if it's possible to assign permissions to specific users to write blogs? Also it would be nice to have them as separated blogs. So that if user want to browse one writers blog posts those would be found from the one page and other writers blog posts from the another. Then collect the newest entries to blog index page, 10-15 newest posts from all blogs.

Is this kind of thing easy to do with SP addon?

Would be really nice to keep all the things within the ElkArte and not set up many different things :)
Title: Re: [ADDON] SimplePortal
Post by: Steeley on December 07, 2022, 11:35:36 pm
Quote from: Vague Whiner – <snip>
if it's possible to assign permissions to specific users to write blogs? Also it would be nice to have them as separated blogs. So that if user want to browse one writers blog posts those would be found from the one page and other writers blog posts from the another. Then collect the newest entries to blog index page, 10-15 newest posts from all blogs.

Is this kind of thing easy to do with SP addon?

Would be really nice to keep all the things within the ElkArte and not set up many different things :)

If you want to have a user with his own little "mini blog", you can easily control who can post to a particular board with the standard admin permissions. If you want other users to be able to discuss those blog posts, granting other users reply (but not create) new topics in that board I believe is doable.  Another option (I think EA permits) is allow the blog poster the ability to create sub-boards in his specific board for discussion - he'd have to link them to the main board topic by title or html link - and that might require some tricky permission profiles for other users if admin isn't going to be required to facilitate each new addition and user access to those sub-boards. 

These are inherent EA permissions - I don't use Simple Portal so I'm not familiar with what additional features (or restrictions) it might bring - I'll defer to others on that one, but it looks like EA is able to do, one way or another,  what you describe inherently without add-on dependency.. If Simple Portal overlays on EA's permissions. that's cool.
 
Edit: as for "Latest Posts" that's also inherent, although having them repeated for separate boards  (latest in board A, latest in board B, etc.) I'm pretty sure will require some code manipulation. I'll defer that question to Spuds or someone more familiar with the PHP under the hood.

Title: Re: [ADDON] SimplePortal
Post by: Vague Whiner on December 08, 2022, 04:41:09 pm
Quote from: Steeley – If you want to have a user with his own little "mini blog", you can easily control who can post to a particular board with the standard admin permissions. If you want other users to be able to discuss those blog posts, granting other users reply (but not create) new topics in that board I believe is doable.

Oh, you mean that SP does use discussion boards as blogs? Didn't understand this from the description ... it just said:

Quote from: https://elkarte.github.io/addons//feature/Simple-Portal.htmlArticles
With the article system enabled, you can easily publish them directly on the Portal, no block is necessary. You can also show articles on any SimplePortal Page, or wherever you have blocks displayed, using an article block.

You can create your articles using BBCode, HTML, Markdown or even PHP depending on your needs. You can attach images to your articles and place them inline or aligned to the left or right to give them a blog look and feel.

Articles are assigned to and organized by categories. You can easily create many different categories, and your users can then browse articles by category. No blog system would be complete without a comment functionality and SimplePortal makes that easy.

From this I deducted it's different beast altogether than discussion boards.
Title: Re: [ADDON] SimplePortal
Post by: Steeley on December 08, 2022, 06:27:15 pm
My reply was discussing the feasibility of doing what I think you were describing inherent in EA and its permissions.
 
As I noted :   "I don't use Simple Portal so I'm not familiar with what additional features (or restrictions) it might bring ." For further discussion on Simple Portal I'll step aside and allow someone with SP familiarity to discuss its features..
Title: Re: [ADDON] SimplePortal
Post by: Steeley on December 15, 2022, 02:54:23 am
Quote from: Vague Whiner –
Oh, you mean that SP does use discussion boards as blogs? Didn't understand this from the description ... it just said:

Quote from: https://elkarte.github.io/addons//feature/Simple-Portal.htmlArticles
With the article system enabled, you can easily publish them directly on the Portal, no block is necessary. You can also show articles on any SimplePortal Page, or wherever you have blocks displayed, using an article block.

You can create your articles using BBCode, HTML, Markdown or even PHP depending on your needs. You can attach images to your articles and place them inline or aligned to the left or right to give them a blog look and feel.

Articles are assigned to and organized by categories. You can easily create many different categories, and your users can then browse articles by category. No blog system would be complete without a comment functionality and SimplePortal makes that easy.

From this I deducted it's different beast altogether than discussion boards.

Well, let me approach this a different way..   do you know your requirements for your "knowledge base", and have a functional architecture in mind? Or are you not sure of the requirements, and are looking at what different tools offer to see if they might provide features you can use to develop a design you  might like?

If you know what the requirements are, it might be helpful to describe them in a little more detail, and then the folks that use SP can tell you what fits (or not). Likewise, those of us more familiar with EA can assist with that fit, as well. 

In your mind, what is the functional difference between a blog, and a board? In my mind I can see a board easily being used as a blog, "assigned" to a particular user.


Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 15, 2022, 10:20:10 am
I'd have to play around and see if the portal article area could be extended to individual user blogs. 

Honestly never thought of it in those terms, but only as a site level "blog" .  There may be a way with portal profile and permissions, but having never tried that I can't give any specific advice.
Title: Re: [ADDON] SimplePortal
Post by: Vague Whiner on December 15, 2022, 04:27:17 pm
Quote from: Spuds – I'd have to play around and see if the portal article area could be extended to individual user blogs. 

Much obliged!
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on December 24, 2022, 12:17:31 pm
@Spuds

I figured out how to edit the title for the board index, but I'd like to edit the title for the main portal page.
I'd like it to show the forum name, then some added text, just on the main portal page.
I've got it showing how I like on the board index by editing the language file, but I can't see where to add what I want to the portal page.
Any help on this would be greatly appreciated. :)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 24, 2022, 04:15:54 pm
I'm not understanding what you want to change  :embarrassed:  Could you give me some more information or maybe a picture of what you want?  Be glad to help, just not sure what t do !
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on December 24, 2022, 05:54:05 pm
The main title of the forum shows in tab on your browser, like whatever names are for each page.
I edited the language file: index.english.php
Code: [Select]
$txt['forum_index'] = '%1$s - We strive to give our best in all things.';

However, since have the portal, that only shows on board index, not on the portal.
https://www.burkeknight.cc.nf/index.php?action=forum
Compared to
https://www.burkeknight.cc.nf/index.php

You'll see in the images, where I hovered over the tab.
(Link-10186) (Link-10188)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 27, 2022, 02:55:37 pm
How did you even notice that !

You will need to edit your PortalMain.controller.php in the sources/controllers directory

Code: (find) [Select]
	public function pre_dispatch()
{
global $context;

if (!sp_is_active())
{
redirectexit();
}

$context['page_title'] = $context['forum_name'];

Code: (replace) [Select]
	public function pre_dispatch()
{
global $context, $txt;

if (!sp_is_active())
{
redirectexit();
}

$context['page_title'] = sprintf($txt['forum_index'], $context['forum_name']);
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on December 27, 2022, 04:30:30 pm
That did the trick!
Thank you, my friend.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 27, 2022, 10:05:10 pm
Cool, glad that worked for you :D
Title: Re: [ADDON] SimplePortal
Post by: Vague Whiner on December 29, 2022, 06:51:20 pm
Quote from: Vague Whiner –
But then thought to take a look into addons of ElkArte and came by SP, but didn't quite make it from the documentation or talks about the addon (whether SMF or ElkArte) if it's possible to assign permissions to specific users to write blogs? Also it would be nice to have them as separated blogs. So that if user want to browse one writers blog posts those would be found from the one page and other writers blog posts from the another. Then collect the newest entries to blog index page, 10-15 newest posts from all blogs.

Is this kind of thing easy to do with SP addon?


And now that I have learned there is a thing called Tiny Portal I was wondering would it be suitable for this kind of thing? If anyone knows please let me know :)
Title: Re: [ADDON] SimplePortal
Post by: tino on December 29, 2022, 07:11:22 pm
TinyPortal has more control for articles etc but currently has less features than SimplePortal on ElkArte.

You can allow users to create articles in TinyPortal but not publish them without admin permission. I don’t know if SimplePortal offers that. You can also have articles which show a category of articles, which could all be associated with one user. It’s not built as a blogging platform, but could be used as one. Same as I’m sure SimplePortal could.

My advice is try both and use the one you’re most comfortable with. Simple Portal is a lot easier to master, Tiny Portal has more control but is more complex due to all its configuration options.
Title: Re: [ADDON] SimplePortal
Post by: Vague Whiner on December 29, 2022, 07:24:55 pm
Quote from: tino – TinyPortal has more control for articles etc but currently has less features than SimplePortal on ElkArte.

I'm not looking more features ... only this blog-type of thing where some users could post and newest topics would be listed and so on.

Quote from: tino – You can allow users to create articles in TinyPortal but not publish them without admin permission.

So you mean these users have to have admin permissions in order to post articles they wrote? That's no problem.

Quote from: tino – I don’t know if SimplePortal offers that. You can also have articles which show a category of articles, which could all be associated with one user. It’s not built as a blogging platform, but could be used as one. Same as I’m sure SimplePortal could.

Sure I know it's no blogging platform, but as I said earlier it would be nice to have all the things planned within ElkArte and not use several different thingies. And there wouldn't be loads of posts anyway, just every now and then someone might write article about something.

Quote from: tino – My advice is try both and use the one you’re most comfortable with. Simple Portal is a lot easier to master, Tiny Portal has more control but is more complex due to all its configuration options.

Well, seems that Tiny Portal is something we could make this kind of "blogging" thing happen then, which is wonderful news. I'll get back to you once our servers and such are done by a friend and EA installed over there etc. I'm not the one who does these things :)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 29, 2022, 09:28:10 pm
Quote from: Vague Whiner – I'm not looking more features ... only this blog-type of thing where some users could post and newest topics would be listed and so on.
You must give TP a try.  Sounds like it meets all of your needs, plus its overall pretty slick :D
Title: Re: [ADDON] SimplePortal
Post by: Vague Whiner on December 30, 2022, 07:26:29 am
Quote from: Spuds –
Quote from: Vague Whiner – I'm not looking more features ... only this blog-type of thing where some users could post and newest topics would be listed and so on.
You must give TP a try.  Sounds like it meets all of your needs, plus its overall pretty slick :D

Sounds like it, once we get that far with the forums!
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on February 20, 2023, 05:25:57 am
@Spuds

Getting a lot of errors with sources/admin/PortalAdminPages.controller.php
Line: 391
Notice: Trying to access array offset on value of type null

Looked up that line and see this:

Code: [Select]
$context['post_box_class'] = $context['article']['type'] !== 'bbc' ? 'sceditor-container' : 'sp-sceditor-container';
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 07, 2023, 06:11:07 am
@Spuds

Is there a way to make a block visible on posting page for only certain boards?
The way it is now, I have a block with some info that's for posting page, but it shows when posting in all boards.
I'd like to find a way to display it only when posting on certain boards.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on March 07, 2023, 07:06:19 am
I am not Spuds,  :wink: but I think, I know this:

(Link-10290)

Go to "profiles" in SimplePortal and create a new profile for "visibility" there.
I named this profile "only show in this boards" for this example:

(Link-10288)


If you click on "Select Boards" there, you will see all boards on your forum.
Then you can select the boards, which shall display this block later.
Create the profile then.



While you are creating a new block then or editing an already existing block, select this profile "only show in this boards".
It will be there in the block settings on the scroll down menue next to "visibility:".

Never tried it yet - but it should work.

Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 07, 2023, 08:07:14 am
That'll only show on the boards, in the topic list, not on the posting page for those boards. Had already tried it.

Good thinking though.  :smiley:

Need to find a way to have a visibility profile that is set for the posting page for only selected boards.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 07, 2023, 04:46:42 pm
Quote from: Burke_Knight – @Spuds

Getting a lot of errors with sources/admin/PortalAdminPages.controller.php
Line: 391
Notice: Trying to access array offset on value of type null

Looked up that line and see this:

Code: [Select]
$context['post_box_class'] = $context['article']['type'] !== 'bbc' ? 'sceditor-container' : 'sp-sceditor-container';
Sorry I missed this post

Looking at my current code I'm thinking that was fixed at some point.   Try changing the line to read
$context['post_box_class'] = $context['SPortal']['page']['type'] !== 'bbc' ? 'sceditor-container' : 'sp-sceditor-container';  Basically change 'article' to 'page' 

Just checked and this was fixed in 1.0.1, you must be running 1.0.0 (and I'm working on a 1.0.2 to fix an issue with MySql so that will be this week :pray:
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 07, 2023, 04:49:35 pm
Quote from: Burke_Knight – Is there a way to make a block visible on posting page for only certain boards?
Probably the only way would be with a custom PHP block.  You could check the board id in the PHP code and its its valid, then show the block.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on March 14, 2023, 06:55:13 am
Using PHP 8.x I am getting errors in Elkarte log
file: sources/admin/ManageSPortalModule.controller.php
line 752
Code: [Select]
$fix = str_replace('{version}', SPORTAL_VERSION, '<a href="https://simpleportal.net/" target="_blank" class="new_win">SimplePortal {version} &copy; 2008-' . strftime('%Y') . '</a>');
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 14, 2023, 05:56:03 pm
That is something I have fixed in SP 1.0.2 .... But (if you are using 1.1.9) you can change that line to

Code: [Select]
$fix = str_replace('{version}', SPORTAL_VERSION, '<a href="https://github.com/SimplePortal" target="_blank" class="new_win">SimplePortal {version} &copy; 2008-' . Util::strftime('%Y', time()) . '</a>');

Title: Re: [ADDON] SimplePortal
Post by: radu81 on March 14, 2023, 06:23:27 pm
Thanks Spuds, no more errors in my log
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 14, 2023, 06:46:58 pm
Now I've got an error in log, just started the other day, it seems:

Type of error: Undefined
Notice: Undefined variable: javascript
Everywhere
File: sources/subs/Portal.subs.php
Line: 266


Lines 264-269:

Code: [Select]
	if ($modSettings['sp_resize_images'])
{
$javascript .= '
createEventListener(window);
window.addEventListener("load", sp_image_resize, false);';
}

ElkArte 1.1.9 - SimplePortal 1.0.0
Title: Re: [ADDON] SimplePortal
Post by: radu81 on March 14, 2023, 06:54:44 pm
update to 1.0.1 https://github.com/SimplePortal/SimplePortal_ElkArte/releases
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 14, 2023, 07:00:57 pm
I've done some modding of files, so would have to manually update some files.

Also:
QuoteNOTE: Install this PRIOR to installing ElkArte 1.1.9 to avoid a hacking attempt message due to 1.1.9 increased security requirements.

I'm already running 1.1.9

Disabling "Resizes images on portal" stops the errors, though.
Title: Re: [ADDON] SimplePortal
Post by: radu81 on March 14, 2023, 07:36:12 pm
TBH I don't know what to suggest, I just updated today to Elk 1.1.9 and then updated SP to 1.0.1. I had no problems. If it's a testing site you can do it, otherwise wait for a better solution from Spuds.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 17, 2023, 10:05:40 am
Quote from: Burke_Knight – Now I've got an error in log, just started the other day, it seems:
That was fixed in a later version.  You can find the section several lines above that that reads (or should)
Code: [Select]
	// Load up some javascript!
loadJavascriptFile('portal.js', ['stale' => SPORTAL_STALE]);
and add after that $javascript = ''; so it will look like
Code: [Select]
	// Load up some javascript!
loadJavascriptFile('portal.js', ['stale' => SPORTAL_STALE]);
$javascript = '';
That will fix that error and a couple of others, depending on what options are on.
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 17, 2023, 12:14:59 pm
Thank you, @Spuds
I found what caused the errors in the first place.
I disabled (by commenting out) the drag and drop feature for the blocks, and the $javascript = ''; part was inside there, so I didn't think to leave it out of the commenting out of the drag and drop.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 17, 2023, 03:12:38 pm
Cool ... In 1.0.1 I had moved it out of that block, to its own line, to avoid just that issue :D
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 20, 2023, 04:33:44 pm
@Spuds
Now I'm getting this error, and inability to get into most settings in admin panel:

Burke Knight
Today at 03:29:21 PM
Type of error: General
Warning: Constant SPORTAL_VERSION already defined
action=admin;area=theme;sa=list;th=4
File: /sources/subs/Portal.subs.php
Line: 61


When even try to get to Current Theme settings:
An Error Has Occurred
Constant SPORTAL_VERSION already defined
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 20, 2023, 08:19:09 pm
I did change that line in version 1.0.2 (to be released soon) .... I guess you are running 1.0.1?

Change line 61 and 62 to be
Code: [Select]
	defined('SPORTAL_VERSION') || define('SPORTAL_VERSION', '1.0.1');
defined('SPORTAL_STALE') || define('SPORTAL_STALE', 'sp101');

And see if that clears up the error

Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 20, 2023, 10:20:36 pm

Was running 1.0.0 and uninstalled it, and installed 1.0.1 and error went away.

Did your posted fix anyways, just to be sure. LOL
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 21, 2023, 08:59:35 am
 :cool:

v1.0.2 main purpose is to fix a problem working under mysql 8.0.2+ and to fix an issue with the previous (<1.0.0) style => style profiles import.  Other than that just a few tweaks.
Title: Re: [ADDON] SimplePortal
Post by: DeadMan on March 21, 2023, 11:31:31 am
Quote from: Spuds – :cool:

v1.0.2 main purpose is to fix a problem working under mysql 8.0.2+ and to fix an issue with the previous (<1.0.0) style => style profiles import.  Other than that just a few tweaks.

Looking forward to it.
Title: Re: [ADDON] SimplePortal
Post by: Hometutor on April 10, 2023, 05:22:29 pm
I suppose the mistake was using softliciaous to install

Fatal error: Uncaught Elk_Exception: Hacking attempt...  on line 404
Title: Re: [ADDON] SimplePortal
Post by: Ruth on May 04, 2023, 03:30:05 pm
In the newest portal version sorting and editing blocks is not always working.
There are errors in sources/subs/PortalAdmin.subs.php

I needed to delete some portalblocks and to create them again, because they did no more react after moving or editing them once. New blocks are first all on the bottom, after this they can be moved by drag & drop....but i tried not all of them. Some blocks are still in the wrong order now.

And in the styling profiles the option "no titel, no body" is not working. No content of the block to see.
I solved this problem with a transparent roundframe.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on May 27, 2023, 12:14:17 am
I am still not done with the portal....but I need to say, that I am very pleased with it.  :smiley:  Great job, Spuds!

It means some work first to do all the settings for the "profiles" for styling, permissions and visibility. But when done once, it will be very easy and fast to handle the portal and to create new blocks or to edit them...specially if more than one theme is used on forum. This with the "profiles" is a very smart and comfortable solution...I like it a lot. :smiley:

I have some questions:

1.
This block "Theme Selection" displays each theme, which was installed once on forum. Members see them all. It would be a lot better and less confusing, if they could only see this 2 or 3 themes, they are allowed to select at the moment. Can this be changed?


2.
For some reason (maybe caused by my changings in portal css) my "articles" in portal look all the same, they have the same styling. In the preview I see other backgrounds, I could select. But after saving the articles, they all will have the same background.

Another thing are the two "reply buttons" there. One tells "reply", the other one tells "write a comment". Both do the same, there will be a new comment then. Why are there two buttons?


3.
Using various backgrounds and roundframes in portal blocks is working fine. But I was not able yet to create another header for portal blocks. My tries had very funny results so far. Lol. I think, I did this wrong or I inserted the class for another header in a wrong way. How does this work? I also don't understand, what I need to insert in "Custom Title Style".


4.
I fear, there is something wrong with the smileys on elk11, Spuds. I created a new shoutbox now, but the smileys are not displayed there in the shouts. Only the code of them is to see in shoutbox.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 27, 2023, 09:56:16 am
I'll take a look at these this weekend and see what I can do  :cool:
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 28, 2023, 09:50:58 pm
Quote from: Ruth – 1.
This block "Theme Selection" displays each theme, which was installed once on forum. Members see them all. It would be a lot better and less confusing, if they could only see this 2 or 3 themes, they are allowed to select at the moment. Can this be changed?
Looks like a bug ... the selection list in the block was not honoring the selectable themes.   The attached ThemeSelect.block.php should fix this.  It goes in sources/subs/spblocks
Quote from: Ruth – 2.
For some reason (maybe caused by my changings in portal css) my "articles" in portal look all the same, they have the same styling. In the preview I see other backgrounds, I could select. But after saving the articles, they all will have the same background.

Another thing are the two "reply buttons" there. One tells "reply", the other one tells "write a comment". Both do the same, there will be a new comment then. Why are there two buttons?
I'm not seeing this in the article areas that have checked, so I need some more information.  I checked both portal articles and article blocks.
Quote from: Ruth – 3.
Using various backgrounds and roundframes in portal blocks is working fine. But I was not able yet to create another header for portal blocks. My tries had very funny results so far. Lol. I think, I did this wrong or I inserted the class for another header in a wrong way. How does this work? I also don't understand, what I need to insert in "Custom Title Style".
a custom style needs to be the complete set of CSS rules for that title.  As a silly example, using the following in a style profile
Code: [Select]
background: green;font-size: 2em;padding: 10px 10px 2px 10px;line-height: 1em;border: 1px solid;border-radius: 10px 10px 0 0;color: #fff;overflow: hidden;text-shadow: 4px 4px #111111;
should give you a starting point of what to do.
Quote from: Ruth – 4.
I fear, there is something wrong with the smileys on elk11, Spuds. I created a new shoutbox now, but the smileys are not displayed there in the shouts. Only the code of them is to see in shoutbox.
Oh goodie, another bug :bug: The attached PortalShoutbox.subs.php should fix that one :pleading_face:  It goes in sources/subs
Title: Re: [ADDON] SimplePortal
Post by: Ruth on May 29, 2023, 12:39:51 am
Thank you very much, Spuds.  :smiley:  I will try them...

To articles:

This 3 buttons are to see, if I look at a categorie for articles. The buttons say "read more", "reply" and "write a comment".

(Link-10524)

"Reply" and "write a comment" can both be used, and both do the same: There will be another comment then in this article. So I don't understand, why there are two buttons for the same result. Should the reply-button do something different?



Edit:

The smileys in shoutbox are displayed now and theme selection is also working perfect.  :smiley:  Thank you very much, Spuds!
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 29, 2023, 12:13:36 pm
Glad we have a couple of the issues fixed.

I'm still not seeing the 3 buttons in any article views (there should only be 2, view more and comment).  What version of SP are you running?
Title: Re: [ADDON] SimplePortal
Post by: Ruth on May 29, 2023, 01:59:55 pm
Thats elk11, so the newest version of portal: 1.0.2

I only have 3 buttons, if i look at a category of articles in ACP.
In the "normal view" of articles there are just 2 buttons.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on May 29, 2023, 06:31:13 pm
I think may be happening is that you are viewing an article that has comments?.   In that case you would see (3) buttons

"Read More" <- takes you to the full article $txt['sp_read_more']
"Comments" <- takes you to the top of the comment listing $txt['sp-articlesComments']
"Write Comment" <- positions the new comment textbox in  view $txt['sp_write_comment']

The write comment button does not focus/select the textarea, so if you only have one or two comments the buttons look to do the same thing.  I'll make an update that will position the cursor inside the textbox when you select "write comment", it should have done this anyway.
Title: Re: [ADDON] SimplePortal
Post by: Ruth on May 29, 2023, 07:26:28 pm
Yes...I changed the language now on forum.

(Link-10526)

I was confused, because the button in the middle does not say "show comments" in german, it says "reply"....and there is a field for typing, if I click on the button in the middle. Thats still the old german language file there, i made years ago. Articles were not really working those days, so translating was a lot of guessing. :wink:

I will change the text of this button in the middle in the german language file.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on November 24, 2023, 02:27:39 pm
@Spuds

Is there a way to have all attachments visible in the "Board News" block?

Also, I'd like to have the avatar show in the recent topics block, instead of the (https://bk.cc.nf/elkarte/SP_Dot.png) that's next to each post.

FYI, in the admin panel, the icon for the Blocks menu is not showing.

(https://bk.cc.nf/elkarte/SP_Menu.png)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 04, 2023, 12:59:55 pm
I'll take a look and see what I can do ....

The missing icon is usually due to an install in a custom theme and the the themes/YOUR THEME/images/sp directory not getting written ... so just copy that over from the default theme
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 06, 2023, 03:26:57 pm
Here is a quick enhanced recent topic block for testing.

To use simply add the attached file to your sites /sources/subs/spblocks directory, it will then magically :magic_wand: be available as a block type in the admin panel.  Then add and tweak it like any other built in block.  The block name is Recent Extended

ETA: updated to support 7.4+
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on December 06, 2023, 04:38:10 pm
@Spuds

Tried to use the new block, and when try to add block, I get this:

Code: [Select]
An Error Has Occurred
syntax error, unexpected ':', expecting ')'

When look at the file, I find an error somewhere in here:

Code: [Select]
		// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $this->_db->query('substring', db_string: '
SELECT
mf.subject,
ml.id_msg, ml.id_topic, ml.id_member, ml.poster_time,
b.id_board, b.name AS bName,
t.num_replies, t.num_views, t.id_first_msg, t.id_last_msg,
COALESCE(mem.real_name, ml.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
COALESCE(lt.id_msg, lmr.id_msg, 0) >= ml.id_msg_modified AS is_read,
COALESCE(lt.id_msg, lmr.id_msg, -1) + 1 AS new_from') . ', mf.smileys_enabled, mf.icon, mg.online_color' .
$preview_bodies . '
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
INNER JOIN {db_prefix}messages AS ml ON (ml.id_msg = t.id_last_msg)
LEFT JOIN {db_prefix}boards AS b ON (b.id_board = mf.id_board)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = ml.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:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})' : '') . '
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = mem.id_group)
WHERE t.id_last_msg >= {int:likely_max_msg}
AND b.id_board = t.id_board' . ($boards === null ? '' : '
AND b.id_board IN ({array_int:include_boards})') . '
AND {query_wanna_see_board}' . ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}
AND ml.approved = {int:is_approved}' : '') . '
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
db_values: [
'current_member' => $user_info['id'],
'include_boards' => $boards,
'limit' => $limit,
'is_approved' => 1,
'likely_max_msg' => $modSettings['maxMsgID'] - 25 * min($limit, 5),
'preview_char' => $preview_char,
]
);
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 06, 2023, 05:49:10 pm
Strange .... did it log the error in admin panel to give us the line?  What options did you choose, I probably messed up some conditional logic.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on December 06, 2023, 07:40:16 pm
Quote from: Spuds – Strange .... did it log the error in admin panel to give us the line?  What options did you choose, I probably messed up some conditional logic.

I didn't get to make any options. As soon as I clicked the Add Block button, I got the error. Never even got to the block selection page.

Code: [Select]
Type of error: General
Exception: syntax error, unexpected ':', expecting ')'
index.php?action=admin;area=portalblocks;sa=add;col=1
File: /sources/subs/spblocks/RecentEx.block.php
Line: 139
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 07, 2023, 09:22:33 am
I re-posted the file, give that one a try.  I think the issue is simply I've been using PHP 8.1 and I'm guessing you are on 7.4, the update should address that.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on December 07, 2023, 12:53:42 pm
Quote from: Spuds – I re-posted the file, give that one a try.  I think the issue is simply I've been using PHP 8.1 and I'm guessing you are on 7.4, the update should address that.

Will try it later, when back at the PC.
Yes, I have to use 7.4 due to Levertine, as it sticks at processing images when uploading when using PHP 8.x.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 07, 2023, 02:41:31 pm
Quote from: Burke Knight – Yes, I have to use 7.4 due to Levertine, as it sticks at processing images when uploading when using PHP 8.x.
Interesting ... I'm sure I updated everything for 8+, but I may not have done an official release.  I'll look into that.
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on December 07, 2023, 06:19:41 pm
Quote from: Spuds – I re-posted the file, give that one a try.  I think the issue is simply I've been using PHP 8.1 and I'm guessing you are on 7.4, the update should address that.

Tried it and modified it a little bit. Very nice block, my friend. :)
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on December 30, 2023, 09:45:56 am
@Spuds
Is there a way to set the Board News block to posts, not topics?
On one site, that would really be better for me. :)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 30, 2023, 08:31:59 pm
I'll take a look in the next couple of days ... I think you can.   I'm fixing a few 1.0.1 bugs and will be getting a 1.0.2 out soon ... plus I have 1.2 of the gallery and 1.1.10 of ElkArte so I'm loosing some :brain: cells right now LOL
Title: Re: [ADDON] SimplePortal
Post by: Steeley on December 30, 2023, 10:01:11 pm
Don't get confused, or "tricky" and decide to reuse code from one project to save time..  :tongue:

(Link-10678)
Title: Re: [ADDON] SimplePortal
Post by: radu81 on December 31, 2023, 07:51:38 am
I think I found a bug related to Simple Portal,
In ACP -> Themes -> Theme settings (/index.php?action=admin;area=theme) I get an error: Constant SPORTAL_VERSION already defined

In Elk error log I see:
file: /public/sources/subs/Portal.subs.php
line: 61
61: define('SPORTAL_VERSION', '1.0.1');
62: define('SPORTAL_STALE', 'sp101');
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 31, 2023, 10:16:15 am
I have that fixed in the (soon) 1.0.2 ... keep looking for those :bug: Here is the short list in 1.0.2 thus far

Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on December 31, 2023, 11:04:23 am

Whew! As if what I've already found isn't keeping you busy around here, you have to go and tell me to find more???  :laugh:
Title: Re: [ADDON] SimplePortal
Post by: Spuds on December 31, 2023, 09:31:59 pm
I know, I just like pain :punch:  LOL
Title: Re: [ADDON] SimplePortal
Post by: radu81 on January 01, 2024, 09:05:48 am
:grin:  :grin:  Lol
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 01, 2024, 05:22:26 pm
For the brave ... here it is ....

https://github.com/SimplePortal/SimplePortal_ElkArte/releases/tag/1.0.2
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on January 10, 2024, 12:45:34 pm
Quote from: Spuds – keep looking for those :bug: Here is the short list in 1.0.2 thus far

You just had to go and state that, eh?
Seems when on index.php?action=forum the Forum tab is highlighted as active as should be, but when go into boards or topics, it goes back to the Home tab as showing active.

Board Index:
(Link-10683)

Inside a board:
(Link-10685)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 10, 2024, 03:07:02 pm
That be a bug  :grin: Yeah for 1.0.3

The fix should be to edit
/sources/admin/ManageSPortalModule.controller.php

Find
Code: (find) [Select]
		// Define the new menu item(s), show it for modes 1 and 3 only
$buttons = elk_array_insert($buttons, 'home', array(
'forum' => array(
'title' => empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'],
'data-icon' => 'i-spgroup',
'href' => $sportal_url,
'show' => empty($context['disable_sp']),
'sub_buttons' => array(),
),

Code: (replace) [Select]
		// Define the new menu item(s), show it for modes 1 and 3 only
$buttons = elk_array_insert($buttons, 'home', array(
'forum' => array(
'title' => empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'],
'data-icon' => 'i-spgroup',
'href' => $sportal_url,
'show' => empty($context['disable_sp']),
'sub_buttons' => array(),
'action_hook' => true,
),
So adding that 'action_hook' => true, to that menu options array
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on January 13, 2024, 09:35:31 pm
On a new install, with ElkArte 1.1.9 Install and elk_simple_portal-1.0.2 I get an error when enable SP:

Code: [Select]
Type of error: Undefined
Warning: Undefined variable $javascript
/index.php?action=admin;area=portalconfig;sa=generalsettings
File: /allpoints.cc.nf/sources/subs/Portal.subs.php
Line: 240

I've had this issue on 2 sites, and had to disable Resize images on portal.


Also, when uninstall SP:

Code: [Select]
Type of error: General
Warning: require_once(/sources/subs/Portal.subs.php): Failed to open stream: No such file or directory
/index.php?action=admin;area=packages;sa=uninstall2;package=elk_simple_portal-1.0.2.zip;pid=2
File: /sources/admin/ManageSPortalModule.controller.php
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 14, 2024, 02:29:46 pm
That first one is strange since that variable does not appear on that line.  Be sure you are using the 1.0.2 I posted here: https://github.com/SimplePortal/SimplePortal_ElkArte/releases/tag/1.0.2
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on January 14, 2024, 04:53:31 pm
Quote from: Spuds – That first one is strange since that variable does not appear on that line.

I found what it was. I removed the bit about drag & drop of the blocks on portal page.
However, I had removed the main call for javascript. (Starts around 237)

Code: (FULL) [Select]
// We use drag and sort blocks for the front page
$javascript = '';
// Javascript to allow D&D ordering of the front page blocks, not for guests
if (($modSettings['sp_portal_mode'] == 1)
&& empty($_REQUEST['action']) && empty($_REQUEST['board']) && !($user_info['is_guest'] || $user_info['id'] == 0))
{
$modSettings['jquery_include_ui'] = true;
$javascript .= '
// Set up our sortable call
$().elkSortable({
sa: "userblockorder",
error: "' . $txt['portal_order_error'] . '",
title: "' . $txt['portal_order_title'] . '",
handle: ".sp_drag_header",
tag: ".sp_column",
opacity: 0.9,
connect: ".sp_column",
containment: "#main_content_section",
tolerance: "pointer",
href: "/",
placeholder: "ui-state-highlight",
axis: "",
});';
}


That's what had removed, but in reality, this is what needed to remove:

Code: (CORRECT) [Select]
// Javascript to allow D&D ordering of the front page blocks, not for guests
if (($modSettings['sp_portal_mode'] == 1)
&& empty($_REQUEST['action']) && empty($_REQUEST['board']) && !($user_info['is_guest'] || $user_info['id'] == 0))
{
$modSettings['jquery_include_ui'] = true;
$javascript .= '
// Set up our sortable call
$().elkSortable({
sa: "userblockorder",
error: "' . $txt['portal_order_error'] . '",
title: "' . $txt['portal_order_title'] . '",
handle: ".sp_drag_header",
tag: ".sp_column",
opacity: 0.9,
connect: ".sp_column",
containment: "#main_content_section",
tolerance: "pointer",
href: "/",
placeholder: "ui-state-highlight",
axis: "",
});';
}


Needed to leave this behind:

Code: (LEAVE) [Select]
// We use drag and sort blocks for the front page
$javascript = '';
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 14, 2024, 06:48:56 pm
See how easy it is to create :bug:  :grin:
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on January 14, 2024, 07:36:59 pm
Quote from: Spuds – See how easy it is to create :bug:  :grin:


Yep... I learned from the best.  :tongue:

Spoiler (click to show/hide)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on January 14, 2024, 09:12:49 pm
:woozy_face: LOL
Title: Re: [ADDON] SimplePortal
Post by: Steeley on January 15, 2024, 06:08:59 pm
Quote from: Burke Knight –
Needed to leave this behind:

Code: (LEAVE) [Select]
// We use drag and sort blocks for the front page
$javascript = '';

One of my project programmers years ago was lamenting the code he inherited and was trying to "clean up"... told us in a progress meeting: "Until I put one of the nonsensical comments that I deleted back in, including all three trailing periods, the damn thing wouldn't compile!"  😕

😛
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 09, 2024, 02:25:14 pm
And a minor update to 1.0.3


http://addons.elkarte.net/feature/Simple-Portal.html
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on February 09, 2024, 05:19:53 pm

Well, since these have already been done to my sites, I think I'll wait until the next update. LOL
Nicely done, my friend. :)
Title: Re: [ADDON] SimplePortal
Post by: Spuds on February 11, 2024, 04:48:28 pm
I would figure you had them since most are ones you reported  :cool:
Title: Re: [ADDON] SimplePortal
Post by: Burke Knight on March 23, 2024, 07:44:41 am
Quote from: Spuds – I would figure you had them since most are ones you reported  :cool:

And since you said that, here's another issue:

QuoteType of error: General
Exception: Class "SP_Abstract_Block" not found
index.php?action=xmlhttp;sa=blockorder;xml
File: sources/subs/spblocks/RecentEx.block.php
Line: 29

Line 29:
Code: [Select]
class Recent_Ex_Block extends SP_Abstract_Block

Strange error that does not appear to have any effect besides error log entry.
Title: Re: [ADDON] SimplePortal
Post by: Spuds on March 23, 2024, 06:50:35 pm
Thanks for the report .. I'll take a look as soon as I'm done adding a new feature to 2.0 ... getting close :D