There a lot of users that are asking an integration with Worpress and in most of cases they ask it just because WP is more flexible in displaying the articles in home page and I'm pretty sure someone will ask here. On Sm.org the answer you'll get is "you cand do it with a portal and some work". Well that "some work" was never been published. Even on simpleportal.net there are different topics that are asking this and no solution has been posted.
I'm not a big fan of WP and will never use it, I still prefer the old and good Joomla but that's a matter of personal taste. So what do you think about giving some more options into the Board News block?
What should do this new Board News block?
- getting the first image of a topic attachment or image inserted with img and display it floated to left o right
- eventually a link from that image to the topic
- a mutlicolumn display of articles will be great
I can say I found an alternative way of doing this using the ILA mod but it's not the same thing. I also have a few visitors that saw my sig on sm.org and asked me how I did this using my Contact form. You may also have a look at the old XenPorta that had a lot of success in the past even if it has less features than SP, but had a great block for displaying the last topics from a category with a "blog style look"
Ahhh...
No, I don't want to start typing now otherwise I'm gonna stay awake for the next two hours. LOL
In short:
* use a forum for blogging is no different from using a blog for "foruming",
yep, a bridge with WP would be nice to have.
yep, a bridge with Joomla! is nice to have .
* yep, improve the "board index" would be very nice (there is a topic around, don't remember where... as usual! LOL), maybe even something where guests get something (like a description, or so), while members something else (for example recent activity).
I started with joomla back in 2007 and choosed smf because at that time it was the only forum which could be integrated into J!. I know Jfusion and I don't have any plans to use a CMS. Think how things changed now :D I want my forum simple, intuitive, fast and easy to manage, and for me smf / elkarte are doing this very well ;) IMHO using a CMS is a pita when it comes to upgrades
What I am asking is just a better block for SP or if there are any plans doing it. I can live without it, but it would be nice to have it ;)
heh...
I tend to start typing and not be able to stop any more daydreaming all the stuff I would like to do. LOL (At least in my dreams I don't have to hit the wall that is the lack of time. :P)
Point 1 and 2 should not be too difficult to do.
I'm not sure what you mean in point 3... oh, I got it while writing, yes!
/me is still daydreaming (while thinking what's the next step in breaking apart Elk code to decouple the calendar entirely from the main code).
Emanuele for me there is no hurry, as I said "it will be nice to have it" so take your time ;) Maybe this topic could help
simpleportal.net/index.php?topic=13658
simpleportal.net/index.php?topic=10766.20
destek.smfmod.com/haber-blogu-t18235.0.html
here a "blogish style" using smf and SP aplicacionesmart.com
I too like some article system in place. :)
I like. Article system is meantly something like WP, Jomla and portal addon. I also wish something similar that is an upgrade to profile page to cater something like that. Member can write his own post / article / status at his profile like having his own forum board where he is in control of it. This is what I think I was trying to ask here:
ahrasis want to think that his request is relevant
I tried this one.
Not tested very deeply, so... use at your own risk, if you have a test board better. ;)
There is a bit of css to add to portal.css:
.sp_article_content .sp_attachment_thumb {
float: left;
margin-right: 10px;
}
.sp_article_content .post:after {
content: '';
display: block;
width: 100%;
clear: both;
}
Ohhh... darn!
I just realized this works only for the development branch... darn!
Tomorrow I'll see to backport it to the current stable version.
Sorry but how do I use this? O:-)
The development version of SP completely overhauled the way "blocks" are added and in doing that added much coolness :D
The way it used to be (or is) was to adding a block required adding a new function inside of portalblocks and a db entry or perhaps a custom PHP page.
The new way allows you to add a block by simply adding a file/program to the spblocks directory, where it is auto discovered and made available as a standard block. So with the new branch you would just take the BoardNews.block.php above and drop it in your spblocks directory and then use it like any other block ... coolness!
TL;DR: I have to "rewrite" it. I wanted to re-do it yesterday, but this year I'm not lucky at all, I got a cold (after the flu in February) and it's almost gone now. Today I may have some other things to do, so it may take until the week-end to be "converted"... :(
That is a great news, I'll wait for the new version ;)
Take your time, no hurry for me ;)
I'm sorry, I don't have a "normal" version handy and I need to reinstall everything to have one... would you mind give it a try?
Of course take a backup of the current file.
If you have any custom change to some of the blocks, let me know, maybe attach your version and I'll apply the changes. ;D
ETA: removed broken file.
I'll try it in localhost, thank you for looking into this.
sorry but I cannot understand what is changed in this version :-[
All I did was to overwrite the Portalblocks.subs.php in sources/subs folder
That should be enough, if there is something attached to the first message of a board news block, or if there is an image tag, it should show it next to the text (floated) in the new block.
Which function (in PortalBlocks.subs.php) allows to do that?
Oook!
I'm back on this, and this time I've been able to setup a forum and do the appropriate testing. O:-)
@CrimeS I attached a diff as well to highlight the changes. ;D
I'm afraid I forgot about this topic :(
I am testing it now ;) It's working, but images are shown in full width.
Thanks for your help!
sharkracingclub.it/sharkelk104
I can't see the request for resizing... :P
I'm not sure how "strict" the css shold be, but:
.action_home .post .sp_attachment_thumb img {
max-width: 50%
}
should be good enough.
Than you can tweak the width to the size you prefer. ;)
Sorry for the delay and thanks for your help.
The block is working fine (demo in the link above) but I get an error:
An Error Has Occurred
Unable to load the 'main' template.
after the news block
That's likely another block.
What other block do you have in the home below this one?
I think it's something wrong with that install.
I updated Elkarte to 1.0.5, I uninstalled Simple Portal, and installed the latest version, I deleted all blocks in SP and the error persist. I checked with original "PortalBlocks.subs.php " and also the modified one but nothing
I think I should try on a clean install first. Could be for some error in my custom.css? That was the only file I modified (or at least that I remember) :)
Nope, a css cannot generate such an error.
So you get the error even with SP uninstalled? O_O
nope, I get that error only on SP homepage. On forum I don't see that error even with SP installed
...Link? It seems to work for me...
skodaclub.it/index.php
click on the image, there is Fancybox trying to open the image
(http://i.imgur.com/n0fotHu.png)
So strange, the thumbnails at the bottom work regardless :o
in this case the fancybox should be disabled, the thumbnaol should point to topic url
If you can figure out how to disable it in particular spots, let me know, because I want to do the same on smf.
In SMF if you are using HS4SMF mod from Spuds you can disable the fancybox effect into posts by using the tag alt=ns
ex:
[img alt="ns"]link_to_img[/img]
No, I can't use that one because of license issues (y u do dis Spuds :( )
And even then, the problems are not images in posts with the one I am using, it's that it also parses custom titles images and sigs if I'm not mistaken ;D
Re: license issues: O_o there is no license issues on using software. There could be redistributing it, but knowing Spuds he used MPL (v2) that is compatible with BSD (I didn't even change the headers of ILA for Elk 1.1, just plugged in the files and written some code).
Re: fancy box... need time to check.
Nope, license issues on commercial stuff, I think it's the only one mod from him that has and can't use it. I had installed it once, but when I realized it got uninstalled quickly :/
Good luck with that fancybox stuff though.
This is what I have in HS4SMF:
and this in Fancybox for elkarte
Now back to topic :D
Thanks, didn't feel like searching it, I'm on a very a bad period.
If you are using a 2 years and a half old version... :P
any news on this? thank you
Just to note, my code is all MPL based and released that way. Highslide.js is the one with the license restriction, I just make you acknowledge that license when you install their software. Those restrictions are why I also moved away from it and started to use fancybox for the ElkArte addon.
Not sure what the issue is on the image in the SP block, sounds like fancybox is just not initialized for some reason.
I would like to disable the fancybox on custom Portalblocks.subs.php that Emanuele made http://www.elkarte.net/community/index.php?topic=2387.msg17894#msg17894
I'll take a look at FB and SP this weekend, see what I can do
@radu81 I think you can disable it from within the code I wrote, if you open the file and search for:
<a href="', $news['href'], '" id="link_', $attachment['id'], '">
replacing the line with:
<a href="', $news['href'], '" id="nfb_link_', $attachment['id'], '">
that should be enough and should not break anything... I hope. O:-)
That did the trick, thank you very much! 8)
Ah-ha ... it was your code :P
/me is innocent. :P
I'm having some errors in my log if I use php 5.6
Type of error: General
preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
File: /.../sources/subs/PortalBlocks.subs.php
Row: 2103
$data = preg_replace('~<\!\[CDATA\[(.+?)\]\]>~eu', '\'#cdata_escape_encode#\' . Util::htmlspecialchars(\'$1\')', $data);
Is there a way to solve this?
I think it's more like:
$data = preg_replace_callback('~<\!\[CDATA\[(.+?)\]\]>~u', function($matches){return '#cdata_escape_encode#' . Util::htmlspecialchars($matches[0]);}, $data);[/code]
matches[0] or matches[1] ?
Thank you Emanuele and Frenzie!
With first code I was getting another error: preg_replace_callback() expects parameter 4 to be long, string given
The version provided by Emanuele works without errors. Thanks again ;)
I failed to spot the first comma. xD
I feel you should trust Spuds and change $matches[0] to $matches[1], I'm not good with converting to callbacks! xD
$matches[0] is probably the full text and $matches[1] the first subpattern. I'm not in a position to test atm.
Sounds like a recipe for disaster. ;)
Ok, I did that, thanks again