Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Modifications    Modification Archive  ›  Enable HTML v1.0 Moderators: 10 Series Support Team
Users Browsing Forum
No Members and 1 Guests

Enable HTML v1.0  This thread currently has 5,470 views. Print
3 Pages 1 2 3 » Recommend Thread
Scottie_Too_Hottie7
March 20, 2005, 1:35pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 217
Gender: Male
Posts Per Day: 0.04
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 28
Would it be possible, for this tag to be added justin

for admins and moderators only (would report an error message if not), you can add a [plcode] and [htmlcode] tag to the bbcode and place real html or perl code to the doc

so like and admin could have something like

[htmlcode]
<script language="JavaScript">
alert("MESSAGE")
</script>
[/htmlcode]

and

[plcode]
print "HELLO";
[/plcode]

And they would work

I know there is a thread about adding buttons, but how would i get it that only admins and moderators have the button, and anyone typing in the bbcode that isn't an admin, it dosen't let them





NOTE : You may notice me not being on these forums for long times on end.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM
Justin
March 20, 2005, 1:53pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.42
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 6 hours
Location: Tallassee, AL
Age: 33
Huh?  You mean where it color codes it?


My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV
Logged Offline
Site Site Private Message Private message Reply: 1 - 41
Scottie_Too_Hottie7
March 20, 2005, 2:32pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 217
Gender: Male
Posts Per Day: 0.04
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 28
No.

If You Use The [htmlcode] tag, rather that formatting the code so it appears as text, it will levae it like normal, so the html (or javascript) will execute.

If You Use The [plcode] tag, It Writes The Code To A tempcode_[i]time[/time].pl File, The Includes The Code Into The Program.

------------------------------------------

Example Of [htmlcode]

Code

[htmlcode]
<script>alert()</script>
[/htmlcode]


A JavaScript Alert Would PopUp, Rather That The Code Being Displaid As Plain Text.

------------------------------------------

Example Of [plcode]

Code

[plcode]
open(ATEXTFILE,'anything.txt');
@infofilelines = <ATEXTFILE>;
close(ATEXTFILE);

foreach $tf_line (@infofilelines) {
print $tf_line;
print "\n";
}
[/plcode]


Would End Up Executing That Perl Code, Which Would Display The Contents Of anything.txt

------------------------------------------

Hope This Isn't Too Complicated To Do.

Remember That If A Normal (non-admin) User Used This Code, Then It Would Discard It.

Thanks.





NOTE : You may notice me not being on these forums for long times on end.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 2 - 41
Ryan
March 20, 2005, 6:41pm Report to Moderator Report to Moderator

Inactive Support Team
Posts: 1,799
Gender: Male
Posts Per Day: 0.32
Reputation: 85.15%
Reputation Score: +86 / -15
Time Online: 11 days 8 hours 2 minutes
Location: Ontario
Age: 40
I know exactly what you mean.  I'd LOVE this feature too... I don't think Justin will ever do it though.  Unless u pay him to make a mod
Logged Offline
Site Site Private Message Private message YIM YIM Reply: 3 - 41
Scottie_Too_Hottie7
March 21, 2005, 10:19am Report to Moderator Report to Moderator

E-Blah Member
Posts: 217
Gender: Male
Posts Per Day: 0.04
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 28
Shame my mum won't let me pay.

I know perl, and could eaisly create the code tags (and the discard method), but the problem is that i would not know how to check if the user is an admin or a moderator. If justin told me the variable, then i might be able to.





NOTE : You may notice me not being on these forums for long times on end.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 4 - 41
Scottie_Too_Hottie7
March 21, 2005, 10:48am Report to Moderator Report to Moderator

E-Blah Member
Posts: 217
Gender: Male
Posts Per Day: 0.04
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 28
Sorry For Double Posting

I Have Managed To Get A Start, But The Code Is Getting Transformed To The HTML Equivelent

EG : < - &lt;

How Would I Stop This Happening If The Code Was Inside The [htmlcode] or [plcode] tag.

--- EDIT ---

Eh!, Just to test the non-admin feature of it, i logged out, registered 'tester' and logged in, i then logged out and in again as the admin, updated 'tester' to a moderator, then logged out. my ip address got blocked ??!??!??!??





NOTE : You may notice me not being on these forums for long times on end.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 5 - 41
Scottie_Too_Hottie7
March 21, 2005, 2:03pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 217
Gender: Male
Posts Per Day: 0.04
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 28
Completed The [htmlcode] Tag

Replace The Unformat Function In Load.pl To This

Code

sub Unformat {
    ($temp) = $_[0];
    $temp =~ s/<br>/\n/g;
    $temp =~ s/&lt;/</g;
    $temp =~ s/&gt;/>/g;
    $temp =~ s/&nbsp; /  /gi;
    $temp =~ s/&amp;/\&/g;
    $temp =~ s/&quot;/\"/g;    
    $temp =~ s/\&#124;/\|/g;    
    return $temp;
}


And Where You See This In Routines.pl

Code

[b]OLD CODE[/b]

    $message =~ s~\[hr\]~<hr size="1" width="100%" color="$color{'border'}">~gsi;
    $message =~ s~\[sub\](.+?)\[/sub\]~<sub>$1</sub>~gsi;
    $message =~ s~\[sup\](.+?)\[/sup\]~<sup>$1</sup>~gsi;
    $message =~ s~\[mail\](.+?)\[/mail\]~<a href="mailto:$1">$1</a>~gsi;
    $message =~ s~\[mail=(.+?)\](.+?)\[/mail\]~<a href="mailto:$1">$2</a>~gsi;
    $message =~ s~\[move\](.+?)\[/move\]~<marquee>$1</marquee>~gsi;


ADD THIS

Code

    # START OF [htmlcode] tag - by scott dennison (Scottie_Too_Hottie7)
    if ($settings[4] eq 'Administrator' || $ismod) {
   while ($message =~ m/\[htmlcode\](.+?)\[\/htmlcode\]/) {
  $htmlcode_tag = "<!-- START OF HTMLCODE //-->";
  $htmlcode_tag .= Unformat($1);
  $htmlcode_tag .= "<!-- END OF HTMLCODE //-->";
  $message =~ s~\[htmlcode\](.+?)\[/htmlcode\]~$htmlcode_tag~gsi;    
   }
    }
    else {
    $message =~ s~\[htmlcode\](.+?)\[/htmlcode\]~<!-- HTMLCODE CANNOT BE USED BY AN ORDIANRY USER //-->~gsi;    
    }    
    # END OF [htmlcode] tag - by scott dennison (Scottie_Too_Hottie7)    


Note This Does Not Add The Button, Just The Code





NOTE : You may notice me not being on these forums for long times on end.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 6 - 41
Justin
March 21, 2005, 2:06pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.42
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 6 hours
Location: Tallassee, AL
Age: 33
That might work.    Actually though, you'll need to use something besides $settings[4], because ... well ... that's just the user reading the message, so any user can add HTML, but only admins could see it.  


My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV
Logged Offline
Site Site Private Message Private message Reply: 7 - 41
Scottie_Too_Hottie7
March 21, 2005, 2:07pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 217
Gender: Male
Posts Per Day: 0.04
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 28
Oops....

What Should I Use

$ismod





NOTE : You may notice me not being on these forums for long times on end.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 8 - 41
Justin
March 21, 2005, 2:56pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.42
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 6 hours
Location: Tallassee, AL
Age: 33
Hmm ....


Well, in the new version, P9, you'll use this:


$members{'Administrator',$user}

In your version:

$userset{$user}->[4] eq 'Administrator'


My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV
Logged Offline
Site Site Private Message Private message Reply: 9 - 41
Scottie_Too_Hottie7
March 21, 2005, 3:07pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 217
Gender: Male
Posts Per Day: 0.04
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 28
What about moderator?





NOTE : You may notice me not being on these forums for long times on end.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 10 - 41
Justin
March 21, 2005, 3:08pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.42
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 6 hours
Location: Tallassee, AL
Age: 33
Umm, I'd have to look at the code for that.    With P9, I believe it's:

$members{'Moderator',$user}

But I'm not sure.  I'd just keep it for Admins.   lol


My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV
Logged Offline
Site Site Private Message Private message Reply: 11 - 41
Scottie_Too_Hottie7
March 21, 2005, 3:13pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 217
Gender: Male
Posts Per Day: 0.04
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 28
OH NO!.

I Incorporated It Into $message To See What It Says For A Moderator.

It Returns Nothing - Even If I Am An Admin

TEST CODE
Code

    $message .= $userset{$user}->[4];
    $message .= "<BR>";





NOTE : You may notice me not being on these forums for long times on end.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 12 - 41
Justin
March 21, 2005, 3:15pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.42
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 6 hours
Location: Tallassee, AL
Age: 33
Eh?  That should show Administrator.  It won't show anything for moderators.  lol


My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV
Logged Offline
Site Site Private Message Private message Reply: 13 - 41
Scottie_Too_Hottie7
March 21, 2005, 3:19pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 217
Gender: Male
Posts Per Day: 0.04
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 28
Go on my site, register.

As i have said, i will make you an admin.

then you can see for yourself.





NOTE : You may notice me not being on these forums for long times on end.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 14 - 41
3 Pages 1 2 3 » Recommend Thread
Print

E-Blah Community    Modifications    Modification Archive  ›  Enable HTML v1.0