Sub Menu
Links Menu
Online Users

In total there are 320 users online :: 3 registered, 0 hidden and 317 guests

Most users ever online was 1091 on Wed Aug 16, 2023 5:27 pm

Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot] based on users active over the past 60 minutes

thank you button?

Mods etc.

Moderator: Integra Moderator

thank you button?

PostAuthor: __ChAnDLeR__ » Wed Feb 06, 2008 9:42 pm

Your phpBB Version: 2.0.
phpBB Type: Integramod 141
MODs: Yes
Your knowledge: Beginner
Board URL: http://yah-mart.net/VIP/index.php

PHP Version:
MySQL Version:


What was done before the problem appeared?



What was done to try to solve the problem?




De.scription and Message

i am curious if i need to have a MOD for adding a thank you button, i see my forums has a ratings thingy.. but i feel a thank you button is a good addition to my forums
Last edited by __ChAnDLeR__ on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[img=left]http://img398.imageshack.us/img398/2482/ymb1an9.gif[/img]
User avatar
__ChAnDLeR__
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Sat Nov 17, 2007 2:00 am
Cash on hand: 0.00

Re: thank you button?

PostAuthor: CaNNon » Wed Feb 06, 2008 10:00 pm

=== Triggered rule ===
alert (msg:"smuggling Java.script inside an image"; headers_content:"image"; nocase; headers_re:"/^Content-Type.*image/mi"; body_re:"/<.script/i";)


Whats up buddy?
Last edited by CaNNon on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
Image
User avatar
CaNNon
Sr Integra Member
Sr Integra Member
 
Posts: 750
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 19, 2007 11:15 am
Cash on hand: 0.00

PostAuthor: __ChAnDLeR__ » Thu Feb 14, 2008 2:22 pm

"CaNNon";p="31185" wrote:
=== Triggered rule ===
alert (msg:"smuggling Java..script inside an image"; headers_content:"image"; nocase; headers_re:"/^Content-Type.*image/mi"; body_re:"/<..script/i";)


Whats up buddy?


okay not sure what or where.. does this go to.. ???
Last edited by __ChAnDLeR__ on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[img=left]http://img398.imageshack.us/img398/2482/ymb1an9.gif[/img]
User avatar
__ChAnDLeR__
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Sat Nov 17, 2007 2:00 am
Cash on hand: 0.00

PostAuthor: BitingMonkey » Thu Feb 14, 2008 2:38 pm

guess I should have guessed by your avatar and sig. But that site is a big NSFW!
Last edited by BitingMonkey on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

BitingMonkey
Members
Members
 
Posts: 36
Likes: 0 post
Liked in: 0 post
Joined: Sat Nov 11, 2006 4:32 am
Cash on hand: 0.00

PostAuthor: CaNNon » Thu Feb 14, 2008 4:34 pm

"__ChAnDLeR__";p="31400" wrote:
"CaNNon";p="31185" wrote:
=== Triggered rule ===
alert (msg:"smuggling Java...script inside an image"; headers_content:"image"; nocase; headers_re:"/^Content-Type.*image/mi"; body_re:"/<...script/i";)


Whats up buddy?


okay not sure what or where.. does this go to.. ???


Coding in one of the graphics files on your site is breaking a security rule in my setup. <img>
In my case it's no biggie but others will get the same warning and just leave your site. Might be good if you didn't .script with java in side graphics files.
Last edited by CaNNon on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
Image
User avatar
CaNNon
Sr Integra Member
Sr Integra Member
 
Posts: 750
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 19, 2007 11:15 am
Cash on hand: 0.00

Re: thank you button?

PostAuthor: MWE_001 » Thu Feb 14, 2008 9:00 pm

I found a nice thankyou mod that ads stats and all in a topic as to who thanked and all. It sure would have ben great had it not been for someone creating all the install docs on those no good for nothing videos. No player or codec that I can get for any player will ever play those.

I wish mod authors would just go the old fashioned route and create honest to god text documents.
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

Re: thank you button?

PostAuthor: Helter » Thu Feb 14, 2008 9:04 pm

install.mov

open with WordPad <img>
Last edited by Helter on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Always use Protection
Image


Please do not PM for support
User avatar
Helter
Administrator
Administrator
 
Posts: 4167
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Sat Mar 11, 2006 3:46 pm
Cash on hand: 172.60
Location: Seattle Wa
IntegraMOD version: IM 3

Re: thank you button?

PostAuthor: star » Fri Feb 15, 2008 3:24 am

i think i checked that ty mod out and its one that needed some major reworking to work with im 140 or 141 due to the differences in the category hierarchies edits .. i run both a forum thats 140 based & one 141 based and it didnt look impossible to get working just sumtin i didnt want enough to spend the time on lol
Last edited by star on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

star
Newbie
Newbie
 
Posts: 17
Likes: 0 post
Liked in: 0 post
Joined: Sat Jun 17, 2006 11:50 am
Cash on hand: 0.00

Re: thank you button?

PostAuthor: MWE_001 » Fri Feb 15, 2008 6:51 am

Ill take your word on that one. :D

And I think this would be a great feature as default. BUT thats just My opinion too.

And you know what Helter, now that I stop and inventory that one a little bit, I do recall you telling me that trick some time back.
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

PostAuthor: __ChAnDLeR__ » Sun Feb 17, 2008 9:28 pm

"MWE_001";p="31408" wrote:I found a nice thankyou mod that ads stats and all in a topic as to who thanked and all. It sure would have ben great had it not been for someone creating all the install docs on those no good for nothing videos. No player or codec that I can get for any player will ever play those.

I wish mod authors would just go the old fashioned route and create honest to god text documents.


no doubt.. so is there a simple solution to adding a thank you button? to intramod powered forums?
Last edited by __ChAnDLeR__ on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[img=left]http://img398.imageshack.us/img398/2482/ymb1an9.gif[/img]
User avatar
__ChAnDLeR__
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Sat Nov 17, 2007 2:00 am
Cash on hand: 0.00

Re: thank you button?

PostAuthor: Helter » Mon Feb 18, 2008 12:14 am

Code: Select all
&#32; &#32; ################################################################ MOD Title]http://www.uzzisoft.com#[/url]# MOD Description: Allows registered users to thank a post which was posted by another user## MOD Version: 0.2.6#### Installation Level: Easy## Installation Time: 10 Minutes## Files To Edit: viewtopic.php## &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; includes/functions_post.php## &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; language/lang_english/lang_main.php## &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; templates/Integra2/Integra2.cfg## &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; templates/Integra2/viewtopic_body.tpl## Included Files: thanks.php## &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  templates/Integra2/thanks.tpl## &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  templates/Integra2/thanks_popup.tpl## &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  templates/Integra2/images/lang_english/icon_thank.gif#### License: [url=http://opensource.org/licenses/gpl-license.php]http://opensource.org/licenses/gpl-license.php[/url] GNU General Public License v2################################################################ For security purposes, please check: [url=http://www.phpbb.com/mods/#]http://www.phpbb.com/mods/#[/url]# for the latest version of this MOD. Although MODs are checked## before being allowed in the MODs Database there is no guarantee## that there are no security problems within the MOD. No support## will be given for MODs not found within the MODs Database which## can be found at [url=http://www.phpbb.com/mods/#]http://www.phpbb.com/mods/#[/url]############################################################### Author Notes:#### &#32;  &#32;  &#32; A mod which allows you to thank a post that a user has posted.## &#32;  &#32;  &#32; When the Thanks button is pressed a page is displayed saying they have successfully thanked the user for their post.## &#32;  &#32;  &#32; You can choose whether that page should be a popup or not; by editing the $popup_enabled to 0 or 1 in viewtopic.php and thanks.php## &#32;  &#32;  &#32; If set to 0, the page displayed will automatically be redirected to the post in 5 seconds.#### &#32;  &#32;  &#32; You can view the thanks given and thanks received by a user in the topic under their posts.## &#32;  &#32;  &#32; You are also shown the users who have thanked the specific post.## &#32;  &#32;  &#32; When the post has been deleted the thanked received for the poster is decreased as well as the thanks given by other users.################################################################## MOD History:#### &#32; 2007-10-26 - Version 0.2.6## &#32;  &#32;  &#32; - Updates thanks_given and thanked_received when posts are deleted#### &#32; 2006-10-29 - Version 0.2.5a## &#32;  &#32;  &#32; - Thanks icon updated#### &#32; 2006-10-23 - Version 0.2.5## &#32;  &#32;  &#32; - Bug Fix: Thanks button was sometimes displayed even though the user had thanked the post#### &#32; 2006-10-22 - Version 0.2.4## &#32;  &#32;  &#32; - Removes the thanks button from posts that the user has already thanked#### &#32; 2006-10-21 - Version 0.2.3## &#32;  &#32;  &#32; - Updated the way "Thanked 2 Times in 1 Posts" is displayed. Posts are now referred to the total number of posts that were thanked by other users instead of the user's total posts.#### &#32; 2006-10-19 - Version 0.2.2## &#32;  &#32;  &#32; - Bug Fix: Adjusted Thanked by row in viewtopic to wrap the users who thanked the post#### &#32; 2006-10-19 - Version 0.2.1## &#32;  &#32;  &#32; - Bug Fix: Moved Thanks icon back next to quote icon since the ICQ icon gets displayed over the thanks icon if the user has an ICQ number set (couldn't find a reasonable solution)## &#32;  &#32;  &#32; ## &#32; 2006-09-27 - Version 0.2.0## &#32;  &#32;  &#32; - Moved Thanks icon to right hand side of where Profile, PM, links are displayed## &#32;  &#32;  &#32; - Made the username of people who thanked a user link to their profile## &#32;  &#32;  &#32; - Be able to select whether the thanks should popup or be displayed on the same page#### &#32; 2006-09-12 - Version 0.1.1## &#32;  &#32;  &#32; - Bug Fix: Thanks received wasn't updating correctly#### &#32; 2006-09-11 - Version 0.1.0## &#32;  &#32;  &#32; - Initial Release (for phpBB 2.0.21)################################################################## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD##############################################################&#32; ##-----[ SQL ]------------------------------------------# Change phpbb_posts and phpbb_users to your tables#ALTER TABLE `phpbb_posts` ADD `thanks_count` MEDIUMINT( 8 ) NOT NULL DEFAULT '0';ALTER TABLE `phpbb_posts` ADD `thanks_from_user_id` TEXT NULL;ALTER TABLE `phpbb_users` ADD `user_thanks_received` MEDIUMINT( 8 ) NOT NULL DEFAULT '0';ALTER TABLE `phpbb_users` ADD `user_thanks_given` MEDIUMINT( 8 ) NOT NULL DEFAULT '0';&#32; ##-----[ COPY ]------------------------------------------#copy root/thanks.php to thanks.phpcopy root/templates/Integra2/thanks.tpl to templates/Integra2/thanks.tplcopy root/templates/Integra2/thanks_popup.tpl to templates/Integra2/thanks_popup.tplcopy root/templates/Integra2/images/lang_english/icon_thank.gif to templates/Integra2/images/lang_english/icon_thank.gif&#32; ##-----[ OPEN ]------------------------------------------#&#32; viewtopic.php&#32; ##-----[ FIND ]------------------------------------------#&#32; $pagination = generate_pagination("viewtopic.$phpEx?". $pagination_printertopic . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&". $pagination_highlight . $pagination_finish_rel, $total_replies, $pagination_ppp, $start);##-----[ AFTER, ADD ]------------------------------------------#&#32; &#32; //// Start Thank Post by User Mod//&#32; // Set to 1 to use pop-ups instead of using the same window$popup_enabled = 0;&#32; if ($popup_enabled == 1) {&#32; $thanks_javascript ='<SCRIPT><Beginfunction></script>';}&#32; //// End Thank Post by User Mod//&#32; &#32; ##-----[ FIND ]------------------------------------------#&#32; &#32;  &#32;  'FORUM_ID' => $forum_id,&#32; ##-----[ BEFORE, ADD ]------------------------------------------#&#32; &#32;  &#32;  'THANKS_JAVASCRIPT' => $thanks_javascript,##-----[ FIND ]------------------------------------------#&#32; $search = '<a>' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>';&#32; ##-----[ AFTER, ADD ]------------------------------------------#&#32; &#32; &#32;  &#32;  &#32;  &#32;  //&#32;  &#32;  &#32;  &#32;  // Start Thank Post by User Mod&#32;  &#32;  &#32;  &#32;  //&#32; &#32;  &#32;  &#32;  &#32;  $thanks_img = '';&#32; &#32;  &#32;  &#32;  &#32;  if ( ($userdata['session_logged_in']) && ($userdata['user_id'] != $poster_id) ) {&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; // Posts SQL&#32;  &#32;  &#32;  &#32;  &#32;  &#32; $sql = "SELECT thanks_from_user_id&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; FROM " . POSTS_TABLE . "&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; WHERE post_id = " . $postrow[$i]['post_id'];&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; if ( !($result = $db->sql_query($sql)) ) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  message_die(GENERAL_ERROR, "Could not obtain post information", '', __LINE__, __FILE__, $sql);&#32;  &#32;  &#32;  &#32;  &#32;  &#32; }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $post_row = $db->sql_fetchrow($result);&#32;  &#32;  &#32;  &#32;  &#32;  &#32; $db->sql_freeresult($result);&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $already_thanked = 0;&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; if ($post_row['thanks_from_user_id'] != null) {&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $thanked_users = explode("|",$post_row['thanks_from_user_id']);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $thanked_count = count($thanked_users);&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  // Loop through all users who thanked the post&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  for ($x = 0; $x < $thanked_count; $x++) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; if ($thanked_users[$x] == $userdata['user_id']) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $already_thanked = 1;&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; }&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  }&#32;  &#32;  &#32;  &#32;  &#32;  &#32; }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; // If the user hasn't thanked this post&#32;  &#32;  &#32;  &#32;  &#32;  &#32; if ($already_thanked == 0) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $temp_url = append_sid("thanks.$phpEx?p=" . $postrow[$i]['post_id']);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  if ($popup_enabled == 1) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $thanks_img = '<a><img></a>';&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  }&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  else {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $thanks_img = '<a><img></a>';&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  }&#32;  &#32;  &#32;  &#32;  &#32;  &#32; }&#32;  &#32;  &#32;  &#32;  }&#32; &#32;  &#32;  &#32;  &#32;  //&#32;  &#32;  &#32;  &#32;  // End Thank Post by User Mod&#32;  &#32;  &#32;  &#32;  //&#32; ##-----[ FIND ]------------------------------------------#&#32; $template->assign_block_vars('postrow', array(&#32; ##-----[ BEFORE, ADD ]------------------------------------------#&#32; &#32;  &#32;  &#32;  &#32;  //&#32;  &#32;  &#32;  &#32;  // Start Thank Post by User Mod&#32;  &#32;  &#32;  &#32;  //&#32; &#32;  &#32;  &#32;  &#32;  // If the user isn't anonymous&#32;  &#32;  &#32;  &#32;  if ($postrow[$i]['user_id'] != ANONYMOUS) {&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; // From Users SQL&#32;  &#32;  &#32;  &#32;  &#32;  &#32; $sql = "SELECT user_posts, user_thanks_given, user_thanks_received&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; FROM " . USERS_TABLE . "&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; WHERE user_id = " . $postrow[$i]['user_id'];&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; if ( !($result = $db->sql_query($sql)) ) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  message_die(GENERAL_ERROR, "Could not obtain user information", '', __LINE__, __FILE__, $sql);&#32;  &#32;  &#32;  &#32;  &#32;  &#32; }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $user_row = $db->sql_fetchrow($result);&#32;  &#32;  &#32;  &#32;  &#32;  &#32; $db->sql_freeresult($result);&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; // Thanked Posts SQL&#32;  &#32;  &#32;  &#32;  &#32;  &#32; $sql = "SELECT COUNT(thanks_count) AS thanks_count&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; FROM " . POSTS_TABLE . "&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; WHERE poster_id = " . $postrow[$i]['user_id'] . "&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; AND thanks_count <> 0";&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; if ( !($result = $db->sql_query($sql)) ) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  message_die(GENERAL_ERROR, "Could not obtain posts information", '', __LINE__, __FILE__, $sql);&#32;  &#32;  &#32;  &#32;  &#32;  &#32; }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $thanked_post_count = $db->sql_fetchrow($result);&#32;  &#32;  &#32;  &#32;  &#32;  &#32; $db->sql_freeresult($result);&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $thanks_given = $lang['Thanks_thanks'] . ': ' . $user_row['user_thanks_given'];&#32;  &#32;  &#32;  &#32;  &#32;  &#32; $thanks_received = $lang['Thanks_thanked_1'] . ' ' . $user_row['user_thanks_received'] . ' ' . $lang['Thanks_thanked_2'] . ' ' . $thanked_post_count['thanks_count'] . ' ' . $lang['Thanks_thanked_3'];&#32; &#32;  &#32;  &#32;  &#32;  }&#32;  &#32;  &#32;  &#32;  else {&#32;  &#32;  &#32;  &#32;  &#32;  &#32; $thanks_given = "";&#32;  &#32;  &#32;  &#32;  &#32;  &#32; $thanks_received = "";&#32;  &#32;  &#32;  &#32;  }&#32; &#32;  &#32;  &#32;  &#32;  //&#32;  &#32;  &#32;  &#32;  // End Thank Post by User Mod&#32;  &#32;  &#32;  &#32;  //&#32; ##-----[ FIND ]------------------------------------------#&#32; &#32;  &#32;  &#32;  &#32;  'POSTER_NAME' => $poster,&#32; ##-----[ AFTER, ADD ]------------------------------------------#&#32; &#32;  &#32;  &#32;  &#32;  'POSTER_THANKS_GIVEN' => $thanks_given,&#32;  &#32;  &#32;  &#32;  'POSTER_THANKS_RECEIVED' => $thanks_received,##-----[ FIND ]------------------------------------------#&#32; 'EDIT' => $edit,&#32; ##-----[ AFTER, ADD ]------------------------------------------#&#32; &#32;  &#32;  &#32;  &#32;  'THANKS_IMG' => $thanks_img,##-----[ FIND ]------------------------------------------#&#32; &#32;  &#32;  &#32;  &#32;  $template->assign_block_vars('postrow.switch_no_buddy_ignore', array());&#32;  &#32;  }//-- fin mod : profile cp --------------------------------------------------------------------------&#32; ##-----[ BEFORE, ADD ]------------------------------------------#&#32; &#32; &#32;  &#32;  &#32;  &#32;  //&#32;  &#32;  &#32;  &#32;  // Start Thank Post by User Mod&#32;  &#32;  &#32;  &#32;  //&#32; &#32;  &#32;  &#32;  &#32;  if ($postrow[$i]['thanks_count'] >= 1) {&#32; &#32;  &#32;  &#32;  &#32;  &#32;  $thanked_by = "";&#32; &#32;  &#32;  &#32;  &#32;  &#32;  $thanked_users = explode("|",$postrow[$i]['thanks_from_user_id']);&#32;  &#32;  &#32;  &#32;  &#32;  $thanked_count = $postrow[$i]['thanks_count'];&#32; &#32;  &#32;  &#32;  &#32;  &#32;  // Loop through all users who thanked the post&#32;  &#32;  &#32;  &#32;  &#32;  for ($x = 0; $x <thanked_count>sql_query($sql)) ) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  message_die(GENERAL_ERROR, "Could not obtain user information", '', __LINE__, __FILE__, $sql);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $user_row = $db->sql_fetchrow($result);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $db->sql_freeresult($result);&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; if ($x >= 1) { $thanked_by .= ", "; }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; // Add user to thanked by list&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $temp_url = "profile.$phpEx?mode=viewprofile&u=" . $user_row['user_id'];&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $thanked_by .= '<a>' . $user_row['username'] . '</a>';&#32;  &#32;  &#32;  &#32;  &#32;  }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  $template->assign_block_vars('postrow.thanks', array(&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  'L_THANKS_TEXT' => $lang['Thanks_thanked_by'],&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  'THANKS_USERS' => $thanked_by)&#32;  &#32;  &#32;  &#32;  &#32;  );&#32;  &#32;  &#32;  &#32;  }&#32; &#32;  &#32;  &#32;  &#32;  //&#32;  &#32;  &#32;  &#32;  // End Thank Post by User Mod&#32;  &#32;  &#32;  &#32;  //&#32; ##-----[ OPEN ]---------------------------------#&#32; includes/functions_post.php&#32; ##-----[ FIND ]---------------------------------#&#32; function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id){&#32;  &#32;  global $board_config, $lang, $db, $phpbb_root_path, $phpEx;&#32;  &#32;  global $userdata, $user_ip;&#32; ##-----[ AFTER, ADD ]---------------------------------#&#32; &#32;  &#32;  &#32;  &#32;  //&#32;  &#32;  &#32;  &#32;  // Start Thank Post by User Mod&#32;  &#32;  &#32;  &#32;  //&#32; &#32;  &#32;  &#32;  &#32;  // Thanked Listing SQL&#32;  &#32;  &#32;  &#32;  $sql = "SELECT thanks_from_user_id, thanks_count, poster_id&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  FROM " . POSTS_TABLE . "&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  WHERE post_id = '$post_id'";&#32; &#32;  &#32;  &#32;  &#32;  if ( !($result = $db->sql_query($sql)) ) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32; message_die(GENERAL_ERROR, "Could not obtain posts information", '', __LINE__, __FILE__, $sql);&#32;  &#32;  &#32;  &#32;  }&#32; &#32;  &#32;  &#32;  &#32;  $post_thanks = $db->sql_fetchrow($result);&#32;  &#32;  &#32;  &#32;  $db->sql_freeresult($result);&#32; &#32;  &#32;  &#32;  &#32;  // If this post was thanked, then continue&#32;  &#32;  &#32;  &#32;  if ($post_thanks['thanks_from_user_id']) {&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; $thanked_users = explode("|", $post_thanks['thanks_from_user_id']);&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32; // Loop through all users who thanked the post&#32;  &#32;  &#32;  &#32;  &#32;  &#32; for ($i = 0; $i <count>sql_query($sql)) ) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; message_die(GENERAL_ERROR, "Could not obtain user information", '', __LINE__, __FILE__, $sql);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $from_user_row = $db->sql_fetchrow($result);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $db->sql_freeresult($result);&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $thanks_given = $from_user_row['user_thanks_given'] - 1;&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  // Update DB with the new thanks given&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $update_sql = "UPDATE " . USERS_TABLE . "&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; SET user_thanks_given = '" . $thanks_given . "'&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; WHERE user_id = " . $from_user;&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  if ( !($result = $db->sql_query($update_sql)) ) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $update_sql);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  // Remove 1 from the user who was thanked&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $sql = "SELECT user_thanks_received&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  FROM " . USERS_TABLE . "&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  WHERE user_id = " . $to_user;&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  if ( !($result = $db->sql_query($sql)) ) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; message_die(GENERAL_ERROR, "Could not obtain user information", '', __LINE__, __FILE__, $sql);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  }&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $to_user_row = $db->sql_fetchrow($result);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $db->sql_freeresult($result);&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $thanks_received = $to_user_row['user_thanks_received'] - 1;&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  // Update DB with the new thanks given&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  $update_sql = "UPDATE " . USERS_TABLE . "&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; SET user_thanks_received = '" . $thanks_received . "'&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; WHERE user_id = " . $to_user;&#32; &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  if ( !($result = $db->sql_query($update_sql)) ) {&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32; message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $update_sql);&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  }&#32;  &#32;  &#32;  &#32;  &#32;  &#32; }&#32;  &#32;  &#32;  &#32;  }&#32; &#32;  &#32;  &#32;  &#32;  //&#32;  &#32;  &#32;  &#32;  // End Thank Post by User Mod&#32;  &#32;  &#32;  &#32;  //&#32; ##-----[ OPEN ]---------------------------------#&#32; templates/Integra2/Integra2.cfg&#32; ##-----[ FIND ]---------------------------------#&#32; $images['icon_edit'] = "$current_template_images/{LANG}/icon_edit.gif";&#32; ##-----[ AFTER, ADD ]---------------------------------#&#32; $images['icon_thank'] = "$current_template_images/{LANG}/icon_thank.gif";##-----[ OPEN ]------------------------------------------#&#32; templates/Integra2/viewtopic_body.tpl&#32; ##-----[ FIND ]------------------------------------------#&#32; <script></script>&#32; &#32; ##-----[ BEFORE, ADD ]---------------------------------#&#32; {THANKS_JAVASCRIPT}&#32; ##-----[ FIND ]------------------------------------------#&#32; {postrow.QUOTE_IMG}&#32; ##-----[ IN-LINE FIND ]------------------------------------------#&#32; {postrow.QUOTE_IMG}&#32; ##-----[ IN-LINE REPLACE WITH ]------------------------------------------#&#32; {postrow.QUOTE_IMG} {postrow.THANKS_IMG}&#32; &#32; &#32; ##-----[ FIND ]------------------------------------------#&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  </td>&#32;  &#32;  &#32;  &#32;  </tr>&#32;  &#32;  &#32;  &#32;  <END>##-----[ After, ADD ]------------------------------------------#&#32;  &#32;  &#32;  &#32; <BEGIN>&#32;  &#32;  &#32;  &#32;  <tr>&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  <td>&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  <table>&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  <tr>&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  <td><span>{postrow.thanks.L_THANKS_TEXT}: {postrow.thanks.THANKS_USERS}</span></td>&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  </tr>&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  </table>&#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  &#32;  </td>&#32;  &#32;  &#32;  &#32;  </tr>&#32;  &#32;  &#32;  &#32;  <END>##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------## EoM&#32; &#32;  


#
#-----[ OPEN ]---------------------------------
#

language/lang_english/lang_main.php

#
#-----[ FIND ]---------------------------------
#

?>

#
#-----[ BEFORE, ADD ]---------------------------------
#

//
// Start Thank Post by User Mod
//

$lang['Thanks_title'] = 'Thank User for Post';
$lang['Thanks_text'] = 'Thank this user for their post';
$lang['Thanks_thanked_by'] = 'Thanked by';

$lang['Thanks_thanks'] = 'Thanks';
$lang['Thanks_thanked_1'] = 'Thanked';
$lang['Thanks_thanked_2'] = 'Times in';
$lang['Thanks_thanked_3'] = 'Posts';

$lang['Thanks_not_logged_in'] = 'You aren't logged in.';
$lang['Thanks_no_post_specified'] = 'No post was specified.';
$lang['Thanks_no_such_post'] = 'Post doesn't exist.';
$lang['Thanks_anonymous'] = 'You can't thank an anonymous post.';
$lang['Thanks_self'] = 'You can't thank your own post.';
$lang['Thanks_already_thanked'] = 'You have already thanked this post.';
$lang['Thanks_success_1'] = 'Post by';
$lang['Thanks_success_2'] = 'in thread';
$lang['Thanks_success_3'] = 'has successfully been thanked.';
$lang['Thanks_success_back'] = 'Click here if you can't wait or if redirection is not supported by your browser';
$lang['Thanks_success_redirect'] = 'Redirecting to the topic/post you came from in 5 seconds.';

//
// End Thank Post by User Mod
//
Attachments
thank_post_by_user_v0.2.6.zip
(9.91 KiB) Downloaded 391 times
Last edited by Helter on Fri Mar 07, 2008 9:10 pm, edited 1 time in total.
Always use Protection
Image


Please do not PM for support
User avatar
Helter
Administrator
Administrator
 
Posts: 4167
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Sat Mar 11, 2006 3:46 pm
Cash on hand: 172.60
Location: Seattle Wa
IntegraMOD version: IM 3

PostAuthor: star » Thu Feb 28, 2008 4:33 pm

with a lil injunuity placing a cpl edits i have this working fine on 140
Last edited by star on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

star
Newbie
Newbie
 
Posts: 17
Likes: 0 post
Liked in: 0 post
Joined: Sat Jun 17, 2006 11:50 am
Cash on hand: 0.00

Re: thank you button?

PostAuthor: MWE_001 » Thu Feb 28, 2008 4:40 pm

I Installed it and had to use some injinuity on a edit or two as well and now I have a all white website. Double checked all edits and all. Not sure what happened. I as well posted another help topic about it.
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

PostAuthor: star » Thu Feb 28, 2008 6:44 pm

chk your edit real close in cfg, file if you did anything like i did cuz i just winged it off the reg install text and used it as a ref point to place my edits and just added to the one in cfg file and made a quick copy & paiste error

added line from install

$images['icon_thank'] = "$current_template_images/{LANG}/icon_thank.gif";

whats needed after exact for im

"width="$topic_iw" height="$topic_ih" class="imgtopic";


i missed the fisrt after icon_thank.gif"; and it caused my site to go white page
Last edited by star on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

star
Newbie
Newbie
 
Posts: 17
Likes: 0 post
Liked in: 0 post
Joined: Sat Jun 17, 2006 11:50 am
Cash on hand: 0.00

Re: thank you button?

PostAuthor: MWE_001 » Thu Feb 28, 2008 10:11 pm

I did infact wing that part. I bet a dime to a dozen doughnuts thats the prob. <img> Ill report back.

Thankyou very much
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

Next

Return to IntegraMOD Modifications

Who is online

Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot]

cron