TinyPortal

Development => Support => Topic started by: BradIsBad on June 23, 2011, 05:41:52 PM

Title: FrontPage
Post by: BradIsBad on June 23, 2011, 05:41:52 PM
When I click on TinyPortal then FrontPage one of the choices you have is:

Display forum-posts on frontpage from: Here is a series of drop downs to choose 5 areas to draw posts from. 

But it seems only the first drop down actually supplies anything. 

Is there something I have to change so it will pull from the 5 different areas?

Thanks!
Title: Re: FrontPage
Post by: ZarPrime on June 23, 2011, 06:10:27 PM
BradIsBad,

Please attach the following info requested in our Posting Guidelines to your next post ...

Link to my site: http://www.yourdomain.com
SMF version: SMF ver. here
TP version: TP ver. here
Default Forum Language: Your Default Forum Language here
Theme name and version: Theme name here
Browser Name and Version: Browser name/version here
Mods installed: Mods listed here
Related Error messages: Error message here

Also, can you please attach a screenshot of what you are seeing on that page?

ZarPrime
Title: Re: FrontPage
Post by: BradIsBad on June 23, 2011, 06:19:47 PM
Link to my site: http://www.simpurethoughts.com/smf
SMF version: 2.0
TP version: 2.0
Default Forum Language: English
Theme name and version: Helios
Browser Name and Version: Chrome
Mods installed: None
Related Error messages: None

Attached is the Screenshot.
Title: Re: FrontPage
Post by: IchBin on June 23, 2011, 06:26:19 PM
http://www.tinyportal.net/index.php?topic=34125.msg272834#msg272834
Title: Re: FrontPage
Post by: BradIsBad on June 23, 2011, 06:56:18 PM
Ok I use that code but it only works if I choose forum posts only and in my case I am using (Forum-posts and articles - sorted on date) because I want a mixture of the two.  When that is selected it only goes back to the first field again.

But it works great for forum posts only.

Is there any way to make it work with the above?
Title: Re: FrontPage
Post by: IchBin on June 23, 2011, 08:55:17 PM
Of course! Thanks for reporting it's not working there too.

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


Change this:
AND t.id_board IN({string:board})
To this:
AND t.id_board IN({raw:board})

Let me know if that works.
Title: Re: FrontPage
Post by: BradIsBad on June 23, 2011, 09:13:42 PM
That worked great!  Thanks for all your help!
Title: Re: FrontPage
Post by: MrCare on November 17, 2014, 05:57:10 AM
I forgot what i was delete some code... now the word "Promote on frontpage" in display post was not there anymore... how can i get it back?
Title: Re: FrontPage
Post by: Freddy on November 17, 2014, 02:51:47 PM
We still don't read minds.
Title: Re: FrontPage
Post by: G6Cad on November 23, 2014, 07:27:19 PM
Freddy, i will send you my crystal ball, it will help you endlessly to see the unseen, hear the silent words and best of all, it will show you the impossible ways to know everything you need  8)
Title: Re: FrontPage
Post by: Freddy on November 23, 2014, 08:01:51 PM
Sounds just like what I need :)