View previous topic :: View next topic |
Author |
Message |
alexi02 Site Admin
Joined: 17 Aug 2004 Posts: 230 Location: Brisbane, Australia
|
Posted: Tue Jun 10, 2008 3:58 pm Post subject: |
|
|
Are you referring to when you are deleting topics? I forgot about removing thanks when deleting topics. This should fix it.
In modcp.php
Find
Code: | $post_id_sql .= ( ( $post_id_sql != '' ) ? ', ' : '' ) . intval($row['post_id']); |
After Add
Code: | //
// Start Thank Post by User Mod
//
// Delete all thanks which match the post id
$sqldel = "DELETE FROM
phpbb_thanksmod
WHERE post_id = '" . intval($row['post_id']) . "'";
if ( !($resultdel = $db->sql_query($sqldel)) ) {
message_die(GENERAL_ERROR, "Could not remove thanks from thanks table", '', __LINE__, __FILE__, $sql);
}
//
// End Thank Post by User Mod
// |
_________________
UzziSoft Administrator |
|
Back to top |
|
|
MadimaC
Joined: 06 Jun 2008 Posts: 8
|
Posted: Tue Jun 10, 2008 5:18 pm Post subject: |
|
|
I have of it 2 am I on both to insert. |
|
Back to top |
|
|
Star
Joined: 21 Oct 2006 Posts: 15
|
Posted: Mon Jun 30, 2008 3:13 pm Post subject: |
|
|
Hello Dear Alexi, can you write this mod for phpbb3?
now 'Thank Post MOD' exist for bb3, but realy bad coding, for example when installing this on forum:
Before install: (viewtopic)
[ Time : 0.105s | 15 Queries | GZIP : On | Memory Usage: 3.75 MiB | Explain ]
After:!! ((viewtopic))
Time : 9.016s | 17 Queries | GZIP : On | Memory Usage: 33.25 MiB | Explain
Can you write this mod for phpbb3 or optimize exsiting mod?
bugy mod link
http://www.phpbb.com/community/viewtopic.php?f=70&t=543797
Thanks for nice mods and coding |
|
Back to top |
|
|
MadimaC
Joined: 06 Jun 2008 Posts: 8
|
Posted: Mon Jun 30, 2008 8:27 pm Post subject: |
|
|
Here can one thanks delete, are possible also with the phpbb2. |
|
Back to top |
|
|
alexi02 Site Admin
Joined: 17 Aug 2004 Posts: 230 Location: Brisbane, Australia
|
|
Back to top |
|
|
Star
Joined: 21 Oct 2006 Posts: 15
|
Posted: Mon Jul 07, 2008 1:51 pm Post subject: |
|
|
Hello Dear alexi, i see this post, but he have not any site or etc, and not post beta version or ...
your are write best coding for thanks on phpbb2, i think if you release this mod for phpbb3, be the best
your thanks mod on phpbb2 working nice on my forum with 65000 user & 170000 post, please write this mod for phpbb3 |
|
Back to top |
|
|
MadimaC
Joined: 06 Jun 2008 Posts: 8
|
Posted: Sat Aug 23, 2008 7:30 am Post subject: |
|
|
Hi Alexi02
Some user thank simply on another user around hide writes the text to open, please which make which one thanks again delete can. |
|
Back to top |
|
|
Star
Joined: 21 Oct 2006 Posts: 15
|
|
Back to top |
|
|
MadimaC
Joined: 06 Jun 2008 Posts: 8
|
Posted: Sat Feb 14, 2009 2:53 am Post subject: |
|
|
Hi
I get that not.would like as exactly as in the picture.
Can you helpme
portal.php
Code: | //
// Start Top 5 Thanked Users
//
$sql = "SELECT t.thanked_user, u.username
FROM forum_thanksmod t LEFT JOIN " . USERS_TABLE . " u
ON t.thanked_user = u.user_id
WHERE thanked_user <> " . ANONYMOUS . "
ORDER BY thanked_user DESC";
if ( !($result = $db->sql_query($sql)) ) {
message_die(GENERAL_ERROR, 'Could not query users table', '', __LINE__, __FILE__, $sql);
}
$thanked_count = 1;
$old_user_id = 0;
$x = 0;
while ($row = mysql_fetch_array($result)) {
$user_id = $row['thanked_user'];
$username = $row['username'];
$username = color_group_colorize_name($user_id, true);
if ($row['thanked_user'] != $old_user_id) {
$thanked_count = 0;
$x++;
}
$old_user_id = $row['thanked_user'];
$thanked_count++;
$thankslist[$x]['count'] = $thanked_count;
$thankslist[$x]['user_id'] = $user_id;
$thankslist[$x]['username'] = $username;
}
rsort($thankslist);
for ($x = 0; $x < 10; $x++) {
if ($thankslist[$x]['user_id']) {
if ($x >= 1) { $top_5_thanked_users .= "<br /> "; }
// Add user to thanked list
$temp_url = "profile.$phpEx?mode=viewprofile&u=" . $thankslist[$x]['user_id'];
$top_5_thanked_users .= '<a href="' . $temp_url . '">' . $thankslist[$x]['username'] . '</a> (' . $thankslist[$x]['count'] . ')';
}
}
//
// End Top 5 Thanked Users
// |
portal.tpl
Code: | <!-- BEGIN top thanks -->
<table border="0" cellpadding="0" cellspacing="0" class="tbl">
<tr>
<td class="tbll">
<img src="images/spacer.gif" alt="" width="8" height="4" /></td>
<td class="tblbot">
<img src="images/spacer.gif" alt="" width="8" height="4" /></td>
<td class="tblr">
<img src="images/spacer.gif" alt="" width="8" height="4" /></td>
</tr>
<table width="100%" cellpadding="2" cellspacing="0" border="0" class="forumline">
<tr>
<td class="navbar" colspan="2" height="25">
<p align="center">
<span class="cellpic3 areatitle" class="gensmall"><b>Top 5 Thanked Users
</b></span></td>
</tr>
<tr>
<td class="row2" align="center" width="50%">
<p align="left"><span class="gensmall">
<tr>
<td class="row2" align="left"><span class="gensmall">{L_TOP_5_THANKED_USERS}</span></td>
</tr></tr>
<!-- END top thanks --> |
|
|
Back to top |
|
|
MadimaC
Joined: 06 Jun 2008 Posts: 8
|
Posted: Fri Feb 20, 2009 11:12 pm Post subject: |
|
|
This is how I made it look now
And this is how I would like to have it
What must I do |
|
Back to top |
|
|
Bob
Joined: 22 Sep 2009 Posts: 1
|
Posted: Tue Sep 22, 2009 2:42 am Post subject: |
|
|
Hey,
Thanks for the mod.
For a few reason I can't migrate to phpbb3 yet so I'm still using your thanks mod.
The problem is the board (which is quite big) slows down a lot when the thanks mod is active.
Could you please suggest some improvements to your code? It's SQL related. Could the lack of Primary Key in phpbb_thanksmod table be an issue? Lack of indexes? |
|
Back to top |
|
|
greg
Joined: 15 Nov 2009 Posts: 2
|
Posted: Sun Nov 15, 2009 11:57 pm Post subject: |
|
|
Alex, thank you for this mod!
I use forum 2.0.23 with lots of mods and now added yours, but forum not shown at all. Just blank page, no errors, logs empty. What it can be? |
|
Back to top |
|
|
greg
Joined: 15 Nov 2009 Posts: 2
|
Posted: Mon Nov 16, 2009 9:06 pm Post subject: |
|
|
greg wrote: | Alex, thank you for this mod!
I use forum 2.0.23 with lots of mods and now added yours, but forum not shown at all. Just blank page, no errors, logs empty. What it can be? |
Sorry, I solved the problem. |
|
Back to top |
|
|
wkdwich
Joined: 06 Oct 2011 Posts: 1 Location: US
|
Posted: Thu Oct 06, 2011 11:38 pm Post subject: |
|
|
Just wanted to thank you quickly and ask a question, but first wanted to see if this was still being responded to.. |
|
Back to top |
|
|
|