Previous Thread
Next Thread
Print Thread
Rate Thread
#202753 04/06/2004 11:44 AM
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
Modification Name: VIPHTML

Author(s): Brett

Description: VIPHTML™ allows admins/mods or special people to post html in forums where it is disabled for the average person.

Demo: n/a cp mod

Download Link: https://www.ubbdev.com/ubb/upload/00006378/VIPHtml6.7.txt

Credits: Greg Hard

Shoutouts: Gizzy (2 left wink )

After installation, the forum has to be set to only admins/vips, which is located in the permissions tab on details of each forum. Once this is enabled, admins/megamods/mods are automatically enabled. To enable special regular users, you would need to open each of their profile from the cp, click on the permissions tab, and under the forum list to add them as moderators, there is another forum list to specifically give them privilages to each forum's use of HTML.

This by no way means, that it disables the HTML filter. It still goes through the same checks as before, but only when you put html tags, they actually execute and not print.

Sponsored Links
#202754 04/07/2004 6:10 AM
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
I had some logic errors in the actual checking. Updated TXT file, and the only replacement goes into the one part in ubb_lib_posting.cgi. (So just replace what you had in before with the new one wink )

#202755 04/07/2004 10:52 AM
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Hey, for once I found a bug and it wasn't running on my forum!


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
#202756 04/07/2004 11:58 AM
Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
Great Hack!!!! thumbsup

...but where can I build in new html-tags?


Webmaster of d-talk & Kabel-Forum.com
#202757 04/08/2004 6:28 AM
Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
Why does some html tags not work?


Webmaster of d-talk & Kabel-Forum.com
Sponsored Links
#202758 04/08/2004 6:54 AM
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
The hack doesn't affect the way ubb translates html. If you were to take this hack out, and turn html on, it would do the same thing. What tag are you trying to use?

#202759 04/08/2004 7:00 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
APPLET BODY EMBED FRAME FRAMESET HTML IFRAME LAYER LINK ILAYER META OBJECT SCRIPT STYLE NOSCRIPT NOEMBED NOFRAMES FORM XMP HEAD

That's the list of HTML tags UBB won't process, as well as PHP tags, ASP tags and tags with parenthesis, ( ) in them.

#202760 04/08/2004 7:23 AM
Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
I want to use Ilayer and applet, is ther no chance to build this in?


Webmaster of d-talk & Kabel-Forum.com
#202761 04/08/2004 8:02 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
You can remove ILAYER and APPLET from the list in ubb_lib.cgi, but it's really not recommended if you don't trust the people you let use HTML completely. (open ubb_lib.cgi, search for "ILAYER". you'll see both of them in the same line)

#202762 05/03/2004 3:21 PM
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Brett, one bug I've been getting.

This doesn't take into account $is_html, meaning the you can't use html in other places, like the CP.

Sponsored Links
#202763 05/04/2004 9:57 PM
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
Your right. Well $is_html is just the wording, in a forum with vip, it would say you couldn't still even though you could.

TXT updated. The only changes:
Code
in ubb_lib_posting.cgi

find:

if ($_[0] eq 'is') {

replace with:

if ($_[0] eq 'is' || $_[0] eq 'vip') {

#202764 05/17/2004 4:57 PM
Joined: Dec 2003
Posts: 40
Member
Member
Offline
Joined: Dec 2003
Posts: 40
Uh-oh, I think I found a bug. When I have html in the forum description (a link, for instance), the tags are converted to text-- in other words, I'm ending up with <A HREF="http://www.mydomain.com/">CLICK HERE</A> , where it should be CLICK HERE

--and if I go into the CP and fix it, it changes it right back.

#202765 05/17/2004 5:22 PM
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Quote
Originally posted by Nate:

Uh-oh, I think I found a bug. When I have html in the forum description (a link, for instance), the tags are converted to text-- in other words, I'm ending up with CLICK HERE , where it should be CLICK HERE

--and if I go into the CP and fix it, it changes it right back.
do what Brett said, that'll fix it

#202766 05/23/2004 12:35 PM
Joined: Dec 2003
Posts: 40
Member
Member
Offline
Joined: Dec 2003
Posts: 40
Yes, I had done what Brett said in ubb_lib_posting when I did the initial install, but the problem still occurs. I verified that the mod is installed properly and precisely, also.

I'm putting simple HTML tags (font size, center)in the "Forum Introduction" section in the CP Forum Summary Options.

Sometimes I can get the HTML to stay as HTML for a short while, but after a few posts are made in one of the forums by a VIP using HTML tags, the tags on the main page revert back to text.

#202767 12/20/2005 9:11 PM
Joined: Jan 2003
Posts: 16
Junior Member
Junior Member
Offline
Joined: Jan 2003
Posts: 16
i installed this hack... but how can i do to allow html signatures for admin or authorized members ?

#202768 12/21/2005 2:40 AM
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
I believe an option is added to the editing members section of the control panel


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Aug 2000
Posts: 178
Member
Member
Offline
Joined: Aug 2000
Posts: 178
He is right, there is an issue with this portion

Code


# If HTML is not enabled, disable it

# VIP HTML
my @user_profile = &OpenProfile($user_number);
my @good_forums = split(/\, /, $user_profile[67]) if $user_profile[67];
my $authority_bool = ($user_profile[8] eq 'Administrator' ||
$user_profile[8] eq 'MegaModerator' || $user_profile[8] eq 'Moderator');
my $g = 0;
foreach(@good_forums) {
if($good_forums[$_] eq $_) { $g = 1; last; }
}
if (((($user_profile[67] && $g ne 1) || $authority_bool) && $vars_forums{$in{f}}->[4] eq 'vip') ||
($vars_forums{$in{f}}->[4] eq 'is' && $authority_bool)) {
} else {
$message =~ s/</</g; $message =~ s/>/>/g;
} #end if


If I add that (which allows the actual NO HTML bypass), forum descriptions are fubar'd.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)