PDA

View Full Version : I need a forum with unlimited images


Allnick
07-30-2008, 11:56 PM
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, 09:07 AM
Can't users circumvent your restriction by typing in xxxxxxx in the non-admin forum?

Lynne
07-31-2008, 02: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:
if (is_member_of($vbulletin->userinfo, 6))
{
$vbulletin->options['maximages'] = 0;
}

Allnick
08-02-2008, 12:38 AM
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, 02: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, 06:40 PM
Wow! I did it, lol.

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

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