Recent Topics

1 Sep 05, 2012 22:48    

My b2evolution Version: 4.1.x

http://www.aswesee.com/

The first post is the featured post but the posts below shouldn't be showing. I've added

if( $Item->ptyp_ID == 1500 ) $GLOBALS['MainList'] = NULL;

but it doesn't seem to be preventing the other posts from showing. Ideas anyone?

2 Sep 06, 2012 03:35

Where did you put this code? It should go somewhere above the main posts loop.

3 Sep 06, 2012 05:28

It's currently at the end of the Featured Posts section in the posts.main.php file which appears to be above the main post area but maybe I'm missing something... ?

4 Sep 06, 2012 20:16

Try this

if( $Item->ptyp_ID == 1500 ) echo 'Yes, I am really an intro post!';

5 Sep 07, 2012 01:57

Thanks Sam2kb - I replaced my code with what you provided and it appears to have no effect.

6 Sep 07, 2012 07:14

Then the post is not of type 1500
Use $Item->is_intro() instead

if( $Item->is_intro() ) echo 'Hooray! I\'m an intro post!';

7 Sep 07, 2012 19:24

Again, no effect. Not sure what the problem is but something is obviously broken...

8 Sep 07, 2012 20:29

Try this

echo $Item->ptyp_ID;

9 Sep 07, 2012 21:08

It put a "1" (no quotes) below the post.

10 Sep 07, 2012 21:09

Then it's a regular post

11 Sep 07, 2012 21:15

Well, the Featured Post box is checked - I've even unchecked it, saved, rechecked it and saved again. Any ideas?

12 Sep 07, 2012 21:33

Ok, I see it now. There's a difference between featured and intro posts

Your post is not intro that's why it doesn't respond to is_intro() check. Add this

if( $Item->is_intro() || $Item->is_featured() ) echo 'Either intro or featured post';

13 Sep 07, 2012 21:45

Ok, that makes sense. So then what should I replace my original code

if( $Item->ptyp_ID == 1500 ) $GLOBALS['MainList'] = NULL; 

to make it so the featured post is the only post that shows up?

***EDIT***

I'm an idiot.

I should have had it set to Intro the whole time. So sorry to waste your time - I'm retarded.

14 Sep 07, 2012 22:03

if( $Item->is_intro() || $Item->is_featured() ) $GLOBALS['MainList'] = NULL;

15 Sep 07, 2012 22:06

Man, I feel like a total jackass. I'm really sorry!


Form is loading...