Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 07-30-2008, 11:56 PM
Allnick Allnick is offline
 
Join Date: Feb 2006
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default I need a forum with unlimited images

OK...I have a private forum for Admin only.
It is used as a "Post and Edit" forum before moving the post to the members area forums.

Someone here kindly supplied the code to allow Admin to use unrestricted text size in this forum, whilst still limiting the text size to "2" in members forums via ACP. (message posting options).

Actually it's just a style change away really. Find the template called "editor_clientscript" (if you can't find it, do a template look-up using keyword "sizeoptions"). Within that template you'll notice you have the following...
PHP Code:
var sizeoptions = new Array($vBeditJs[size_options_array]);

What you can replace it with is the following. Obviously you'd just put the forum id that's unrestricted rather than what I have. It should look like this...

<if condition="$forumid == 4"> <!-- unrestricted forum id -->
var sizeoptions = new Array(1,2,3,4,5,6,7); <!-- unrestricted sizes -->
<else />
var sizeoptions = new Array($vBeditJs[size_options_array]); <!-- default sizes -->
</if>


I limit the number of Images/Smilies in a post to 4 in members forums.
Can anyone advise how to do the same for images, i.e. allow unrestricted Images in the "Post and Edit" forum for Admin.

Many Thanks.
Reply With Quote
  #2  
Old 07-31-2008, 09:07 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can't users circumvent your restriction by typing in xxxxxxx in the non-admin forum?
Reply With Quote
  #3  
Old 07-31-2008, 02:26 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The variable you are interested in is $vbulletin->options['maximages'] You may be able to create a plugin which sets that variable to '0' (meaning it's disabled) for admins. Perhaps try the global_start location with something along the lines of:
Code:
 if (is_member_of($vbulletin->userinfo, 6))
{
    $vbulletin->options['maximages'] = 0;
}
Reply With Quote
  #4  
Old 08-02-2008, 12:38 AM
Allnick Allnick is offline
 
Join Date: Feb 2006
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, but I really am still learning all this stuff.
Where do I find the global_start location?
And where exactly do I add this code?
Many Thanks
Reply With Quote
  #5  
Old 08-02-2008, 02:10 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

global_start is a hook location. You would find it under Products & Plugins > Add new Plugin

You might want to take a look at the manual and read up on Products & Plugins if you are unfamiliar with them.
Reply With Quote
  #6  
Old 08-02-2008, 06:40 PM
Allnick Allnick is offline
 
Join Date: Feb 2006
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow! I did it, lol.

Thanks again Lynne. That works a treat.:up:

I'll go read the manual now..........
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 02:09 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14323 seconds
  • Memory Usage 2,198KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete