Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 843
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


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

Editing Board News block header

Started by Viken, September 18, 2010, 08:58:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Viken

SMF: 2.0 RC3
SP: 2.3.2

Hi there, my SP is working perfectly except I'd like to make a small change .... I just don't know how.

The Board News block, which I have as a top block, pulls recent forum posts from specified forum boards. However, the title in the forum states the post title followed by " | date". I would like to take that date out of the heading for each post.

Also, each Board news showing has, under the header, the date of posting, the post author, number of times viewed, and number of comments. I'd like to get rid of those also.

Finally, I have the SP set to show 3 posts only, so it is only one page. At the bottom it says "Pages: [1]". I can understand that if there are multiple pages to look at, but is it possible to have that disappear and show only if there is more than one page?

Thanks in advance for your advice.

Viken

QuoteThe Board News block, which I have as a top block, pulls recent forum posts from specified forum boards. However, the title in the forum states the post title followed by " | date". I would like to take that date out of the heading for each post.

I have managed to achieve this by editing the /sources/portalblocks.php file as follows:

FIND:
<td class="sp_middle sp_regular_padding sp_fullwidth"><a href="', $news['href'], '" >', $news['subject'], '</a> | ', $news['timeyear'], '</td>

REPLACE WITH:
<td class="sp_middle sp_regular_padding sp_fullwidth"><a href="', $news['href'], '" >', $news['subject'], '</a> ', '</td>

FIND:
                    <h3 class="catbg"><span class="left"></span>
                        <span class="sp_float_left sp_article_icon">', $news['icon'], '</span><a href="', $news['href'], '" >', $news['subject'], '</a> | ', $news['timeyear'], '
                    </h3>


REPLACE WITH:
                    <h3 class="catbg"><span class="left"></span>
                        <span class="sp_float_left sp_article_icon">', $news['icon'], '</span><a href="', $news['href'], '" >', $news['subject'], '</a> ', '
                    </h3>


That will help someone else if they ever wish to achieve this.

Viken

QuoteAlso, each Board news showing has, under the header, the date of posting, the post author, number of times viewed, and number of comments. I'd like to get rid of those also.

I have managed to achieve this by editing the /sources/portalblocks.php file as follows:

FIND:

<span class="topslice"><span></span></span>

Just below it, FIND AND DELETE the following:

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