Thanks button

making a thanks button

  • (2 Pages)
  • +
  • 1
  • 2

21 Replies - 1900 Views - Last Post: 29 November 2009 - 01:35 PM Rate Topic: -----

#16 doc1984  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 24-November 09

Re: Thanks button

Posted 28 November 2009 - 10:00 AM

View PostBGDeveloper, on 28 Nov, 2009 - 08:34 AM, said:

Okay, I've write you a simple function for this.
<?php
	function count_thanks($userid)
	{
		$sql = "SELECT COUNT(`post_thanks_thanked_times`) AS `thanks_count` FROM `users` WHERE `userid` = {$userid}";
		$query = mysql_query($sql);
		$result = mysql_fetch_array($query);
		
		return $result['thanks_count'];
	}
?>



All you have to do is to call it by parsing the user id.

Quote

print count_thanks($userid)

where $userid will be variable with each unique id. I hope you've got the idea.


Yes i get your idea i will have to try add the template you just made to vbulletin then so it passes the varabiles i will let you know how i get on :)
Was This Post Helpful? 0
  • +
  • -

#17 doc1984  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 24-November 09

Re: Thanks button

Posted 28 November 2009 - 10:10 AM

dont look like its going to be posible i might have to admit deafeat and say sorry for wasting your time as i have just read this

http://www.vbulletin.org/forum/showthread.php?t=228078


And obvously our code runs serperate from vbulletin to try and save complications
Was This Post Helpful? 0
  • +
  • -

#18 BGDeveloper  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 84
  • Joined: 01-April 09

Re: Thanks button

Posted 28 November 2009 - 10:43 AM

Don't be sorry. This is a forum after all, for helping other people out.
I'm glad I've been able to help, so good luck. ;]
Was This Post Helpful? 0
  • +
  • -

#19 doc1984  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 24-November 09

Re: Thanks button

Posted 28 November 2009 - 10:49 AM

View PostBGDeveloper, on 28 Nov, 2009 - 09:43 AM, said:

Don't be sorry. This is a forum after all, for helping other people out.
I'm glad I've been able to help, so good luck. ;]


you have been a great help and i will keep trying if i find a way to dispaly it i will come back and share it :)
Was This Post Helpful? 0
  • +
  • -

#20 BGDeveloper  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 84
  • Joined: 01-April 09

Re: Thanks button

Posted 28 November 2009 - 10:53 AM

Read this and try it out.
http://www.vbulletin...ght=post+thanks
Was This Post Helpful? 0
  • +
  • -

#21 doc1984  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 24-November 09

Re: Thanks button

Posted 29 November 2009 - 06:08 AM

View PostBGDeveloper, on 28 Nov, 2009 - 09:53 AM, said:

Read this and try it out.
http://www.vbulletin...ght=post+thanks



Thats for an older version, vbulletin 4 has only just been released and no mods have been made apart from basic ones and ones i have made my self to work with the forum. But my members really wanted a thanks button so i thought i would try make a basic one what works thanks to you but i cant find a way to display the amount of thanks a user has
Was This Post Helpful? 0
  • +
  • -

#22 doc1984  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 24-November 09

Re: Thanks button

Posted 29 November 2009 - 01:35 PM

View Postdoc1984, on 29 Nov, 2009 - 05:08 AM, said:

View PostBGDeveloper, on 28 Nov, 2009 - 09:53 AM, said:

Read this and try it out.
http://www.vbulletin...ght=post+thanks



Thats for an older version, vbulletin 4 has only just been released and no mods have been made apart from basic ones and ones i have made my self to work with the forum. But my members really wanted a thanks button so i thought i would try make a basic one what works thanks to you but i cant find a way to display the amount of thanks a user has


Been looking at making the success / failed query to appear in pop up but dont seem to load i just get errors i have been reading java script help topics ect but they all go on about linking different ect
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2