|
|
Scottie_Too_Hottie7 |
|
|
Posts: 216
Gender:  Male
Posts Per Day: 0.13
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 23 minutes
Age: 17
|
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 |
|
Please Increase My Reputation Remember NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Justin |
|
|
Posts: 15,070
Gender:  Male
Posts Per Day: 6.55
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 14 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 216
Gender:  Male
Posts Per Day: 0.13
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 23 minutes
Age: 17
|
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. |
|
Please Increase My Reputation Remember NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Ryan |
|
|
Posts: 1,799
Gender:  Male
Posts Per Day: 1.14
Reputation: 85.00%
Reputation Score: +85 / -15
Time Online: 11 days 8 hours 2 minutes
Location: Ontario
Age: 29
|
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  |
| Read about Canada's Holocaust "Hidden from History" - http://www.ryanpaul.ca/canadas-holocaust/ |
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 216
Gender:  Male
Posts Per Day: 0.13
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 23 minutes
Age: 17
|
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. |
|
Please Increase My Reputation Remember NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 216
Gender:  Male
Posts Per Day: 0.13
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 23 minutes
Age: 17
|
Sorry For Double Posting
I Have Managed To Get A Start, But The Code Is Getting Transformed To The HTML Equivelent
EG : < - <
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 ??!??!??!?? |
|
Please Increase My Reputation Remember NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 216
Gender:  Male
Posts Per Day: 0.13
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 23 minutes
Age: 17
|
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/</</g; $temp =~ s/>/>/g; $temp =~ s/ / /gi; $temp =~ s/&/\&/g; $temp =~ s/"/\"/g; $temp =~ s/\|/\|/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 |
|
Please Increase My Reputation Remember NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Justin |
|
|
Posts: 15,070
Gender:  Male
Posts Per Day: 6.55
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 14 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 216
Gender:  Male
Posts Per Day: 0.13
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 23 minutes
Age: 17
|
Oops....
What Should I Use
$ismod |
|
Please Increase My Reputation Remember NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Justin |
|
|
Posts: 15,070
Gender:  Male
Posts Per Day: 6.55
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 14 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 216
Gender:  Male
Posts Per Day: 0.13
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 23 minutes
Age: 17
|
What about moderator? |
|
Please Increase My Reputation Remember NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Justin |
|
|
Posts: 15,070
Gender:  Male
Posts Per Day: 6.55
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 14 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 216
Gender:  Male
Posts Per Day: 0.13
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 23 minutes
Age: 17
|
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>";
|
|
|
|
Please Increase My Reputation Remember NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Justin |
|
|
Posts: 15,070
Gender:  Male
Posts Per Day: 6.55
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 14 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 216
Gender:  Male
Posts Per Day: 0.13
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 23 minutes
Age: 17
|
Go on my site, register.
As i have said, i will make you an admin.
then you can see for yourself. |
|
Please Increase My Reputation Remember NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
|