Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 16 Aug 2013, 05:38
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Real name: Milk Pink
if category x contains new posts

How do you write an if condition to show something if if category x contains new posts?

Dummy code explaination:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by PinkMilk; 16 Aug 2013 at 05:50.
Reply With Quote
  #2  
Old 16 Aug 2013, 17:23
exel exel is offline
 
Join Date: Jan 2008
Where are you trying to add that code?
Reply With Quote
  #3  
Old 17 Aug 2013, 01:50
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Real name: Milk Pink
Originally Posted by exel View Post
Where are you trying to add that code?
On forumhome, I don't use forumhome_forumbit_level1_nopost so I'm probably just going to have to write a plugin to query db, tbh I have kind of given up on the idea but if you have a solution it would be much appreciated.

Last edited by PinkMilk; 17 Aug 2013 at 01:59.
Reply With Quote
  #4  
Old 20 Aug 2013, 17:35
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
In a plugin on global_start add this code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace 999 with the forumid of the forum (or category) you want to check

This works for me, I repeat this code multiple times in the plugin to check multiple forumids-


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #5  
Old 21 Aug 2013, 20:00
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Real name: Milk Pink
Thank you BOP but dosen't seem to work for me, I did everything as instructed and the execution code is just a simple if else


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and added $newmsg to templates, so not sure where I'm going wrong.
Reply With Quote
  #6  
Old 21 Aug 2013, 20:14
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
What template are you putting $newmsg in?
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #7  
Old 21 Aug 2013, 20:52
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Real name: Milk Pink
Have tried, forumhome, forumhome_forumbit_level2_post and forumhome_forumbit_level1_nopost
Reply With Quote
  #8  
Old 21 Aug 2013, 21:40
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
This exact code works for me...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


In your vBulletin Options -> General Settings -> Thread/Forum Read Marking Type, is it set to Database (automatic forum marking)? It may need to be for this to work.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Thread Enhancements Hide Forum Posts in Activity Stream and Unread Posts Link SnaKe |WiH| vBulletin 4.x Add-ons 4 14 Feb 2014 20:44



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 20:26.

Layout Options | Width: Wide Color: