News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Recent Topic Block Modification

Started by Mraza, July 07, 2009, 05:32:15 AM

Previous topic - Next topic

Mraza

hi guys i am using 1.1.9 smf with simpleportal 2.2. i wanted to show my choosen one boards to show posts in portal from recent posts blocks. so far i get this code but it is not working. can somebody help me in this, thanks. here is the code

(Find (SSI.php))function ssi_recentTopics($num_recent = 8, $exclude_boards = null, $output_method = 'echo')
(Replace)function ssi_recentTopics($num_recent = 8, $exclude_boards = null, $output_method = 'echo', $include_boards = null)


(Find (SSI.php))         AND t.ID_LAST_MSG = m.ID_MSG
         AND b.ID_BOARD = t.ID_BOARD" . (empty($exclude_boards) ? '' : "

(Replace)         AND t.ID_LAST_MSG = m.ID_MSG
         AND b.ID_BOARD = t.ID_BOARD" . (empty($include_boards) ? '' : "
         AND b.ID_BOARD IN (" . implode(', ', $include_boards) . ")") . (empty($exclude_boards) ? '' : "



(Find (Sources/SPortal1-1.php))$topics = ssi_recentTopics($limit, null, 'array');
(Replace)$topics = ssi_recentTopics($limit, null, 'array', array(1, 2, 3, 4));

array(1, 2, 3, 4)) on last line code is where i put my board ID but not working.
Signature:
Old Software Engineers Never Dies, They Just Log Out...
! ! ! ! ! 5 Best Movies Thread ! ! ! ! !

Mraza

bump ...anybody i want to stop showing certain boards to display recent posts on portal and to show posts from my chosen one boards....helpppp
Signature:
Old Software Engineers Never Dies, They Just Log Out...
! ! ! ! ! 5 Best Movies Thread ! ! ! ! !

[SiNaN]

Well, "doesn't work" really doesn't help us much in providing suggestions. It probably gives you an output, doesn't it? Do you get the desired result viewing ssi_examples.php file (http://yourforum.com/ssi_examples.php)?

Which block type are you using with SimplePortal? Can you attach your SPortal2.php file here?
Former SMF Core Developer | My Mods | SimplePortal

Mraza

Quote from: [SiNaN] on July 15, 2009, 11:17:45 AM
Well, "doesn't work" really doesn't help us much in providing suggestions. It probably gives you an output, doesn't it? Do you get the desired result viewing ssi_examples.php file (http://yourforum.com/ssi_examples.php)?

Which block type are you using with SimplePortal? Can you attach your SPortal2.php file here?
Thanks [SiNaN] for your answer. After changing the array(1, 2, 3, 4)) it must give me the output of my "recent posts" from my selected boards from array, but weird thing is there was the same result as it were before this editing. if i make a post to any board,For example on board ID 5.. it will show on Portal recent posts block.  I am using Bottom Blocks from SPortal. i can not find file SPortal2.php so here i am attaching the Sportal1-1.php without modification. Thanks for any suggestions

Regards
Signature:
Old Software Engineers Never Dies, They Just Log Out...
! ! ! ! ! 5 Best Movies Thread ! ! ! ! !

[SiNaN]

There are three recent block types; recent topics, recent posts and compact recent. Which one do you use exactly? You didn't answer my question regarding ssi_exampless, I need that. Also attach the file you modified, not the fresh one.
Former SMF Core Developer | My Mods | SimplePortal

Mraza

#5
Oh God i am really sorry i misunderstood...this was the"Board news" not the recent topic block, where i want to display topics from chosen boards i just see it by disabling it, i was thinking it is recent topic block, how stupid i am . Totally different then what i was doing.  :-[...i think i need to start from beginning now  :-[

Edit: and i see the options there already to choose the boards from where i want to display the topic's ..
thanks [SiNaN] for opening my eyes :-[

Is it possible to add more then one board in Board News block by entering Board ID?
Signature:
Old Software Engineers Never Dies, They Just Log Out...
! ! ! ! ! 5 Best Movies Thread ! ! ! ! !

Advertisement: