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 2 Guests

Enable HTML v1.0  This thread currently has 5,366 views. Print
3 Pages « 1 2 3 » Recommend Thread
Ryan
March 21, 2005, 4:56pm Report to Moderator Report to Moderator

Inactive Support Team
Posts: 1,799
Gender: Male
Posts Per Day: 0.33
Reputation: 85.15%
Reputation Score: +86 / -15
Time Online: 11 days 8 hours 2 minutes
Location: Ontario
Age: 40
Did you get this mod working?
Logged Offline
Site Site Private Message Private message YIM YIM Reply: 15 - 41
Scottie_Too_Hottie7
March 22, 2005, 3:06am 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
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.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 16 - 41
Justin
March 22, 2005, 10:38am Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.45
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 5 hours 58 minutes
Location: Tallassee, AL
Age: 32
It won't work in the preview, heh.  Only on MessageDisplay pages.  


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: 17 - 41
Scottie_Too_Hottie7
March 22, 2005, 12:29pm 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
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.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 18 - 41
Justin
March 22, 2005, 1:28pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.45
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 5 hours 58 minutes
Location: Tallassee, AL
Age: 32
Not now.  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: 19 - 41
Scottie_Too_Hottie7
March 22, 2005, 2: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
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.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 20 - 41
Justin
March 22, 2005, 2:23pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.45
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 5 hours 58 minutes
Location: Tallassee, AL
Age: 32
Well, you can edit Post.pl, and in the Preview sub, just add $username.  OR you can add right before the code in Routines.pl, if($user eq '') { $user = $username; }


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: 21 - 41
Scottie_Too_Hottie7
March 22, 2005, 4:28pm 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
$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.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 22 - 41
Justin
March 22, 2005, 4:39pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.45
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 5 hours 58 minutes
Location: Tallassee, AL
Age: 32
Oh ... and after the if statement, do a loaduser($user).  


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: 23 - 41
Scottie_Too_Hottie7
March 23, 2005, 3:23am 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
i will try it





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: 24 - 41
Scottie_Too_Hottie7
March 23, 2005, 3:42am 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
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 : hello
Normal 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.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 25 - 41
Scottie_Too_Hottie7
March 23, 2005, 12:05pm 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
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.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 26 - 41
Scottie_Too_Hottie7
March 23, 2005, 2:52pm 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
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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="checkbox" name="postafterfix" id="postafterfix">
&nbsp;&nbsp;
$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.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 27 - 41
Scottie_Too_Hottie7
March 26, 2005, 3:28am 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
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.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 28 - 41
Scottie_Too_Hottie7
March 28, 2005, 2:58pm 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
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.
Logged Offline
Private Message Private message YIM YIM Windows Live Messenger WLM Reply: 29 - 41
3 Pages « 1 2 3 » Recommend Thread
Print

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