Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 05:22 am EST
Geeklog Forums
forum moderator hack
Page navigation
G
Anonymous
Would love to see this. Thanks for doing it.
37
38
Quote
Status: offline
hidden
Forum User
Chatty
Registered: 11/13/03
Posts: 51
so here it is. this is a very dirty hack...
edit forum/index.php
look for this block of code
if ($posts > 0) {
$modsql = DB_query("SELECT * FROM {$_TABLES['gf_moderators']} WHERE mod_forum='{$B['forum_id']}'");
$moderatorcnt = 1;
while($showmods = DB_fetchArray($modsql)) {
$modquery = DB_numRows($modsql);
if($modquery < 1) {
$moderators = $LANG_GF01['no_one'];
} else {
if($moderatorcnt == 1) {
$moderators .= $showmods['mod_username'];
} else {
$moderators .= ", {$showmods['mod_username']}";
}
$moderatorcnt++;
}
}
edit or replace that code with this one
if ($posts > 0) {
$modsql = DB_query("SELECT * FROM {$_TABLES['gf_moderators']} WHERE mod_forum='{$B['forum_id']}'");
$moderatorcnt = 1;
$moderators="";
while($showmods = DB_fetchArray($modsql)) {
$modquery = DB_numRows($modsql);
if($modquery < 1) {
$moderators = $LANG_GF01['no_one'];
} else {
$modusers = DB_query("SELECT * FROM {$_TABLES['users']} WHERE username='{$showmods['mod_username']}'");
$moderatorid=DB_fetchArray($modusers);
if($moderatorcnt == 1) {
$moderators .= $showmods['mod_username'];
$moderators = '<A HREF="' .$_CONF['site_url'] .'/users.php?mode=profile&uid=' .$moderatorid['uid']. '">' .$moderators . '</a>';
} else {
$moderators .= '<A HREF="' .$_CONF['site_url'] .'/users.php?mode=profile&uid=' .$moderatorid['uid']. '">' . ", {$showmods['mod_username']}" . '</a>';
}
$moderatorcnt++;
}
$forumlisting->set_var ('moderator', $moderators);
}
look for this line and comment it
please inform me of any feedbacks.
edited(2004-08-18 )
we are just shadows of our hidden identities
edit forum/index.php
look for this block of code
Text Formatted Code
if ($posts > 0) {
$modsql = DB_query("SELECT * FROM {$_TABLES['gf_moderators']} WHERE mod_forum='{$B['forum_id']}'");
$moderatorcnt = 1;
while($showmods = DB_fetchArray($modsql)) {
$modquery = DB_numRows($modsql);
if($modquery < 1) {
$moderators = $LANG_GF01['no_one'];
} else {
if($moderatorcnt == 1) {
$moderators .= $showmods['mod_username'];
} else {
$moderators .= ", {$showmods['mod_username']}";
}
$moderatorcnt++;
}
}
edit or replace that code with this one
Text Formatted Code
if ($posts > 0) {
$modsql = DB_query("SELECT * FROM {$_TABLES['gf_moderators']} WHERE mod_forum='{$B['forum_id']}'");
$moderatorcnt = 1;
$moderators="";
while($showmods = DB_fetchArray($modsql)) {
$modquery = DB_numRows($modsql);
if($modquery < 1) {
$moderators = $LANG_GF01['no_one'];
} else {
$modusers = DB_query("SELECT * FROM {$_TABLES['users']} WHERE username='{$showmods['mod_username']}'");
$moderatorid=DB_fetchArray($modusers);
if($moderatorcnt == 1) {
$moderators .= $showmods['mod_username'];
$moderators = '<A HREF="' .$_CONF['site_url'] .'/users.php?mode=profile&uid=' .$moderatorid['uid']. '">' .$moderators . '</a>';
} else {
$moderators .= '<A HREF="' .$_CONF['site_url'] .'/users.php?mode=profile&uid=' .$moderatorid['uid']. '">' . ", {$showmods['mod_username']}" . '</a>';
}
$moderatorcnt++;
}
$forumlisting->set_var ('moderator', $moderators);
}
look for this line and comment it
Text Formatted Code
$forumlisting->set_var ('moderator', sprintf($LANG_GF01['MODERATED'],$moderators));please inform me of any feedbacks.
edited(2004-08-18 )
we are just shadows of our hidden identities
23
33
Quote
Status: offline
trenchteam
Forum User
Regular Poster
Registered: 06/08/04
Posts: 89
What do you mean by uncomment? Delete it? I get an sql error when i attempted this, and had to replace the file with my backup.
40
31
Quote
Status: offline
hidden
Forum User
Chatty
Registered: 11/13/03
Posts: 51
Quote by trenchteam: What do you mean by uncomment? Delete it? I get an sql error when i attempted this, and had to replace the file with my backup.
sorry! i mean comment it out.
you have to comment it out because we've already set that variable above, inside the loop.
this line..
Text Formatted Code
$forumlisting->set_var ('moderator', $moderators);we are just shadows of our hidden identities
33
32
Quote
Status: offline
trenchteam
Forum User
Regular Poster
Registered: 06/08/04
Posts: 89
I keep getting sql errors
32
41
Quote
Status: offline
trenchteam
Forum User
Regular Poster
Registered: 06/08/04
Posts: 89
table prefix? Changes? Im not sure what you mean by this?
31
34
Quote
Status: offline
hidden
Forum User
Chatty
Registered: 11/13/03
Posts: 51
gf_moderators -> that GF there... that's what i mean. have you tried recomparing the code that i posted here and the one that is in your index.php?
try looking at your error.log and check whats the exact error.
we are just shadows of our hidden identities
try looking at your error.log and check whats the exact error.
we are just shadows of our hidden identities
35
34
Quote
Status: offline
trenchteam
Forum User
Regular Poster
Registered: 06/08/04
Posts: 89
This is the index php in the forum folder in the public file right?
36
31
Quote
Status: offline
Robin
Forum User
Full Member
Registered: 02/15/02
Posts: 725
Hi.
Which forum version is this hack designed for? I'm asking because the code you posted is slightly different from the code in 2.3. Anyhow I applied it to index.php from version 2.3 no errors so far. However I don't see the moderators listed. Are there any other not mentioned changes to some templates maybe?
Geeklog Polish Support Team
Which forum version is this hack designed for? I'm asking because the code you posted is slightly different from the code in 2.3. Anyhow I applied it to index.php from version 2.3 no errors so far. However I don't see the moderators listed. Are there any other not mentioned changes to some templates maybe?
Geeklog Polish Support Team
34
38
Quote
Status: offline
hidden
Forum User
Chatty
Registered: 11/13/03
Posts: 51
in forumlisting.thtml of current theme, on line 3 i edited it.
<td class="forumRollOut" style="padding-top:5px;"align="left" onMouseOver="className='forumRollOver'; this.style.cursor='hand';" onMouseOut="className='forumRollOut';" onclick="window.location.href='index.php?forum={forum_id}'; this.style.cursor='hand';"><A HREF="index.php?forum={forum_id}">{forum_name}</A><br>{forum_desc}<br>Moderator(s): {moderator}</td>
but i believe its already there...
im using forum 2.3.1
we are just shadows of our hidden identities
Text Formatted Code
<td class="forumRollOut" style="padding-top:5px;"align="left" onMouseOver="className='forumRollOver'; this.style.cursor='hand';" onMouseOut="className='forumRollOut';" onclick="window.location.href='index.php?forum={forum_id}'; this.style.cursor='hand';"><A HREF="index.php?forum={forum_id}">{forum_name}</A><br>{forum_desc}<br>Moderator(s): {moderator}</td>
but i believe its already there...
im using forum 2.3.1
we are just shadows of our hidden identities
36
33
Quote
Status: offline
trenchteam
Forum User
Regular Poster
Registered: 06/08/04
Posts: 89
Is that the only thing im missing now? I really like what you did, but I hope you have all the directions now.
28
29
Quote
Status: offline
hidden
Forum User
Chatty
Registered: 11/13/03
Posts: 51
Quote by trenchteam: Is that the only thing im missing now? I really like what you did, but I hope you have all the directions now.
yeah thats all that i did... i did not include the last step because i thought it was already there.
btw, have tried my other hack? the one that shows who and when the last topic is edited. its really cool.
we are just shadows of our hidden identities
31
32
Quote
Status: offline
trenchteam
Forum User
Regular Poster
Registered: 06/08/04
Posts: 89
No I haven't. Im still tryin to get this one to work. I dont know what the problem is. Its a really nice hack. How did you get your forums to show without any columns?
32
40
Quote
Status: offline
hidden
Forum User
Chatty
Registered: 11/13/03
Posts: 51
Quote by trenchteam: No I haven't. Im still tryin to get this one to work. I dont know what the problem is. Its a really nice hack. How did you get your forums to show without any columns?
what do you mean without any colums? you mean without the right and left block?
we are just shadows of our hidden identities
26
31
Quote
Status: offline
trenchteam
Forum User
Regular Poster
Registered: 06/08/04
Posts: 89
yes, without the right and left blocks
32
28
Quote
Lost Puppy
Anonymous
i would be intrested in ur last modified hack....
33
33
Quote
Page navigation
All times are EST. The time is now 05:22 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content