vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   I need a forum with unlimited images (https://vborg.vbsupport.ru/showthread.php?t=186808)

Allnick 07-30-2008 10:56 PM

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.

Opserty 07-31-2008 08:07 AM

Can't users circumvent your restriction by typing in xxxxxxx in the non-admin forum?

Lynne 07-31-2008 01:26 PM

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;
}


Allnick 08-01-2008 11:38 PM

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

Lynne 08-02-2008 01:10 AM

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.

Allnick 08-02-2008 05:40 PM

Wow! I did it, lol.

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

I'll go read the manual now..........


All times are GMT. The time now is 05:38 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01556 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete