Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 02 Apr 2012, 13:41
LOGECT's Avatar
LOGECT LOGECT is offline
 
Join Date: Jun 2010
vBCMS - Detect articles in section X

Hello

I would like to use some different style/lang for my articles in section for example X than Y, so i need to separate them, the only way i find was the following code and the problem is that i have to writ the $_GET['r'] == x manually for every each article.
I believe that there should be a way to detect all articles in section X instant of writing the numbers manually.

Any help would be great.
Thank you


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

__________________
LOGECT
Reply With Quote
  #2  
Old 03 Apr 2012, 11:54
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004

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

Depending on your requirement, one of these, called from any of the vbcms_article_populate_* hooks, should get you what you're looking for.
Reply With Quote
  #3  
Old 03 Apr 2012, 21:42
LOGECT's Avatar
LOGECT LOGECT is offline
 
Join Date: Jun 2010
Originally Posted by Dead Eddie View Post
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Depending on your requirement, one of these, called from any of the vbcms_article_populate_* hooks, should get you what you're looking for.
Thanks for your reply, it doesn't work for me, i'v also followed this thread at vb.com:
https://www.vbulletin.com/forum/show...in-plugin-code
__________________
LOGECT
Reply With Quote
  #4  
Old 03 Apr 2012, 21:47
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
What specifically doesn't work? Can you post some sample code, along with which hook you're putting it in, what you expect to see, and what you're seeing?
Reply With Quote
  #5  
Old 03 Apr 2012, 21:55
LOGECT's Avatar
LOGECT LOGECT is offline
 
Join Date: Jun 2010
I have created a plugin with hook location vbcms_article_populate_end and this code:


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

Then I have a plugin with hook location init_startup:


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

I've also tried this with 2 plugins.
__________________
LOGECT

Last edited by LOGECT; 04 Apr 2012 at 11:37.
Reply With Quote
  #6  
Old 04 Apr 2012, 14:47
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
Whoops! That's not going to work! init_startup is called a little to early. I'd wager $sectionid isn't available either.

I have an idea on how to do this...I'll take another quick look tonight.
Reply With Quote
Reply



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 17:18.

Layout Options | Width: Wide Color: