Featured post in portal page?
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #1
Featured post in portal page?
Hi, there is a plugin or modification for "featured post" in portal page, as in Wordpress?

thanks
08-10-2012 08:23 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: Featured post in portal page?
I don't know what is your requirement for the "featured post". There is an example plugin here (using XThreads) for displaying the selected threads on portal:
http://mybbhacks.zingaburga.com/showthread.php?tid=474
Maybe you can modify it as your needs.

08-11-2012 06:41 AM
Find all posts by this user Quote this message in a reply
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #3
RE: Featured post in portal page?
Thank you RateU. I wish the post I chose to remain in first position in the first page of portal of my MyBB forum, displaying new posts after it, as in Wordpress.

For example:
- 1 August I created the thread in forum X
- 3 August I created the thread in forum Y
- 4 August I created the thread in forum X

So in first page of portal I'll have, on 4 august, in order:
- 4 August I created the thread in forum X
- 3 August I created the thread in forum Y
- 1 August I created the thread in forum X

I would like to have 3 August I created the thread in forum Y ever in first position, and after others threads, that is 4 August and 1 August.

I hope you understood me, I'm sorry Frown
08-11-2012 10:05 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Featured post in portal page?
What do you mean by the "first page"?

08-12-2012 05:10 AM
Find all posts by this user Quote this message in a reply
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #5
RE: Featured post in portal page?
The "important post" to keep in evidence only on first page of Portal (portal.php) and not in portal.php?paged=1&page=2, portal.php?paged=1&page=3, portal.php?paged=1&page=4, etc.

If this is possible also in MyBB, thanks
(This post was last modified: 08-12-2012 06:34 AM by nier3.)
08-12-2012 06:34 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: Featured post in portal page?
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.

(This post was last modified: 08-12-2012 06:56 AM by RateU.)
08-12-2012 06:52 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #7
RE: Featured post in portal page?
If it's just a single post, just hard code the thing into the template.

My Blog
08-12-2012 10:54 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #8
RE: Featured post in portal page?
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.


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
08-12-2012 05:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
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
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #10
RE: Featured post in portal page?
ADD: there is a problem..if I add post in announcement I have to copy-paste all post, but so users can't click on title and go directly in post on forum and read all answers..
(This post was last modified: 08-12-2012 09:33 PM by nier3.)
08-12-2012 09:33 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: