Featured post in portal page?
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #9
RE: Featured post in portal page?
(08-12-2012 06:52 AM)RateU Wrote:  Are you using a modified portal? By default, MyBB doesn't have paging in portal. The easiest way is, load the specified post and put it above the announcements. Wrap it inside a condition so it won't be displayed in other "page". Then modify the announcements query.

Thank you, this is perfect for me, I don't know why I never thought that first. I put this code in portal template:

Code:
1
2
3
4
5
6
7
8
9
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Title</strong></td>
</tr>
<tr>
<td class="trow2"><div align="center">Text</div></td>
</tr>
</table>
<br />{$announcements}</td>


Yes, I have edited a bit portal template with multipage, 3 column, avatars in latest threads (thanks leefish Biggrin ).

Could you say me what is the condition so Post won't be displayed in other pages? Thank you very much


(08-12-2012 05:42 PM)Sama34 Wrote:  Didn't read the full thread, but are not WP feature posts similar to MyBB stickies?

If so, you can try to modify the portal.php, edit the while function.

Not right but the idea would be this (if somebody gets it -.-u):

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$threads = $stickies = '';
while($annoucment = $db->fetch_array($query))
{
...
if($annoucment['sticky'])
{
eval('$stickies .= "'.$templates->get('...').'";');
}
else
{
eval('$threads .= "'.$templates->get('...').'";');
}
}
$threads = $stickies.$threads;
unset($stickies);


That is pretty much what I did for my portal (since I already control what threads are shown in it, there is no way all stickies will appear as portal news even if there are in the same forum).

Hope that helps.


Hi, stickies posts are "important threads" in forumdisplay? Maybe I was wrong to put the word "featured", I think it is more appropriate "post in evidence"
08-12-2012 07:56 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Featured post in portal page? - nier3 - 08-10-2012, 08:23 PM
RE: Featured post in portal page? - RateU - 08-11-2012, 06:41 AM
RE: Featured post in portal page? - nier3 - 08-11-2012, 10:05 PM
RE: Featured post in portal page? - RateU - 08-12-2012, 05:10 AM
RE: Featured post in portal page? - nier3 - 08-12-2012, 06:34 AM
RE: Featured post in portal page? - RateU - 08-12-2012, 06:52 AM
RE: Featured post in portal page? - Sama34 - 08-12-2012, 05:42 PM
RE: Featured post in portal page? - nier3 - 08-12-2012 07:56 PM
RE: Featured post in portal page? - nier3 - 08-12-2012, 09:33 PM
RE: Featured post in portal page? - RateU - 08-13-2012, 02:13 AM
RE: Featured post in portal page? - Sama34 - 08-13-2012, 03:34 AM
RE: Featured post in portal page? - nier3 - 08-18-2012, 07:55 PM

 Standard Tools
Forum Jump: