User

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


Login with username, password and session length

Select language:

Community



Donate

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

Stats

  • *Total Members: 4010
  • *Latest: kuki78

  • *Total Posts: 15656
  • *Total Topics: 2322
  • *Online Today: 23
  • *Most Online: 157
(27 Aug 09, 03:54:53)
  • *Users: 0
  • *Guests: 16
  • *Total: 16

Author Topic: Tagging System block code  (Read 3128 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: 5224
  • 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: 714
  • 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
|I Use: SMF 2.0 | PortaMx 1.4
Q: What do you do when you see a bear in the woods?
A: Play Dead!

H-A-H-L = Happy Admins Have Linux

Offline Horseman

  • Jr. Member
  • **
  • Posts: 64
  • 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 RC3 PortaMX 0.980-1 & PmxBlog
Reiter Community: http://www.h-h-c.de >SMF 2 RC3 PortaMX 0.980-1 & PmxBlog

Offline Cool

  • Free Tibet
  • Charter Member
  • *
  • Posts: 714
  • 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.
|I Use: SMF 2.0 | PortaMx 1.4
Q: What do you do when you see a bear in the woods?
A: Play Dead!

H-A-H-L = Happy Admins Have Linux

Offline Horseman

  • Jr. Member
  • **
  • Posts: 64
  • 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 RC3 PortaMX 0.980-1 & PmxBlog
Reiter Community: http://www.h-h-c.de >SMF 2 RC3 PortaMX 0.980-1 & PmxBlog

Offline Horseman

  • Jr. Member
  • **
  • Posts: 64
  • 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 RC3 PortaMX 0.980-1 & PmxBlog
Reiter Community: http://www.h-h-c.de >SMF 2 RC3 PortaMX 0.980-1 & PmxBlog

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: 5224
  • 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.