Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 940
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Portala Etiketleti Eklemek

Started by KeReM @, January 09, 2011, 01:21:09 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.


KeReM @

Fatal error: Call to undefined function db_query() in /var/www/vhosts/frmna.com/httpdocs/Sources/PortalBlocks.php(3351) : eval()'d code on line 7

nas?l d

grafitus

my modsI don't reply support PMs. Please use support forums.


grafitus

#4
?unu deneyin:
global $smcFunc, $context, $db_prefix, $scripturl, $txt;

$result = $smcFunc['db_query']('', '
SELECT t.tag AS tag, l.id_tag, COUNT(l.id_tag) AS quantity
FROM {db_prefix}tags AS t, {db_prefix}tags_log AS l
WHERE t.id_tag = l.id_tag
GROUP BY l.id_tag
ORDER BY l.ID DESC
LIMIT 50',
array()
);

$tags = array();
$tags2 = array();
while ($row = $smcFunc['db_fetch_assoc']($result))
{
$tags[$row['tag']] = $row['quantity'];
$tags2[$row['tag']] = $row['id_tag'];
}

if(count($tags2) > 0)
{
$max_size = 250;
$min_size = 100;

$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));

$spread = $max_qty - $min_qty;
if ($spread == 0)
$spread = 1;

$step = ($max_size - $min_size) / $spread;

$context['poptags'] = '';
$row_count = 0;
foreach ($tags as $key => $value)
{
$row_count++;
$size = $min_size + (($value - $min_qty) * $step);

$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;id=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
$context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
$context['poptags'] .= '>'.$key.'</a> ';

if ($row_count > 5)
{
$context['poptags'] .= '<br />';
$row_count = 0;
}
}
}

if(!empty($context['poptags']))
echo $context['poptags'];
my modsI don't reply support PMs. Please use support forums.