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: 1151
  • 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]


Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

How to remove bodybg and titlebg of board news?

Started by impennetrate, November 15, 2009, 11:20:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

impennetrate

Hello,

How would I go about removing the bodybg and titlebg of a board news block?

Or could I create a custom html/php block that performs the same function as the board news?

Nathaniel

Do a search for the 'sp_boardNews' function in the 'Sources/PortalBlocks.php' file. The display/template code is at the end of the function, you can make whatever changes you want there or you can copy the code from that function into a Custom PHP block and make your edits there.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

impennetrate

Okay so I want to make a new Boardnews Block, can I make it using php? I want it to look very specific, though... I'll show pictures of what it looks like now, and what I want it to look like (edited image):

What it is now:


What I want it to be:


Is this possible?

giannis_athens

Quote from: Nathaniel on November 15, 2009, 06:17:25 PM
Do a search for the 'sp_boardNews' function in the 'Sources/PortalBlocks.php' file. The display/template code is at the end of the function, you can make whatever changes you want there or you can copy the code from that function into a Custom PHP block and make your edits there.
Ok i tried that part and , actually i didn't know what exactly  i should  fill in the Custom PHP,
so i put all the 'sp_boardNews'  function to start making some changes


function sp_boardNews($parameters, $id, $return_parameters = false)

{
        global $scripturl, $txt, $settings, $modSettings, $context, $smcFunc, $color_profile;

        $block_parameters = array(

'board' => 'boards',

'limit' => 'int',

'start' => 'int',

'length' => 'int',

'avatar' => 'check',

'per_page' => 'int',

);


but, when i preview i get this error :
Parse error: syntax error, unexpected $end in /home/aktorama/public_html/Sources/PortalBlocks.php(6661) : eval()'d code on line 23

Can you please tell me what part of this function i should add at the cutom PHP field
to start editing???

jamiechaos

I'm no SP expert? but if the code you showed us is what's in the block, then you didn't include the whole function, and that's wht the error message is complaining about.  You need to include it from the first { to the final } (where the next function begins).

Beyond that, I'm useless, but maybe that much will at least be helpful.

giannis_athens

Quote from: jamiechaos on August 09, 2010, 02:13:04 PM
I'm no SP expert? but if the code you showed us is what's in the block, then you didn't include the whole function, and that's wht the error message is complaining about.  You need to include it from the first { to the final } (where the next function begins).

Beyond that, I'm useless, but maybe that much will at least be helpful.

Thank you very much, you are right about the function, i didnt include it all of it....  :-[

I will check it again and i will inform the topic...
Thank you.

giannis_athens

Ok i put all this function but i get this error:


Fatal error: Cannot redeclare sp_boardnews() (previously declared in /home/aktorama/public_html/Sources/PortalBlocks.php:2511) in /home/aktorama/public_html/Sources/PortalBlocks.php(6661) : eval()'d code on line 505

Forget it...iam toooo noob to deal with that....lets get something else to change...  :)

Nathaniel

@giannis_athens,
Do a search for the sp_boardnews function in the Sources/PortalBlocks.php file, its already there, you don't need to add a new function. I would suggest that you edit the function that is already there. If you don't want to, then create a Custom PHP block and put the code in there.

Also, you shouldn't have so much whitespace within your function (every line is separated by a newline), if you have used an editor like notepadd, then don't, Notepad++ is far better.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.