Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.
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: 4319
  • *Latest: thygrim

  • *Total Posts: 15776
  • *Total Topics: 2382
  • *Online Today: 3
  • *Most Online: 157
(27.08.09, 03:54:53)
  • *Users: 0
  • *Guests: 1
  • *Total: 1

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

0 Members and 0 Guests are viewing this topic.

Offline beltazar

  • Newbie
  • *
  • Posts: 7
Tagging System block code
« on: 27.11.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: 5584
  • Gender: Female
Re: Tagging System block code
« Reply #1 on: 28.11.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
  • PortaMx Supporter
  • *
  • Posts: 743
  • Gender: Male
  • I Hate Chinas Authority
Re: Tagging System block code
« Reply #2 on: 28.11.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.4 | PortaMx 1.5.1
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: 67
  • Gender: Male
  • 'MAS VALE CABALLO QUE CAUDAL!'
    • Horsegirls & Horsemen Community
Re: Tagging System block code
« Reply #3 on: 29.11.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
  • PortaMx Supporter
  • *
  • Posts: 743
  • Gender: Male
  • I Hate Chinas Authority
Re: Tagging System block code
« Reply #4 on: 29.11.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.4 | PortaMx 1.5.1
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: 67
  • Gender: Male
  • 'MAS VALE CABALLO QUE CAUDAL!'
    • Horsegirls & Horsemen Community
Re: Tagging System block code
« Reply #5 on: 29.11.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: 67
  • Gender: Male
  • 'MAS VALE CABALLO QUE CAUDAL!'
    • Horsegirls & Horsemen Community
Re: Tagging System block code
« Reply #6 on: 29.11.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.12.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.01.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.01.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: 5584
  • Gender: Female
Re: Tagging System block code
« Reply #10 on: 05.01.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.

Offline Eclipse16V

  • Full Member
  • ***
  • Posts: 117
  • Gender: Male
    • Tornado Map
Re: Tagging System block code
« Reply #11 on: 11.02.12, 08:03:01 »
Hallo,

habe diesen Code bei mir eingebaut nur jetzt wird keine Sprache geladen.
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'];
Wie bekomme ich es hin das auch Tag.german-utf8.php geladen wird?

Danke
I work with SMF 2.0.4:
Tornado Map
Default Theme
German & English Languages

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5584
  • Gender: Female
Re: Tagging System block code
« Reply #12 on: 11.02.12, 12:52:35 »
Die Sprachdateien werden normalerweise mit
loadLanguage('FileName')
geladen. In deinem Fall also mit loadLanguage('Tag') ...
Many are stubborn in relation to the path, a few in relation to the target.

Offline Eclipse16V

  • Full Member
  • ***
  • Posts: 117
  • Gender: Male
    • Tornado Map
Re: Tagging System block code
« Reply #13 on: 11.02.12, 13:16:03 »
Danke

Achso, Tags und nicht Tag.  ::)
I work with SMF 2.0.4:
Tornado Map
Default Theme
German & English Languages

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5584
  • Gender: Female
Re: Tagging System block code
« Reply #14 on: 11.02.12, 20:52:43 »
Wie bekomme ich es hin das auch Tag.german-utf8.php geladen wird?
Wenn die Datei Tags heißt ...  ;D
Many are stubborn in relation to the path, a few in relation to the target.