|
|
Ryan |
|
|
Posts: 1,799
Gender:  Male
Posts Per Day: 0.65
Reputation: 85.15%
Reputation Score: +86 / -15
Time Online: 11 days 8 hours 2 minutes
Location: Ontario
Age: 32
|
Did you get this mod working? |
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
Just got to get the 'admin and moderators only' bit working
---EDIT--- After a bit more inspection, i have found out two problems
* $user is sometimes not defined ($username is) * i have tried using both of $userset{$user}->[4] and $userset{$username}->[4] - They return nothing when previewing |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Justin |
|
|
Posts: 15,196
Gender:  Male
Posts Per Day: 4.37
Reputation: 93.25%
Reputation Score: +304 / -22
Time Online: 37 days 19 hours 48 minutes
Location: Tallassee, AL
Age: 25
|
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
Justin, If I Give You The Code. Will You Contiune [htmlcode] and do [plcode]. Please? (huh)   |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Justin |
|
|
Posts: 15,196
Gender:  Male
Posts Per Day: 4.37
Reputation: 93.25%
Reputation Score: +304 / -22
Time Online: 37 days 19 hours 48 minutes
Location: Tallassee, AL
Age: 25
|
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
Well please could you atleast do 1 thing.
let the $userset{}->[4] thing be accessible when previewing.
I will do the rest. Without that, it is almost impossible |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Justin |
|
|
Posts: 15,196
Gender:  Male
Posts Per Day: 4.37
Reputation: 93.25%
Reputation Score: +304 / -22
Time Online: 37 days 19 hours 48 minutes
Location: Tallassee, AL
Age: 25
|
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
$username and $user is already defined the problem is that $userset is not available |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Justin |
|
|
Posts: 15,196
Gender:  Male
Posts Per Day: 4.37
Reputation: 93.25%
Reputation Score: +304 / -22
Time Online: 37 days 19 hours 48 minutes
Location: Tallassee, AL
Age: 25
|
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
i will try it |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
Modified It. One problem - The Posting (And Previewing) Now Works. The only problem is that only if the person viewing the message is an admin, it will work properly
EXAMPLE Admin has posted : [htmlcode]<B>hello</B>[/htmlcode] Admin sees : helloNormal User sees : <B>hello</B>
Here Is The Code Now
|
Code
# START OF [htmlcode] tag - by scott dennison (Scottie_Too_Hottie7) $user = $username; loaduser($user); # $message .= "_ABC_"; # $message .= $userset{$user}->[4]; # $message .= "_DEF"; if ($userset{$user}->[4] eq 'Administrator') { 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 { if ($message =~ m/\[htmlcode\](.+?)\[\/htmlcode\]/) { $error = "ONLY ADMINS AND MODERATORS ARE ALLOWED TO USE THE [htmlcode] TAG"; $message =~ s~\[htmlcode\](.+?)\[/htmlcode\]~$1~gsi; } } # END OF [htmlcode] tag - by scott dennison (Scottie_Too_Hottie7)
|
|
NOTE : The 3 lines that are commented out are a $userset tester - to see if it was defined properly |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
I think i might have a way, but i will need a lot of help.
I check if it is on the preview/post page or on the messagedisplay page.
If on the preview/post page, then the user loaded is - the user If on the messagedisplay page, then the user loaded is - the author |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
|
Code
# START OF [htmlcode] tag - by scott dennison (Scottie_Too_Hottie7) if (lc($URL{'v'}) eq "post") { loaduser($username); if ($userset{$username}->[4] eq 'Administrator') { 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 { if ($message =~ m/\[htmlcode\](.+?)\[\/htmlcode\]/) { $md100 = $messagedisplay[100]; $md101 = $messagedisplay[101]; $md102 = $messagedisplay[102]; $md103 = $messagedisplay[103]; $error = <<"EOT"; <script language="JavaScript"> function htmlcode_fix(dopost) { var them = msend.message.value; while(them.indexOf('[htmlcode]') != -1) { them = them.replace("[htmlcode]",""); } while(them.indexOf('[/htmlcode]') != -1) { them = them.replace("[/htmlcode]",""); } msend.message.value = them; if (dopost) { msend.submit.click(); } else { alert("$md103"); } } </script>
<center> $md100 <BR> <button class=button onclick='htmlcode_fix(postafterfix.checked)'>$md101</button> <input type="checkbox" name="postafterfix" id="postafterfix"> $md102 </center> EOT
$message =~ s~\[htmlcode\](.+?)\[/htmlcode\]~$1~gsi; } } } else { 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; } } # END OF [htmlcode] tag - by scott dennison (Scottie_Too_Hottie7)
|
|
There are two problems with this.
- if the user clicks post, then it skips straight past and [htmlcode] tags are used.
- although i have modified messagedisplay.lng (See Below), $md100,$md101,$md102 and $md103, do not contain any values
Addon To MessageDisplay.lng
|
Code
# HTMLCODE BBCODE $messagedisplay[100] = "ONLY ADMINS ARE ALLOWED TO USE THE [htmlcode] TAG"; $messagedisplay[101] = "Fix bbcode Errors"; $messagedisplay[102] = "Post After Fix?"; $messagedisplay[103] = "Removed [htmlcode] Tags";
|
|
Someone Please Help???  |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
I NEED HELP.
IF ANYONE CANNOT HELP WITH THEESE REMAINING ISSUES. THEN THEESE 2 TAGS WILL HAVE TO BE CANCELED |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
Scottie_Too_Hottie7 |
|
|
Posts: 217
Gender:  Male
Posts Per Day: 0.07
Reputation: 76.92%
Reputation Score: +10 / -3
Time Online: 1 days 10 hours 37 minutes
Age: 20
|
i have uncancelled the [htmlcode] project.
i have found out - with just moving the two pieces of code to different files, [htmlcode] will work
Justin says [plcode] will be a bit risky, so i do not know wether to do the [plcode] tag |
|
NOTE : You may notice me not being on these forums for long times on end. |
|
|
|
|
|
|