TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

October 16, 2024, 03:15:42 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,395
  • Total Topics: 21,244
  • Online today: 123
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 50
  • Total: 50

Fronpage news from few boards

Started by Nolt, June 19, 2011, 06:36:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ZarPrime

Yes ZER0X304, but there are a few other edits in that part of the code from lines 1445 to 1458.  The full edit for those lines is specified in Ichbin's post above --> http://www.tinyportal.net/index.php?topic=34125.msg272832#msg272832

and yes, as Ichbin said, these edits have already been done for the next Release Candidate of TinyPortal [1.0 RC3] which is currently undergoing testing.

ZarPrime

ZER0X304

Quote from: ©Lesmond on July 24, 2011, 02:49:01 PMwelcome to Tinyportal O0

Thanks :)

Quote from: ©Lesmond on July 24, 2011, 02:49:01 PMSo you like a bit of php? stick around we are always on the lookout for coders   O0

I do quite a bit of work, but it's my first time looking through TP today - usually I have no need. I expect I'll be around a bit more often now :)

Quote from: IchBinâ,,¢ on July 24, 2011, 03:30:41 PMYep I've already made the change.

Good to know, thanks.

Quote from: ZarPrime on July 24, 2011, 03:36:47 PMYes ZER0X304, but there are a few other edits in that part of the code from lines 1445 to 1458.

So they were, but I didn't find those edits a requirement :)

BD

Quote from: IchBinâ,,¢ on June 20, 2011, 02:15:12 AM
Find in TPortal.php this code:
// Find the post ids.
if($context['TPortal']['front_type'] == 'forum_only')
$request =  $smcFunc['db_query']('', '
SELECT t.id_first_msg as ID_FIRST_MSG
FROM ({db_prefix}topics as t, {db_prefix}boards as b)
WHERE t.id_board = b.id_board
AND t.id_board IN({string:board})
' . ($context['TPortal']['allow_guestnews'] == 0 ? 'AND {string:guestnews}' : '') . '
ORDER BY t.id_first_msg DESC
LIMIT {int:max}',
array(
'board' => $context['TPortal']['SSI_board'],
'guestnews' => $user_info['query_see_board'],
'max' => $totalmax)
);


Replace with this code:
// Find the post ids.
if($context['TPortal']['front_type'] == 'forum_only')
$request =  $smcFunc['db_query']('', '
SELECT t.id_first_msg as ID_FIRST_MSG
FROM ({db_prefix}topics as t, {db_prefix}boards as b)
WHERE t.id_board = b.id_board
AND t.id_board IN({raw:board})
' . ($context['TPortal']['allow_guestnews'] == 0 ? 'AND {query_see_board}' : '') . '
ORDER BY t.id_first_msg DESC
LIMIT {int:max}',
array(
'board' => $context['TPortal']['SSI_board'],
'max' => $totalmax)
);

Thank you for this!

Is there a way to do the same if you have selected "Forum-posts and articles - sorted on date" to display, rather than "Only forum-posts."

I really appreciate your help!
BD

IchBin

I'm not sure what you are asking BD. Do the same what?