collapse collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 124
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM
  • phantomm: and from what I see only patch is broken, full install package is fine
    October 21, 2016, 03:44:44 PM

* Recent Posts

Where is the code for these elements, where are they stored? by danmsmith018f
[Yesterday at 04:23:44 PM]


Re: v 2.3.3 to v2.3.7 by ♦ Ninja ZX-10RR ♦
[December 11, 2018, 04:14:48 PM]


v 2.3.3 to v2.3.7 by rollingrock
[December 11, 2018, 09:36:20 AM]


[Block] Help with editing few lines on Simpleportal by Wallen
[December 09, 2018, 05:10:34 AM]


Re: LinkTree by Chen Zhen
[November 15, 2018, 02:24:51 PM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: BoardNews for Frontpage block  (Read 33679 times)

0 Members and 1 Guest are viewing this topic.

Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
BoardNews for Frontpage block
« on: February 28, 2012, 12:56:00 PM »
Is there a block that would display or topics like this?



Cheers
« Last Edit: March 01, 2012, 08:08:07 AM by AngelinaBelle »

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Frontpage block
« Reply #1 on: February 28, 2012, 02:36:15 PM »
This is a Joomla website ... a recent posts block will do the same for smf/sportal but not sure about resized article/topic images displayed.
Might be a mod for that ...

Blocweb  templates did exactly the same but recently shut down.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Frontpage block
« Reply #2 on: February 28, 2012, 02:56:41 PM »
I was hoping for a mod.. I just dont have the knowledge to do it.

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Frontpage block
« Reply #3 on: February 29, 2012, 02:06:24 AM »
Look around ... smf and here - recent posts with images.
At least you can just do the same without the images using recent posts block. It will show the users avatar if that is useful.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Frontpage block
« Reply #4 on: February 29, 2012, 06:04:52 AM »
I have looked fella, sadly nothing appears to fit the bill.

 :'(

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Frontpage block
« Reply #5 on: February 29, 2012, 09:56:14 AM »
It should be possible to do the same to articles, or to sp_articles block or a boardnews block.

If you are interested, this is a customization project, involving mostly HTML and CSS. Very little PHP knowledge will be required.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Frontpage block
« Reply #6 on: February 29, 2012, 03:34:00 PM »
Yes please? :nervous-happy:

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Frontpage block
« Reply #7 on: February 29, 2012, 11:50:38 PM »
Would be a nice addition to have a recent topics/select board with preview image, ... or same for article block.
Does it select the first image in an article or allow selection of any image, or uploaded image...? And the resize image?

Its a popular style of display for Joomla K2 content management, Drupal CCK, and blogs.
« Last Edit: February 29, 2012, 11:52:40 PM by igirisjin »
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Frontpage block
« Reply #8 on: March 01, 2012, 08:07:10 AM »
OK.  I have moved this to customization.

Actually, I would not promise the images and the image layout. Because that would almost certainly require changes on the database. And I am not so confident in doing that.  I have never packaged a mod, myself.

Here is what I would propose to help you with:
1) Begin with BoardNews, because it is already closest to what you wish to achieve
2) Change the style for the heading

If you want the picture layout to be like that, you will have to find another way. You can use a bbc table, or you can use HTML to create a floating img, or you can use the AEVA Media mod, for example (the caveat with AEVA Media is that its author will not be updating it for future versions of SMF).

I am not an awesome coder. So I will get you started and you will wind up learning quite a bit.
Ready?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: BoardNews for Frontpage block
« Reply #9 on: March 01, 2012, 10:26:29 AM »
The image makes the difference so without it the current blocks are fine. As its such a hassle ... probably not worth it (for me).
Maybe this year I will start learning php ... maybe. But it seems like a big leap to being able to understand where to get information in SMF and use it.
After Japan I will go back to civil engineering or perhaps back to school to do IT or computer science - again ...
Might specialize in web programming if it looks like I can make a decent living out of it, and the projects look interesting.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Frontpage block
« Reply #10 on: March 01, 2012, 07:01:43 PM »
OK.  I have moved this to customization.

Actually, I would not promise the images and the image layout. Because that would almost certainly require changes on the database. And I am not so confident in doing that.  I have never packaged a mod, myself.

Here is what I would propose to help you with:
1) Begin with BoardNews, because it is already closest to what you wish to achieve
2) Change the style for the heading

If you want the picture layout to be like that, you will have to find another way. You can use a bbc table, or you can use HTML to create a floating img, or you can use the AEVA Media mod, for example (the caveat with AEVA Media is that its author will not be updating it for future versions of SMF).

I am not an awesome coder. So I will get you started and you will wind up learning quite a bit.
Ready?

Thanks, usless i can get the block to do whats in that image i would not want to waste your time?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews for Frontpage block
« Reply #11 on: March 01, 2012, 07:19:39 PM »
I think you can get the block to do what's in the image.
It would mean, I think, that the image that goes with each post would be left-floated even when you look at it.

Here's mod for a a bbcode float tag: http://custom.simplemachines.org/mods/index.php?mod=2305

See if you like it.  The rest is going to be easy, and I can show you how to do it.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline katoon

  • Semi Newbie
  • *
  • Posts: 39
  • SMF Version: 2.0.1
  • SP Version: 2.0.2
Re: BoardNews for Frontpage block
« Reply #12 on: June 08, 2012, 11:00:10 AM »
could this look any better?


Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews for Frontpage block
« Reply #13 on: June 08, 2012, 11:41:12 AM »
That looks pretty good.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline kimyaci

  • Full Member
  • ***
  • Posts: 127
  • Gender: Male
    • Forumigo8navigation
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #14 on: August 27, 2012, 06:45:46 PM »


How is this?

Demo: http://sanal.igo8navigation.com/Portal.php

user: demo
pass: demo
« Last Edit: August 27, 2012, 06:48:48 PM by kimyaci »
SMF 2.0.7 HabboArtv1, Default Themes.

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: BoardNews for Frontpage block
« Reply #15 on: August 28, 2012, 06:03:04 AM »
Nice...! Is the resizing of the article list image automated  -  a mod?  I saw the SMF float mod but would be nice if you gave the custom code for the rest. Looks more like Joomla and wordpres this way.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline kimyaci

  • Full Member
  • ***
  • Posts: 127
  • Gender: Male
    • Forumigo8navigation
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #16 on: August 28, 2012, 08:08:08 AM »
Nice...! Is the resizing of the article list image automated  -  a mod?  I saw the SMF float mod but would be nice if you gave the custom code for the rest. Looks more like Joomla and wordpres this way.

Hi
Yes, there are resizing images.Thanks for the comment.
SMF 2.0.7 HabboArtv1, Default Themes.

Offline FrizzleFried

  • Full Member
  • ***
  • Posts: 114
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #17 on: August 29, 2012, 10:55:50 AM »
Nice...! Is the resizing of the article list image automated  -  a mod?  I saw the SMF float mod but would be nice if you gave the custom code for the rest. Looks more like Joomla and wordpres this way.

Unfortunately this is how it looks in Firefox 14....


Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews for Frontpage block
« Reply #18 on: August 30, 2012, 07:46:56 AM »
You have some xHTML errors.
The browsers are trying to figure out what you probably MEANT to have instead of what you do have.
These may be the cause of the problem.

Of course the marquee tag is nonstandard.  But most browsers deal with it pretty well.  So I assume the problems are related to HTML "syntax errors" like unclosed  tags, improper nesting (<table></center></tr>), etc.

Please fix these problems and see how it looks after that.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline velorooms

  • Jr. Member
  • **
  • Posts: 83
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #19 on: October 02, 2012, 07:56:16 PM »
looks good. are you going to share the code when its done
Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5

Offline radu81

  • Semi Newbie
  • *
  • Posts: 21
  • Gender: Male
    • www.sharkracingclub.it
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: BoardNews for Frontpage block
« Reply #20 on: July 03, 2013, 04:55:26 PM »
I'm also interested, pls share it ;)

Offline pugsx

  • Just Registered
  • Posts: 1
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #21 on: May 24, 2014, 10:36:18 AM »
Would like something like this.

sorry for reviving old post

Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #22 on: November 12, 2014, 07:10:28 PM »
Yeah is this possible?

Offline langel

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #23 on: November 14, 2014, 02:01:07 AM »
Yes is posible, look my web: http://www.aplicacionesmart.com/index.php

Although it looks different, the principle is the same, only div & css

Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #24 on: November 14, 2014, 07:07:34 AM »
Wow, would you be willing to share or help me out please?

my site is www.retrovideogamer.co.uk

Offline langel

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #25 on: November 14, 2014, 03:55:58 PM »
Yeah sure! look this thread: http://www.simplemachines.org/community/index.php?topic=337240.0

You can do so from SSI or the PortalBlocks.php, everything else is div and css.

Regards! :)

Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #26 on: November 14, 2014, 05:09:15 PM »
I followed that and crashed the site, the English is broken so i am slightly worried i did it wrong.

Offline langel

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #27 on: November 14, 2014, 06:36:05 PM »
It is possible, although not very difficult to adapt to portalblocks.php

I recommend you do it there, and not in the SSI

Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #28 on: November 14, 2014, 06:37:05 PM »
I am lost, could you do a guide please?

Offline zapiy

  • Semi Newbie
  • *
  • Posts: 31
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: BoardNews for Frontpage block
« Reply #29 on: December 22, 2014, 10:43:42 AM »
Anyone willing to help me out please?

Offline sub5

  • Semi Newbie
  • *
  • Posts: 25
    • All student forum
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #30 on: December 25, 2014, 08:16:07 PM »
Hello guys,
I too have been looking for a way to do this for a long time and after going through the tutorial from http://destek.smfmod.com/haber-blogu-t18235.0.htm i was able to do it but i had issues, it did not turn out excitedly like this


This is how it turned out to be


Please i will appreciate any help on this.

Here is the code i used, for those that are interested in doing this on their site.
Locate your Sources/PortalBlocks.php

Find this
Code: [Select]
   if ($context['SPortal']['core_compat'])
   {
      foreach ($return as $news)
      {
         echo '
               <div class="tborder sp_article_content">
                  <table class="sp_block">
                     <tr class="catbg">
                        <td class="sp_middle">', $news['icon'], '</td>
                        <td class="sp_middle sp_regular_padding sp_fullwidth"><a href="', $news['href'], '" >', $news['subject'], '</a></td>
                     </tr>
                     <tr class="windowbg">
                        <td class="sp_regular_padding" colspan="2">';

         if ($avatars && $news['avatar']['name'] !== null && !empty($news['avatar']['href']))
            echo '
                           <a href="', $scripturl, '?action=profile;u=', $news['poster']['id'], '"><img src="', $news['avatar']['href'], '" alt="', $news['poster']['name'], '" width="30" style="float: right;" /></a>
                           <div class="middletext">', $news['time'], ' ', $txt['by'], ' ', $news['poster']['link'], '<br />', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div>';
         else
            echo '
                           <div class="middletext">', $news['time'], ' ', $txt['by'], ' ', $news['poster']['link'], ' | ', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div>';

         echo '
                           <div class="post"><hr />', $news['body'], '<br /><br /></div>
                        </td>
                     </tr>
                     <tr>
                        <td class="windowbg2" colspan="2">
                           <div class="sp_right sp_regular_padding">', $news['link'], ' ',  $news['new_comment'], '</div>
                        </td>
                     </tr>
                  </table>
               </div>';
      }
   }
   else
   {
      foreach ($return as $news)
      {
         echo '
               <div class="cat_bar">
                  <h3 class="catbg">
                     <span class="sp_float_left sp_article_icon">', $news['icon'], '</span><a href="', $news['href'], '" >', $news['subject'], '</a>
                  </h3>
               </div>
               <div class="windowbg sp_article_content">
                  <span class="topslice"><span></span></span>
                  <div class="sp_content_padding">';

         if ($avatars && $news['avatar']['name'] !== null && !empty($news['avatar']['href']))
            echo '
                     <a href="', $scripturl, '?action=profile;u=', $news['poster']['id'], '"><img src="', $news['avatar']['href'], '" alt="', $news['poster']['name'], '" width="30" class="sp_float_right" /></a>
                     <div class="middletext">', $news['time'], ' ', $txt['by'], ' ', $news['poster']['link'], '<br />', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div>';
         else
            echo '
                     <div class="middletext">', $news['time'], ' ', $txt['by'], ' ', $news['poster']['link'], ' | ', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div>';

         echo '
                     <div class="post"><hr />', $news['body'], '</div>
                     <div class="sp_right">', $news['link'], ' ',  $news['new_comment'], '</div>
                  </div>
                  <span class="botslice"><span></span></span>
               </div>';
      }   
   }
   if (!empty($per_page))
      echo '
               <div class="sp_page_index">', $txt['sp-articlesPages'], ': ', $page_index, '</div>';
}

Replace with this
Code: [Select]
   if ($context['SPortal']['core_compat'])
   {
      foreach ($return as $news)
      {
         echo '
               <div class="tborder sp_article_content">
                  <table class="sp_block">
                     <tr class="catbg">
                        <td class="sp_middle">', $news['icon'], '</td>
                        <td class="sp_middle sp_regular_padding sp_fullwidth"><a href="', $news['href'], '" >', $news['subject'], '</a></td>
                     </tr>
                     <tr class="roundframe">
                        <td class="sp_regular_padding" colspan="2">';

         if ($avatars && $news['avatar']['name'] !== null && !empty($news['avatar']['href']))
            echo '
                           <a href="', $scripturl, '?action=profile;u=', $news['poster']['id'], '"><img src="', $news['avatar']['href'], '" alt="', $news['poster']['name'], '" width="30" height="30" style="float: right;" /></a><br />
                           <div class="middletext">', $news['time'], ' | ', $txt['by'], ' ', $news['poster']['link'], '</div>';
         else
            echo '
                           <div class="middletext">', $news['time'], ' ', $txt['by'], ' ', $news['poster']['link'], '</div>';

   
                  echo '               
                           <div class="post"><hr /><div class="haberblog">', $news['body'], '<br /><br /></div></div>
                        </td>
                     </tr>
                     <tr>
                        <td class="windowbg2" colspan="2"><hr />
                             <div class="yorumbuton">
                       <div class="yorum">', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div><div class="buton">', $news['link'], ' ',  $news['new_comment'], '</div></div>
                        </td>
                     </tr>
                  </table>
               </div>';
      }
   }
   else
   {
      foreach ($return as $news)
      {
         echo '
               <div class="cat_bar">
                  <h3 class="catbg">
                     <span class="sp_float_left sp_article_icon">', $news['icon'], '</span><a href="', $news['href'], '" >', $news['subject'], '</a>
                  </h3>
               </div>
               <div class="windowbg sp_article_content">
                  <span class="topslice"><span></span></span>
                  <div class="sp_content_padding">';

         if ($avatars && $news['avatar']['name'] !== null && !empty($news['avatar']['href']))
            echo '
                     <a href="', $scripturl, '?action=profile;u=', $news['poster']['id'], '"><img src="', $news['avatar']['href'], '" alt="', $news['poster']['name'], '" width="30" height="30" class="sp_float_right" /></a><br />
                     <div class="middletext">', $news['time'], ' | ', $txt['by'], ' ', $news['poster']['link'], '</div>';
         else
            echo '
                     <div class="middletext">', $news['time'], ' ', $txt['by'], ' ', $news['poster']['link'], '</div>';

         echo '
                     <div class="post"><hr /><div class="haberblog">', $news['body'], '</div></div><hr />
                       <div class="yorumbuton">
                       <div class="yorum">', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div><div class="buton">', $news['link'], ' ',  $news['new_comment'], '</div></div>
                  </div>
                  <span class="botslice"><span></span></span>
               </div>';
      }   
   }
   if (!empty($modSettings['articleperpage']) && !empty($context['page_index']))
      echo '
               <div class="sp_page_index">', $txt['sp-articlesPages'], ': ', $page_index, '</div>';
}

Then go to your portal.css and add this code below at the end of it
Code: [Select]
.haberblog {
   
   overflow: auto;
    margin-top: -16px;
}
.haberblog  img
{
   border: 1px solid #5998A7;
   border-radius: 3px;
   -moz-border-radius: 3px;
   margin: 16px 10px 0px 10px;
   -webkit-border-radius: 3px;
    padding: 6px 6px 6px 6px;
    width: 142px;
    height: 85px;
}
.haberblog  li a img
{

   border-radius: 3px;
    width: 142px;
    height: 85px;
}
.yorumbuton
{
   border: 0px solid #5998A7;
   width: 100%;

   overflow: auto;

}
.yorum
{
   border-right: 0px solid #5998A7;
   width: 50%;
   float: left;
    overflow: auto;
    padding: 5px 10px 10px 10px;
}
.buton
{
   border: 0px solid #5998A7;
float: right;
overflow: auto;

cursor: pointer;
padding: 5px 10px 10px 10px;
background: #f7f7f7;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#f7f7f7));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#f7f7f7',GradientType=0 );
border-radius: 5px;
}

Thats all. Please i need assistance in making it look the way it should.

Offline Infernus

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #31 on: December 26, 2014, 09:31:08 AM »
How does it look now then?

Offline sub5

  • Semi Newbie
  • *
  • Posts: 25
    • All student forum
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #32 on: December 26, 2014, 02:27:36 PM »
How does it look now then?
It looks like this



Instead of Like this



I cant seem to figure out what the problem is, thats why i have come for help from all of you. I will be glad if any one can help.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1335
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: BoardNews for Frontpage block
« Reply #33 on: December 26, 2014, 04:12:28 PM »
You forgot an edit from the code you referenced and also it appears to be written for the SMF 1.1.X branch which is apparent from the second edit which you neglected to post.

Offline sub5

  • Semi Newbie
  • *
  • Posts: 25
    • All student forum
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #34 on: December 26, 2014, 06:05:47 PM »
You forgot an edit from the code you referenced and also it appears to be written for the SMF 1.1.X branch which is apparent from the second edit which you neglected to post.
Please can you help out, the second edit was found in the fist edit, the one i posted above, that was why i neglected it, and it was also not found in the PortalBlocks.php
Please can i adapt it to work with my 2.0.9 thanks

Here is the 2nd edit code
find this
Code: [Select]
         echo '
                           <div class="post"><hr />', $news['body'], '<br /><br /></div>
                        </td>
                     </tr>
                     <tr>
                        <td class="windowbg2" colspan="2">
                           <div class="sp_right sp_regular_padding">', $news['link'], ' ',  $news['new_comment'], '</div>
                        </td>
                     </tr>
                  </table>
               </div>';
      }
   }

Change to
Code: [Select]
                  echo '               
                           <div class="post"><hr /><div class="haberblog">', $news['body'], '<br /><br /></div></div>
                        </td>
                     </tr>
                     <tr>
                        <td class="windowbg2" colspan="2"><hr />
                             <div class="yorumbuton">
                       <div class="yorum">', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div><div class="buton">', $news['link'], ' ',  $news['new_comment'], '</div></div>
                        </td>
                     </tr>
                  </table>
               </div>';
      }
   }

Offline Infernus

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #35 on: December 27, 2014, 02:30:31 AM »
Hoppe you like it, it's pure css. http://jsfiddle.net/17s1Ldjs/6/

Next improvement steps are:
  • Include the html code in PortalBlocks.php
  • Include css code in some css file (portal.css should be fine)
  • Load default image, if no image is found in topic.
  • Optimize/cache small images + avatars, instead of using huge ones. 

Further you could tweak it up even more, based on what you want it to be.
« Last Edit: December 27, 2014, 08:52:29 AM by Infernus »

Offline sub5

  • Semi Newbie
  • *
  • Posts: 25
    • All student forum
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #36 on: December 27, 2014, 06:21:59 AM »
Hoppe you like it, it's pure css. http://jsfiddle.net/17s1Ldjs/6/

Next improvement steps are:
  • Include the html code in PortalBlocks.php
  • Include css code in some css file (portal.css should be fine)
  • Load default image, if no image is found in topic.
  • Optimize/cache small images + avatars, instead of using huge ones. 

Further you could tweak it up even more, based on what you want it to be.
Thank you for responding. I am lost please, how do i implement this, which section on the portalblocks.php am i to add include the html code. i dont understand how to go about this also
  • Load default image, if no image is found in topic.
  • Optimize/cache small images + avatars, instead of using huge ones. 

Offline Infernus

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #37 on: December 27, 2014, 08:51:14 AM »
You'll have to adapt HTML to PHP code. You showed us a working example above, now what you have to do is replace old HTML code with this one, so CSS rules matches.
Oh, and those steps are optional, I just thought they might be usefull.

Edit:
I think it's possible to create this as a custom block, so source code of portal won't be modified. (A giant block that contains other blocks  ;D, how awesome is that)
« Last Edit: December 27, 2014, 09:11:13 AM by Infernus »

Offline sub5

  • Semi Newbie
  • *
  • Posts: 25
    • All student forum
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #38 on: December 27, 2014, 12:55:27 PM »
You'll have to adapt HTML to PHP code. You showed us a working example above, now what you have to do is replace old HTML code with this one, so CSS rules matches.
Oh, and those steps are optional, I just thought they might be usefull.
Ok thanks i will try and see if i will get it right,
Quote
Edit:
I think it's possible to create this as a custom block, so source code of portal won't be modified. (A giant block that contains other blocks  ;D, how awesome is that)
I would prefer to use custom block for it but my coding skill is little. if i can get the custom block code of it, i will appreciate.

Offline sub5

  • Semi Newbie
  • *
  • Posts: 25
    • All student forum
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #39 on: December 27, 2014, 06:59:13 PM »
I have been on it all day and i am not getting any where, i keeping getting error, there are link on you html code, which i dont understand why you are use those links, i was thinking the code will call up the news and the images just like the one in my first post.

Can you help out with a guide or custom block of the BoardNews for Frontpage?

Offline sub5

  • Semi Newbie
  • *
  • Posts: 25
    • All student forum
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: BoardNews for Frontpage block
« Reply #40 on: February 14, 2015, 06:33:31 AM »
Finally i fix my issue, thanks to all the tried helping out.
« Last Edit: February 15, 2015, 07:18:59 AM by sub5 »