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 login or register.

* Who's Online

  • Dot Guests: 754
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {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

* 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]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: Remove List of Articles from the Article Block  (Read 4145 times)

0 Members and 1 Guest are viewing this topic.

Offline berkcet

  • Semi Newbie
  • *
  • Posts: 6
  • long time no see
    • Valyria
  • SMF Version: 2.0.10
  • SP Version: 2.3.6
Remove List of Articles from the Article Block
« on: July 10, 2015, 02:00:33 AM »
    Hello there,

    SimplePortal has exceeded my expectations in terms of customizability and features. One small detail I'd like to change is the little list of recent articles that appear on top of the block. You can see what I mean on the screenshot.



    I'm assuming removing this part can be achieved by editing the PortalArticles.template.php however I'm not very good with php and I fear ruining the functionality and the integrity of said block.

Code: [Select]
<?php

/**
 * @package SimplePortal
 *
 * @author SimplePortal Team
 * @copyright 2014 SimplePortal Team
 * @license BSD 3-clause
 *
 * @version 2.3.6
 */

function template_articles()
{
global $context;

if ($context['SPortal']['core_compat'])
template_articles_core();
else
template_articles_curve();
}

function 
template_articles_core()
{
global $context$txt$modSettings$scripturl;

if (empty($modSettings['articleactive']))
return;

while ($article $context['get_articles']())
{
echo '
<div class="tborder sp_article_content">
<table class="sp_block">
<tr class="catbg">
<td class="sp_middle">'
$article['message']['icon'], '</td>
<td class="sp_middle sp_regular_padding sp_fullwidth">'
$article['topic']['link'], '</td>
</tr>
<tr class="windowbg">
<td class="sp_regular_padding" colspan="2">'
;

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

echo '
<div class="post"><hr />'
, !empty($article['category']['picture']['href']) ? '<div><img src="' $article['category']['picture']['href'] . '" alt="' $article['category']['name'] . '" class="sp_article_image" align="right" /></div>' ''$article['message']['body'], '<br/><br/>
</div>
</td>
</tr>
<tr>
<td class="windowbg2" colspan="2">
<div class="sp_right sp_regular_padding">'
$article['article']['link'], ' ',  $article['article']['new_comment'], '</div>
</td>
</tr>
</table>
</div>'
;
}

if (!empty($modSettings['articleperpage']) && !empty($context['page_index']))
echo '
<div class="sp_page_index">'
$txt['sp-articlesPages'], ': '$context['page_index'], '</div>';
}

function 
template_articles_curve()
{
global $context$txt$modSettings$scripturl;

if (empty($modSettings['articleactive']))
return;

while ($article $context['get_articles']())
{
echo '
<div class="cat_bar">
<h3 class="catbg">
<span class="sp_float_left sp_article_icon">'
$article['message']['icon'], '</span>'$article['topic']['link'], '
</h3>
</div>
<div class="windowbg sp_article_content">
<span class="topslice"><span></span></span>
<div class="sp_content_padding">'
;

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

echo '
<div class="post"><hr />'
, !empty($article['category']['picture']['href']) ? '<div><img src="' $article['category']['picture']['href'] . '" alt="' $article['category']['name'] . '" class="sp_article_image sp_float_right" /></div>' ''$article['message']['body'], '</div>
<div class="sp_right">'
$article['article']['link'], ' ',  $article['article']['new_comment'], '</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'], ': '$context['page_index'], '</div>';
}

function 
template_add_article()
{
global $context;

if ($context['SPortal']['core_compat'])
template_add_article_core();
else
template_add_article_curve();
}

function 
template_add_article_core()
{
global $context$scripturl$txt;

echo '<br />
<table border="0" align="center" cellspacing="1" cellpadding="4" class="tborder" width="40%">
<tr class="catbg">
<td>'
$txt['sp-articlesAdd'], '</td>
</tr>
<tr class="windowbg2">
<td align="center">
<form action="'
$scripturl'?action=portal;sa=addarticle" method="post" accept-charset="'$context['character_set'], '">
<table cellpadding="4">
<tr>
<th align="right">'
$txt['sp-articlesCategory'], ':</th>
<td align="left">
<select id="category" name="category">'
;

foreach($context['list_categories'] as $category)
echo '
<option value="'
$category['id'], '">'$category['name'], '</option>';

echo '
</select>
</td>
</tr><tr>
<td colspan="2" align="center"><input type="submit" name="add_article" value="'
$txt['sp-articlesAdd'], '" class="button_submit" /></td>
</tr>
</table>
<input type="hidden" name="return" value="'
$context['return'], '" />
<input type="hidden" name="message" value="'
$context['message'], '" />
<input type="hidden" name="'
$context['session_var'], '" value="'$context['session_id'], '" />
</form>
</td>
</tr>
</table>'
;
}

function 
template_add_article_curve()
{
global $context$scripturl$txt;

echo '
<div class="sp_auto_align" style="width: 40%;">
<div class="cat_bar">
<h3 class="catbg">
'
$txt['sp-articlesAdd'], '
</h3>
</div>
<div class="sp_center windowbg2">
<span class="topslice"><span></span></span>
<form action="'
$scripturl'?action=portal;sa=addarticle" method="post" accept-charset="'$context['character_set'], '">
<dl class="settings">
<dt class="sp_right">
<strong>'
$txt['sp-articlesCategory'], ':</strong>
</dt>
<dd class="sp_left" style="margin-left: 10px;">
<select id="category" name="category">'
;

foreach($context['list_categories'] as $category)
echo '
<option value="'
$category['id'], '">'$category['name'], '</option>';

echo '
</select>
</dd>
</dl>
<p>
<input type="submit" name="add_article" value="'
$txt['sp-articlesAdd'], '" class="button_submit" />
</p>
<input type="hidden" name="return" value="'
$context['return'], '" />
<input type="hidden" name="message" value="'
$context['message'], '" />
<input type="hidden" name="'
$context['session_var'], '" value="'$context['session_id'], '" />
</form>
<span class="botslice"><span></span></span>
</div>
</div>'
;
}

?>

    I'd really appreciate what to remove/replace in order to remove this small list. I already checked No Title and No Body. While they help, I'd like to remove the list completely. Thanks for your time.

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Remove List of Articles from the Article Block
« Reply #1 on: July 10, 2015, 07:42:53 AM »
Hi berkcet! Please provide a link to a page with that block set to active, so I can actually see it, it should make things faster ;)
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline berkcet

  • Semi Newbie
  • *
  • Posts: 6
  • long time no see
    • Valyria
  • SMF Version: 2.0.10
  • SP Version: 2.3.6
Re: Remove List of Articles from the Article Block
« Reply #2 on: July 10, 2015, 08:00:51 AM »
Hello!

Thanks for the response, the website is valyria.eu.com

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Remove List of Articles from the Article Block
« Reply #3 on: July 10, 2015, 08:10:16 AM »
After a PM due to awaiting approval post...
Add this bit to the bottom of your /themes/default/css/portal.css

Code: [Select]
div#sp_block15 div.sp_block ul.sp_list { display: none; }
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Remove List of Articles from the Article Block
« Reply #4 on: July 10, 2015, 08:16:19 AM »
Actually that looks like an articles block to me. You can just disable/remove the articles block you have in top blocks list. It's the block with the ID of 15. The articles that you have under the part you want to remove can be managed through SimplePortal > Configuration > Article Settings page.
And slowly, you come to realize... It's all as it should be...

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Remove List of Articles from the Article Block
« Reply #5 on: July 10, 2015, 08:20:02 AM »
Not sure why he didn't do it though, it basically annihilates the whole purpose of the block @_@
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline berkcet

  • Semi Newbie
  • *
  • Posts: 6
  • long time no see
    • Valyria
  • SMF Version: 2.0.10
  • SP Version: 2.3.6
Re: Remove List of Articles from the Article Block
« Reply #6 on: July 10, 2015, 08:21:38 AM »
Code: [Select]
div#sp_block15 div.sp_block ul.sp_list { display: none; }
didn't do the trick, I'll try [SiNaN]'s suggestion but am a bit confused. I'd like to keep the articles block and the articles themselves. I just want to hide or remove the highlighted list that is on top of the block
« Last Edit: July 10, 2015, 08:27:47 AM by berkcet »

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Remove List of Articles from the Article Block
« Reply #7 on: July 10, 2015, 08:24:02 AM »
You need to flush your forum+browser cache in order to see any css changes. Usually, doing a ctrl+f5 instead of f5 works, unless you are using something like Cloudflare and if so you'd need to flush CF cache as well.

P.S.: yo SiNaN again :D
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Remove List of Articles from the Article Block
« Reply #8 on: July 10, 2015, 08:27:23 AM »
The part that you want to remove is the articles block.

The stuff that you have under the part that you want to remove is not part of the articles block, it's a separate articles feature.

The articles added can either be displayed in the main articles section of the portal page (managed through article settings) or using an articles block.

A little more info here: http://simpleportal.net/index.php?action=docs;area=setup_articles
And slowly, you come to realize... It's all as it should be...

Offline berkcet

  • Semi Newbie
  • *
  • Posts: 6
  • long time no see
    • Valyria
  • SMF Version: 2.0.10
  • SP Version: 2.3.6
Re: Remove List of Articles from the Article Block
« Reply #9 on: July 10, 2015, 08:30:00 AM »
That did the trick. Boy do I feel stupid   :-[

I had this idea(!) that the articles+the list I wanted to remove were both part of the article block. Apparently the block is the list and just enabling the articles from SimplePortal > Configuration > Article Settings adds them to the home page.


Thank you very much!
« Last Edit: July 10, 2015, 08:34:59 AM by berkcet »

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Remove List of Articles from the Article Block
« Reply #10 on: July 10, 2015, 08:35:42 AM »
No problem. It's exactly the way you worded it. I can understand why people may get confused by that. Glad that we got it right in the end though. I'll be marking this as solved then.
And slowly, you come to realize... It's all as it should be...