![]() |
HTML allowed for certain groups
Would like to see a hack to allow only admins (by group or user ID) to post HTML in threads with VB3.
-W596 |
I'd also like something like this, but I need to be able to just let one user do it who is not an admin or moderator. At the mo I keep having to enable/disable html in the forum for when he posts his league tables from excel!! :-)
|
This may work, tested it and it worked, but I'd test it first to be sure. :)
Open /includes/functions_showthread.php Find PHP Code:
PHP Code:
To make it for just one person, all I'd think you have to do is change: PHP Code:
PHP Code:
Change X to the user's ID you're wanting. This was not my work, as I used two other hacks from vB2 to figure this out. Entourage and Palmer ofShinra are the original creators of this hack. |
Thanks Scrub, I'll give this a try. ;)
|
what changes would be nessary for multiple groups and or individuals?
eg 2 groups + 2 individuals |
Quote:
|
Quote:
Change PHP Code:
PHP Code:
If you'd like it for just cerrtain users. Change: PHP Code:
PHP Code:
I've tested it and it works, but I suggest you test it first before actually making it live. :). I am unsure how to make it so you can have both a usergroup and a certain member to be able to use it. But I will play around with it some more later on today and see what I can come up with. And BarHopper, this is not my creation to release. :) Before someone says why not use is_member_of, I tried it and couldn't figure it out. :p |
Thanks Scrub, it worked.
|
Hey thanks a lot!
Worked for me, exactly what I needed. I used the array so that in the future, I can add more people as I decide who can post html. This is a no-brainer modification! |
Damn! This works like a charm on 3.0.3...
It says though, "HTML Code is OFF" though under my tag. Still allows me to post in HTML which is cool!!!!!!! |
Awesome :beard: :lick: <installed>
|
But what happens when somebody (that isn't allowed to use html) quotes a post of an admin?
|
Yes, works fine. Can someone tell me what I have to change if I want the same thing for user signatures? So that only one usergroup (admins for example) can use HTML, but users not
|
I found a problem with this...
All the HTML is displayed properly in the actual thread itself however, when I user (administrator or not) goes to reply, all the HTML code is shown in the 'Topic Review' area. Is there anyway to fix this??? |
Yes, that's right... I got the same thing if I try that...
the HTML-code isn't parsed in the thread review... I think you have to change on both things for the review and for the signatures a place in the code that is similiar to this example... But where? |
Quote:
Please... does anyone have a fix for this??? Thanks :) |
Thanks. Installed on my forum. The one thing that I noticed was that it posted the html wonderfully on my forum but when the post fed into my portal (vbadvanced) the html would not post correctly. For now, I just redirected the post to a forum that doesn't feed into the portal. Otherwise, all works great! Thanks for the help. I will check back for any updates.
|
Here's my version. It should work everywhere BBCode is parsed and the post array is $post (which should be everywhere you actually post).
In includes/functions_bbcodeparse.php, find this: PHP Code:
PHP Code:
|
Link,
I tried using your code above but it isn't working on my forums. I took out the code I had originally placed from the original posts. Does that need to be in place as well? |
Quote:
Either way, it works for me. HTML is off in the forum and is still parsing on my dev board. |
Quote:
|
At my board the version of Link14716 is working and better... HTML in signatures is now also only allowed for admins, yet that what I wanted first, thanks Link:)
But html code in quotes of normal users, in the signature editor preview (low priority, because only admins can't see their html-code in the preview, for users it's correcly not parsed as it should be if html is disabled and ok so) and in the Topic Review area isn't still parsed... |
For some reason Link's solution doesn't work unless I use if ($post['usergroupid'] == 0), but I am definately an admin.. no other value works.
|
Link, thanks very much for that simple solution.
Question for anyone: is there any easy way to modify that code so it works using say, the number of posts the user has? I'm still kind of new to this. :) Thanks. Charles |
Perhaps a simpler question.. is there a way to have this work based on a secondary usergroup rather than the primary?
Thanks... Charles |
Quote:
Foolish me was looking at doing this in a different way before I found this thread... This is an AWSOME hack and it is working great for me on two of my vBulletin installs! |
how come this affects other BB code tags? I have a [showtogroups] tag that now isnt displayed because of this
|
Anyone who modded this for vB 3.5.0?
|
All times are GMT. The time now is 03:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|