Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
I've noticed there was no hack for 6.3.1 to add extra mods, I've created one.
Just wondering if its worth me posting the code, does anyone else want it ?

Cheers


I can't afford a good signature editor frown
Sponsored Links
Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
I'd personally love it....

Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Sorry I have nowhere to host the file so I'll just post the changes below. Let me now how you go.

Code
Open cp_vars_mods.pl

--------------
Find :
--------------
chomp($mods[0]);
chomp($mods[1]);
chomp($mods[2]);
chomp($mods[3]);

for (0..3) {
$mods[$_] = '' unless (defined($mods[$_]));
}

--------------
Replace With :
--------------

$Num_of_Mod = 12;
$Num_of_Mod_Cnt = 0;

for (0..11) {
chomp($mods[$_]);
$mods[$_] = '' unless (defined($mods[$_]));
}

--------------
Find :
--------------
if (($mods[0] ne '') && (&FileExists("$vars_config{MembersPath}/$mods[0].cgi"))) {
@user_profile = &OpenProfile("$mods[0]");
chomp($user_profile[0]);
chomp($user_profile[15]);
if ($user_profile[15] ne '') {
$display_name[0] = $user_profile[15];
} else {
$display_name[0] = $user_profile[0];
}
} else {
$mods[0] = '';
}

if (($mods[1] ne '') && (&FileExists("$vars_config{MembersPath}/$mods[1].cgi"))) {
@user_profile = &OpenProfile("$mods[1]");
chomp($user_profile[0]);
chomp($user_profile[15]);
if ($user_profile[15] ne '') {
$display_name[1] = $user_profile[15];
} else {
$display_name[1] = $user_profile[0];
}
} else {
$mods[1] = '';
}


if (($mods[2] ne '') && (&FileExists("$vars_config{MembersPath}/$mods[2].cgi"))) {
@user_profile = &OpenProfile("$mods[2]");
chomp($user_profile[0]);
chomp($user_profile[15]);
if ($user_profile[15] ne '') {
$display_name[2] = $user_profile[15];
} else {
$display_name[2] = $user_profile[0];
}
} else {
$mods[2] = '';
}

if (($mods[3] ne '') && (&FileExists("$vars_config{MembersPath}/$mods[3].cgi"))) {
@user_profile = &OpenProfile("$mods[3]");
chomp($user_profile[0]);
chomp($user_profile[15]);
if ($user_profile[15] ne '') {
$display_name[3] = $user_profile[15];
} else {
$display_name[3] = $user_profile[0];
}
} else {
$mods[3] = '';
}
--------------
Replace With :
--------------
while ($Num_of_Mod_Cnt < $Num_of_Mod) {
if (($mods[$Num_of_Mod_Cnt] ne '') && (&FileExists("$vars_config{MembersPath}/$mods[$Num_of_Mod_Cnt].cgi"))) {
@user_profile = &OpenProfile("$mods[$Num_of_Mod_Cnt]");
chomp($user_profile[0]);
chomp($user_profile[15]);
if ($user_profile[15] ne '') {
$display_name[$Num_of_Mod_Cnt] = $user_profile[15];
} else {
$display_name[$Num_of_Mod_Cnt] = $user_profile[0];
}
} else {
$mods[$Num_of_Mod_Cnt] = '';
}
$Num_of_Mod_Cnt++;
}

--------------
Find :
--------------
<table border="0" bgcolor="$vars_style_cp{AltColumnColor1}">
<tr><td class="smallrow">
$display_name[0]
</td>
<td class="smallrow">
$display_name[1]
</td>
<td class="smallrow">
$display_name[2]
</td>
<td class="smallrow">
$display_name[3]
</td>
</tr>

<tr><td class="smallrow">
<input type="text" name="1NewMod$check[8]" value="$mods[0]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="2NewMod$check[8]" value="$mods[1]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="3NewMod$check[8]" value="$mods[2]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="4NewMod$check[8]" value="$mods[3]" size="20" maxlength="30">
</td>
</tr>
</table>


</td>
</tr>
--------------
Replace With :
--------------
<table border="0" bgcolor="$vars_style_cp{AltColumnColor1}">
<tr><td class="smallrow">
$display_name[0]
</td>
<td class="smallrow">
$display_name[1]
</td>
<td class="smallrow">
$display_name[2]
</td>
<td class="smallrow">
$display_name[3]
</td>
<td class="smallrow">
$display_name[4]
</td>
<td class="smallrow">
$display_name[5]
</td>
</tr>
<tr><td class="smallrow">
<input type="text" name="1NewMod$check[8]" value="$mods[0]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="2NewMod$check[8]" value="$mods[1]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="3NewMod$check[8]" value="$mods[2]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="4NewMod$check[8]" value="$mods[3]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="5NewMod$check[8]" value="$mods[4]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="6NewMod$check[8]" value="$mods[5]" size="20" maxlength="30">
</td>
</tr>

<tr>
<td class="smallrow">
$display_name[6]
</td>
<td class="smallrow">
$display_name[7]
</td>
<td class="smallrow">
$display_name[8]
</td>
<td class="smallrow">
$display_name[9]
</td>
<td class="smallrow">
$display_name[10]
</td>
<td class="smallrow">
$display_name[11]
</td>
</tr>

<tr>
<td class="smallrow">
<input type="text" name="7NewMod$check[8]" value="$mods[6]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="8NewMod$check[8]" value="$mods[7]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="9NewMod$check[8]" value="$mods[8]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="10NewMod$check[8]" value="$mods[9]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="11NewMod$check[8]" value="$mods[10]" size="20" maxlength="30">
</td>
<td class="smallrow">
<input type="text" name="12NewMod$check[8]" value="$mods[11]" size="20" maxlength="30">
</td>


</tr>
</table>


</td>
</tr>


I can't afford a good signature editor frown
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
You mean like this?

click here

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
You said there "choices are good" wink

Bass, in chomp(), you chomped only the 9 first, it should be until 11.

X, yours probably works well with 6.3.x, but it only looks fine in 6.3.0 because 6.3.1 has a new look for CP tipsy

Sponsored Links
Joined: Oct 2001
Posts: 24
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 24
cool, nice

Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
LK, thanks I missed that, I've edited my post above, and included the chomp in the while loop.

Cheers


I can't afford a good signature editor frown
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Nice mod, the more mods can be useful. smile

Off topic, did you upgrade from v5 BassTeQ?

Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Thanks Lord D.
Im still on version v5, but im doing some work on a board that is using v6, this is my first hack for the v6 series so hopefully I'll be able to start working on some more. Ive stopped creating v5 ones as I think that version has had its day, still a good board but I dont want to hack it any more.

Cheers mate.


I can't afford a good signature editor frown
Joined: Sep 2002
Posts: 6
Junior Member
Junior Member
Offline
Joined: Sep 2002
Posts: 6
I put this in -- and it seems to work -- only problem is that when it brings up the moderators page in 6.3.1 -- it doesn't lists ANY of the names from the vars_mods.cgi file even though they are there...

So.. it basically rewrites the entire file each time.. and doesn't save your previous moderator adds.. Make sense?

Any thoughts on this?

Sponsored Links
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Hrmmm, are you using 6.3.1.1 ?
I've just checked mine and it does list the mod names above the input text box which contains the members number, it loads any mods that already exist in the vars_mod.cgi.

Does it list any mod details when the page loads ?


I can't afford a good signature editor frown
Joined: Sep 2002
Posts: 6
Junior Member
Junior Member
Offline
Joined: Sep 2002
Posts: 6
My fault... I accidently deleted a line... works greats.. I actually edited the code a bit and made it allow 20 mods....

Thanks again for the great hack

Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Np's enjoy!


I can't afford a good signature editor frown
Joined: Sep 2002
Posts: 6
Junior Member
Junior Member
Offline
Joined: Sep 2002
Posts: 6
Ughhhh---

BassTeq -- I just noticed a problem -- I installed this hack and I thought it was working great -- but I just noticed in my forum that the "Ip Logging" is now missing and the reply with quote icon is missing.

Just so you will know -- I modified this script to allow 30 moderators per forum and am not sure sure if this possibly had something to do with it?

Looking forward to hearing your reply.. kind of in a jam here!

Michael

Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Hi Michael, this hack only works with 1 file used by the CP, the reason you're IP logged, Quote buttons aren't working cannot be related to the changes made by this hack. Did you install any other hack by chance ? Id say that you may have made a mistake when adding another hack.

Cheers


I can't afford a good signature editor frown

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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
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)