![]() |
Parsing html for certain members
When a member is replying to a message, the threadbitlist lists out below the replybox with all the posts from that thread. I want to be able to have it parse any html code that is in those message ONLY from the Admins and Supermods who the message belong to. If an Admin or Supermod wrote a message with html, I want to parse the html code so anyone reading it will see it like it should be. But not on anyone else's messages. Does this make any sense? ;)
Here is the code I am using so far and it doesn't quite work right, for some reason. Anyone have any idea what I am doing wrong? PHP Code:
|
it's ok and no security risk, but you have forgotten, that messages are preparsed also, so you have to edit newreply as well :)
|
Where would I out that in the newreply.php to parse the threadlisting below the replybox? And will that code work ok? I have been trying to find the place to put it but can't seem to get it to take. ;)
|
PHP Code:
|
It didn't work there. Any other ideas? :)
|
Hi Boofo!!
I have this goodie installed by Logician and it works like a charm. Its not the same that you want, but maybe it helps you... :)[Link] |
I'm using the hack that only allows Admins and Supermods to use html and no one else. All I'm trying to do is get it to parse the html in the threadreview (the listing of messages below the newreply box when you are replying) for only those messages that belong to the Admins and Supermods. Everyone else's messages I want it to show the actual code and not parse it. And I'm close but not having very much luck. :(
|
oh sorry, i missread something ;)
you have to edit this part: PHP Code:
|
Here's what I have for that piece of code.
PHP Code:
|
change this line:
PHP Code:
PHP Code:
|
and this code:
PHP Code:
PHP Code:
|
LOL I was close. I had already done the bottom code like you showed here. I just didn't have any idea about the posts query part of it. I'm not very good with queries yet. This is almost as bad as not including the $bbuserinfo in the global line for the navbar (the one you helped me with the other day). I don't feel as stupid about this one, though, but almost. :)
Thank you very much, sir. It works great now. ;) |
Stefan, can you tell me why I add this to the query:
user.usergroupid instead of this: post.usergroupid which is what I thought I needed. I'm just curious so maybe I can start to understand this. ;) And, can you use [high]else if[/high] the same way as [high]elseif[/high]? |
AFAIK there is no real difference between elseif and else if...
you have to use user.usergroupid, because the field usergroupid just exists in the user table, not in the post table :) that's why there are these nice join queries ;) |
All times are GMT. The time now is 10:17 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:
|