TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 316
  • Total: 317
  • @rjen

DKP Check for the currently logged in user

Started by sloanja, March 21, 2007, 03:43:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

maviel

got it all working now thank you allot for you help and effort!

Ianedres


Inny

Working for me as well, with the modification for running EQDKP in a different database.

maviel

is it possible to add 5 latest loot inside [wowitem]itemname[/wowitem] bellow this "quick" dkp i mean it should be about the same code right? :/

Inny

#14
Quote from: maviel on May 05, 2009, 08:14:15 AM
is it possible to add 5 latest loot inside [wowitem]itemname[/wowitem] bellow this "quick" dkp i mean it should be about the same code right? :/

Its about the same, i think i have somewhere the code handy but not at home right now, when i and if i find it i will add it in a new topic.

Just for reference i suggest to remove the WoWitem Modification, check my guide found here and follow the step to install the WOWHead tooltips.

Lucutious

This code does not work in 2.0.

Here's my edit - Anyone care to help me with why not?  I think it's something with the db_query function.
global $db_prefix, $context, $user_info, $ID_MEMBER;

$EQPrefix = "eqdkp_";


echo '<center>';
$sql1 = "SELECT * FROM {$EQPrefix}members WHERE member_name='" . $context['user']['name'] ."'";

if ($context['user']['is_logged']){
$request = db_query($sql1, __FILE__, __LINE__);


$row = mysql_fetch_assoc($request);

if (empty($row['member_name'])){

echo '<a href="http://dkp.harmswayguild.com/">Your account has errors.  Contact Quantic or Revolut</a>.<br>';

}
else
{

$totaldkp=$row['member_earned'] - $row['member_spent'] + $row['member_adjustment'];
echo '<a href="http://dkp.harmswayguild.com/">You have '. $totaldkp .' DKP</a>.<br>';

}

};

if (!$context['user']['is_logged']){
echo 'SERIOUS ERROR - CONTACT LUCUTIOUS';
}

echo '</center>';

IchBin

This should probably work.

global $context, $user_info, $smcFunc;

echo '<center>';

if ($context['user']['is_logged'])
{
$request = $smcFunc['db_query']('', '
SELECT * FOM eqdkp_members
WHERE member_name = {string:name}',
array('name' => $context['user']['name'])
);

$row = $smcFunc['db_fetch_assoc']($request);

if (empty($row['member_name']))
{
echo '
<a href="http://dkp.harmswayguild.com/">Your account has errors.  Contact Quantic or Revolut</a>.<br>';
}
else
{
$totaldkp = $row['member_earned'] - $row['member_spent'] + $row['member_adjustment'];
echo '<a href="http://dkp.harmswayguild.com/">You have '. $totaldkp .' DKP</a>.<br>';
}
}

if (!$context['user']['is_logged'])
{
echo 'SERIOUS ERROR - CONTACT LUCUTIOUS';
}

$smcFunc['db_free_results']($request);

echo '</center>';

This website is proudly hosted on Crocweb Cloud Website Hosting.