Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #106  
Old 25 Aug 2010, 15:15
tech4c tech4c is offline
 
Join Date: Jan 2009
Real name: Homoud
thanks
Reply With Quote
  #107  
Old 25 Aug 2010, 20:24
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by ICannt.org View Post
So in the template FORUMDISPLAY I've done this:

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

Except it isn't working, is there something I'm missing by some chance?

Cheers.
I don't know if "$show['newthreadlink']" works in forumdisplay but if it does you're better off using an AND statement than two IF's...


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
  #108  
Old 28 Aug 2010, 07:37
ICannt.org ICannt.org is offline
 
Join Date: Jan 2010
Hello,
The "$show['newthreadlink']" was in forumdisplay to begin with, I just added the array bit.

I tried what you gave, yet it still didn't hide the New thread button from display :/
Reply With Quote
  #109  
Old 28 Aug 2010, 14:39
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
What exactly are you trying to do- I know hide "New Thread" but under what conditions?
__________________
-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
  #110  
Old 29 Aug 2010, 04:10
ICannt.org ICannt.org is offline
 
Join Date: Jan 2010
Essentially, we've got Easy Forms installed and we want users to only be able to submit a form on particular forums so they can follow a pre-defined template instead of being able to post whatever they want.
I've got a "Notice" on the forums saying with a bit of text, including a link to the needed form, but I know of no other way to hide the "New Thread" button.

I originally tried simply taking away permissions for Registered Users to Create New Threads, but then that wouldn't let them upload attachments to the form - which is a necessity.

If you know of any other way to do this, that would be greatly appreciated.
Reply With Quote
  #111  
Old 29 Aug 2010, 17:58
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Hmmm... you could force users to use a specific style for that forum, and in that style you could remove the code for the new thread button completely... but that seems overkill... the IF condition should work... I'm surprised it's not.
__________________
-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
  #112  
Old 31 Aug 2010, 23:32
ICannt.org ICannt.org is offline
 
Join Date: Jan 2010
I was surprised it didn't work either, unless there's something I might have missed?
Reply With Quote
  #113  
Old 02 Sep 2010, 09:37
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Real name: Wayne
Originally Posted by ICannt.org View Post
Essentially, we've got Easy Forms installed and we want users to only be able to submit a form on particular forums so they can follow a pre-defined template instead of being able to post whatever they want.
I've got a "Notice" on the forums saying with a bit of text, including a link to the needed form, but I know of no other way to hide the "New Thread" button.

I originally tried simply taking away permissions for Registered Users to Create New Threads, but then that wouldn't let them upload attachments to the form - which is a necessity.

If you know of any other way to do this, that would be greatly appreciated.
You can make a plugin so that if the "New Thread" button is used it generates your form.

Hook Location: newthread_start
Two examples in the code below - (change the forum ID numbers and the form addresses)

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

Reply With Quote
  #114  
Old 03 Sep 2010, 01:46
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Real name: Paul
I want a user to be able to disable and enable a plugin that starts:

if ($vbulletin->options['mob_detect_enabled'] == 1)

So, I've created a profile field (for a setting) and I want to use this conditional inside the plugin so that ordinary members can disable it (it uses the style_fetch hook).

I think I need to add something like this at the top of the plugin, but in php ...


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

Can anyone tell me how I write the same thing in PHP to get it to work?

Last edited by moonclamp; 03 Sep 2010 at 02:09.
Reply With Quote
  #115  
Old 03 Sep 2010, 02:48
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Try


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
  #116  
Old 03 Sep 2010, 05:17
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Real name: Paul
No that didn't do it ... but that may be down to my lack of php understanding.
Reply With Quote
  #117  
Old 03 Sep 2010, 14:38
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Yeah the problem is the $bbuserinfo - there are various ways to access the same data, different ways work in different places... it may be something like $vboptions->bbuserinfo['fieldX'] or even $this->registry->bbuserinfo['fieldX'] but honestly I'm not sure of the exact syntax off hand, if you search around for it you should be able to find one that works, that's what I usually do.
__________________
-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
  #118  
Old 03 Sep 2010, 15:18
XLCR GODFATHER XLCR GODFATHER is offline
 
Join Date: Mar 2010
try


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

worked for me
Reply With Quote
  #119  
Old 03 Sep 2010, 16:54
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Real name: Paul
Originally Posted by BirdOPrey5 View Post
it may be something like $vboptions->bbuserinfo['fieldX']
I tried that one to no avail.
Originally Posted by BirdOPrey5 View Post
or even $this->registry->bbuserinfo['fieldX']
I'll have a go with the above a bit later (when nobody is on my site), thanks

Originally Posted by XLCR GODFATHER View Post
try


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

worked for me
Already tried that, and unfortunately it didn't do it.
Reply With Quote
  #120  
Old 04 Sep 2010, 05:58
ICannt.org ICannt.org is offline
 
Join Date: Jan 2010
Originally Posted by midnz View Post
You can make a plugin so that if the "New Thread" button is used it generates your form.
This worked!

Thanks to the people who helped, greatly appreciated.
Reply With Quote
Reply



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

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 21:12.

Layout Options | Width: Wide Color: