* User

Welcome, Guest. Please login or register.
Did you miss your activation email?

12 Mar 10, 00:28:59

Login with username, password and session length

Select language:

* Recent Topics



Donate

Donate for PortaMx !
Your donation is safe and helps support the issues and causes you care most about.

* Stats

  • *Total Members: 1973
  • *Latest: jimpacgr

  • *Total Posts: 9044
  • *Total Topics: 1317
  • *Online Today: 18
  • *Most Online: 157
(27 Aug 09, 03:54:53)
  • *Users: 0
  • *Guests: 12
  • *Spiders: 0
  • *Total: 12

* Themes

*

Author Topic: Tagging System block code  (Read 1265 times)

0 Members and 1 Guest are viewing this topic.

Offline beltazar

  • Newbie
  • *
  • Posts: 7
Tagging System block code
« on: 27 Nov 09, 21:44:38 »
Hi,

I'm using Tagging System mod from here http://mods.simplemachines.org/index.php?mod=579
I love that mod and want to add Popular Tags in a portamx block

how is the code to do that ?

thx


Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 2772
  • Gender: Female
Re: Tagging System block code
« Reply #1 on: 28 Nov 09, 18:37:48 »
For this question you have to call the mod author, who the data stored ...

Fel
Many are stubborn in relation to the path, a few in relation to the target.

Offline Cool

  • Free Tibet
  • Charter Member
  • *
  • Posts: 568
  • Gender: Male
  • I Hate Chinas Authority
Re: Tagging System block code
« Reply #2 on: 28 Nov 09, 19:13:38 »
Code: [Select]
//Tagging System
$dbresult= $smcFunc['db_query']('', "
SELECT
t.tag,l.ID,t.ID_TAG
FROM {db_prefix}tags_log as l, {db_prefix}tags as t
WHERE t.ID_TAG = l.ID_TAG && l.ID_TOPIC = $topic");
$context['topic_tags'] = array();
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$context['topic_tags'][] = array(
'ID' => $row['ID'],
'ID_TAG' => $row['ID_TAG'],
'tag' => $row['tag'],
);
}
$smcFunc['db_free_result']($dbresult);
//End Tagging System
Site:FikaGuide(Sv)|I Use:V0.971-2|SMF 2.0 RC2
Q: What do you do when you see a bear in the woods?
A: Play Dead!

EEE-PC:1000H-1TB_WD-2GB-Xp&Win7-BT_Gps-BT_Mouse-USB_Huawei_Hsdp

Offline Horseman

  • Newbie
  • *
  • Posts: 40
  • Gender: Male
  • 'MAS VALE CABALLO QUE CAUDAL!'
    • Horsegirls & Horsemen Community
Re: Tagging System block code
« Reply #3 on: 29 Nov 09, 09:40:06 »
Hallo @cool
Ich habe deinen Code eben auch mal in einen Block eingebunden und über den MOD 3 Tags angelegt.
Es wird mir aber kein Tag angezeigt.
PhpOpenChat Support Portal: http://www.phpopenchat.de >SMF 2 RC2.0 PortaMX 0.971 PmxBlog 0952
Reiter Community: http://www.h-h-c.de >SMF 2 RC2.0 PortaMX 0.971 PmxBlog 0952

Offline Cool

  • Free Tibet
  • Charter Member
  • *
  • Posts: 568
  • Gender: Male
  • I Hate Chinas Authority
Re: Tagging System block code
« Reply #4 on: 29 Nov 09, 10:18:39 »
das ist nur der code aus dem script, wie dieser verwaltet wird. wenn du dir den mod auf der smf-seite parsen lässt kommst du sicher weiter.
Site:FikaGuide(Sv)|I Use:V0.971-2|SMF 2.0 RC2
Q: What do you do when you see a bear in the woods?
A: Play Dead!

EEE-PC:1000H-1TB_WD-2GB-Xp&Win7-BT_Gps-BT_Mouse-USB_Huawei_Hsdp

Offline Horseman

  • Newbie
  • *
  • Posts: 40
  • Gender: Male
  • 'MAS VALE CABALLO QUE CAUDAL!'
    • Horsegirls & Horsemen Community
Re: Tagging System block code
« Reply #5 on: 29 Nov 09, 10:48:26 »
@Cool
Danke für den Hinweis, dachte das wäre der fertige Code für den Block ;-)

Schönen 1. Advent allen PortaMX Mitgliedern auf diesem Weg wünscht!

Gruß
Horseman
PhpOpenChat Support Portal: http://www.phpopenchat.de >SMF 2 RC2.0 PortaMX 0.971 PmxBlog 0952
Reiter Community: http://www.h-h-c.de >SMF 2 RC2.0 PortaMX 0.971 PmxBlog 0952

Offline Horseman

  • Newbie
  • *
  • Posts: 40
  • Gender: Male
  • 'MAS VALE CABALLO QUE CAUDAL!'
    • Horsegirls & Horsemen Community
Re: Tagging System block code
« Reply #6 on: 29 Nov 09, 11:01:30 »
@beltazar
Der von dir bei SMF gepostete Code funktioniert doch  :D

Gruß
Horseman
PhpOpenChat Support Portal: http://www.phpopenchat.de >SMF 2 RC2.0 PortaMX 0.971 PmxBlog 0952
Reiter Community: http://www.h-h-c.de >SMF 2 RC2.0 PortaMX 0.971 PmxBlog 0952

Offline beltazar

  • Newbie
  • *
  • Posts: 7
Re: Tagging System block code
« Reply #7 on: 11 Dec 09, 05:27:47 »
I try this code and it works

Code: [Select]
global $sourcedir, $txt, $context, $scripturl;

require_once($sourcedir . '/Tags2.php');
ViewTags();

if (isset($context['poptags']))
echo $context['poptags'];


Offline Fadi

  • Newbie
  • *
  • Posts: 2
  • Gender: Male
Re: Tagging System block code
« Reply #8 on: 05 Jan 10, 22:59:35 »
i have created a block with this coding in PHP block after created this my site is noww opening completely i have attached the screenshot please help me  :'( how to solve this Please Help on every page i m getting this and after this line there is not more page and nothing else page stop loading... please help

Offline Fadi

  • Newbie
  • *
  • Posts: 2
  • Gender: Male
Re: Tagging System block code
« Reply #9 on: 05 Jan 10, 23:10:57 »
Code: [Select]
   //Tagging System
   $dbresult= $smcFunc['db_query']('', "
   SELECT
      t.tag,l.ID,t.ID_TAG
   FROM {db_prefix}tags_log as l, {db_prefix}tags as t
   WHERE t.ID_TAG = l.ID_TAG && l.ID_TOPIC = $topic");
      $context['topic_tags'] = array();
       while($row = $smcFunc['db_fetch_assoc']($dbresult))
         {
            $context['topic_tags'][] = array(
            'ID' => $row['ID'],
            'ID_TAG' => $row['ID_TAG'],
            'tag' => $row['tag'],
            );
      }
   $smcFunc['db_free_result']($dbresult);
   //End Tagging System

i used this code in block  :'(

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 2772
  • Gender: Female
Re: Tagging System block code
« Reply #10 on: 05 Jan 10, 23:17:29 »
Add the line
Code: [Select]
global $context, $smcFunc;
at the top of you code

Fel
Many are stubborn in relation to the path, a few in relation to the target.