Link to the mod (https://custom.simplemachines.org/index.php?mod=579)
Tagging System For Topics
By vbgamer45 (http://custom.simplemachines.org/mods/index.php?action=profile;u=24876)
CompatibilityWorks with SMF 2.1.x, SMF 2.0.x and SMF 1.1.x
DescriptionA complete tagging system for SMF.
Features:Tag Cloud
Tagging of Topics
Thread owner can add and remove tags to the topic.
Tag Admins can tag topics and remove tags.
Clicking a tag returns a list of tagged topics that have that tag.
Recent tagged topics on tag cloud page.
Many settings to customize the tag system.
Support LinksSMF Package Parser (http://sleepycode.com/PackageParser/)
Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)
I understood, what's this mod! Any demo please?;) For custom theme any changes? :P
Yeah what is this... ??
Did you look at the screenshots?
http://mods.simplemachines.org/index.php?mod=579
Basically it allows you to tag posts with topics they are related to.
For example this topic: mods, smf, php, tagging
Custom theme changes involve both Post.template.php and Display.template.php for keyword posting and display. Index.template.php for link to tag cloud.
Quote from: vbgamer45 on December 19, 2006, 12:04:36 PM
Custom theme changes involve both Post.template.php and Display.template.php for keyword posting and display. Index.template.php for link to tag cloud.
can you code it here, so that i can apply manually :)
Check out the tags.xml file in the mod package it contains the changes that it makes to the template files.
Had problems installing post.php.
Did post.php myself and installed the rest through package manager, then i got a fatal MySQL error when posting.
What's the error? And where did you post the code in Post.php and what other mods do you have to Post.php and SMF version
Sorry I cannot remember the error but it was along the lines of
"You have an error in your SQL"
SMF version is 1.1.1.
I posted the code in post.php just as it said in xml install file, I cannot remember what it was exactly sorry.
I have a lot of mods so I do not know which ones changed post.php. here is the list:
Quote
1. Global Announcements 1.0 [ Uninstall ]
2. Membergroup Color Legend 1.1 [ Uninstall ]
3. Expand Pages Mod 1.0 [ Uninstall ]
4. Country Flags 1.0.1 [ Uninstall ]
5. Moderator Activity Report for SMF1.1RC2 1.1a [ Uninstall ]
6. Move Old Topics 1.1 [ Uninstall ]
7. PM On Registration 1.0.2 [ Uninstall ]
8. Users Online Today Mod 1.4.0b3 [ Uninstall ]
9. Profile User Action 1.0 [ Uninstall ]
10. Ad Managment 2.0 [ Uninstall ]
11. Subject Statistics In Subject 2 [ Uninstall ]
12. SMF Archive 1.1 [ Uninstall ]
13. Related Topics 1.1.1 [ Uninstall ]
14. Streaming 3 4.2.2a [ Uninstall ]
15. Member posts recount 0.5 [ Uninstall ]
16. SMF Staff Page 1.3 [ Uninstall ]
17. Global Headers Footers 1.3 [ Uninstall ]
18. MSN in SMF 1.0 [ Uninstall ]
19. Custom Action Mod 2.03 [ Uninstall ]
20. Hide Tag 1.2.1 [ Uninstall ]
21. Mod List Color Alternate 1.0 [ Uninstall ]
22. SMF Arcade 1.3.1-MOD-E1.5.1 [ Uninstall ]
23. SMFShop 2.3 [ Uninstall ]
24. Shop Item: Change Display Name CSS 0.1 [ Uninstall ]
25. Admin Notepad 1.0 [ Uninstall ]
26. Custom Profile Field Mod 3.16 [ Uninstall ]
27. Advanced Visual Verification 1.1 [ Uninstall ]
28. PhpInfo 1.1 [ Uninstall ]
29. Board Viewers Mod 1.1 [ Uninstall ]
30. SMF 1.1.1 Update Package 1.1.1 [ Uninstall ]
Do you need one more mod to that list? :P
The mods I have aren't exactly groundbreaking features, just little add ons to improve my forum. Is it my fault certain little things which would be better included in SMF are only available as mods? ;D
If I didn't use the mods I installed I suppose that's a good question from you, but myself and my members use them quite a lot :)
See, these are not even noticeable or seen or should pretty much be standard:
Quote
3. Expand Pages Mod 1.0 [ Uninstall ]
5. Moderator Activity Report for SMF1.1RC2 1.1a [ Uninstall ]
6. Move Old Topics 1.1 [ Uninstall ]
9. Profile User Action 1.0 [ Uninstall ]
12. SMF Archive 1.1 [ Uninstall ]
14. Streaming 3 4.2.2a [ Uninstall ]
15. Member posts recount 0.5 [ Uninstall ]
16. SMF Staff Page 1.3 [ Uninstall ]
17. Global Headers Footers 1.3 [ Uninstall ]
24. Shop Item: Change Display Name CSS 0.1 [ Uninstall ]
25. Admin Notepad 1.0 [ Uninstall ]
27. Advanced Visual Verification 1.1 [ Uninstall ]
28. PhpInfo 1.1 [ Uninstall ]
30. SMF 1.1.1 Update Package 1.1.1 [ Uninstall ]
Adding the tag list would improve searching for related topics a lot easier.
Can you post a copy of post.php from your sources folder?
Sorry I have to make two posts, it breaks character limit
<?php
/**********************************************************************************
* Post.php *
***********************************************************************************
* SMF: Simple Machines Forum *
* Open-Source Project Inspired by Zef Hemel ([email protected]) *
* =============================================================================== *
* Software Version: SMF 1.1.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *
* 2001-2006 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under *
* the terms of the provided license as published by Simple Machines LLC. *
* *
* This program is distributed in the hope that it is and will be useful, but *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* See the "license.txt" file for details of the Simple Machines license. *
* The latest version can always be found at http://www.simplemachines.org. *
**********************************************************************************/
if (!defined('SMF'))
die('Hacking attempt...');
/* The job of this file is to handle everything related to posting replies,
new topics, quotes, and modifications to existing posts. It also handles
quoting posts by way of javascript.
void Post()
- handles showing the post screen, loading the post to be modified, and
loading any post quoted.
- additionally handles previews of posts.
- uses the Post template and language file, main sub template.
- allows wireless access using the protocol_post sub template.
- requires different permissions depending on the actions, but most
notably post_new, post_reply_own, and post_reply_any.
- shows options for the editing and posting of calendar events and
attachments, as well as the posting of polls.
- accessed from ?action=post.
void Post2()
- actually posts or saves the message composed with Post().
- requires various permissions depending on the action.
- handles attachment, post, and calendar saving.
- sends off notifications, and allows for announcements and moderation.
- accessed from ?action=post2.
void AnnounceTopic()
- handle the announce topic function (action=announce).
- checks the topic announcement permissions and loads the announcement
template.
- requires the announce_topic permission.
- uses the ManageMembers template and Post language file.
- call the right function based on the sub-action.
void AnnouncementSelectMembergroup()
- lets the user select the membergroups that will receive the topic
announcement.
void AnnouncementSend()
- splits the members to be sent a topic announcement into chunks.
- composes notification messages in all languages needed.
- does the actual sending of the topic announcements in chunks.
- calculates a rough estimate of the percentage items sent.
void notifyMembersBoard()
- notifies members who have requested notification for new topics
posted on a board of said posts.
- only sends notifications to those who can *currently* see the topic
(it doesn't matter if they could when they requested notification.)
- loads the Post language file multiple times for each language if the
userLanguage setting is set.
void getTopic()
- gets a summary of the most recent posts in a topic.
- depends on the topicSummaryPosts setting.
- if you are editing a post, only shows posts previous to that post.
void QuoteFast()
- loads a post an inserts it into the current editing text box.
- uses the Post language file.
- uses special (sadly browser dependent) javascript to parse entities
for internationalization reasons.
- accessed with ?action=quotefast.
void JavaScriptModify()
// !!!
*/
function Post()
{
global $txt, $scripturl, $topic, $db_prefix, $modSettings, $board, $ID_MEMBER;
global $user_info, $sc, $board_info, $context, $settings, $sourcedir;
global $options, $func, $language;
loadLanguage('Post');
$context['show_spellchecking'] = !empty($modSettings['enableSpellChecking']) && function_exists('pspell_new');
// You can't reply with a poll... hacker.
if (isset($_REQUEST['poll']) && !empty($topic) && !isset($_REQUEST['msg']))
unset($_REQUEST['poll']);
// Posting an event?
$context['make_event'] = isset($_REQUEST['calendar']);
// You must be posting to *some* board.
if (empty($board) && !$context['make_event'])
fatal_lang_error('smf232', false);
// Generate a visual verification code to make sure the user is not a bot.
$context['visual_verification'] = empty($modSettings['disable_visual_verification']) && empty($modSettings['verificationDontAskGuestPost']) && $user_info['is_guest'];
$context['verificiation_image_href'] = $scripturl . '?action=verificationcode;rand=' . md5(rand());
// See whether you are allowed to post now.
if($context['visual_verification'])
{
require_once($sourcedir . '/Verification.php');
verificationNotExceed();
}
require_once($sourcedir . '/Subs-Post.php');
if (isset($_REQUEST['xml']))
{
$context['sub_template'] = 'post';
// Just in case of an earlier error...
$context['preview_message'] = '';
$context['preview_subject'] = '';
}
// Check if it's locked. It isn't locked if no topic is specified.
if (!empty($topic))
{
$request = db_query("
SELECT
t.locked, IFNULL(ln.ID_TOPIC, 0) AS notify, t.isSticky, t.ID_POLL, t.numReplies, mf.ID_MEMBER,
t.ID_FIRST_MSG, mf.subject, GREATEST(ml.posterTime, ml.modifiedTime) AS lastPostTime
FROM {$db_prefix}topics AS t
LEFT JOIN {$db_prefix}log_notify AS ln ON (ln.ID_TOPIC = t.ID_TOPIC AND ln.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}messages AS mf ON (mf.ID_MSG = t.ID_FIRST_MSG)
LEFT JOIN {$db_prefix}messages AS ml ON (ml.ID_MSG = t.ID_LAST_MSG)
WHERE t.ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);
list ($locked, $context['notify'], $sticky, $pollID, $context['num_replies'], $ID_MEMBER_POSTER, $ID_FIRST_MSG, $first_subject, $lastPostTime) = mysql_fetch_row($request);
mysql_free_result($request);
// If this topic already has a poll, they sure can't add another.
if (isset($_REQUEST['poll']) && $pollID > 0)
unset($_REQUEST['poll']);
if (empty($_REQUEST['msg']))
{
if ($user_info['is_guest'] && !allowedTo('post_reply_any'))
is_not_guest();
if ($ID_MEMBER_POSTER != $ID_MEMBER)
isAllowedTo('post_reply_any');
elseif (!allowedTo('post_reply_any'))
isAllowedTo('post_reply_own');
}
$context['can_lock'] = allowedTo('lock_any') || ($ID_MEMBER == $ID_MEMBER_POSTER && allowedTo('lock_own'));
$context['can_sticky'] = allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']);
$context['notify'] = !empty($context['notify']);
$context['sticky'] = isset($_REQUEST['sticky']) ? !empty($_REQUEST['sticky']) : $sticky;
}
else
{
if ((!$context['make_event'] || !empty($board)) && (!isset($_REQUEST['poll']) || $modSettings['pollMode'] != '1'))
isAllowedTo('post_new');
$locked = 0;
// !!! These won't work if you're making an event.
$context['can_lock'] = allowedTo(array('lock_any', 'lock_own'));
$context['can_sticky'] = allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']);
$context['notify'] = !empty($context['notify']);
$context['sticky'] = !empty($_REQUEST['sticky']);
}
// !!! These won't work if you're posting an event!
$context['can_notify'] = allowedTo('mark_any_notify');
$context['can_move'] = allowedTo('move_any');
$context['can_announce'] = allowedTo('announce_topic');
$context['locked'] = !empty($locked) || !empty($_REQUEST['lock']);
// An array to hold all the attachments for this topic.
$context['current_attachments'] = array();
// Don't allow a post if it's locked and you aren't all powerful.
if ($locked && !allowedTo('moderate_board'))
fatal_lang_error(90, false);
// Check the users permissions - is the user allowed to add or post a poll?
if (isset($_REQUEST['poll']) && $modSettings['pollMode'] == '1')
{
// New topic, new poll.
if (empty($topic))
isAllowedTo('poll_post');
// This is an old topic - but it is yours! Can you add to it?
elseif ($ID_MEMBER == $ID_MEMBER_POSTER && !allowedTo('poll_add_any'))
isAllowedTo('poll_add_own');
// If you're not the owner, can you add to any poll?
else
isAllowedTo('poll_add_any');
// Set up the poll options.
$context['poll_options'] = array(
'max_votes' => empty($_POST['poll_max_votes']) ? '1' : max(1, $_POST['poll_max_votes']),
'hide' => empty($_POST['poll_hide']) ? 0 : $_POST['poll_hide'],
'expire' => !isset($_POST['poll_expire']) ? '' : $_POST['poll_expire'],
'change_vote' => isset($_POST['poll_change_vote'])
);
// Make all five poll choices empty.
$context['choices'] = array(
array('id' => 0, 'number' => 1, 'label' => '', 'is_last' => false),
array('id' => 1, 'number' => 2, 'label' => '', 'is_last' => false),
array('id' => 2, 'number' => 3, 'label' => '', 'is_last' => false),
array('id' => 3, 'number' => 4, 'label' => '', 'is_last' => false),
array('id' => 4, 'number' => 5, 'label' => '', 'is_last' => true)
);
}
if ($context['make_event'])
{
// They might want to pick a board.
if (!isset($context['current_board']))
$context['current_board'] = 0;
// Start loading up the event info.
$context['event'] = array();
$context['event']['title'] = isset($_REQUEST['evtitle']) ? $_REQUEST['evtitle'] : '';
$context['event']['id'] = isset($_REQUEST['eventid']) ? (int) $_REQUEST['eventid'] : -1;
$context['event']['new'] = $context['event']['id'] == -1;
// Permissions check!
isAllowedTo('calendar_post');
// Editing an event? (but NOT previewing!?)
if (!$context['event']['new'] && !isset($_REQUEST['subject']))
{
// If the user doesn't have permission to edit the post in this topic, redirect them.
if ($ID_MEMBER_POSTER != $ID_MEMBER || !allowedTo('modify_own') && !allowedTo('modify_any'))
{
require_once($sourcedir . '/Calendar.php');
return CalendarPost();
}
// Get the current event information.
$request = db_query("
SELECT
ID_MEMBER, title, MONTH(startDate) AS month, DAYOFMONTH(startDate) AS day,
YEAR(startDate) AS year, (TO_DAYS(endDate) - TO_DAYS(startDate)) AS span
FROM {$db_prefix}calendar
WHERE ID_EVENT = " . $context['event']['id'] . "
LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($request);
mysql_free_result($request);
// Make sure the user is allowed to edit this event.
if ($row['ID_MEMBER'] != $ID_MEMBER)
isAllowedTo('calendar_edit_any');
elseif (!allowedTo('calendar_edit_any'))
isAllowedTo('calendar_edit_own');
$context['event']['month'] = $row['month'];
$context['event']['day'] = $row['day'];
$context['event']['year'] = $row['year'];
$context['event']['title'] = $row['title'];
$context['event']['span'] = $row['span'] + 1;
}
else
{
$today = getdate();
// You must have a month and year specified!
if (!isset($_REQUEST['month']))
$_REQUEST['month'] = $today['mon'];
if (!isset($_REQUEST['year']))
$_REQUEST['year'] = $today['year'];
$context['event']['month'] = (int) $_REQUEST['month'];
$context['event']['year'] = (int) $_REQUEST['year'];
$context['event']['day'] = isset($_REQUEST['day']) ? $_REQUEST['day'] : ($_REQUEST['month'] == $today['mon'] ? $today['mday'] : 0);
$context['event']['span'] = isset($_REQUEST['span']) ? $_REQUEST['span'] : 1;
// Make sure the year and month are in the valid range.
if ($context['event']['month'] < 1 || $context['event']['month'] > 12)
fatal_lang_error('calendar1', false);
if ($context['event']['year'] < $modSettings['cal_minyear'] || $context['event']['year'] > $modSettings['cal_maxyear'])
fatal_lang_error('calendar2', false);
// Get a list of boards they can post in.
$boards = boardsAllowedTo('post_new');
if (empty($boards))
fatal_lang_error('cannot_post_new');
$request = db_query("
SELECT c.name AS catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.childLevel
FROM {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT)
WHERE $user_info[query_see_board]" . (in_array(0, $boards) ? '' : "
AND b.ID_BOARD IN (" . implode(', ', $boards) . ")"), __FILE__, __LINE__);
$context['event']['boards'] = array();
while ($row = mysql_fetch_assoc($request))
$context['event']['boards'][] = array(
'id' => $row['ID_BOARD'],
'name' => $row['boardName'],
'childLevel' => $row['childLevel'],
'prefix' => str_repeat(' ', $row['childLevel'] * 3),
'cat' => array(
'id' => $row['ID_CAT'],
'name' => $row['catName']
)
);
mysql_free_result($request);
}
// Find the last day of the month.
$context['event']['last_day'] = (int) strftime('%d', mktime(0, 0, 0, $context['event']['month'] == 12 ? 1 : $context['event']['month'] + 1, 0, $context['event']['month'] == 12 ? $context['event']['year'] + 1 : $context['event']['year']));
$context['event']['board'] = !empty($board) ? $board : $modSettings['cal_defaultboard'];
}
if (empty($context['post_errors']))
$context['post_errors'] = array();
// See if any new replies have come along.
if (empty($_REQUEST['msg']) && !empty($topic))
{
if (empty($options['no_new_reply_warning']) && isset($_REQUEST['num_replies']))
{
$newReplies = $context['num_replies'] > $_REQUEST['num_replies'] ? $context['num_replies'] - $_REQUEST['num_replies'] : 0;
if (!empty($newReplies))
{
if ($newReplies == 1)
$txt['error_new_reply'] = isset($_GET['num_replies']) ? $txt['error_new_reply_reading'] : $txt['error_new_reply'];
else
$txt['error_new_replies'] = sprintf(isset($_GET['num_replies']) ? $txt['error_new_replies_reading'] : $txt['error_new_replies'], $newReplies);
// If they've come from the display page then we treat the error differently....
if (isset($_GET['num_replies']))
$newRepliesError = $newReplies;
else
$context['post_error'][$newReplies == 1 ? 'new_reply' : 'new_replies'] = true;
$modSettings['topicSummaryPosts'] = $newReplies > $modSettings['topicSummaryPosts'] ? max($modSettings['topicSummaryPosts'], 5) : $modSettings['topicSummaryPosts'];
}
}
// Check whether this is a really old post being bumped...
if (!empty($modSettings['oldTopicDays']) && $lastPostTime + $modSettings['oldTopicDays'] * 86400 < time() && empty($sticky) && !isset($_REQUEST['subject']))
$oldTopicError = true;
}
// Get a response prefix (like 'Re:') in the default forum language.
if (!isset($context['response_prefix']) && !($context['response_prefix'] = cache_get_data('response_prefix')))
{
if ($language === $user_info['language'])
$context['response_prefix'] = $txt['response_prefix'];
else
{
loadLanguage('index', $language, false);
$context['response_prefix'] = $txt['response_prefix'];
loadLanguage('index');
}
cache_put_data('response_prefix', $context['response_prefix'], 600);
}
// Previewing, modifying, or posting?
if (isset($_REQUEST['message']) || !empty($context['post_error']))
{
// Validate inputs.
if (empty($context['post_error']))
{
if ($func['htmltrim']($_REQUEST['subject']) == '')
$context['post_error']['no_subject'] = true;
if ($func['htmltrim']($_REQUEST['message']) == '')
$context['post_error']['no_message'] = true;
if (!empty($modSettings['max_messageLength']) && $func['strlen']($_REQUEST['message']) > $modSettings['max_messageLength'])
$context['post_error']['long_message'] = true;
// Are you... a guest?
if ($user_info['is_guest'])
{
$_REQUEST['guestname'] = !isset($_REQUEST['guestname']) ? '' : trim($_REQUEST['guestname']);
$_REQUEST['email'] = !isset($_REQUEST['email']) ? '' : trim($_REQUEST['email']);
// Validate the name and email.
if (!isset($_REQUEST['guestname']) || trim(strtr($_REQUEST['guestname'], '_', ' ')) == '')
$context['post_error']['no_name'] = true;
elseif ($func['strlen']($_REQUEST['guestname']) > 25)
$context['post_error']['long_name'] = true;
else
{
require_once($sourcedir . '/Subs-Members.php');
if (isReservedName(htmlspecialchars($_REQUEST['guestname']), 0, true, false))
{
$context['post_error']['bad_name'] = true;
}
}
if (empty($modSettings['guest_post_no_email']))
{
if (!isset($_REQUEST['email']) || $_REQUEST['email'] == '')
$context['post_error']['no_email'] = true;
elseif (preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_REQUEST['email'])) == 0)
$context['post_error']['bad_email'] = true;
}
}
// This is self explanatory - got any questions?
if (isset($_REQUEST['question']) && trim($_REQUEST['question']) == '')
$context['post_error']['no_question'] = true;
// This means they didn't click Post and get an error.
$really_previewing = true;
}
else
{
if (!isset($_REQUEST['subject']))
$_REQUEST['subject'] = '';
if (!isset($_REQUEST['message']))
$_REQUEST['message'] = '';
if (!isset($_REQUEST['icon']))
$_REQUEST['icon'] = 'xx';
$really_previewing = false;
}
// Set up the inputs for the form.
$form_subject = strtr($func['htmlspecialchars'](stripslashes($_REQUEST['subject'])), array("\r" => '', "\n" => '', "\t" => ''));
$form_message = $func['htmlspecialchars'](stripslashes($_REQUEST['message']), ENT_QUOTES);
// Make sure the subject isn't too long - taking into account special characters.
if ($func['strlen']($form_subject) > 100)
$form_subject = $func['substr']($form_subject, 0, 100);
// Have we inadvertently trimmed off the subject of useful information?
if ($func['htmltrim']($form_subject) === '')
$context['post_error']['no_subject'] = true;
// Any errors occurred?
if (!empty($context['post_error']))
{
loadLanguage('Errors');
$context['error_type'] = 'minor';
$context['post_error']['messages'] = array();
foreach ($context['post_error'] as $post_error => $dummy)
{
if ($post_error == 'messages')
continue;
$context['post_error']['messages'][] = $txt['error_' . $post_error];
// If it's not a minor error flag it as such.
if (!in_array($post_error, array('new_reply', 'new_replies', 'old_topic')))
$context['error_type'] = 'serious';
}
}
if (isset($_REQUEST['poll']))
{
$context['question'] = isset($_REQUEST['question']) ? $func['htmlspecialchars'](stripslashes(trim($_REQUEST['question']))) : '';
$context['choices'] = array();
$choice_id = 0;
$_POST['options'] = empty($_POST['options']) ? array() : htmlspecialchars__recursive(stripslashes__recursive($_POST['options']));
foreach ($_POST['options'] as $option)
{
if (trim($option) == '')
continue;
$context['choices'][] = array(
'id' => $choice_id++,
'number' => $choice_id,
'label' => $option,
'is_last' => false
);
}
if (count($context['choices']) < 2)
{
$context['choices'][] = array(
'id' => $choice_id++,
'number' => $choice_id,
'label' => '',
'is_last' => false
);
$context['choices'][] = array(
'id' => $choice_id++,
'number' => $choice_id,
'label' => '',
'is_last' => false
);
}
$context['choices'][count($context['choices']) - 1]['is_last'] = true;
}
// Are you... a guest?
if ($user_info['is_guest'])
{
$_REQUEST['guestname'] = !isset($_REQUEST['guestname']) ? '' : trim($_REQUEST['guestname']);
$_REQUEST['email'] = !isset($_REQUEST['email']) ? '' : trim($_REQUEST['email']);
$_REQUEST['guestname'] = htmlspecialchars($_REQUEST['guestname']);
$context['name'] = $_REQUEST['guestname'];
$_REQUEST['email'] = htmlspecialchars($_REQUEST['email']);
$context['email'] = $_REQUEST['email'];
$user_info['name'] = $_REQUEST['guestname'];
}
// Only show the preview stuff if they hit Preview.
if ($really_previewing == true || isset($_REQUEST['xml']))
{
// Set up the preview message and subject and censor them...
$context['preview_message'] = $form_message;
preparsecode($form_message, true);
preparsecode($context['preview_message']);
// Do all bulletin board code tags, with or without smileys.
$context['preview_message'] = parse_bbc($context['preview_message'], isset($_REQUEST['ns']) ? 0 : 1);
if ($form_subject != '')
{
$context['preview_subject'] = $form_subject;
censorText($context['preview_subject']);
censorText($context['preview_message']);
}
else
$context['preview_subject'] = '<i>' . $txt[24] . '</i>';
}
// Set up the checkboxes.
$context['notify'] = !empty($_REQUEST['notify']);
$context['use_smileys'] = !isset($_REQUEST['ns']);
$context['icon'] = isset($_REQUEST['icon']) ? preg_replace('~[\./\\\\*\':"<>]~', '', $_REQUEST['icon']) : 'xx';
// Set the destination action for submission.
$context['destination'] = 'post2;start=' . $_REQUEST['start'] . (isset($_REQUEST['msg']) ? ';msg=' . $_REQUEST['msg'] . ';sesc=' . $sc : '') . (isset($_REQUEST['poll']) ? ';poll' : '');
$context['submit_label'] = isset($_REQUEST['msg']) ? $txt[10] : $txt[105];
// Previewing an edit?
if (isset($_REQUEST['msg']))
{
if (!empty($modSettings['attachmentEnable']))
{
$request = db_query("
SELECT IFNULL(size, -1) AS filesize, filename, ID_ATTACH
FROM {$db_prefix}attachments
WHERE ID_MSG = " . (int) $_REQUEST['msg'] . "
AND attachmentType = 0", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
if ($row['filesize'] <= 0)
continue;
$context['current_attachments'][] = array(
'name' => $row['filename'],
'id' => $row['ID_ATTACH']
);
}
mysql_free_result($request);
}
// Allow moderators to change names....
if (allowedTo('moderate_forum'))
{
$request = db_query("
SELECT ID_MEMBER, posterName, posterEmail
FROM {$db_prefix}messages
WHERE ID_MSG = " . (int) $_REQUEST['msg'] . "
AND ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($request);
mysql_free_result($request);
if (empty($row['ID_MEMBER']))
{
$context['name'] = htmlspecialchars($row['posterName']);
$context['email'] = htmlspecialchars($row['posterEmail']);
}
}
}
// No check is needed, since nothing is really posted.
checkSubmitOnce('free');
}
// Editing a message...
elseif (isset($_REQUEST['msg']))
{
checkSession('get');
// Get the existing message.
$request = db_query("
SELECT
m.ID_MEMBER, m.modifiedTime, m.smileysEnabled, m.body,
m.posterName, m.posterEmail, m.subject, m.icon,
IFNULL(a.size, -1) AS filesize, a.filename, a.ID_ATTACH,
t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER, m.posterTime
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MSG = m.ID_MSG AND a.attachmentType = 0)
WHERE m.ID_MSG = " . (int) $_REQUEST['msg'] . "
AND m.ID_TOPIC = $topic
AND t.ID_TOPIC = $topic", __FILE__, __LINE__);
// The message they were trying to edit was most likely deleted.
// !!! Change this error message?
if (mysql_num_rows($request) == 0)
fatal_lang_error('smf232', false);
$row = mysql_fetch_assoc($request);
$attachment_stuff = array($row);
while ($row2 = mysql_fetch_assoc($request))
$attachment_stuff[] = $row2;
mysql_free_result($request);
if ($row['ID_MEMBER'] == $ID_MEMBER && !allowedTo('modify_any'))
{
// Give an extra five minutes over the disable time threshold, so they can type.
if (!empty($modSettings['edit_disable_time']) && $row['posterTime'] + ($modSettings['edit_disable_time'] + 5) * 60 < time())
fatal_lang_error('modify_post_time_passed', false);
elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_own'))
isAllowedTo('modify_replies');
else
isAllowedTo('modify_own');
}
elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_any'))
isAllowedTo('modify_replies');
else
isAllowedTo('modify_any');
// When was it last modified?
if (!empty($row['modifiedTime']))
$context['last_modified'] = timeformat($row['modifiedTime']);
// Get the stuff ready for the form.
$form_subject = $row['subject'];
$form_message = un_preparsecode($row['body']);
censorText($form_message);
censorText($form_subject);
// Check the boxes that should be checked.
$context['use_smileys'] = !empty($row['smileysEnabled']);
$context['icon'] = $row['icon'];
// Load up 'em attachments!
foreach ($attachment_stuff as $attachment)
{
if ($attachment['filesize'] >= 0 && !empty($modSettings['attachmentEnable']))
$context['current_attachments'][] = array(
'name' => $attachment['filename'],
'id' => $attachment['ID_ATTACH']
);
}
// Allow moderators to change names....
if (allowedTo('moderate_forum') && empty($row['ID_MEMBER']))
{
$context['name'] = htmlspecialchars($row['posterName']);
$context['email'] = htmlspecialchars($row['posterEmail']);
}
// Set the destinaton.
$context['destination'] = 'post2;start=' . $_REQUEST['start'] . ';msg=' . $_REQUEST['msg'] . ';sesc=' . $sc . (isset($_REQUEST['poll']) ? ';poll' : '');
$context['submit_label'] = $txt[10];
}
// Posting...
else
{
// By default....
$context['use_smileys'] = true;
$context['icon'] = 'xx';
if ($user_info['is_guest'])
{
$context['name'] = '';
$context['email'] = '';
}
$context['destination'] = 'post2;start=' . $_REQUEST['start'] . (isset($_REQUEST['poll']) ? ';poll' : '');
$context['submit_label'] = $txt[105];
// Posting a quoted reply?
if (!empty($topic) && !empty($_REQUEST['quote']))
{
checkSession('get');
// Make sure they _can_ quote this post, and if so get it.
$request = db_query("
SELECT m.subject, IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.body
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE m.ID_MSG = " . (int) $_REQUEST['quote'] . "
AND b.ID_BOARD = m.ID_BOARD
AND $user_info[query_see_board]
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) == 0)
fatal_lang_error('quoted_post_deleted', false);
list ($form_subject, $mname, $mdate, $form_message) = mysql_fetch_row($request);
mysql_free_result($request);
// Add 'Re: ' to the front of the quoted subject.
if (trim($context['response_prefix']) != '' && $func['strpos']($form_subject, trim($context['response_prefix'])) !== 0)
$form_subject = $context['response_prefix'] . $form_subject;
// Censor the message and subject.
censorText($form_message);
censorText($form_subject);
//Lets change the HideTag ;) this is a secret and should be a secret :)
if (empty($modSettings['hide_hiddentext'])) $modSettings['hide_hiddentext'] = ' '; //A tiny little space =)
// The MUI Switch ;D
if (!empty($modSettings['hide_MUIswitch'])) $modSettings['hide_hiddentext'] = &$txt['hide_hiddentext'];
$form_message = preg_replace("~\[hide\](.+?)\[\/hide\]~i", $modSettings['hide_hiddentext'], $form_message);
$form_message = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), $modSettings['hide_hiddentext'], $form_message);
$form_message = preg_replace('~<br(?: /)?' . '>~i', "\n", $form_message);
// Remove any nested quotes, if necessary.
if (!empty($modSettings['removeNestedQuotes']))
$form_message = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $form_message);
// Add a quote string on the front and end.
$form_message = '[quote author=' . $mname . ' link=topic=' . $topic . '.msg' . (int) $_REQUEST['quote'] . '#msg' . (int) $_REQUEST['quote'] . ' date=' . $mdate . ']' . "\n" . $form_message . "\n" . '[/quote]';
}
// Posting a reply without a quote?
elseif (!empty($topic) && empty($_REQUEST['quote']))
{
// Get the first message's subject.
$form_subject = $first_subject;
// Add 'Re: ' to the front of the subject.
if (trim($context['response_prefix']) != '' && $form_subject != '' && $func['strpos']($form_subject, trim($context['response_prefix'])) !== 0)
$form_subject = $context['response_prefix'] . $form_subject;
// Censor the subject.
censorText($form_subject);
$form_message = '';
}
else
{
$form_subject = isset($_GET['subject']) ? $_GET['subject'] : '';
$form_message = '';
}
}
// !!! This won't work if you're posting an event.
if (allowedTo('post_attachment'))
{
if (empty($_SESSION['temp_attachments']))
$_SESSION['temp_attachments'] = array();
// If this isn't a new post, check the current attachments.
if (isset($_REQUEST['msg']))
{
$request = db_query("
SELECT COUNT(*), SUM(size)
FROM {$db_prefix}attachments
WHERE ID_MSG = " . (int) $_REQUEST['msg'] . "
AND attachmentType = 0", __FILE__, __LINE__);
list ($quantity, $total_size) = mysql_fetch_row($request);
mysql_free_result($request);
}
else
{
$quantity = 0;
$total_size = 0;
}
$temp_start = 0;
if (!empty($_SESSION['temp_attachments']))
foreach ($_SESSION['temp_attachments'] as $attachID => $name)
{
$temp_start++;
if (preg_match('~^post_tmp_' . $ID_MEMBER . '_\d+$~', $attachID) == 0)
{
unset($_SESSION['temp_attachments'][$attachID]);
continue;
}
if (!empty($_POST['attach_del']) && !in_array($attachID, $_POST['attach_del']))
{
$deleted_attachments = true;
unset($_SESSION['temp_attachments'][$attachID]);
@unlink($modSettings['attachmentUploadDir'] . '/' . $attachID);
continue;
}
$quantity++;
$total_size += filesize($modSettings['attachmentUploadDir'] . '/' . $attachID);
$context['current_attachments'][] = array(
'name' => getAttachmentFilename($name, false, true),
'id' => $attachID
);
}
if (!empty($_POST['attach_del']))
{
$del_temp = array();
foreach ($_POST['attach_del'] as $i => $dummy)
$del_temp[$i] = (int) $dummy;
foreach ($context['current_attachments'] as $k => $dummy)
if (!in_array($dummy['id'], $del_temp))
{
$context['current_attachments'][$k]['unchecked'] = true;
$deleted_attachments = !isset($deleted_attachments) || is_bool($deleted_attachments) ? 1 : $deleted_attachments + 1;
$quantity--;
}
}
if (!empty($_FILES['attachment']))
foreach ($_FILES['attachment']['tmp_name'] as $n => $dummy)
{
if ($_FILES['attachment']['name'][$n] == '')
continue;
if (!is_uploaded_file($_FILES['attachment']['tmp_name'][$n]) || (@ini_get('open_basedir') == '' && !file_exists($_FILES['attachment']['tmp_name'][$n])))
fatal_lang_error('smf124');
if (!empty($modSettings['attachmentSizeLimit']) && $_FILES['attachment']['size'][$n] > $modSettings['attachmentSizeLimit'] * 1024)
fatal_lang_error('smf122', false, array($modSettings['attachmentSizeLimit']));
$quantity++;
if (!empty($modSettings['attachmentNumPerPostLimit']) && $quantity > $modSettings['attachmentNumPerPostLimit'])
fatal_lang_error('attachments_limit_per_post', false, array($modSettings['attachmentNumPerPostLimit']));
$total_size += $_FILES['attachment']['size'][$n];
if (!empty($modSettings['attachmentPostLimit']) && $total_size > $modSettings['attachmentPostLimit'] * 1024)
fatal_lang_error('smf122', false, array($modSettings['attachmentPostLimit']));
if (!empty($modSettings['attachmentCheckExtensions']))
{
if (!in_array(strtolower(substr(strrchr($_FILES['attachment']['name'][$n], '.'), 1)), explode(',', strtolower($modSettings['attachmentExtensions']))))
fatal_error($_FILES['attachment']['name'][$n] . '.<br />' . $txt['smf123'] . ' ' . $modSettings['attachmentExtensions'] . '.', false);
}
if (!empty($modSettings['attachmentDirSizeLimit']))
{
// Make sure the directory isn't full.
$dirSize = 0;
$dir = @opendir($modSettings['attachmentUploadDir']) or fatal_lang_error('smf115b');
while ($file = readdir($dir))
{
if (substr($file, 0, -1) == '.')
continue;
if (preg_match('~^post_tmp_\d+_\d+$~', $file) != 0)
{
// Temp file is more than 5 hours old!
if (filemtime($modSettings['attachmentUploadDir'] . '/' . $file) < time() - 18000)
@unlink($modSettings['attachmentUploadDir'] . '/' . $file);
continue;
}
$dirSize += filesize($modSettings['attachmentUploadDir'] . '/' . $file);
}
closedir($dir);
// Too big! Maybe you could zip it or something...
if ($_FILES['attachment']['size'][$n] + $dirSize > $modSettings['attachmentDirSizeLimit'] * 1024)
fatal_lang_error('smf126');
}
if (!is_writable($modSettings['attachmentUploadDir']))
fatal_lang_error('attachments_no_write');
$attachID = 'post_tmp_' . $ID_MEMBER . '_' . $temp_start++;
$_SESSION['temp_attachments'][$attachID] = stripslashes(basename($_FILES['attachment']['name'][$n]));
$context['current_attachments'][] = array(
'name' => basename(stripslashes($_FILES['attachment']['name'][$n])),
'id' => $attachID
);
$destName = $modSettings['attachmentUploadDir'] . '/' . $attachID;
if (!move_uploaded_file($_FILES['attachment']['tmp_name'][$n], $destName))
fatal_lang_error('smf124');
@chmod($destName, 0644);
}
}
// If we are coming here to make a reply, and someone has already replied... make a special warning message.
if (isset($newRepliesError))
{
$context['post_error']['messages'][] = $newRepliesError == 1 ? $txt['error_new_reply'] : $txt['error_new_replies'];
$context['error_type'] = 'minor';
}
if (isset($oldTopicError))
{
$context['post_error']['messages'][] = $txt['error_old_topic'];
$context['error_type'] = 'minor';
}
// What are you doing? Posting a poll, modifying, previewing, new post, or reply...
if (isset($_REQUEST['poll']))
$context['page_title'] = $txt['smf20'];
elseif ($context['make_event'])
$context['page_title'] = $context['event']['id'] == -1 ? $txt['calendar23'] : $txt['calendar20'];
elseif (isset($_REQUEST['msg']))
$context['page_title'] = $txt[66];
elseif (isset($_REQUEST['subject'], $context['preview_subject']))
$context['page_title'] = $txt[507] . ' - ' . strip_tags($context['preview_subject']);
elseif (empty($topic))
$context['page_title'] = $txt[33];
else
$context['page_title'] = $txt[25];
// Build the link tree.
if (empty($topic))
$context['linktree'][] = array(
'name' => '<i>' . $txt[33] . '</i>'
);
else
$context['linktree'][] = array(
'url' => $scripturl . '?topic=' . $topic . '.' . $_REQUEST['start'],
'name' => $form_subject,
'extra_before' => '<span' . ($settings['linktree_inline'] ? ' class="smalltext"' : '') . '><b class="nav">' . $context['page_title'] . ' ( </b></span>',
'extra_after' => '<span' . ($settings['linktree_inline'] ? ' class="smalltext"' : '') . '><b class="nav"> )</b></span>'
);
// If they've unchecked an attachment, they may still want to attach that many more files, but don't allow more than num_allowed_attachments.
// !!! This won't work if you're posting an event.
$context['num_allowed_attachments'] = min($modSettings['attachmentNumPerPostLimit'] - count($context['current_attachments']) + (isset($deleted_attachments) ? $deleted_attachments : 0), $modSettings['attachmentNumPerPostLimit']);
$context['can_post_attachment'] = !empty($modSettings['attachmentEnable']) && $modSettings['attachmentEnable'] == 1 && allowedTo('post_attachment') && $context['num_allowed_attachments'] > 0;
$context['subject'] = addcslashes($form_subject, '"');
$context['message'] = str_replace(array('"', '<', '>', ' '), array('"', '<', '>', ' '), $form_message);
$context['attached'] = '';
$context['allowed_extensions'] = strtr($modSettings['attachmentExtensions'], array(',' => ', '));
$context['make_poll'] = isset($_REQUEST['poll']);
// Message icons - customized icons are off?
if (empty($modSettings['messageIcons_enable']))
{
$context['icons'] = array(
array('value' => 'xx', 'name' => $txt[281]),
array('value' => 'thumbup', 'name' => $txt[282]),
array('value' => 'thumbdown', 'name' => $txt[283]),
array('value' => 'exclamation', 'name' => $txt[284]),
array('value' => 'question', 'name' => $txt[285]),
array('value' => 'lamp', 'name' => $txt[286]),
array('value' => 'smiley', 'name' => $txt[287]),
array('value' => 'angry', 'name' => $txt[288]),
array('value' => 'cheesy', 'name' => $txt[289]),
array('value' => 'grin', 'name' => $txt[293]),
array('value' => 'sad', 'name' => $txt[291]),
array('value' => 'wink', 'name' => $txt[292])
);
foreach ($context['icons'] as $k => $dummy)
{
$context['icons'][$k]['url'] = $settings['images_url'] . '/post/' . $dummy['value'] . '.gif';
$context['icons'][$k]['is_last'] = false;
}
$context['icon_url'] = $settings['images_url'] . '/post/' . $context['icon'] . '.gif';
}
// Otherwise load the icons, and check we give the right image too...
else
{
// Regardless of what *should* exist, let's do this properly.
$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$context['icon_sources'] = array();
foreach ($stable_icons as $icon)
$context['icon_sources'][$icon] = 'images_url';
// Array for all icons that need to revert to the default theme!
$context['javascript_icons'] = array();
if (($temp = cache_get_data('posting_icons-' . $board, 480)) == null)
{
$request = db_query("
SELECT title, filename
FROM {$db_prefix}message_icons
WHERE ID_BOARD IN (0, $board)", __FILE__, __LINE__);
$icon_data = array();
while ($row = mysql_fetch_assoc($request))
$icon_data[] = $row;
mysql_free_result($request);
cache_put_data('posting_icons-' . $board, $icon_data, 480);
}
else
$icon_data = $temp;
$context['icons'] = array();
foreach ($icon_data as $icon)
{
if (!isset($context['icon_sources'][$icon['filename']]))
$context['icon_sources'][$icon['filename']] = file_exists($settings['theme_dir'] . '/images/post/' . $icon['filename'] . '.gif') ? 'images_url' : 'default_images_url';
// If the icon exists only in the default theme, ensure the javascript popup respects this.
if ($context['icon_sources'][$icon['filename']] == 'default_images_url')
$context['javascript_icons'][] = $icon['filename'];
$context['icons'][] = array(
'value' => $icon['filename'],
'name' => $icon['title'],
'url' => $settings[$context['icon_sources'][$icon['filename']]] . '/post/' . $icon['filename'] . '.gif',
'is_last' => false,
);
}
$context['icon_url'] = $settings[isset($context['icon_sources'][$context['icon']]) ? $context['icon_sources'][$context['icon']] : 'images_url'] . '/post/' . $context['icon'] . '.gif';
}
if (!empty($context['icons']))
$context['icons'][count($context['icons']) - 1]['is_last'] = true;
$found = false;
for ($i = 0, $n = count($context['icons']); $i < $n; $i++)
{
$context['icons'][$i]['selected'] = $context['icon'] == $context['icons'][$i]['value'];
if ($context['icons'][$i]['selected'])
$found = true;
}
if (!$found)
array_unshift($context['icons'], array(
'value' => $context['icon'],
'name' => $txt['current_icon'],
'url' => $context['icon_url'],
'is_last' => empty($context['icons']),
'selected' => true,
));
if (isset($topic))
getTopic();
$context['back_to_topic'] = isset($_REQUEST['goback']) || (isset($_REQUEST['msg']) && !isset($_REQUEST['subject']));
$context['show_additional_options'] = !empty($_POST['additional_options']) || !empty($_SESSION['temp_attachments']) || !empty($deleted_attachments);
$context['is_new_topic'] = empty($topic);
$context['is_new_post'] = !isset($_REQUEST['msg']);
$context['is_first_post'] = $context['is_new_topic'] || (isset($_REQUEST['msg']) && $_REQUEST['msg'] == $ID_FIRST_MSG);
// Register this form in the session variables.
checkSubmitOnce('register');
// Finally, load the template.
if (WIRELESS)
$context['sub_template'] = WIRELESS_PROTOCOL . '_post';
elseif (!isset($_REQUEST['xml']))
loadTemplate('Post');
}
function Post2()
{
global $board, $topic, $txt, $db_prefix, $modSettings, $sourcedir, $context;
global $ID_MEMBER, $user_info, $board_info, $options, $func;
// Previewing? Go back to start.
if (isset($_REQUEST['preview']))
return Post();
// Prevent double submission of this form.
checkSubmitOnce('check');
// No errors as yet.
$post_errors = array();
// If the session has timed out, let the user re-submit their form.
if (checkSession('post', '', false) != '')
$post_errors[] = 'session_timeout';
require_once($sourcedir . '/Subs-Post.php');
loadLanguage('Post');
// Replying to a topic?
if (!empty($topic) && !isset($_REQUEST['msg']))
{
$request = db_query("
SELECT t.locked, t.isSticky, t.ID_POLL, t.numReplies, m.ID_MEMBER
FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m)
WHERE t.ID_TOPIC = $topic
AND m.ID_MSG = t.ID_FIRST_MSG
LIMIT 1", __FILE__, __LINE__);
list ($tmplocked, $tmpstickied, $pollID, $numReplies, $ID_MEMBER_POSTER) = mysql_fetch_row($request);
mysql_free_result($request);
// Don't allow a post if it's locked.
if ($tmplocked != 0 && !allowedTo('moderate_board'))
fatal_lang_error(90, false);
// Sorry, multiple polls aren't allowed... yet. You should stop giving me ideas :P.
if (isset($_REQUEST['poll']) && $pollID > 0)
unset($_REQUEST['poll']);
if ($ID_MEMBER_POSTER != $ID_MEMBER)
isAllowedTo('post_reply_any');
elseif (!allowedTo('post_reply_any'))
isAllowedTo('post_reply_own');
if (isset($_POST['lock']))
{
// Nothing is changed to the lock.
if ((empty($tmplocked) && empty($_POST['lock'])) || (!empty($_POST['lock']) && !empty($tmplocked)))
unset($_POST['lock']);
// You're have no permission to lock this topic.
elseif (!allowedTo(array('lock_any', 'lock_own')) || (!allowedTo('lock_any') && $ID_MEMBER != $ID_MEMBER_POSTER))
unset($_POST['lock']);
// You are allowed to (un)lock your own topic only.
elseif (!allowedTo('lock_any'))
{
// You cannot override a moderator lock.
if ($tmplocked == 1)
unset($_POST['lock']);
else
$_POST['lock'] = empty($_POST['lock']) ? 0 : 2;
}
// Hail mighty moderator, (un)lock this topic immediately.
else
$_POST['lock'] = empty($_POST['lock']) ? 0 : 1;
}
// So you wanna (un)sticky this...let's see.
if (isset($_POST['sticky']) && (empty($modSettings['enableStickyTopics']) || $_POST['sticky'] == $tmpstickied || !allowedTo('make_sticky')))
unset($_POST['sticky']);
// If the number of replies has changed, if the setting is enabled, go back to Post() - which handles the error.
$newReplies = isset($_POST['num_replies']) && $numReplies > $_POST['num_replies'] ? $numReplies - $_POST['num_replies'] : 0;
if (empty($options['no_new_reply_warning']) && !empty($newReplies))
{
$_REQUEST['preview'] = true;
return Post();
}
$posterIsGuest = $user_info['is_guest'];
}
Damn code tags won't work now
// Posting a new topic.
elseif (empty($topic))
{
if (!isset($_REQUEST['poll']) || $modSettings['pollMode'] != '1')
isAllowedTo('post_new');
if (isset($_POST['lock']))
{
// New topics are by default not locked.
if (empty($_POST['lock']))
unset($_POST['lock']);
// Besides, you need permission.
elseif (!allowedTo(array('lock_any', 'lock_own')))
unset($_POST['lock']);
// A moderator-lock (1) can override a user-lock (2).
else
$_POST['lock'] = allowedTo('lock_any') ? 1 : 2;
}
if (isset($_POST['sticky']) && (empty($modSettings['enableStickyTopics']) || empty($_POST['sticky']) || !allowedTo('make_sticky')))
unset($_POST['sticky']);
$posterIsGuest = $user_info['is_guest'];
}
// Modifying an existing message?
elseif (isset($_REQUEST['msg']) && !empty($topic))
{
$_REQUEST['msg'] = (int) $_REQUEST['msg'];
$request = db_query("
SELECT
m.ID_MEMBER, m.posterName, m.posterEmail, m.posterTime,
t.ID_FIRST_MSG, t.locked, t.isSticky, t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t)
WHERE m.ID_MSG = $_REQUEST[msg]
AND t.ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) == 0)
fatal_lang_error('smf272', false);
$row = mysql_fetch_assoc($request);
mysql_free_result($request);
if (!empty($row['locked']) && !allowedTo('moderate_board'))
fatal_lang_error(90, false);
if (isset($_POST['lock']))
{
// Nothing changes to the lock status.
if ((empty($_POST['lock']) && empty($row['locked'])) || (!empty($_POST['lock']) && !empty($row['locked'])))
unset($_POST['lock']);
// You're simply not allowed to (un)lock this.
elseif (!allowedTo(array('lock_any', 'lock_own')) || (!allowedTo('lock_any') && $ID_MEMBER != $row['ID_MEMBER_POSTER']))
unset($_POST['lock']);
// You're only allowed to lock your own topics.
elseif (!allowedTo('lock_any'))
{
// You're not allowed to break a moderator's lock.
if ($row['locked'] == 1)
unset($_POST['lock']);
// Lock it with a soft lock or unlock it.
else
$_POST['lock'] = empty($_POST['lock']) ? 0 : 2;
}
// You must be the moderator.
else
$_POST['lock'] = empty($_POST['lock']) ? 0 : 1;
}
// Change the sticky status of this topic?
if (isset($_POST['sticky']) && (!allowedTo('make_sticky') || $_POST['sticky'] == $row['isSticky']))
unset($_POST['sticky']);
if ($row['ID_MEMBER'] == $ID_MEMBER && !allowedTo('modify_any'))
{
if (!empty($modSettings['edit_disable_time']) && $row['posterTime'] + $modSettings['edit_disable_time'] * 60 < time())
fatal_lang_error('modify_post_time_passed', false);
elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_own'))
isAllowedTo('modify_replies');
else
isAllowedTo('modify_own');
}
elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_any'))
{
isAllowedTo('modify_replies');
// If you're modifying a reply, I say it better be logged...
$moderationAction = true;
}
else
{
isAllowedTo('modify_any');
// Log it, assuming you're not modifying your own post.
if ($row['ID_MEMBER'] != $ID_MEMBER)
$moderationAction = true;
}
$posterIsGuest = empty($row['ID_MEMBER']);
if (!allowedTo('moderate_forum') || !$posterIsGuest)
{
$_POST['guestname'] = addslashes($row['posterName']);
$_POST['email'] = addslashes($row['posterEmail']);
}
}
// If the poster is a guest evaluate the legality of name and email.
if ($posterIsGuest)
{
$_POST['guestname'] = !isset($_POST['guestname']) ? '' : trim($_POST['guestname']);
$_POST['email'] = !isset($_POST['email']) ? '' : trim($_POST['email']);
if ($_POST['guestname'] == '' || $_POST['guestname'] == '_')
$post_errors[] = 'no_name';
if ($func['strlen']($_POST['guestname']) > 25)
$post_errors[] = 'long_name';
if (empty($modSettings['guest_post_no_email']))
{
// Only check if they changed it!
if (!isset($row) || $row['posterEmail'] != $_POST['email'])
{
if (!allowedTo('moderate_forum') && (!isset($_POST['email']) || $_POST['email'] == ''))
$post_errors[] = 'no_email';
if (!allowedTo('moderate_forum') && preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_POST['email'])) == 0)
$post_errors[] = 'bad_email';
}
// Now make sure this email address is not banned from posting.
isBannedEmail($_POST['email'], 'cannot_post', sprintf($txt['you_are_post_banned'], $txt[28]));
}
// Check whether the visual verification code was entered correctly, and the poster is really a guest.
if (empty($modSettings['disable_visual_verification']) && empty($modSettings['verificationDontAskGuestPost']) && $ID_MEMBER == 0)
{
require_once($sourcedir . '/Verification.php');
if ((empty($_REQUEST['visual_verification_code']) || !verifyCode(strtoupper($_REQUEST['visual_verification_code']))))
{
$post_errors[] = 'visual_verification_failed';
log_error($txt['visual_verification_failed']);
}
}
}
// Check the subject and message.
if (!isset($_POST['subject']) || $func['htmltrim']($_POST['subject']) === '')
$post_errors[] = 'no_subject';
if (!isset($_POST['message']) || $func['htmltrim']($_POST['message']) === '')
$post_errors[] = 'no_message';
elseif (!empty($modSettings['max_messageLength']) && $func['strlen']($_POST['message']) > $modSettings['max_messageLength'])
$post_errors[] = 'long_message';
else
{
// Prepare the message a bit for some additional testing.
$_POST['message'] = $func['htmlspecialchars']($_POST['message'], ENT_QUOTES);
// Preparse code. (Zef)
if ($user_info['is_guest'])
$user_info['name'] = $_POST['guestname'];
preparsecode($_POST['message']);
// Let's see if there's still some content left without the tags.
if ($func['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) && (strip_tags(parse_bbc($_POST['message'], false), '<yt>')) === '')
$post_errors[] = 'no_message';
}
if (isset($_POST['calendar']) && !isset($_REQUEST['deleteevent']) && $func['htmltrim']($_POST['evtitle']) === '')
$post_errors[] = 'no_event';
// You are not!
if (isset($_POST['message']) && strtolower($_POST['message']) == 'i am the administrator.' && !$user_info['is_admin'])
fatal_error('Knave! Masquerader! Charlatan!', false);
// Validate the poll...
if (isset($_REQUEST['poll']) && $modSettings['pollMode'] == '1')
{
if (isset($topic) && !isset($_REQUEST['msg']))
fatal_lang_error(1, false);
// This is a new topic... so it's a new poll.
if (empty($topic))
isAllowedTo('poll_post');
// Can you add to your own topics?
elseif ($ID_MEMBER == $row['ID_MEMBER_POSTER'] && !allowedTo('poll_add_any'))
isAllowedTo('poll_add_own');
// Can you add polls to any topic, then?
else
isAllowedTo('poll_add_any');
if (!isset($_POST['question']) || trim($_POST['question']) == '')
$post_errors[] = 'no_question';
$_POST['options'] = empty($_POST['options']) ? array() : htmltrim__recursive($_POST['options']);
// Get rid of empty ones.
foreach ($_POST['options'] as $k => $option)
if ($option == '')
unset($_POST['options'][$k], $_POST['options'][$k]);
// What are you going to vote between with one choice?!?
if (count($_POST['options']) < 2)
$post_errors[] = 'poll_few';
}
if ($posterIsGuest)
{
// If user is a guest, make sure the chosen name isn't taken.
require_once($sourcedir . '/Subs-Members.php');
if (isReservedName($_POST['guestname'], 0, true, false) && (!isset($row['posterName']) || $_POST['guestname'] != $row['posterName']))
$post_errors[] = 'bad_name';
}
// If the user isn't a guest, get his or her name and email.
elseif (!isset($_REQUEST['msg']))
{
$_POST['guestname'] = addslashes($user_info['username']);
$_POST['email'] = addslashes($user_info['email']);
}
// Any mistakes?
if (!empty($post_errors))
{
loadLanguage('Errors');
// Previewing.
$_REQUEST['preview'] = true;
$context['post_error'] = array('messages' => array());
foreach ($post_errors as $post_error)
{
$context['post_error'][$post_error] = true;
$context['post_error']['messages'][] = $txt['error_' . $post_error];
}
return Post();
}
// Make sure the user isn't spamming the board.
if (!isset($_REQUEST['msg']))
spamProtection('spam');
// At about this point, we're posting and that's that.
ignore_user_abort(true);
@set_time_limit(300);
// Add special html entities to the subject, name, and email.
$_POST['subject'] = strtr($func['htmlspecialchars']($_POST['subject']), array("\r" => '', "\n" => '', "\t" => ''));
$_POST['guestname'] = htmlspecialchars($_POST['guestname']);
$_POST['email'] = htmlspecialchars($_POST['email']);
// At this point, we want to make sure the subject isn't too long.
if ($func['strlen']($_POST['subject']) > 100)
$_POST['subject'] = addslashes($func['substr'](stripslashes($_POST['subject']), 0, 100));
// Make the poll...
if (isset($_REQUEST['poll']))
{
// Make sure that the user has not entered a ridiculous number of options..
if (empty($_POST['poll_max_votes']) || $_POST['poll_max_votes'] <= 0)
$_POST['poll_max_votes'] = 1;
elseif ($_POST['poll_max_votes'] > count($_POST['options']))
$_POST['poll_max_votes'] = count($_POST['options']);
else
$_POST['poll_max_votes'] = (int) $_POST['poll_max_votes'];
// Just set it to zero if it's not there..
if (!isset($_POST['poll_hide']))
$_POST['poll_hide'] = 0;
else
$_POST['poll_hide'] = (int) $_POST['poll_hide'];
$_POST['poll_change_vote'] = isset($_POST['poll_change_vote']) ? 1 : 0;
// If the user tries to set the poll too far in advance, don't let them.
if (!empty($_POST['poll_expire']) && $_POST['poll_expire'] < 1)
fatal_lang_error('poll_range_error', false);
// Don't allow them to select option 2 for hidden results if it's not time limited.
elseif (empty($_POST['poll_expire']) && $_POST['poll_hide'] == 2)
$_POST['poll_hide'] = 1;
// Clean up the question and answers.
$_POST['question'] = $func['htmlspecialchars']($_POST['question']);
$_POST['options'] = htmlspecialchars__recursive($_POST['options']);
}
// Check if they are trying to delete any current attachments....
if (isset($_REQUEST['msg'], $_POST['attach_del']) && allowedTo('post_attachment'))
{
$del_temp = array();
foreach ($_POST['attach_del'] as $i => $dummy)
$del_temp[$i] = (int) $dummy;
require_once($sourcedir . '/ManageAttachments.php');
removeAttachments('a.attachmentType = 0 AND a.ID_MSG = ' . (int) $_REQUEST['msg'] . ' AND a.ID_ATTACH NOT IN (' . implode(', ', $del_temp) . ')');
}
// ...or attach a new file...
if (isset($_FILES['attachment']['name']) || !empty($_SESSION['temp_attachments']))
{
isAllowedTo('post_attachment');
// If this isn't a new post, check the current attachments.
if (isset($_REQUEST['msg']))
{
$request = db_query("
SELECT COUNT(*), SUM(size)
FROM {$db_prefix}attachments
WHERE ID_MSG = " . (int) $_REQUEST['msg'] . "
AND attachmentType = 0", __FILE__, __LINE__);
list ($quantity, $total_size) = mysql_fetch_row($request);
mysql_free_result($request);
}
else
{
$quantity = 0;
$total_size = 0;
}
if (!empty($_SESSION['temp_attachments']))
foreach ($_SESSION['temp_attachments'] as $attachID => $name)
{
if (preg_match('~^post_tmp_' . $ID_MEMBER . '_\d+$~', $attachID) == 0)
continue;
if (!empty($_POST['attach_del']) && !in_array($attachID, $_POST['attach_del']))
{
unset($_SESSION['temp_attachments'][$attachID]);
@unlink($modSettings['attachmentUploadDir'] . '/' . $attachID);
continue;
}
$_FILES['attachment']['tmp_name'][] = $attachID;
$_FILES['attachment']['name'][] = addslashes($name);
$_FILES['attachment']['size'][] = filesize($modSettings['attachmentUploadDir'] . '/' . $attachID);
list ($_FILES['attachment']['width'][], $_FILES['attachment']['height'][]) = @getimagesize($modSettings['attachmentUploadDir'] . '/' . $attachID);
unset($_SESSION['temp_attachments'][$attachID]);
}
if (!isset($_FILES['attachment']['name']))
$_FILES['attachment']['tmp_name'] = array();
$attachIDs = array();
foreach ($_FILES['attachment']['tmp_name'] as $n => $dummy)
{
if ($_FILES['attachment']['name'][$n] == '')
continue;
// Have we reached the maximum number of files we are allowed?
$quantity++;
if (!empty($modSettings['attachmentNumPerPostLimit']) && $quantity > $modSettings['attachmentNumPerPostLimit'])
fatal_lang_error('attachments_limit_per_post', false, array($modSettings['attachmentNumPerPostLimit']));
// Check the total upload size for this post...
$total_size += $_FILES['attachment']['size'][$n];
if (!empty($modSettings['attachmentPostLimit']) && $total_size > $modSettings['attachmentPostLimit'] * 1024)
fatal_lang_error('smf122', false, array($modSettings['attachmentPostLimit']));
$attachmentOptions = array(
'post' => isset($_REQUEST['msg']) ? $_REQUEST['msg'] : 0,
'poster' => $ID_MEMBER,
'name' => $_FILES['attachment']['name'][$n],
'tmp_name' => $_FILES['attachment']['tmp_name'][$n],
'size' => $_FILES['attachment']['size'][$n],
);
if (createAttachment($attachmentOptions))
{
$attachIDs[] = $attachmentOptions['id'];
if (!empty($attachmentOptions['thumb']))
$attachIDs[] = $attachmentOptions['thumb'];
}
else
{
if (in_array('could_not_upload', $attachmentOptions['errors']))
fatal_lang_error('smf124');
if (in_array('too_large', $attachmentOptions['errors']))
fatal_lang_error('smf122', false, array($modSettings['attachmentSizeLimit']));
if (in_array('bad_extension', $attachmentOptions['errors']))
fatal_error($attachmentOptions['name'] . '.<br />' . $txt['smf123'] . ' ' . $modSettings['attachmentExtensions'] . '.', false);
if (in_array('directory_full', $attachmentOptions['errors']))
fatal_lang_error('smf126');
if (in_array('bad_filename', $attachmentOptions['errors']))
fatal_error(basename($attachmentOptions['name']) . '.<br />' . $txt['smf130b'] . '.');
if (in_array('taken_filename', $attachmentOptions['errors']))
fatal_lang_error('smf125');
}
}
}
// Make the poll...
if (isset($_REQUEST['poll']))
{
// Create the poll.
db_query("
INSERT INTO {$db_prefix}polls
(question, hideResults, maxVotes, expireTime, ID_MEMBER, posterName, changeVote)
VALUES (SUBSTRING('$_POST[question]', 1, 255), $_POST[poll_hide], $_POST[poll_max_votes],
" . (empty($_POST['poll_expire']) ? '0' : time() + $_POST['poll_expire'] * 3600 * 24) . ", $ID_MEMBER, SUBSTRING('$_POST[guestname]', 1, 255), $_POST[poll_change_vote])", __FILE__, __LINE__);
$ID_POLL = db_insert_id();
// Create each answer choice.
$i = 0;
$setString = '';
foreach ($_POST['options'] as $option)
{
$setString .= "
($ID_POLL, $i, SUBSTRING('$option', 1, 255)),";
$i++;
}
db_query("
INSERT INTO {$db_prefix}poll_choices
(ID_POLL, ID_CHOICE, label)
VALUES" . substr($setString, 0, -1), __FILE__, __LINE__);
}
else
$ID_POLL = 0;
// Creating a new topic?
$newTopic = empty($_REQUEST['msg']) && empty($topic);
// Collect all parameters for the creation or modification of a post.
$msgOptions = array(
'id' => empty($_REQUEST['msg']) ? 0 : (int) $_REQUEST['msg'],
'subject' => $_POST['subject'],
'body' => $_POST['message'],
'icon' => preg_replace('~[\./\\\\*\':"<>]~', '', $_POST['icon']),
'smileys_enabled' => !isset($_POST['ns']),
'attachments' => empty($attachIDs) ? array() : $attachIDs,
);
$topicOptions = array(
'id' => empty($topic) ? 0 : $topic,
'board' => $board,
'poll' => isset($_REQUEST['poll']) ? $ID_POLL : null,
'lock_mode' => isset($_POST['lock']) ? (int) $_POST['lock'] : null,
'sticky_mode' => isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics']) ? (int) $_POST['sticky'] : null,
'mark_as_read' => true,
);
$posterOptions = array(
'id' => $ID_MEMBER,
'name' => $_POST['guestname'],
'email' => $_POST['email'],
'update_post_count' => !$user_info['is_guest'] && !isset($_REQUEST['msg']) && $board_info['posts_count'],
);
// This is an already existing message. Edit it.
if (!empty($_REQUEST['msg']))
{
// Have admins allowed people to hide their screwups?
if (time() - $row['posterTime'] > $modSettings['edit_wait_time'] || $ID_MEMBER != $row['ID_MEMBER'])
{
$msgOptions['modify_time'] = time();
$msgOptions['modify_name'] = addslashes($user_info['name']);
}
modifyPost($msgOptions, $topicOptions, $posterOptions);
}
// This is a new topic or an already existing one. Save it.
else
{
createPost($msgOptions, $topicOptions, $posterOptions);
//BEGIN SMFShop Shop MOD 1.3 (Build 6) code
// Get if this board gives credits for posting
$result_shop = db_query("SELECT countMoney
FROM {$db_prefix}boards
WHERE ID_BOARD = $board
LIMIT 1", __FILE__, __LINE__);
$row_shop = mysql_fetch_array($result_shop, MYSQL_ASSOC);
// If we do give credits, then how much?
if (isset($row_shop['countMoney']) && $row_shop['countMoney'] == "1") {
//For a new topic, you get...
if ($newTopic)
$result_shop = db_query("UPDATE {$db_prefix}members
SET money = money + {$modSettings['shopPointsPerTopic']}
WHERE ID_MEMBER = {$ID_MEMBER}
LIMIT 1", __FILE__, __LINE__);
else
$result_shop = db_query("UPDATE {$db_prefix}members
SET money = money + {$modSettings['shopPointsPerPost']}
WHERE ID_MEMBER = {$ID_MEMBER}
LIMIT 1", __FILE__, __LINE__);
}
//End Shop MOD
if (isset($topicOptions['id']))
$topic = $topicOptions['id'];
}
// Editing or posting an event?
if (isset($_POST['calendar']) && (!isset($_REQUEST['eventid']) || $_REQUEST['eventid'] == -1))
{
require_once($sourcedir . '/Calendar.php');
calendarCanLink();
calendarInsertEvent($board, $topic, $_POST['evtitle'], $ID_MEMBER, $_POST['month'], $_POST['day'], $_POST['year'], isset($_POST['span']) ? $_POST['span'] : null);
}
elseif (isset($_POST['calendar']))
{
$_REQUEST['eventid'] = (int) $_REQUEST['eventid'];
// Validate the post...
require_once($sourcedir . '/Subs-Post.php');
calendarValidatePost();
// If you're not allowed to edit any events, you have to be the poster.
if (!allowedTo('calendar_edit_any'))
{
// Get the event's poster.
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}calendar
WHERE ID_EVENT = $_REQUEST[eventid]", __FILE__, __LINE__);
$row2 = mysql_fetch_assoc($request);
mysql_free_result($request);
// Silly hacker, Trix are for kids. ...probably trademarked somewhere, this is FAIR USE! (parody...)
isAllowedTo('calendar_edit_' . ($row2['ID_MEMBER'] == $ID_MEMBER ? 'own' : 'any'));
}
// Delete it?
if (isset($_REQUEST['deleteevent']))
db_query("
DELETE FROM {$db_prefix}calendar
WHERE ID_EVENT = $_REQUEST[eventid]
LIMIT 1", __FILE__, __LINE__);
// ... or just update it?
else
{
$span = !empty($modSettings['cal_allowspan']) && !empty($_REQUEST['span']) ? min((int) $modSettings['cal_maxspan'], (int) $_REQUEST['span'] - 1) : 0;
$start_time = mktime(0, 0, 0, (int) $_REQUEST['month'], (int) $_REQUEST['day'], (int) $_REQUEST['year']);
db_query("
UPDATE {$db_prefix}calendar
SET endDate = '" . strftime('%Y-%m-%d', $start_time + $span * 86400) . "',
startDate = '" . strftime('%Y-%m-%d', $start_time) . "',
title = '" . $func['htmlspecialchars']($_REQUEST['evtitle'], ENT_QUOTES) . "'
WHERE ID_EVENT = $_REQUEST[eventid]
LIMIT 1", __FILE__, __LINE__);
}
updateStats('calendar');
}
// Marking read should be done even for editing messages....
if (!$user_info['is_guest'])
{
// Mark all the parents read. (since you just posted and they will be unread.)
if (!empty($board_info['parent_boards']))
{
db_query("
UPDATE {$db_prefix}log_boards
SET ID_MSG = $modSettings[maxMsgID]
WHERE ID_MEMBER = $ID_MEMBER
AND ID_BOARD IN (" . implode(',', array_keys($board_info['parent_boards'])) . ")", __FILE__, __LINE__);
}
}
// Turn notification on or off. (note this just blows smoke if it's already on or off.)
if (!empty($_POST['notify']))
{
if (allowedTo('mark_any_notify'))
db_query("
INSERT IGNORE INTO {$db_prefix}log_notify
(ID_MEMBER, ID_TOPIC, ID_BOARD)
VALUES ($ID_MEMBER, $topic, 0)", __FILE__, __LINE__);
}
elseif (!$newTopic)
db_query("
DELETE FROM {$db_prefix}log_notify
WHERE ID_MEMBER = $ID_MEMBER
AND ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);
// Log an act of moderation - modifying.
if (!empty($moderationAction))
logAction('modify', array('topic' => $topic, 'message' => (int) $_REQUEST['msg'], 'member' => $row['ID_MEMBER']));
if (isset($_POST['lock']) && $_POST['lock'] != 2)
logAction('lock', array('topic' => $topicOptions['id']));
if (isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics']))
logAction('sticky', array('topic' => $topicOptions['id']));
// Notify any members who have notification turned on for this topic.
if ($newTopic)
notifyMembersBoard();
elseif (empty($_REQUEST['msg']))
sendNotifications($topic, 'reply');
// Returning to the topic?
if (!empty($_REQUEST['goback']))
{
// Mark the board as read.... because it might get confusing otherwise.
db_query("
UPDATE {$db_prefix}log_boards
SET ID_MSG = $modSettings[maxMsgID]
WHERE ID_MEMBER = $ID_MEMBER
AND ID_BOARD = $board", __FILE__, __LINE__);
}
if (!empty($_POST['announce_topic']))
redirectexit('action=announce;sa=selectgroup;topic=' . $topic . (!empty($_POST['move']) && allowedTo('move_any') ? ';move' : '') . (empty($_REQUEST['goback']) ? '' : ';goback'));
if (!empty($_POST['move']) && allowedTo('move_any'))
redirectexit('action=movetopic;topic=' . $topic . '.0' . (empty($_REQUEST['goback']) ? '' : ';goback'));
// Return to post if the mod is on.
if (isset($_REQUEST['msg']) && !empty($_REQUEST['goback']))
redirectexit('topic=' . $topic . '.msg' . $_REQUEST['msg'] . '#msg' . $_REQUEST['msg'], $context['browser']['is_ie']);
elseif (!empty($_REQUEST['goback']))
redirectexit('topic=' . $topic . '.new#new', $context['browser']['is_ie']);
// Dut-dut-duh-duh-DUH-duh-dut-duh-duh! *dances to the Final Fantasy Fanfare...*
else
redirectexit('board=' . $board . '.0');
}
// General function for topic announcements.
function AnnounceTopic()
{
global $context, $txt;
isAllowedTo('announce_topic');
validateSession();
loadLanguage('Post');
loadTemplate('Post');
$subActions = array(
'selectgroup' => 'AnnouncementSelectMembergroup',
'send' => 'AnnouncementSend',
);
$context['page_title'] = $txt['announce_topic'];
// Call the function based on the sub-action.
$subActions[isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'selectgroup']();
}
// Allow a user to chose the membergroups to send the announcement to.
function AnnouncementSelectMembergroup()
{
global $db_prefix, $txt, $context, $topic, $board, $board_info;
$groups = array_merge($board_info['groups'], array(1));
foreach ($groups as $id => $group)
$groups[$id] = (int) $group;
$context['groups'] = array();
if (in_array(0, $groups))
{
$context['groups'][0] = array(
'id' => 0,
'name' => $txt['announce_regular_members'],
'member_count' => 'n/a',
);
}
// Get all membergroups that have access to the board the announcement was made on.
$request = db_query("
SELECT mg.ID_GROUP, mg.groupName, COUNT(mem.ID_MEMBER) AS num_members
FROM {$db_prefix}membergroups AS mg
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_GROUP = mg.ID_GROUP OR FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR mg.ID_GROUP = mem.ID_POST_GROUP)
WHERE mg.ID_GROUP IN (" . implode(', ', $groups) . ")
GROUP BY mg.ID_GROUP
ORDER BY mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
$context['groups'][$row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => $row['groupName'],
'member_count' => $row['num_members'],
);
}
mysql_free_result($request);
// Get the subject of the topic we're about to announce.
$request = db_query("
SELECT m.subject
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t)
WHERE t.ID_TOPIC = $topic
AND m.ID_MSG = t.ID_FIRST_MSG", __FILE__, __LINE__);
list ($context['topic_subject']) = mysql_fetch_row($request);
mysql_free_result($request);
censorText($context['announce_topic']['subject']);
$context['move'] = isset($_REQUEST['move']) ? 1 : 0;
$context['go_back'] = isset($_REQUEST['goback']) ? 1 : 0;
$context['sub_template'] = 'announce';
}
// Send the announcement in chunks.
function AnnouncementSend()
{
global $db_prefix, $topic, $board, $board_info, $context, $modSettings;
global $language, $scripturl, $txt, $ID_MEMBER, $sourcedir;
checkSession();
// !!! Might need an interface?
$chunkSize = 50;
$context['start'] = empty($_REQUEST['start']) ? 0 : (int) $_REQUEST['start'];
$groups = array_merge($board_info['groups'], array(1));
if (!empty($_POST['membergroups']))
$_POST['who'] = explode(',', $_POST['membergroups']);
// Check whether at least one membergroup was selected.
if (empty($_POST['who']))
fatal_lang_error('no_membergroup_selected');
// Make sure all membergroups are integers and can access the board of the announcement.
foreach ($_POST['who'] as $id => $mg)
$_POST['who'][$id] = in_array((int) $mg, $groups) ? (int) $mg : 0;
// Get the topic subject and censor it.
$request = db_query("
SELECT m.ID_MSG, m.subject, m.body
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t)
WHERE t.ID_TOPIC = $topic
AND m.ID_MSG = t.ID_FIRST_MSG", __FILE__, __LINE__);
list ($ID_MSG, $context['topic_subject'], $message) = mysql_fetch_row($request);
mysql_free_result($request);
censorText($context['topic_subject']);
censorText($message);
$message = trim(un_htmlspecialchars(strip_tags(strtr(parse_bbc($message, false, $ID_MSG), array('<br />' => "\n", '</div>' => "\n", '</li>' => "\n", '[' => '[', ']' => ']')))));
// We need this in order to be able send emails.
require_once($sourcedir . '/Subs-Post.php');
// Select the email addresses for this batch.
$request = db_query("
SELECT mem.ID_MEMBER, mem.emailAddress, mem.lngfile
FROM {$db_prefix}members AS mem
WHERE mem.ID_MEMBER != $ID_MEMBER" . (!empty($modSettings['allow_disableAnnounce']) ? '
AND mem.notifyAnnouncements = 1' : '') . "
AND mem.is_activated = 1
AND (mem.ID_GROUP IN (" . implode(', ', $_POST['who']) . ") OR mem.ID_POST_GROUP IN (" . implode(', ', $_POST['who']) . ") OR FIND_IN_SET(" . implode(", mem.additionalGroups) OR FIND_IN_SET(", $_POST['who']) . ", mem.additionalGroups))
AND mem.ID_MEMBER > $context[start]
ORDER BY mem.ID_MEMBER
LIMIT $chunkSize", __FILE__, __LINE__);
// All members have received a mail. Go to the next screen.
if (mysql_num_rows($request) == 0)
{
if (!empty($_REQUEST['move']) && allowedTo('move_any'))
redirectexit('action=movetopic;topic=' . $topic . '.0' . (empty($_REQUEST['goback']) ? '' : ';goback'));
elseif (!empty($_REQUEST['goback']))
redirectexit('topic=' . $topic . '.new;boardseen#new', $context['browser']['is_ie']);
else
redirectexit('board=' . $board . '.0');
}
// Loop through all members that'll receive an announcement in this batch.
while ($row = mysql_fetch_assoc($request))
{
$cur_language = empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile'];
// If the language wasn't defined yet, load it and compose a notification message.
if (!isset($announcements[$cur_language]))
{
loadLanguage('Post', $cur_language, false);
$announcements[$cur_language] = array(
'subject' => $txt['notifyXAnn2'] . ': ' . $context['topic_subject'],
'body' => $message . "\n\n" . $txt['notifyXAnn3'] . "\n\n" . $scripturl . '?topic=' . $topic . ".0\n\n" . $txt[130],
'recipients' => array(),
);
}
$announcements[$cur_language]['recipients'][$row['ID_MEMBER']] = $row['emailAddress'];
$context['start'] = $row['ID_MEMBER'];
}
mysql_free_result($request);
// For each language send a different mail.
foreach ($announcements as $lang => $mail)
sendmail($mail['recipients'], $mail['subject'], $mail['body']);
$context['percentage_done'] = round(100 * $context['start'] / $modSettings['latestMember'], 1);
$context['move'] = empty($_REQUEST['move']) ? 0 : 1;
$context['go_back'] = empty($_REQUEST['goback']) ? 0 : 1;
$context['membergroups'] = implode(',', $_POST['who']);
$context['sub_template'] = 'announcement_send';
// Go back to the correct language for the user ;).
if (!empty($modSettings['userLanguage']))
loadLanguage('Post');
}
// Notify members of a new post.
function notifyMembersBoard()
{
global $board, $topic, $txt, $scripturl, $db_prefix, $language, $user_info;
global $ID_MEMBER, $modSettings, $sourcedir;
// Can't do it if there's no board. (won't happen but let's check for safety and not sending a zillion email's sake.)
if (empty($board))
trigger_error('notifyMembersBoard(): Can\'t send a notification without a board id!', E_USER_NOTICE);
require_once($sourcedir . '/Subs-Post.php');
$message = stripslashes($_POST['message']);
// Censor the subject and body...
censorText($_POST['subject']);
censorText($message);
$_POST['subject'] = un_htmlspecialchars($_POST['subject']);
$message = trim(un_htmlspecialchars(strip_tags(strtr(parse_bbc($message, false), array('<br />' => "\n", '</div>' => "\n", '</li>' => "\n", '[' => '[', ']' => ']')))));
// Find the members with notification on for this board.
$members = db_query("
SELECT
mem.ID_MEMBER, mem.emailAddress, mem.notifyOnce, mem.notifySendBody, mem.lngfile,
ln.sent, mem.ID_GROUP, mem.additionalGroups, b.memberGroups, mem.ID_POST_GROUP
FROM ({$db_prefix}log_notify AS ln, {$db_prefix}members AS mem, {$db_prefix}boards AS b)
WHERE ln.ID_BOARD = $board
AND b.ID_BOARD = $board
AND mem.ID_MEMBER != $ID_MEMBER
AND mem.is_activated = 1
AND mem.notifyTypes != 4
AND ln.ID_MEMBER = mem.ID_MEMBER
GROUP BY mem.ID_MEMBER
ORDER BY mem.lngfile", __FILE__, __LINE__);
while ($rowmember = mysql_fetch_assoc($members))
{
if ($rowmember['ID_GROUP'] != 1)
{
$allowed = explode(',', $rowmember['memberGroups']);
$rowmember['additionalGroups'] = explode(',', $rowmember['additionalGroups']);
$rowmember['additionalGroups'][] = $rowmember['ID_GROUP'];
$rowmember['additionalGroups'][] = $rowmember['ID_POST_GROUP'];
if (count(array_intersect($allowed, $rowmember['additionalGroups'])) == 0)
continue;
}
loadLanguage('Post', empty($rowmember['lngfile']) || empty($modSettings['userLanguage']) ? $language : $rowmember['lngfile'], false);
// Setup the string for adding the body to the message, if a user wants it.
$body_text = empty($modSettings['disallow_sendBody']) ? $txt['notification_new_topic_body'] . "\n\n" . $message . "\n\n" : '';
$send_subject = sprintf($txt['notify_boards_subject'], $_POST['subject']);
// Send only if once is off or it's on and it hasn't been sent.
if (!empty($rowmember['notifyOnce']) && empty($rowmember['sent']))
sendmail($rowmember['emailAddress'], $send_subject,
sprintf($txt['notify_boards'], $_POST['subject'], $scripturl . '?topic=' . $topic . '.new#new', un_htmlspecialchars($user_info['name'])) .
$txt['notify_boards_once'] . "\n\n" .
(!empty($rowmember['notifySendBody']) ? $body_text : '') .
$txt['notify_boardsUnsubscribe'] . ': ' . $scripturl . '?action=notifyboard;board=' . $board . ".0\n\n" .
$txt[130], null, 't' . $topic);
elseif (empty($rowmember['notifyOnce']))
sendmail($rowmember['emailAddress'], $send_subject,
sprintf($txt['notify_boards'], $_POST['subject'], $scripturl . '?topic=' . $topic . '.new#new', un_htmlspecialchars($user_info['name'])) .
(!empty($rowmember['notifySendBody']) ? $body_text : '') .
$txt['notify_boardsUnsubscribe'] . ': ' . $scripturl . '?action=notifyboard;board=' . $board . ".0\n\n" .
$txt[130], null, 't' . $topic);
}
mysql_free_result($members);
// Sent!
db_query("
UPDATE {$db_prefix}log_notify
SET sent = 1
WHERE ID_BOARD = $board
AND ID_MEMBER != $ID_MEMBER", __FILE__, __LINE__);
}
// Get the topic for display purposes.
function getTopic()
{
global $topic, $db_prefix, $modSettings, $context;
// Calculate the amount of new replies.
$newReplies = empty($_REQUEST['num_replies']) || $context['num_replies'] <= $_REQUEST['num_replies'] ? 0 : $context['num_replies'] - $_REQUEST['num_replies'];
if (isset($_REQUEST['xml']))
$limit = "
LIMIT " . (empty($newReplies) ? '0' : $newReplies);
else
$limit = empty($modSettings['topicSummaryPosts']) ? '' : '
LIMIT ' . (int) $modSettings['topicSummaryPosts'];
// If you're modifying, get only those posts before the current one. (otherwise get all.)
$request = db_query("
SELECT IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.body, m.smileysEnabled, m.ID_MSG
FROM {$db_prefix}messages AS m
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE m.ID_TOPIC = $topic" . (isset($_REQUEST['msg']) ? "
AND m.ID_MSG < " . (int) $_REQUEST['msg'] : '') . "
ORDER BY m.ID_MSG DESC$limit", __FILE__, __LINE__);
$context['previous_posts'] = array();
while ($row = mysql_fetch_assoc($request))
{
// Censor, BBC, ...
censorText($row['body']);
$row['body'] = parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']);
// ...and store.
$context['previous_posts'][] = array(
'poster' => $row['posterName'],
'message' => $row['body'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'id' => $row['ID_MSG'],
'is_new' => !empty($newReplies),
);
if (!empty($newReplies))
$newReplies--;
}
mysql_free_result($request);
}
function QuoteFast()
{
global $db_prefix, $modSettings, $user_info, $txt, $settings, $context;
global $sourcedir, $func;
loadLanguage('Post');
if (!isset($_REQUEST['xml']))
loadTemplate('Post');
checkSession('get');
include_once($sourcedir . '/Subs-Post.php');
$request = db_query("
SELECT IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.body, m.ID_TOPIC, m.subject
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE m.ID_MSG = " . (int) $_REQUEST['quote'] . "
AND b.ID_BOARD = m.ID_BOARD
AND $user_info[query_see_board]
LIMIT 1", __FILE__, __LINE__);
$context['close_window'] = mysql_num_rows($request) == 0;
if (mysql_num_rows($request) != 0)
{
$row = mysql_fetch_assoc($request);
mysql_free_result($request);
// Censor the message!
censorText($row['body']);
// Remove special formatting we don't want anymore.
un_preparsecode($row['body']);
$row['body'] = preg_replace('~<br(?: /)?' . '>~i', "\n", $row['body']);
//Lets change the HideTag ;) this is a secret and should be a secret :)
if (empty($modSettings['hide_hiddentext'])) $modSettings['hide_hiddentext'] = ' '; //A tiny little space =)
// The MUI Switch ;D
if (!empty($modSettings['hide_MUIswitch'])) $modSettings['hide_hiddentext'] = &$txt['hide_hiddentext'];
$row['body'] = preg_replace("/\[hide\](.+?)\[\/hide\]/i", $modSettings['hide_hiddentext'], $row['body']);
$row['body'] = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), $modSettings['hide_hiddentext'], $row['body']);
// Want to modify a single message by double clicking it?
if (isset($_REQUEST['modify']))
{
censorText($row['subject']);
$context['sub_template'] = 'modifyfast';
$context['message'] = array(
'id' => $_REQUEST['quote'],
'body' => $row['body'],
'subject' => addcslashes($row['subject'], '"'),
);
return;
}
// Remove any nested quotes.
if (!empty($modSettings['removeNestedQuotes']))
$row['body'] = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $row['body']);
// Add a quote string on the front and end.
$context['quote']['xml'] = '[quote author=' . $row['posterName'] . ' link=topic=' . $row['ID_TOPIC'] . '.msg' . (int) $_REQUEST['quote'] . '#msg' . (int) $_REQUEST['quote'] . ' date=' . $row['posterTime'] . ']' . "\n" . $row['body'] . "\n" . '[/quote]';
$context['quote']['text'] = strtr(un_htmlspecialchars($context['quote']['xml']), array('\'' => '\\\'', '\\' => '\\\\', "\n" => '\\n', '</script>' => '</\' + \'script>'));
$context['quote']['xml'] = strtr($context['quote']['xml'], array(' ' => ' ', '<' => '<', '>' => '>'));
$context['quote']['mozilla'] = strtr($func['htmlspecialchars']($context['quote']['text']), array('"' => '"'));
}
// !!! Needs a nicer interface.
// In case our message has been removed in the meantime.
elseif (isset($_REQUEST['modify']))
{
$context['sub_template'] = 'modifyfast';
$context['message'] = array(
'id' => 0,
'body' => '',
'subject' => '',
);
}
else
$context['quote'] = array(
'xml' => '',
'mozilla' => '',
'text' => '',
);
$context['sub_template'] = 'quotefast';
}
Mod edit: Cut some code off your post, wrapped it in code tags, and good job at hitting the post size limit. Please use a service like PasteBin (http://pastebin.com/) and paste the link in your post, or attach the file instead of this huge block of code.
You can also attach files to the forum too.
Try doing this Open Post.php
Find
// Editing or posting an event?
if (isset($_POST['calendar']) && (!isset($_REQUEST['eventid']) || $_REQUEST['eventid'] == -1))
{
require_once($sourcedir . '/Calendar.php');
calendarCanLink();
calendarInsertEvent($board, $topic, $_POST['evtitle'], $ID_MEMBER, $_POST['month'], $_POST['day'], $_POST['year'], isset($_POST['span']) ? $_POST['span'] : null);
}
Above that code add
//Tagging System
if(isset($_REQUEST['tags']) && !isset($_REQUEST['num_replies']))
{
//Get how many tags there have been for the topic
$dbresult = db_query("SELECT COUNT(*) as total FROM {$db_prefix}tags_log WHERE ID_TOPIC = " . $topic, __FILE__, __LINE__);
$row = mysql_fetch_assoc($dbresult);
$totaltags = $row['total'];
mysql_free_result($dbresult);
//Check Tag restrictions
$tags = explode(',',htmlspecialchars($_REQUEST['tags'],ENT_QUOTES));
if($totaltags < $modSettings['smftags_set_maxtags'])
{
$tagcount = 0;
foreach($tags as $tag)
{
if($tagcount >= $modSettings['smftags_set_maxtags'])
continue;
if(empty($tag))
continue;
//Check min tag length
if(strlen($tag) < $modSettings['smftags_set_mintaglength'])
continue;
//Check max tag length
if(strlen($tag) > $modSettings['smftags_set_maxtaglength'])
continue;
//Insert The tag
$dbresult = db_query("SELECT ID_TAG FROM {$db_prefix}tags WHERE tag = '$tag'", __FILE__, __LINE__);
if(db_affected_rows() == 0)
{
//Insert into Tags table
db_query("INSERT INTO {$db_prefix}tags
(tag, approved)
VALUES ('$tag',1)", __FILE__, __LINE__);
$ID_TAG = db_insert_id();
//Insert into Tags log
db_query("INSERT INTO {$db_prefix}tags_log
(ID_TAG,ID_TOPIC, ID_MEMBER)
VALUES ($ID_TAG,$topic,$ID_MEMBER)", __FILE__, __LINE__);
$tagcount++;
}
else
{
$row = mysql_fetch_assoc($dbresult);
$ID_TAG = $row['ID_TAG'];
$dbresult2= db_query("SELECT ID FROM {$db_prefix}tags_log WHERE ID_TAG = $ID_TAG AND ID_TOPIC = $topic", __FILE__, __LINE__);
if(db_affected_rows() != 0)
{
continue;
}
mysql_free_result($dbresult2);
//Insert into Tags log
db_query("INSERT INTO {$db_prefix}tags_log
(ID_TAG,ID_TOPIC, ID_MEMBER)
VALUES ($ID_TAG,$topic,$ID_MEMBER)", __FILE__, __LINE__);
$tagcount++;
}
mysql_free_result($dbresult);
}
}
}
//End Tagging System
Thanks a lot it worked.
Sorry to bother you again, but what do I need to do if I wanted to centre the tags (which appear at the bottom of the post) please?
You would need to edit Display.template.php
Find
//Tagging System
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;id=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
if(!$context['user']['is_guest'])
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
//End Tagging System
Replace with
//Tagging System
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg" align="center">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;id=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
if(!$context['user']['is_guest'])
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
//End Tagging System
Thanks.
Ahhhh...I went into a topic made yesterday, and I clicked add tag. I then entered "arcade" into the box (without quotes).
Then I got this error:
Unknown column 'arcade' in 'field list'
File: /home/tscar/public_html/board/Sources/Tags.php
Line: 260
Yeah I just made a fix to it. Download the mod again and copy Tags.php to your sources folder to fix that problem.
Thanks VBGamer big help.
Sorry to keep buggin ya, where would I change the border colour in the tags page when you click a tag?
Tags.template.php that is controlled by the css tags though.
ok thanks a lot.
It works now.
I have just a question. Where appears the options in bold? I cannot find them.
Quote<?php
//Tagging System Version 1.0 by:vbgamer45 http://www.smfhacks.com
//Tags text strings
$txt['smftags_tags'] = 'Tags';
$txt['smftags_tagtosuggest'] = 'Tag To Suggest:';
$txt['smftags_popular'] = 'Popular Tags';
$txt['smftags_latest'] = 'Latest Tagged Posts';
$txt['smftags_resultsfor'] = 'Results for ';
$txt['smftags_suggest'] = 'Suggest Tag';
$txt['smftags_addtag'] = '[Add Tag]';
$txt['smftags_deletetag'] = '[Delete Tag]';
$txt['smftags_addtag2'] = 'Add Tag';
$txt['smftags_tagtoadd'] = 'Tag to Add';
//Tags Admin Settings
$txt['smftags_set_mintaglength'] = 'Minimum Tag Length';
$txt['smftags_set_maxtaglength'] = 'Maximum Tag Length';
$txt['smftags_set_maxtags'] = 'Max number of tags per topic';
$txt['smftags_err_deletetag'] = 'You do not have permission to delete the tag.';
$txt['smftags_err_notopic'] = 'No topic selected.';
$txt['smftags_err_notag'] = 'You need to enter a tag.';
$txt['smftags_err_mintag'] = 'The tag is smaller than the minimum tag length of ';
$txt['smftags_err_maxtag'] = 'The tag is greater than the maximum tag length of ';
$txt['smftags_err_toomaxtag'] = 'Tag limit per topic exceeded.';
$txt['smftags_err_permaddtags'] = 'You are not allowed to add tags to that topic.';
$txt['smftags_err_alreadyexists'] = 'That tag for that topic already exists.';
$txt['smftags_settings'] = 'Tags Settings';
$txt['smftags_pages'] = 'Pages: ';
$txt['smftags_savesettings'] = 'Save Settings';
///Results Display
$txt['smftags_subject'] = 'Subject';
$txt['smftags_startedby'] = 'Started by';
$txt['smftags_replies'] = 'Replies';
$txt['smftags_views'] = 'Views';
?>
Oohhhhh nice I'll have to try this one :)
Quote from: Greek on December 20, 2006, 04:25:38 AM
It works now.
I have just a question. Where appears the options in bold? I cannot find them.
Quote<?php
//Tagging System Version 1.0 by:vbgamer45 http://www.smfhacks.com
//Tags text strings
$txt['smftags_tags'] = 'Tags';
$txt['smftags_tagtosuggest'] = 'Tag To Suggest:';
$txt['smftags_popular'] = 'Popular Tags';
$txt['smftags_latest'] = 'Latest Tagged Posts';
$txt['smftags_resultsfor'] = 'Results for ';
$txt['smftags_suggest'] = 'Suggest Tag';
$txt['smftags_addtag'] = '[Add Tag]';
$txt['smftags_deletetag'] = '[Delete Tag]';
$txt['smftags_addtag2'] = 'Add Tag';
$txt['smftags_tagtoadd'] = 'Tag to Add';
//Tags Admin Settings
$txt['smftags_set_mintaglength'] = 'Minimum Tag Length';
$txt['smftags_set_maxtaglength'] = 'Maximum Tag Length';
$txt['smftags_set_maxtags'] = 'Max number of tags per topic';
$txt['smftags_err_deletetag'] = 'You do not have permission to delete the tag.';
$txt['smftags_err_notopic'] = 'No topic selected.';
$txt['smftags_err_notag'] = 'You need to enter a tag.';
$txt['smftags_err_mintag'] = 'The tag is smaller than the minimum tag length of ';
$txt['smftags_err_maxtag'] = 'The tag is greater than the maximum tag length of ';
$txt['smftags_err_toomaxtag'] = 'Tag limit per topic exceeded.';
$txt['smftags_err_permaddtags'] = 'You are not allowed to add tags to that topic.';
$txt['smftags_err_alreadyexists'] = 'That tag for that topic already exists.';
$txt['smftags_settings'] = 'Tags Settings';
$txt['smftags_pages'] = 'Pages: ';
$txt['smftags_savesettings'] = 'Save Settings';
///Results Display
$txt['smftags_subject'] = 'Subject';
$txt['smftags_startedby'] = 'Started by';
$txt['smftags_replies'] = 'Replies';
$txt['smftags_views'] = 'Views';
?>
Suggest a tag is not in yet. I am still thinking of things to add to the tagging system so send me some ideas.
How about if someone makes a topic and doesn't add tags, the tags system automatically scans the topic and title and chooses the most relevant ones?
That's a little bit of work like what is the critera of tags that it will include and how does it deem what is important.
ok nevermind then, thought that's what ya was goin for with the unused word strings lol
edit: I think I know something which would be good.. Can we have it so that if you click Add Tags in a topic without tags, that we can add more than one at a time.
Quote from: vbgamer45 on December 20, 2006, 09:23:50 AM
Suggest a tag is not in yet. I am still thinking of things to add to the tagging system so send me some ideas.
Thanks for the answer.
I think that it doesn't need something more your mod. The most important is to execute its main target and as far it does it good enough :)
To be honest, I really don't know what's the use of "tags" in a forum. But wth! I already saw two non-SMF forums using tags! So maybe it will really be useful one day, so download time and install time.... :D
Great job!!
very nice mod! I have been waiting for a tag-mod and here it is.
it would be nice if you could implement the possibility to add more than one tag a time (like the way to add more than one attachment) and a possibility to manage all tags in admin-interface, for example delete a tag from all topics and such things. some statistics for the admins would also be nice.
thanks for this great mod.
Ouch, this rocks hard enough to hurt my head. It hurt my head so much that...
Err...
If the post is imported from RSS from a WordPress blog AND is tagged already...
(You see where I'm going don't you?)
How can I use those tags as these tags? ;)
Same server at least but tags may well be parsed in RSS using the plugin...
That would make it the ultimate. Hell, I'd worship the ground you walked on if you could do it. I might already.
Some investigation shows that the tags aren't (silly me) sent with the RSS feed with WordPress plug-in but are stored (and easily found) in the database.
I use my blog's RSS feed to post the comments there to the News section of the forum. I use a tag system at the blog. I adore the tag ideals... Getting those tags automatically inserted is looking like it might be more complicated than I was hoping.
I did have an idea... Actually a few...
How about an option to change how many recently tagged topics are on the tags page?
How about letting people pick the weight for when tags are resized tags page?
How about letting people pick the font color for various tag sizes on the tags page?
I think those would be great additional features to have with the MOD actually. (I've been poking at it a bit. Once again, thanks. Simply fantastic work as always - enough to make me go rate it even.)
Updated the mod.
Fixed showing topics title from boards that they do not have permission to.
Will look into some features for the next major version.
Just installed it, great mod!!
But would be even greater if you have seperate permissions for adding and removing tags to topics ;)
Quote from: Harro on December 27, 2006, 07:36:10 PM
Just installed it, great mod!!
But would be even greater if you have seperate permissions for adding and removing tags to topics ;)
That's something I could do in the future.
Currently that permission is tied to the thread starter or people who have the manage tags permission.
Yeah, I noticed.
But I want every member to have the possibility to add tags, but removing somebody else's tag shouldn't be allowed.
But it's a great mod.
It's a mod SMF needed already a long time ago ;)
gr8 mod. However during some heavy testing i gave it, it threw up an error in my error log when there are no tags and I visit the tags screen. When there are tags, this error does not appear.
On a complete brand spanking new install of SMF 1.1.1 (no mods, no custom skins) hosted on VPS. PHP running i think is 5.1. Hope this helps.
admin Today at 04:12:26 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: min() [<a href='function.min'>function.min</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 123
admin Today at 04:12:26 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: max() [<a href='function.max'>function.max</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 122
admin Today at 04:12:19 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: min() [<a href='function.min'>function.min</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 123
admin Today at 04:12:19 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: max() [<a href='function.max'>function.max</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 122
admin Today at 04:12:16 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: min() [<a href='function.min'>function.min</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 123
admin Today at 04:12:16 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: max() [<a href='function.max'>function.max</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 122
Quote from: karlbenson on December 28, 2006, 06:19:01 PM
gr8 mod. However during some heavy testing i gave it, it threw up an error in my error log when there are no tags and I visit the tags screen. When there are tags, this error does not appear.
On a complete brand spanking new install of SMF 1.1.1 (no mods, no custom skins) hosted on VPS. PHP running i think is 5.1. Hope this helps.
admin Today at 04:12:26 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: min() [<a href='function.min'>function.min</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 123
admin Today at 04:12:26 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: max() [<a href='function.max'>function.max</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 122
admin Today at 04:12:19 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: min() [<a href='function.min'>function.min</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 123
admin Today at 04:12:19 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: max() [<a href='function.max'>function.max</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 122
admin Today at 04:12:16 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: min() [<a href='function.min'>function.min</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 123
admin Today at 04:12:16 PM
86.133.78.125 6229d472c780ab62d866886d3ab22a80
http://sdvsraw2.com/index.php?action=tags
2: max() [<a href='function.max'>function.max</a>]: Array must contain atleast one element
File: /home/sdvsraw2/public_html/Sources/Tags.php
Line: 122
Fixed
I am using 1.1 RC3 Is it not compatable with that? I tryed to download and install and kep getting:
"The package you are trying to download or install is either corrupt or not compatible with this version of SMF."
Tested only on SMF 1.1 to 1.1.1 and currently will only install for those.
A great mod and it works well:
http://historyhuntersinternational.org/index.php?action=tags (http://historyhuntersinternational.org/index.php?action=tags)
Now I want to add it to a block...
;)
Hello,
nice mod! propably it would be nice to enhance the mod with a "TAG" BBCode.
Then it would be much easier to make "table of content" topics using the tags.
for example:
you want to create a "table of contents" for your forum:
1. SMF-mods
1.1 Tools
1.2 Enhancements
2. SMF-themes
2.1 light
2.2 dark
=> so add appropriate tag to your topics
=> in your "table of content" topic would be good to use the BBC:
1. SMF-mods
[TAG=tool]1.1 Tools[TAG]
[TAG=enhancement]1.2 Enhancements[TAG]
2. SMF-themes
[TAG=light-theme] 2.1 light[/TAG]
[TAG=dark-theme] 2.2 dark[/TAG]
the generated topic code should then look like:
...
<a href="http://www.simplemachines.org/community/index.php?action=tags;id=1" title="2 things tagged with tool">1.1Tools</a>
what do you think? does this make sense?
Works great.
How is it possible to display an icon (placed in themes\...\images\icons\) in place of [X] ?
Thanks for any hints and tips
Quote from: @ngel on January 05, 2007, 06:59:13 AM
Works great.
How is it possible to display an icon (placed in themes\...\images\icons\) in place of [X] ?
Thanks for any hints and tips
Yes you could. Check in Display.template.php that's were it adds the X for the tags
I see the position of the [ X ] but i don't known by what to replace and which variable to be used.
Thanks for your help
It would be cool, if you add option of searching for tags n Search function!
Hello,
I guess after deleting a topic you don´t remove regading stuff in the "tags_log" table. or am I wrong? (I was just trying this mod). As I see in your code, you will add some more admin control over the tags in future!?
That tags are not deleted from the table when a topic is deleted.
hi,
is it now possible or easily integrated to search via the Tag itself not the id?
e.g.
instead of
http://yourdomain/index.php?action=tags;id=123
do it like
http://yourdomain/index.php?action=tags;tag=NameOfTagAsText
with the same result-page.
so it would be easier to use it in posts as direct links. (sorry abou my english)
okay, I looked into the "Tags.php" and tried a little bit.
After
if (isset($_REQUEST['id']))
{
// Show the tag results for that tag
$id = (int) $_REQUEST['id'];
// Find Tag Name
$dbresult = db_query("SELECT tag FROM {$db_prefix}tags WHERE ID_TAG = $id LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($dbresult);
mysql_free_result($dbresult);
$context['tag_search'] = $row['tag'];
$context['page_title'] = $mbname . ' - ' . $txt['smftags_resultsfor'] . $context['tag_search'];
// Find Results
$dbresult = db_query("
SELECT t.numReplies,t.numViews,m.ID_MEMBER,m.posterName,m.subject,m.ID_TOPIC,m.posterTime, t.ID_BOARD
FROM {$db_prefix}tags_log as l, {$db_prefix}boards AS b, {$db_prefix}topics as t, {$db_prefix}messages as m
WHERE l.ID_TAG = $id AND b.ID_BOARD = t.ID_BOARD AND l.ID_TOPIC = t.ID_TOPIC AND t.ID_FIRST_MSG = m.ID_MSG AND " . $user_info['query_see_board'], __FILE__, __LINE__);
$context['tags_topics'] = array();
while ($row = mysql_fetch_assoc($dbresult))
{
$context['tags_topics'][] = array(
'ID_MEMBER' => $row['ID_MEMBER'],
'posterName' => $row['posterName'],
'subject' => $row['subject'],
'ID_TOPIC' => $row['ID_TOPIC'],
'posterTime' => $row['posterTime'],
'numViews' => $row['numViews'],
'numReplies' => $row['numReplies'],
);
}
mysql_free_result($dbresult);
$context['sub_template'] = 'results';
}
add
elseif (isset($_REQUEST['tag']))
{
// Show the tag results for that tag
$context['tag_search'] = $_REQUEST['tag'];
// Find Tag Name
$context['page_title'] = $mbname . ' - ' . $txt['smftags_resultsfor'] . $context['tag_search'];
// Find Results
$dbresult = db_query("
SELECT t.numReplies,t.numViews,m.ID_MEMBER,m.posterName,m.subject,m.ID_TOPIC,m.posterTime, t.ID_BOARD
FROM {$db_prefix}tags_log as l, {$db_prefix}boards AS b, {$db_prefix}topics as t, {$db_prefix}messages as m
JOIN {$db_prefix}tags AS TA ON (TA.ID_TAG = l.ID_TAG)
WHERE TA.tag = '" . $context['tag_search'] . "' AND b.ID_BOARD = t.ID_BOARD AND l.ID_TOPIC = t.ID_TOPIC AND t.ID_FIRST_MSG = m.ID_MSG AND " . $user_info['query_see_board'], __FILE__, __LINE__);
$context['tags_topics'] = array();
while ($row = mysql_fetch_assoc($dbresult))
{
$context['tags_topics'][] = array(
'ID_MEMBER' => $row['ID_MEMBER'],
'posterName' => $row['posterName'],
'subject' => $row['subject'],
'ID_TOPIC' => $row['ID_TOPIC'],
'posterTime' => $row['posterTime'],
'numViews' => $row['numViews'],
'numReplies' => $row['numReplies'],
);
}
mysql_free_result($dbresult);
$context['sub_template'] = 'results';
}
and you can use the tag function directly from a link:
http://yourdomain/index.php?action=tags;tag=OneTagText
but I´m no php programmer. nether than mysql.
=> so propably this is a security risk for sql injection!? how can I fix this?
=> does this make problems if wrong tags are used?
Thanks for help,
Patxi
Yeah that would lead to an injection
find
$context['tag_search'] = $_REQUEST['tag'];
Change to
$context['tag_search'] = htmlspecialchars($_REQUEST['tag'],ENT_QUOTES);
Thanks vbgamer45 !
I just tried to add a bbcode to this system and added this code to the Subs.php in the function parse_bbc
array(
'tag' => 'tag',
'type' => 'unparsed_content',
'content' => '<a href="http://yourdomain/index.php?action=tags;tag=$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'tag',
'type' => 'unparsed_equals',
'before' => '<a href="http://yourdomain/index.php?action=tags;tag=$1">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
It´s not very good coding. I was not quite sure how to replace the YOURDOMAIN code with a variable.
with this, you can Link to the TAG site via
[tag]YourTagText[/tag]
or
[tag=YourTagText]something other text[/tag]
Replace
http://yourdomain/index.php?action=tags
With
' . $scripturl . '?action=tags
incredible! quite fast your response!
After some test, i found my solution.
If you want to replace the [ X ] with an icon/image (in my case : delete_tag.png), do this in the file "Display.Template.php" in your "Themes\[your theme]\":
replaceecho '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
withecho '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><img src="' . $settings['images_url'] . '/delete_tag.png" alt="" border="0" width=12 height=13/></a> ';
If you want to use an alternate name, use this (you need to create the $txt['smftags_deletethistag'] = "delete this tag" entry in your "Modifications.[language].php" : echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><img src="' . $settings['images_url'] . '/mir_delete_tag.png" alt="' . $txt['smftags_deletethistag'] . '" border="0" width=12 height=13/></a> ';
Your icon/image must be set in your "Themes\[your theme]\images". I resized the icon/image too.
Below, the result ;-)
Great mod - thank you very much.
We've been playing around and we are getting some empty tags listed in the Tag Cloud page. How do we get rid of these tags?
Is it possible to alphabatize the Tag listing in the Cloud page? Would make it easier to track down and use.
Thanks again,
slack
Empty tags hmm. You would need to find the topic that posted them and delete them from there.
Quote from: vbgamer45 on January 08, 2007, 07:07:35 PM
Empty tags hmm. You would need to find the topic that posted them and delete them from there.
Hmm, Well, one of our moderators deleted the posts from our Recycle bin (eg they posts are permanently gone) :P -- so I'd have to delete them directly from the database then?
Yeah for now. It does not check for deleted topics.
Is there a way to get a listing of ALL tags? It seems of you just list "popular" tags -- it leaves things wide open for users to create duplicate tags. What would be nice: when a user clicks "add tag" a picklist of existing tags appears and they can either pick an existing tag or enter a new one.
I have a small problem with this mod. When English language is selected the strings are shown however after changing the language they disappear. I have created Tags.turkish.php and Tags.german.php files manually.
That will happen if use other languages you will need to copy the text strings and from modifications.english.php to modfications.yourlanguage.php
Why the TAGS menu is displayed in the main menu even if a user is not logged ?
At this time, I added this if (($context['user']['is_logged']) && (allowedTo('smftags_suggest')))
before the line
echo ($current_action == 'tags' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
in the file Index.Template.php
I also see that the Suggest Tags in Permissions is not displayed so, I changed this in the file ManagePermissions.Php
before'smftags' => array(
'smftags_manage' => false,
after'smftags' => array(
'smftags_suggest' => false,
'smftags_manage' => false,
rem : these informations was also missing in the tags.xml from the installation
The suggest tags is not built in yet.
You're right but I needed a "solution" to avoid the display the TAGS menu in main-menu for any user.
Thanks for this powerfull mod.
Is it possible to have the tags be placed inside a block from the Ad Management Mod? I want to place the tags at the end of every post.
one suggestion to think about:
does it make sense to enhance the "tags" table with a "parent"-tag. That means you could create tags in different levels => TAG-Tree
so if every new tag would be grouped to the right parent-tag than a "forum-table of content" could be generated automatically.
the best would be, if the order of this tree could be edited in the admin-panel.
what do you think? is it to complicated to program?
Quote from: geezmo on January 18, 2007, 02:34:38 AM
Is it possible to have the tags be placed inside a block from the Ad Management Mod? I want to place the tags at the end of every post.
Anyone?
I am not sure I don't know the ad management mod.
It's this one (http://custom.simplemachines.org/mods/index.php?mod=255). It lets you easily put ads (or any php or html code) almost anywhere in the forum, the header, footer, right-side block, left-side block, below the nav menu, after the last post, etc.
Back to my question. Is there a simple code I can use to show the cloud tag? I'll just need to copy this code, paste it in one part of the forum (like a sidebar), then the tag cloud appears there.
Great Mod again, vbgamer45 :)
Only that my pages now have 3 xml errors (http://www.simplemachines.org/community/index.php?topic=151019.0)at all >:(
All the trouble is, that there are not 50 or 1000 errors, only 3, and I cant find them.
I tried to delete two lines of </td></tr></table> in tags.template.php
But I'm not really sure.
Now I really have to go to sleep.
Thank you for working on our SMF's :)
EDIT:
I changed
//Tagging System
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'], '</b>';
in display.template.php to
//Tagging System
echo '<b>', $txt['smftags_topic'], '</b>';
I don't know how, but the pages (postings) now pass validation.
What is this TAG MOD for? Like... search engines?
QuoteWhat is this TAG MOD for?
It's written in your forum http://crud3w4re.com/index.php?topic=89.0 .
QuoteLike... search engines?
First, it is usefull for searching relevant topics by a human user.
Here a discussion, unfortunatly in german, about what is the difference between tags and categories.
http://forum.developers-guide.net/showthread.php?t=4902
As summary I would say tags are more flexibel, "free", compared to "hierarchical" categories.
Experimentally, you can add the tags to your keywords (index.template.php), to make it relevant for search engines, too (adjust YOUR_KEYWORDS to your keywords string var):
foreach ($context['topic_tags'] as $i => $tag)
{
$YOUR_KEYWORDS.=', '.$tag['tag'];
}
mfg
HeY this is really a great mod!! Installed it and works like a charm!
But i have a few questions, is it possible when editing the first post to add some tags, or can this only be done when starting a new topic? I mean adding tags to topics that were not tagged before..
And where do i delete tags from topics that are deleted.. Sorry if this was allready asnwered, but i did not find it anywere..
But again this is a great mod, thank you!!
This is a really cool mod, theres just one thing I cant figure out how to alter.
As it is, the tags, when first used, start at the top and eventually disappear of the tag cloud no matter how many times its used after that (unless its set to show 1000's lol), is there anyway to set it up so when a new topic is posted with a tag already in use, that tag gets moved back to the front of the tag cloud.... if that makes any sense lol
Installed today. I had to hand mod Post.php but then it seems to work great.
Stupid question - but how do I get into the admin for this mod? :)
Thanks
Its in your Admin CP. Under Tags Configuration
Doesn't show, but then again this seems to be down to TinyPortal. Uninstalled it and some things just don't seem right :(
Is there a space or anyting?
You can also access it via http://www.yourforum.com/index.php?action=tags;sa=admin
Nope, no space and index.php?action=tags;sa=admin doesn't seemed to work either. Seems TP has really screwed up my board :(
Quote from: casp3r on March 17, 2007, 07:07:56 PM
Nope, no space and index.php?action=tags;sa=admin doesn't seemed to work either. Seems TP has really screwed up my board :(
did you installed TP 0.98 ?
i use SMF1.1.2 + TP 0.98 + lots of mods and this mod works great in the default theme.
BTW vbgarer45 thanks for the mod ;)
i'll come back with feature requests-suggestions :D
Quote from: v2.web on February 15, 2007, 07:43:20 PM
EDIT:
I changed
//Tagging System
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'], '</b>';
in display.template.php to
//Tagging System
echo '<b>', $txt['smftags_topic'], '</b>';
I don't know how, but the pages (postings) now pass validation.
Hi guys, I think It would be better to use this:
Quote
<!-- Tagging System -->
<strong>', $txt['smftags_topic'], '</strong>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;id=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '">
<span style="color:#f00;">[X]</span></a> ';
}
if(!$context['user']['is_guest'])
echo ' <a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
<!-- End Tagging System -->
Cause I don't think it's necesary to show the users where the Tagging System starts and finish. By the way I did copy that piece of code right before
<a name="lastPost"></a>';
in the Display.Template.php file.
Also the W3C recommend the use of <strong> over <b> I think.
Cheers
David.
For a future version of this cool mod, it would be nice that we are able to show the popular tags in a box, also in the frontpage, something like this: http://communityserver.org/forums/ (http://communityserver.org/forums/)
:D
Cheers,
David.
Hello there,
I am testing the tagging system, but something seems wrong.
I added the tag "1986" to many topics, meaning this tag is the most popular and, hence, should be shown on the Popular tags page with the biggest size. However, this does not happen:
http://www.curefans.com/index.php?action=tags
There, the biggest is "2005", but if you compare the number of topics that use "1986" you will notice this one should have the biggest letters.
Topics using "2005"
http://www.curefans.com/index.php?action=tags;id=55
Topics using "1986"
http://www.curefans.com/index.php?action=tags;id=23
What's wrong? :(
Thanks
David.
Actually I've found the problem. It seems the system shows the "Popular tags" BUT among the "Recents tags". The "1986" I did create was one of the firsts ones, hence, it was not shown among all the popular tags.
Temporaly I did change the line:
ORDER BY l.ID DESC LIMIT 50";
to
ORDER BY l.ID DESC LIMIT 80";
in the Sources/Tags.php file.
However this does not really solves the problem...
Any help will be appreciated!
thanks
David.
This is a great mod. Here's how I want to use the TAG feature in SMF 1.1.2+:
1) Admin (or Global Moderator) with CREATE TAG permission will add/change/inactivate(not delete) a series of Domain Tags in the TAG DB.
2) The creator (owner) of a Topic (or Admin/Moderator with SELECT/UNSELECT TAG permission) can Select or Unselect one or more existing Domain Tags from the TAG DB via DropDown List or checkBox(s).
3) Members with TAG SEARCH permission will be able to Advanced Search for Topics (Query-by-Example /QBE would be nice) with multiple TAGS and boolean conditions (only viewing results matching their access rights, of course).
4) Most (Recent) Popular Tag feature is not needed.
Any ideas and MOD code to accomplish this will be greatly appreciated.
Keep up the good work!
THX
5. The admin could restrict tagging to specific forums. A comme separated list of inclusions OR exclusions would be nice.
Hi vbgamer, i was looking exactly what your mod does, i installed and got errors in the installation that i was capable of solving, but i'm stuck with this error without apparent reason, maybe you can throw me a light on this...
I get this error:
QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: /var/www/html/foros/Sources/Post.php
Line: 1628
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.2, while your database is at version 1.1.1. The above error might possibly go away if you execute the latest version of upgrade.php.
The line pointed by the error message is this one (first uncommented line):
//Get how many tags there have been for the topic
$dbresult = db_query("SELECT COUNT(*) as total FROM {$db_prefix}tags_log WHERE ID_TOPIC = " . $topic, __FILE__, __LINE__);
$row = mysql_fetch_assoc($dbresult);
$totaltags = $row['total'];
mysql_free_result($dbresult);
I have executed the line in PhpMyAdmin and got the expected result (replacing the variables) but when running the script, it will always fail pointing to the same line...
I would appreciate any help on this, and great mod, by the way.
Regards
Check the code before it
The code before it is the working post.php before installing the TAGS mod.
I post the code again, including the lines before:
QuotecreatePost($msgOptions, $topicOptions, $posterOptions);
//Tagging System
if(isset($_REQUEST['tags']) && !isset($_REQUEST['num_replies']))
{
//Get how many tags there have been for the topic
$dbresult = db_query("SELECT COUNT(*) as total FROM {$db_prefix}tags_log WHERE ID_TOPIC = " . $topic, __FILE__, __LINE__);
$row = mysql_fetch_assoc($dbresult);
$totaltags = $row['total'];
mysql_free_result($dbresult);
Thanks for your reply.
Nice mod. It took some times to recognize you code the mod to ignore any errors in the language files and that was the reason why I saw nothing instead of the texts ;-)
Hello,
My users were asking for tags so I installed this mod. Congrats for the great job! :)
I would like to make some modifications, can you help me?
-I want to have an output of all the tags in the MessageIndex. How can I do it? Like: "Tags: Wii, DS, GC, N64"...
-Is it possible to, when I click on the tag in a specific board MessageIndex, only appear topics from that board?
Thanks! :)
anyone?
i`ve made a small modification-addition to this mod.
in the way i think of tags the words in the subject should also be counted.
so i added in post.php before
//Check Tag restrictions
$tags = explode(',',htmlspecialchars($_REQUEST['tags'],ENT_QUOTES));
this
if(isset($_REQUEST['subject']) {
$_REQUEST['subject']=str_replace(' ',',',$_REQUEST['subject']);
$_REQUEST['tags']=$_REQUEST['tags'].','.$_REQUEST['subject'];
}
ps sorry if it`s complete wrong (codingwise) but my php coding knowledge is pretty limited
I experienced this bug :
Erasing a thread do not suppress occurrences of related tags.
For example, I had only one thread with a tag called "fridge".
When erasing this thread, the tag "fridge" have not been removed and now point on no thread.
Except this bug, it works fine and it is a very useful mod.
By the way, I suggest you to had settings in admin panel in order to set behaviors :
- tags cloud listed by popularity on a specified time range - week/month/all time
- a way to specify a popularity threshold. For example, display only tags with at least X occurrences
- (this one is a kind of mix of the two suggestions above) a way to define a tag limit : For example, display only the N tags with most occurrences on a specified time range
- order the tags cloud alphabetically
Like this it will totally be perfect.. (at least for me ;) )
Good luck, it is a very nice mod!
When I add the same tags to different threads it seems to create duplicates in the tag cloud (instead of adding it to the existing tag)??
Quote from: rosiem on April 22, 2007, 12:32:18 PM
When I add the same tags to different threads it seems to create duplicates in the tag cloud (instead of adding it to the existing tag)??
this happen when you let spaces between commas.
correct:
tag1,tag2,tag3
incorrect:
tag1, tag2, tag3
http://microformats.org/wiki/rel-tag
As part of the microformats movement, there is a proposed spec for rel="tag". It would be good if the default URLs used for this mod put the tag name itself in the query, so that if the microformat isn't directly supported, theme/site authors could do it themselves.
Hello,
I installed the tags mod, however, nothing no fields appear in my post.
I'm not sure what additional tweaking I need to do to my post, display and index files to make this work. (attached).
Can anyone suggest what I need to do to integrate into my customized theme? (http://www.went2networks.com/smf)
(I tried to insert code I saw in this forum into my post.template file, but that didn't seem to change anything)
Any help would be appreciated!
thanks,
matt
hello
it was thinking that serious interesting that this mod has the option to suggest tags of which already they have added in others post also of which it uses tags of technorati
I really love this mod, and thanks for making it. However, I'd like to make some suggestions.
Firstly, and perhaps most importantly, it'd be great if you could remove someone's ability to make tags.
Also I'd love to be able to make some censored tags. So that I would define censored tags, and the tagging page would then reject them when someone tries to enter them.
Would be nice to be able to have better tag administration too. For instance, if there was an option for just the admin to be able to delete ALL instances of a tag on the main tag page, that would save a lot of time, and make it so much easier to look after.
I have it set so anyone can add and delete tags, but it would also be great if people could either add but not delete tags, or only delete their own (apart from the admin of course.)
a bug is when move a topic with tag in the tagcloud the tag no redirect to new position of topic
Please use the proper QueryString.php validated $topic rather than $_REQUEST['topic'], so that URL rewriting mods will work.
Are you planning on doing much more with this? I'd be interested in taking over if you weren't.
Great mod. I sincerely hope that it continues to be developed...
Quote from: dsanchez on March 21, 2007, 11:14:38 AM
..................
<!-- Tagging System -->
<strong>', $txt['smftags_topic'], '</strong>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;id=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '">
<span style="color:#f00;">[X]</span></a> ';
}
if(!$context['user']['is_guest'])
echo ' <a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
<!-- End Tagging System -->
Cause I don't think it's necesary to show the users where the Tagging System starts and finish. By the way I did copy that piece of code right before
<a name="lastPost"></a>';
in the Display.Template.php file.
..............
After when add this code I have two links Add Tag below post
hey vbgamer what do i add to make a tag cloud on the index page i tried a playing with the tag code but i keep geeting errors it keeps saying the function template main() is already being used thanks
Quote from: dsanchez on April 24, 2007, 12:08:39 PM
Quote from: rosiem on April 22, 2007, 12:32:18 PM
When I add the same tags to different threads it seems to create duplicates in the tag cloud (instead of adding it to the existing tag)??
this happen when you let spaces between commas.
correct:
tag1,tag2,tag3
incorrect:
tag1, tag2, tag3
Does anyone knows how to correct this bug?
I get this.
Am running 1.1.3
The package you tried to upload either is not a valid package or has become corrupted.
Any help please ?
Have you tried re-downloading the package...perhaps with a different browser?
Has anyone been able to pull out the code needed to display the tag cloud in a block instead of having a separate page for it?
I would like to see tags that are separated by a comma to become their own tag in the tag listing instead of a string of tags. That would make this mod A+ and make it so you don't have to enter each tag you want individually.
for the tag cloud you need tiny portal and then use this
http://www.tinyportal.net/index.php?topic=13744.10
you can have it on every page of just on the tinyportal front page
Can I manually install this MOD on a forum running 1.1 RC 3 ?
@ ragots
This mod is compatible with the following SMF versions:
1.1, 1.1.1, 1.1.2, 1.1.3
You would be best to upgrade from the old version of SMF you are using. You may, or may not (probably the latter), manage to get it to work on obsolete SMF versions but I very much doubt that you will be given any support for such an installation.
I'm running 1.1 RC3 and I have too many mods (39) installed and I'm worried about upgrading and loosing all my MODS.
The tag system for posts is very much neeed and is the last mod I'd want to install.
Why wouldn't it work if install it manually ?
Quote
Nom du mod Version
1. Streaming 3 4.2.2a [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
2. Advanced Visual Verification 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
3. Anonymous Posting Mod 1.01 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
4. Max Subject Length 1.1 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
5. Digg Topic 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
6. Rename Topic 1.0.2 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
7. Ad Managment 2.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
8. Users Online Today Mod 1.4.0b3 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
9. SMF File Manager 1.0.1 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
10. No Spam by Guests! 0.1 [ Appliquer le mod ] [ Lister les fichiers ] [ Effacer ]
11. Hide Post 1.0.7 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
12. MessagePreview 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
13. Board Viewers Mod 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
14. SMF 1.0.9 and 1.1 RC3-1 Security Patch 1.0.8/1.1 RC3 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
15. Karma Buttons 1.02 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
16. Board Notes 1.0.5 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
17. Contact Page 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
18. SMF Shoutbox 1.15 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
19. Hide Board 1.1 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
20. Hide Tag 1.2.4 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
21. Enhanced Quick Reply for 1.1 RC3 TBA [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
22. Expand Pages Mod 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
23. Active Members In Topic 1.5 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
24. View Single Post 2.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
25. Profile User Action 1.1 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
26. Simple Award System 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
27. Minimum Characters/Words Per Post 1.0.0 [ Appliquer le mod ] [ Lister les fichiers ] [ Effacer ]
28. Signature Permission 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
29. Edit Meta Data 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
30. Signature Option Post 1.1 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
31. BBCode Bar For Signature 1.3 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
32. Profile Comments 1.2.1 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
33. SMF Links 1.6.3 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
34. nwsw.nwswAdminAttachAnything 1.1 RC3 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
35. SMF Gallery Lite 1.7.1 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
36. Enhanced Quick Reply for 1.1 RC3 TBA [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
37. Media Center 1.0 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
38. Karma Description Mod 2.3 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
39. Spoiler Tag 0.2.6 [ Désinstaller ] [ Lister les fichiers ] [ Effacer ]
It really isn't a good idea to either use mods that don't, officially, support a particular version of SMF or to continue to use an obsolete version of SMF. As your version gets more and more out of date you will be at ever greater security risk due to patched problems in the current versions still being unfixed in the one you use and the lack of mods that will support such an old version.
I would suggest that given some of my forums have a great deal more mods than you appear to run and yet they are quite easy to keep up to date yours can be too.
I would further suggest that you do the following...I'll give you two possible ways to do it:
- Install a new (fresh install) test forum using SMF 1.1.3
- One by one install all the mods and themes you wish to continue to use into the test forum (using the latest versions of all products)
- When finished backup all the files from the test forum (not the database)
- Backup the files and database of your live/production forum
- Look at the directories in the SMF 1.1.3 package...with that as a guide you will be able to differentiate between those added by mods and the core ones (for instance Gallery or arcade mods make new directories)
- With the exceptions of Settings.php and Settings_bak.php in the forum root delete and replace all the old core files and directories in your live/production forum with those from the backup of your test forum
This will not affect your database at all and thus no postings will be lost...it will bring your forum up to date with SMF 1.1.3 and it is a rather easy process. If you do the backups there is no risk attached to it as you can always restore from backup. The mods and themes will also be up to date.
Alternatively you could forego the test forum and do the following:
- Backup your files and database
- Delete and replace the core files and directories with those from the SMF 1.1.3 package except for Settings.php and Settings.bak.php in your forum root...this should include your Packages directory and all sub directories.
- The above will have removed all your mods and themes so again you will need to install new ones using the latest versions.
Personally I much prefer the first method but either will bring you up to date.
I won't get into considerations of why mods that support current SMF versions might not support older versions...it's a futile thing to do. Code changes and improves over time and one should make sure that the code used is up to date. Neither method is difficult nor particularly time consuming.
Thanks, I would gladly pay someone to do the ugprade job for me.
Maybe you (some paypal money)
I'm too scared of messing my forum.
Here is a link to the forum
index page
http://love.mixbeat.com/hype/index.php?option=com_smf&Itemid=238
board view
http://love.mixbeat.com/hype/index.php?option=com_smf&Itemid=231&board=1.0
QuoteInsert Quote
Thanks, I would gladly pay someone to do the ugprade job for me.
Maybe you (some paypal money)
I'm too scared of messing my forum.
Here is a link to the forum
index page
http://love.mixbeat.com/hype/index.php?option=com_smf&Itemid=238
board view
http://love.mixbeat.com/hype/index.php?option=com_smf&Itemid=231&board=1.0
And here is the HOME PAGE of the site
http://love.mixbeat.com/hype/index.php
I'm a bit concerned that accepting such an offer might be taking from SMF...you see SMF offers Charter Membership and as part of that you'd get a special support forum and one on one help as well as an installation done for you.
http://www.simplemachines.org/charter/ (http://www.simplemachines.org/charter/)
I try to provide some support here by way of giving back to SMF so the last thing I'd want to do is to take away some vital revenue from it...I hope you see what I mean.
The process I described might sound daunting but it's really easy enough and if you do it via the test forum route you can take your time and have no risk to your main forum while you do it.
Thanks for your kind offer though.
I'll follow the test forum route and let you know.
Thanks
Given that it's very off topic as regards this particular mod perhaps you'd like to let me know how you get on via PM?
Ok, I will contact you via PM and let you know.
One last thing. I've looked everywhere on how to change the width of the standalone version of my forum.
http://love.mixbeat.com/hype/smf/index.php
I've tried everything, I would like the standalone version to be centered and 775px width. I don't know where to change that.
In style.css ? Where ?
Thanks in advance.
Have a look in style.css (working on that for the SMF default theme for this example)...find:
/* The main body of the entire forum. */
body
{
background-color: white;
margin: 0px;
padding: 0px;
}
...change to
/* The main body of the entire forum. */
body
{
background-color: white;
margin: 0px;
padding: 0px;
width: 775px;
}
BTW...this Q & A is off topic so let's not keep doing it...more appropriate to General English Support I'd say.
Please ignore my last post.
I have now installed the mod.
I have a problem.
You can type in tags when you start a new topic but when when admin tries to add new tags to an already existing post you get this message :
No topic selected.
You would do best to go to:
ACP>Packages>Options
Set the Installation Options to those appropriate to your hosting then in Cleanup Permissions make all files writeable.
Check via ftp (not sure what systems cpanel provides regarding ftp) that your files are set to CHMOD 777 or 775 depending on your host configuration.
This should resolve the problem you had...you should follow this process whenever you install or uninstall any mod or theme though when not doing so you can use Cleanup Permissions to "tighten" your CHMOD settings.
Once you've done the above try the automatic installation again.
Hi sorry about this,
I somehow managed it ( a filepath was wrong)
Please ignore my last post.
I have now installed the mod.
I do have a problem now though.
You can type in tags when you start a new topic but when when admin tries to add new tags to an already existing post you get this message :
No topic selected.
I think this might still be a CHMOD issue...try the method I gave above to make all files writeable.
ok I checked in spanel and the folder for this mod is 777
I am still getting the error
No topic selected.
Your reply leaves the situation very unclear. I am asking you to use the method I described above to make all the files in your forum writeable...have you done so? This mod has no "folder" and it edits a number of files (in four different directories) as well as adding four new ones (3 different directories.)
Hi True satan,
Sorry for any confusion. A little confused myself really
I have done what you say. The first time you do it it asks for a password then when you put the password in and press "change file permisions" the screen reloads - no errors show etc, but there is no message to say if the operation was successful or not ?
I am unable to chack chmod via my ftp as it doesnt have the function. This is what cpanel shows for plugins
Up one level
backups 777
Create New File
3D_Art_avatars_1.1.zip 97 k 0777
Googlebot_v2_0_3_only_smf1.1.x.zip 9 k 0777
MemberAwards_1-0-2.zip 18 k 0777
Tags.zip 10 k 0777
ad_mod_1-1-x_v2-3.zip 17 k 0777
cbi-1.zip 1 k 0777
enhanced_qr-1.1.tar.gz 5 k 0777
index.php 0 k 0777
installed.list 0 k 0777
prettyurls-base_0_7.tar.gz 10 k 0777
thesimpsonsavatars.zip 312 k 0777
yt_bbc_xhtml_1.0.zip 2 k 0777
Is there any other way to sort this out please ?
@ glennk
You are obviously looking at the packages directory but from what you've reported it does appear that everything is CHMOD 777 so it's looking likely that the rest of your forum is the same and thus that the Installation Options did its job properly.
I would wonder if this problem might be due to your use of the prettyurls mod...would you mind, please, uninstalling that and then trying this mod again?
Ok, uninstalled pretty urls and all is well with the tagging mod now, but unfortunately I cant get the pretty urls mod to go back in now and am getting this error
An Error Has Occurred!
Hacking attempt...
:'(
The mods appear to conflict (at least in your configuration) you would probably be best not to add PrettyURL's again if you want to use this mod. The modification the PrettyURL's developer suggested to you may work but it untested...you would be best IMHO to choose either this mod or PrettyURL's not both.
Released Tagging System 1.0.4 with eldʌkaː fix for pretty urls.
Thankyou, vbgamer...much appreciated.
Thanks for that. Works fine now. Much appreciated.
Quote from: somze on February 26, 2007, 12:30:42 PM
And where do i delete tags from topics that are deleted ?
I have the same question.
I created a new topic with a new tag. I deleted that topic,
but the tag related to it stil shows.
How do I delete that tag ?
This issue has been discussed in past postings in this topic...please note it would be appreciated if people would read the whole topic as often they'll find the answers to their questions have already been asked and answered...this mod doesn't, as you have realised, delete tags when a topic is deleted...should you wish to delete the tags you would have to edit them from your database.
I went and installed this mod on my SMF 1.1 RC3 and it went without a glitch.
I just would like to know where to change the rollover text that shows up
when the mouse pass over a tag in the the tag cloud and it reads 1 things tagged with...
I'd like to change to 1 topic tagged with....
It's not in the languages files
Ok, never mind. I found where to change that in tags.php.
Now I have another issue. I tried to add this feature.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg259.imageshack.us%2Fimg259%2F7008%2Faddtagrolloverry0.gif&hash=250e770cb1a8f441e10eebbf848ae194180f1636)
Tags: [Add Tag] See existing tags
At the bottom of the topic, it would be nice to be able to see (like a roll over title) the existing tags before one click to add one.
I added the link to the tag cloud, but I don't know how to add the roll over title.
That way, the user don't have to leave the topic to see the existing tags.
While trying to find a solution for the above issue, I bumped into an unclosed table in Display.template.php that was causing my theme to break when the user is not logged in. You can see that table is not closed when the user is a guest:
if(!$context['user']['is_guest'])
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
//End Tagging System
I changed that for:
if(!$context['user']['is_guest'])
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a> ';
echo '</td>
</tr>
</table>';
//End Tagging System
After I did that, my theme did not break anymore.
Hello,
I don't want my users to be allowed to pick tag word when launching a new topic.
I want to get ride of that tag field in the new thread form.
How do I do that ?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Flove.mixbeat.com%2Fhype%2Fimage1%2Ftag-form-new-topic.gif&hash=4fad1a7896b2790ed616db9d78225226edfaabed)
Hi vbgamer,
I think this is one of the most important mods, as it adds a new method of organizing information in your forums and I am thankful that you started it.
However, are you still actively developing it and adding new (requested) features and cleaning up the code? (E. g. there are at least two seperate functions to add tags to the database, i tried to filter tags against a regexp in the tags.php, but that didn't suffice.)
I'd like to know if I should go on and (try to) add the features I need (already am showing Tags in the Messageindex) or if there are new, improved versions coming out soon (like in a month)?
How would I go about upgrading? Do I have to uninstall the previous version first?
Quote from: t0AsD on August 01, 2007, 07:10:37 AM
Hi vbgamer,
I think this is one of the most important mods, as it adds a new method of organizing information in your forums and I am thankful that you started it.
However, are you still actively developing it and adding new (requested) features and cleaning up the code? (E. g. there are at least two seperate functions to add tags to the database, i tried to filter tags against a regexp in the tags.php, but that didn't suffice.)
I'd like to know if I should go on and (try to) add the features I need (already am showing Tags in the Messageindex) or if there are new, improved versions coming out soon (like in a month)?
No active development only paid custom work.
Sad to hear that :(
What about the takeover eldʌkaː proposed (http://www.simplemachines.org/community/index.php?topic=135761.msg1126316#msg1126316)?
Hello, how would I go about upgrading? :P
If by that you mean upgrading this mod from an earlier version to the current one...uninstall the earlier version and install the current one...your database holds the tags you have set and that won't be affected by the alteration.
CUSTOM WORK NEEDED
When I'm in a thread, and I want to add a tag at the bottom of the page, I'd like to be able to know what are the already existing tags withou leaving the page I'm on. How could that be done ? And if that's what you can do as custom work, so be it, how much you want to do that ? Send me an IM or email at
[email protected]Something like this... or similar...
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg259.imageshack.us%2Fimg259%2F7008%2Faddtagrolloverry0.gif&hash=250e770cb1a8f441e10eebbf848ae194180f1636)
Can someone PLEASE tell me the easiest way to find out which user added a certain tag?
The Tag mod currently displays only the latest tags not the most popular ones overall.
Could this be fixed?
This Mod is no longer supported. I even offered money (see above) I got no reply.
Quote from: ragots on August 13, 2007, 07:52:59 AM
This Mod is no longer supported. I even offered money (see above) I got no reply.
Incorrect! vbgamer45 replied recently to another member saying that there was no active development but that is not the same as unsupported.
But that doesn't change the fact that ragots offered money and got no reply... It's probably best to assume that vbgamer won't really be working on this any more and find alternatives.
Does anybody know if this mod actually automatically tag existing topics? I think the answer is no, but I'm not sure...
Thanks in advance
no it don't.
I see. Thank you.
Quote from: TrueSatan on August 06, 2007, 04:19:13 AM
If by that you mean upgrading this mod from an earlier version to the current one...uninstall the earlier version and install the current one...your database holds the tags you have set and that won't be affected by the alteration.
Sadly I can't uninstall it. I need some instructions to do it manually. There's no uninstall button on my package manager, it's under the category of Modification Packages — unknown using Daniel 15's package sorter.
The official SMF documentation contains help on installing mods manually...you would need to reverse the process outlined therein:
http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)
I'm having a slight problem with new posts with this mod. I was getting this error -
QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: /home/doughboy/public_html/forum/Sources/Post.php
Line: 1730
Well it pointed to this code -
Quote//Get how many tags there have been for the topic
$dbresult = db_query("SELECT COUNT(*) as total FROM {$db_prefix}tags_log WHERE ID_TOPIC = " . $topic, __FILE__, __LINE__);
$row = mysql_fetch_assoc($dbresult);
$totaltags = $row['total'];
mysql_free_result($dbresult);
To see what would happen I removed the code and found I could post again. I want to put the code back in because it generates tag count errors in my forum error log. Any ideas?
Just like to say that I love this mod. I don't know what it is, but there's just something about this mod that just makes me happy..
Thank you :)
Sadly.. this mod works perfectly at my place. but
It is not modifiying RSS feed ie. tags are not included in feed of Board.
##############################################
#### SMF TAG HACKS FULL SEO&SEF SUPPORT####
#### Version 1.0 Beta ####
#### Murat KAYA ####
#### http://www.sectitweb.net ####
#### http://www.joomlatr.org ####
##############################################
##############################################
For English :
DEMO URL #1 : http://www.joomlatr.org/forum/tags/
DEMO URL #2 : http://www.sectitweb.net/sectitsmf/tags/
[PREPARATION]
This mod will work just if you have already installed SEO4SMF and SMF TAGS.
You can downlod your SEO4SMF copy from : http://custom.simplemachines.org/mods/index.php?mod=518
You can download your SMF TAGS from : http://www.smfhacks.com
After complated insallation of these two MOD's, Go to Admin Panel and find Seo4SMF Admin;
Be sure "Beautifying url for forum actions ?" option is CHECKED! If not, SEO for TAGGING SYSTEM WILL NOT WORK!
En of preparation.....
[INSTALATION]
1. Unrar frist ( Use Winrar or etc...)
2. There will be three files; "Subs-Seo4SMF.php", "Tags.template.php" and ".htaccess"
3. Edit .htaccess with Notepad and change RewriteBase /sectitsmf to RewriteBase/!!YOUR FORUM DIRECTORY!!!
4. Save and upload .htaccess your forum directory.
5. Upload Subs-Seo4SMF.php to Sources directory of your forum (Backup yours please before overwrite!)
6. upload "Tags.template.php" to YOUR THEME FOLDER (overwrite with this)
[FINISH]
Türkçe :
[ÖN HAZIRLIK]
Bu Hack/Mod sadece Seo4SMF ve SMF TAGS (Smf Tagging System) forumunuzda kurulu ise çalışır.
Seo4SMF indirmek için : http://custom.simplemachines.org/mods/index.php?mod=518
SMF TAGS indirmek için : http://www.smfhacks.com
Bu iki modu sırasıyla kurduktan sonra, admin paneline gidin ve SeoSMF Admin linkine tıklayın;
"Beautifying url for forum actions ?" parametresinin İŞARETLENMİŞ olduğundan emin olun, değil ise işaretleyin.
Ön hazırlık bitti...
[KURULUM]
1. Dosyaları bir dizine açın (Winrar kullanabilirsiniz)
2. Dizine 3 adet dosya açılacak; Subs-Seo4SMF.php", "Tags.template.php" ve ".htaccess"
3. ".htaccess" dosyasını Notepad ile açın ve RewriteBase /sectitsmf yazan yeri RewriteBase/FORUM_KLASÖRÜNÜZÜ YAZIN
şeklinde değiştirin
4. Kayıt edin ve .htaccess dosyasını FORUM DİZİNİNE gönderin. ( Üstüne yazın )
5. "Subs-Seo4SMF.php" dosyasını (Seo4SMF kurulu olmalı) Sources klasörüne gönderin (önce yedeğini alıp sonra Üstüne yazın)
6. "Tags.template.php" dosyanızı tema klasörüne gönderin ( Üstüne yazın)
[BİTTİ]
Merhabalar,
Kodda dün bir sorun farkettim, kusuruma bakmayın;
Sub-Seo4SMF.php dosyasında aşağıdaki satır ;
$find_sa = strstr($other, "sa=admin"); // CHECKING IF ADMIN MODE CALLED ???
Bu şekilde olması gerekiyor ;
$find_sa = strstr($other, "sa="); // CHECKING IF ADMIN MODE OTHERS ETC... CALLED ???
Dosya güncellenmiştir, yeni dosyaları üstüne yazarsanız sorun çıkmayacaktır.
-----------------------
Hello,
I noticed yesterday some code error, Please update your files or change manual with this codes;
Find in Sub-Seo4SMF.php;
$find_sa = strstr($other, "sa=admin"); // CHECKING IF ADMIN MODE CALLED ???
Replace with this ;
$find_sa = strstr($other, "sa="); // CHECKING IF ADMIN MODE OTHERS ETC... CALLED ???
Notice : All files updated and attached again, if you dont want to edit just download .rar and overwrite old files
I got a wierd problem with this mod. When I add tags when submitting a new topic these tags are not added, however they are added if I add them manually in topic view..
The mods can't work in East Asian UTF8 Language. When you try to add a tag, you will get the following error:
Illegal mix of collations (latin1_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
To solve this issue, you need change the tables. Or before you install it, change the tagsql.php file:
<?php
//SMFHacks.com
//Table SQL
global $db_character_set;
if ($db_character_set == "utf8")
{
$char_set = " DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci";
}
//Create Tags Table
db_query("CREATE TABLE IF NOT EXISTS `{$db_prefix}tags`
(`ID_TAG` mediumint([img alt=8)]http://www.simplemachines.org/community/Smileys/simple/cool.gif[/img] NOT NULL auto_increment,
`tag` tinytext NOT NULL,
approved tinyint(4) NOT NULL default '0',
PRIMARY KEY (`ID_TAG`)) TYPE=MyISAM $char_set", __FILE__, __LINE__);
//Create Tags Log
db_query("CREATE TABLE IF NOT EXISTS `{$db_prefix}tags_log`
(`ID` int(11) NOT NULL auto_increment,
`ID_TAG` mediumint([img alt=8)]http://www.simplemachines.org/community/Smileys/simple/cool.gif[/img] unsigned NOT NULL default '0',
ID_TOPIC mediumint([img alt=8)]http://www.simplemachines.org/community/Smileys/simple/cool.gif[/img] unsigned NOT NULL,
`ID_MEMBER` mediumint([img alt=8)]http://www.simplemachines.org/community/Smileys/simple/cool.gif[/img] unsigned NOT NULL default '0',
PRIMARY KEY (`ID`)) TYPE=MyISAM $char_set", __FILE__, __LINE__);
//Insert the settings
db_query("REPLACE INTO {$db_prefix}settings VALUES ('smftags_set_mintaglength', '3')", __FILE__, __LINE__);
db_query("REPLACE INTO {$db_prefix}settings VALUES ('smftags_set_maxtaglength', '30')", __FILE__, __LINE__);
db_query("REPLACE INTO {$db_prefix}settings VALUES ('smftags_set_maxtags', '10')", __FILE__, __LINE__);
?>
for a custom theme Dana in TP how to edit/create tags for existing posts.
using TP 0.98 and SMF 1.1.4
how's support doin here? i like this mod!
Suggestion:
If the tagging system is installed before the TinyPortal v0.9.8.
TinyPortal v0.9.8 will fail. Because the following operation.
<file name="$themedir/index.template.php">
<operation>
<search position="before"><![CDATA[$current_action = 'admin';
if (in_array($context['current_action'], array(]]></search>
<add><![CDATA['tags',]]></add>
</operation>
This conflict can be solved by manually modified the code.
If Tagging system can change the code to the following:
<file name="$themedir/index.template.php">
<operation>
<search position="before"><![CDATA[$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm']]></search>
<add><![CDATA[, 'tags']]></add>
</operation>
The conflict will be solved if TinyPortal v0.9.8 remove two ")))" in tinyportal09x-11x.mod file
(lines 307 and 310).
From:
<search for>
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
</search for>
<replace>
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
</replace>
to:
<search for>
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm'
</search for>
<replace>
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin'
</replace>
1..hi, i would like the delete "x" and "add tag" icons not to show to every member. although other members cannot add or delete tags on another member's topic, i want these icons to show only to the owner of the post.
2. while in the text editor, i would like to change
QuoteTags:_____________________________
to
QuoteTags/Keywords:________________________
which file will i edit? thanks.
TIA
if guests have no permissions to add tags/post and only admin has how to edit the old posts to add tags
*bump* :)
Modifications.english.php
find : Tags and replace it :)
thanks Mr cowboy!
how about this one?
Quote1..hi, i would like the "x" and "add tag" icons not to show to every member. although other members cannot add or delete tags on another member's topic, i want these icons to show only to the owner of the post, and the administrator.
TIA
you'r weLcome :)
Check permissions for it..
i think it will be there ;)
and if any1 wanna change
- button with an icon look here ;
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg208.imageshack.us%2Fimg208%2F1339%2Fetiketgoruntukq0.jpg&hash=960bb6a1b6ccc7fb0815d3e870d29107dafc22a2)
find this in display.template.php ;
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
replace with this ;
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><img src="http://www.srotr.com/Themes/wchild/images/kapat.gif"></a> ';
ok, can anyone tell me where can i change perrmisions for taggin? my members have "You are not allowed to add tags to that topic" error.
also is that me, or is it normal that we can add only one tag a time? commas don't work.
Quote from: dreadu on November 04, 2007, 08:32:14 AM
ok, can anyone tell me where can i change perrmisions for taggin? my members have "You are not allowed to add tags to that topic" error.
also is that me, or is it normal that we can add only one tag a time? commas don't work.
Admin -> Permissions modify each group.
how about this one vbgamer?
Quotehi, i would like the delete "x" and "add tag" icons not to show to every member. although other members cannot add or delete tags on another member's topic, i want these icons to show only to the owner of the post.
TIA.
Quote from: taurean on October 27, 2007, 01:42:07 PM
if guests have no permissions to add tags/post and only admin has how to edit the old posts to add tags
This problem was solved but new issues keep coming back.
For existing post i can add tags now but there is a problem in arranging the tags.
for ex; tag1,tag2,tag3,tag4,tag5 or ex; tag1 tag2 tag3 tag4 tag5 are all shown as 1 Single tag while adding to the existing posts.
But for new posts tag1,tag2,tag3,tag4,tag5 are shown as seperate tags for the topic.
how to solve this?
QuoteFor existing post i can add tags now but there is a problem in arranging the tags.
for ex; tag1,tag2,tag3,tag4,tag5 or ex; tag1 tag2 tag3 tag4 tag5 are all shown as 1 Single tag while adding to the existing posts.
what i do is when adding tags, i add one tag at a time. anyway its just adding tags on an already existing topic.
thanks! i didn't saw it there.
what about commas? i can add one tag a time only? everyone has that problem? or me and some other users here?
sorry for post under post, but is there any way to show all tags on one site?
In a way...if you use Tiny Portal there is available for it a Tag Cloud block that displays all the tags over a set figure...you could edit that to make all show providing there weren't too many of them...other that that such a feature is not part of the mod at this time.
Please place all feature requests in my mod tracker
http://www.smfhacks.com/index.php?action=modtracker
So I am able to keep track of what to work on.
Quote from: 3nd3r on August 21, 2007, 07:59:42 AM
Does anybody know if this mod actually automatically tag existing topics? I think the answer is no, but I'm not sure...
Thanks in advance
it should be enable automatic adding tags like karlbenson's mod do.
Quotewhat about commas? i can add one tag a time only? everyone has that problem? or me and some other users here?
same problem here and it doesn't have with tp tag cloud because i have that problem before adding php box on tp for tag cloud on infex page of forum. ::)
--
Should i expect some restrictions from google because i tag topics which isn't visible for the guest?
Quote from: Murat KAYA on September 25, 2007, 04:26:39 AM
##############################################
#### SMF TAG HACKS FULL SEO&SEF SUPPORT####
#### Version 1.0 Beta ####
#### Murat KAYA ####
#### http://www.sectitweb.net ####
#### http://www.joomlatr.org ####
##############################################
##############################################
For English :
DEMO URL #1 : http://www.joomlatr.org/forum/tags/
DEMO URL #2 : http://www.sectitweb.net/sectitsmf/tags/
[PREPARATION]
This mod will work just if you have already installed SEO4SMF and SMF TAGS.
You can downlod your SEO4SMF copy from : http://custom.simplemachines.org/mods/index.php?mod=518
You can download your SMF TAGS from : http://www.smfhacks.com
After complated insallation of these two MOD's, Go to Admin Panel and find Seo4SMF Admin;
Be sure "Beautifying url for forum actions ?" option is CHECKED! If not, SEO for TAGGING SYSTEM WILL NOT WORK!
En of preparation.....
[INSTALATION]
1. Unrar frist ( Use Winrar or etc...)
2. There will be three files; "Subs-Seo4SMF.php", "Tags.template.php" and ".htaccess"
3. Edit .htaccess with Notepad and change RewriteBase /sectitsmf to RewriteBase/!!YOUR FORUM DIRECTORY!!!
4. Save and upload .htaccess your forum directory.
5. Upload Subs-Seo4SMF.php to Sources directory of your forum (Backup yours please before overwrite!)
6. upload "Tags.template.php" to YOUR THEME FOLDER (overwrite with this)
[FINISH]
Türkçe :
[ÖN HAZIRLIK]
Bu Hack/Mod sadece Seo4SMF ve SMF TAGS (Smf Tagging System) forumunuzda kurulu ise çalışır.
Seo4SMF indirmek için : http://custom.simplemachines.org/mods/index.php?mod=518
SMF TAGS indirmek için : http://www.smfhacks.com
Bu iki modu sırasıyla kurduktan sonra, admin paneline gidin ve SeoSMF Admin linkine tıklayın;
"Beautifying url for forum actions ?" parametresinin İŞARETLENMİŞ olduğundan emin olun, değil ise işaretleyin.
Ön hazırlık bitti...
[KURULUM]
1. Dosyaları bir dizine açın (Winrar kullanabilirsiniz)
2. Dizine 3 adet dosya açılacak; Subs-Seo4SMF.php", "Tags.template.php" ve ".htaccess"
3. ".htaccess" dosyasını Notepad ile açın ve RewriteBase /sectitsmf yazan yeri RewriteBase/FORUM_KLASÖRÜNÜZÜ YAZIN
şeklinde değiştirin
4. Kayıt edin ve .htaccess dosyasını FORUM DİZİNİNE gönderin. ( Üstüne yazın )
5. "Subs-Seo4SMF.php" dosyasını (Seo4SMF kurulu olmalı) Sources klasörüne gönderin (önce yedeğini alıp sonra Üstüne yazın)
6. "Tags.template.php" dosyanızı tema klasörüne gönderin ( Üstüne yazın)
[BİTTİ]
Dediklerini eksiksiz uyguladım ama hala linkler empty... seklinde
Hi, It is working great.. I am wondering if it is possible to add the 'PopTags' listings to the main page or somewhere else in my site. I have added the below code from the tags.template.php file and would like it to show up on one of my side tables on my site portal... The concept and existing usage on my site is working just fine, but extending just the tag lists themselves would be great. I can't seem to make this work, any suggestions or ideas would be great. Thx
echo '<div class="tborder">
<table style="border-left: 1px solid #336699; border-right: 1px solid #336699; border-bottom: 1px solid #336699;" border="0" cellpadding="2" cellspacing="0" align="center" width="98%">
<tr>
<td align="center" class="catbg"><span style="font-size: 12pt;">',$txt['smftags_popular'], ':</td>
</tr>
<tr>
<td align="center" class="windowbg2">';
if(isset($context['poptags']))
echo '<b>',$context['poptags'],'</b>';
echo '
</td>
</tr>
</table>
<br />';
Eeg- There's a TP block mentioned a few pages ago that does this already. For Tinyportals.net
how we can add tags in old topics?
hi i have a problem with tiny portal in this part ofcode
Quote//Tagging System
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;id=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
if(!$context['user']['is_guest'])
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
//End Tagging System
in display.template
when user is logued show like this
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg110.imageshack.us%2Fimg110%2F5989%2F20080111141528cy0.gif&hash=3779849d816bc61ff3ea41f937eeec6648c77ce8)
but from guest show this
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg110.imageshack.us%2Fimg110%2F9197%2F20080111141611td2.gif&hash=362e39245507e1b746000989bdff3ab3260f21a2)
I just noticed that I cannot search the text in tag created by this mod :( I have a topic tagged traval, chineses, taiwan for example; and when I use the search function in SMF, I could not find the topic tagged with those tags.
Any idea on this?
Quote from: au8ust on February 01, 2008, 06:58:09 PM
I just noticed that I cannot search the text in tag created by this mod :( I have a topic tagged traval, chineses, taiwan for example; and when I use the search function in SMF, I could not find the topic tagged with those tags.
Any idea on this?
Currently this is not a feature of the mod.
Quote from: vbgamer45 on February 05, 2008, 08:15:00 AM
Quote from: au8ust on February 01, 2008, 06:58:09 PM
I just noticed that I cannot search the text in tag created by this mod :( I have a topic tagged traval, chineses, taiwan for example; and when I use the search function in SMF, I could not find the topic tagged with those tags.
Any idea on this?
Currently this is not a feature of the mod.
Okay, thanks so much :D
When a member is searching for topics, will it also show topics that has the searched keyword in a tag?
For example: Topic A has the tag: SMF, but the word SMF is nowhere in the topic. Does it still show up in Search when a user searches for SMF? Thanks.
No it will not
This is a great mod. I would like to sort the tags in the tags cloud in alphabetical order. Is that possible?
I have found the solution for my problem. Just change the code
$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";
into
$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 tag ASC";
Removing LIMIT 50 makes that you can see all the tags.
Does someone knows how I can get a new line per first character of the tags in the results?
Good ideas will add them to the next version
Does this mod only work on topics or does it also work on individual messages?
Only on topics.
i am using createPost() from an external page not in the forum
what do i need to add to this to make it also add tags?
Is there any way that I can remove the ability to add tags from everyone BUT the tag admins? In other words make it so users can not add tags to their own posts.
Also, is there a way to add a "Most Popular Topics by Tags" statistic to the "User Statistics" panel?
*edit to ask another question before any responses were added*
You can setup permissions for each membergroup and disallow any non admin to not allow them to add tags.
Quote from: vbgamer45 on April 06, 2008, 01:35:13 PM
You can setup permissions for each membergroup and disallow any non admin to not allow them to add tags.
I have, however that only affects members ability to alter or add tags to other posts. They can still add tags when ever they start a new topic.
Quote from: Bazil Greyson on April 06, 2008, 08:54:23 PM
Quote from: vbgamer45 on April 06, 2008, 01:35:13 PM
You can setup permissions for each membergroup and disallow any non admin to not allow them to add tags.
I have, however that only affects members ability to alter or add tags to other posts. They can still add tags when ever they start a new topic.
Which version of SMF are you running?
SMF 1.1.4
Under...
Permissions > Regular Members
This is the only options for tags...
SMF Tags
Manage Tags [ ]
Added some new permissions for SMF 2.0 beta 3. for the tagging system might added to the SMF 1.1.x version as well.
Quote from: vbgamer45 on April 06, 2008, 09:35:38 PM
Added some new permissions for SMF 2.0 beta 3. for the tagging system might added to the SMF 1.1.x version as well.
Ahh, ok. Guess I will need to figure out how to fix it in the code then. I am using Tiny Portal and from the info I can gather from them.. they are NOT doing a version for SMF 2.0 for a very long time.
*edit for extra info*
In the Themes > Default > Posttemplate.php.. I find the following
//Tagging system Mod
if(!isset($context['num_replies']))
{
echo '
<tr>
<td align="right">
<b>', $txt['smftags_topic'], '</b></td>
<td>
<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
</td>
</tr>';
}
//End Tagging system mod
What can I add to that to make it only recgonize a particular member ID number, or group ?
I have an issue with one of the tables created by this mod. I'm running SMF 1.1.4 with the mod's latests version. I do regular backups, and from time to time I import them just to make sure everything is ok :)
The backup the forum generates is:
#
# Table structure for table `lovetime_tags_log`
#
DROP TABLE IF EXISTS `lovetime_tags_log`;
CREATE TABLE `lovetime_tags_log` (
ID int(11) NOT NULL auto_increment,
ID_TAG mediumint(8) unsigned NOT NULL default 0,
ID_TOPIC mediumint(8) unsigned NOT NULL default '',
ID_MEMBER mediumint(8) unsigned NOT NULL default 0,
PRIMARY KEY (ID)
) TYPE=MyISAM;
The error is at the ID_TOPIC line, where the default value is '' instead of 0.
ERROR 1067 (42000) at line 539594: Invalid default value for 'ID_TOPIC'
MySQL is: Server version: 5.0.51a
It's not a problem, I can edit that line no problem (vi rules at instantly checking a line number, I never saw another windows text editor able to handle a 90Mb text file :D)
Thanks,
Quote from: viulian on April 22, 2008, 02:42:00 PM
I have an issue with one of the tables created by this mod. I'm running SMF 1.1.4 with the mod's latests version. I do regular backups, and from time to time I import them just to make sure everything is ok :)
The backup the forum generates is:
#
# Table structure for table `lovetime_tags_log`
#
DROP TABLE IF EXISTS `lovetime_tags_log`;
CREATE TABLE `lovetime_tags_log` (
ID int(11) NOT NULL auto_increment,
ID_TAG mediumint(8) unsigned NOT NULL default 0,
ID_TOPIC mediumint(8) unsigned NOT NULL default '',
ID_MEMBER mediumint(8) unsigned NOT NULL default 0,
PRIMARY KEY (ID)
) TYPE=MyISAM;
The error is at the ID_TOPIC line, where the default value is '' instead of 0.
ERROR 1067 (42000) at line 539594: Invalid default value for 'ID_TOPIC'
MySQL is: Server version: 5.0.51a
It's not a problem, I can edit that line no problem (vi rules at instantly checking a line number, I never saw another windows text editor able to handle a 90Mb text file :D)
Thanks,
Fixed thanks for the report.
nice Mod..
thank translate Portuguese..
<file name="$languagedir/Modifications.portuguese.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Tags Configurações';
$txt['smftags_addtag'] = '[Add Tag]';
$txt['smftags_seperate'] = 'Separe cada tag por uma vírgula';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Tags Sugerir';
$txt['permissionhelp_smftags_suggest'] = 'Os usuários podem sugerir para adicionar tags';
$txt['cannot_smftags_suggest'] = 'Você não está autorizado a sugerir tags.';
$txt['permissionname_smftags_manage'] = 'Gerenciar Tags';
$txt['permissionhelp_smftags_manage'] = 'Os membros podem modificar as definições de tag e adicionar e remover tags';
$txt['cannot_smftags_manage'] = 'Você não está autorizado a gerir tags.';
//END Tagging System Strings
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.brazilian.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Tags Configurações';
$txt['smftags_addtag'] = '[Add Tag]';
$txt['smftags_seperate'] = 'Separe cada tag por uma vírgula';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Tags Sugerir';
$txt['permissionhelp_smftags_suggest'] = 'Os usuários podem sugerir para adicionar tags';
$txt['cannot_smftags_suggest'] = 'Você não está autorizado a sugerir tags.';
$txt['permissionname_smftags_manage'] = 'Gerenciar Tags';
$txt['permissionhelp_smftags_manage'] = 'Os membros podem modificar as definições de tag e adicionar e remover tags';
$txt['cannot_smftags_manage'] = 'Você não está autorizado a gerir tags.';
//END Tagging System Strings
]]></add>
</operation>
</file>
For Suporte smf 2.0 Beta3
<file name="$languagedir/Modifications.portuguese.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Tags Configurações';
$txt['smftags_addtag'] = '[Add Tag]';
$txt['smftags_seperate'] = 'Separe cada tag por uma vírgula';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Tags Sugerir';
$txt['permissionhelp_smftags_suggest'] = 'Os usuários podem sugerir para adicionar tags';
$txt['cannot_smftags_suggest'] = 'Você não está autorizado a sugerir tags.';
$txt['permissionname_smftags_add'] = 'Adicionar tags a própria tópicos';
$txt['permissionhelp_smftags_add'] = 'Os membros podem adicionar tagss';
$txt['cannot_smftags_add'] = 'Você não tem permissão para adicionar tags aos tópicos';
$txt['permissionname_smftags_del'] = 'Apagar tags a própria tópicos';
$txt['permissionhelp_smftags_del'] = 'Os membros podem apagar etiquetas a partir de temas de abertura';
$txt['cannot_smftags_del'] = 'Você não tem permissão para apagar esta tags';
$txt['permissionname_smftags_manage'] = 'Gerenciar Tags';
$txt['permissionhelp_smftags_manage'] = 'Os membros podem modificar as definições de tag e adicionar e remover tags';
$txt['cannot_smftags_manage'] = 'Você não está autorizado a gerir tags.';
//END Tagging System Strings
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.brazilian.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Tags Configurações';
$txt['smftags_addtag'] = '[Add Tag]';
$txt['smftags_seperate'] = 'Separe cada tag por uma vírgula';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Tags Sugerir';
$txt['permissionhelp_smftags_suggest'] = 'Os usuários podem sugerir para adicionar tags';
$txt['cannot_smftags_suggest'] = 'Você não está autorizado a sugerir tags.';
$txt['permissionname_smftags_add'] = 'Adicionar tags a própria tópicos';
$txt['permissionhelp_smftags_add'] = 'Os membros podem adicionar tagss';
$txt['cannot_smftags_add'] = 'Você não tem permissão para adicionar tags aos tópicos';
$txt['permissionname_smftags_del'] = 'Apagar tags a própria tópicos';
$txt['permissionhelp_smftags_del'] = 'Os membros podem apagar etiquetas a partir de temas de abertura';
$txt['cannot_smftags_del'] = 'Você não tem permissão para apagar esta tags';
$txt['permissionname_smftags_manage'] = 'Gerenciar Tags';
$txt['permissionhelp_smftags_manage'] = 'Os membros podem modificar as definições de tag e adicionar e remover tags';
$txt['cannot_smftags_manage'] = 'Você não está autorizado a gerir tags.';
//END Tagging System Strings
]]></add>
</operation>
</file>
Is there a known way to have the standard SMF search include the tags in the searched base?
No known way that would require a little bit good idea though add it to the modtracker found in the first post of this topic.
Added it to the tracker.
Quote from: vbgamer45 on July 23, 2007, 08:10:07 AM
Released Tagging System 1.0.4 with eldʌkaː fix for pretty urls.
Hi,
I'm still facing this problem of "No Topic Selected" I have the latest Pretty URLs Mod installed. I downloaded the latest version from SMF Mod Site but the error continues to show up.
Please help. Thanks.
The tagsql.php file for the SMF 2 version has some issues. It creates a table dbprefix_dbprefix_tags. This line
$smcFunc['db_create_table']($db_prefix . 'tags', $columns, $indexes, array(), 'update_remove');
should be
$smcFunc['db_create_table']('tags', $columns, $indexes, array(), 'update_remove');
Also the tags_log table creation doesn't use the new db_create_table function so it might not be compatible with all database backends.
Quote from: PanesarV on May 10, 2008, 03:39:41 PM
Quote from: vbgamer45 on July 23, 2007, 08:10:07 AM
Released Tagging System 1.0.4 with eldʌkaː fix for pretty urls.
Hi,
I'm still facing this problem of "No Topic Selected" I have the latest Pretty URLs Mod installed. I downloaded the latest version from SMF Mod Site but the error continues to show up.
Please help. Thanks.
Bump.
It may not work with that release have not tested with the latest pretty url.
hi.. i get this error when adding some utf-8 charachters.
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
file: /*****/Sources/Tags.php
Line: 274
MY database is mosty in utf8 but the tag is in latin1_swedish_ci . Do i need to covert the table in utf8 and how do i do that?
I am trying to figure out how to add/remove tags in the display.template via javascript so a new page isn't loaded for each action. Similar to how it is done in Flickr.
Something like this via AJAX.
In the display.template.php, the view of tags associated with the topic:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi25.tinypic.com%2F3469k3t.png&hash=241e003d12540b1fd28967e2ae6a130506aa4b47)
After clicking [Add a tag] a textbox form appears to enter a new tag:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi30.tinypic.com%2Fdq67f7.png&hash=644d92889e7363b198ec374c5675620d5d8a2668)
After clicking OK the tag is added and it appears on the list along with another [Add a tag] link so the process can be repeated if desired:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi26.tinypic.com%2Fwuigrc.png&hash=92b9d4bd985233ccc0166900edd9e3c59e084373)
Also, clicking the "x" deletes and clears the tag from the list, all done via AJAX so the process is less laborious.
However, I don't know AJAX. If anyone likes this idea and wants to implement it; would you mind sharing the code and could you make it compatible for SMF 1.1.1 (which is what I am on).
That would be cool would need to look into that.
Indeed. I have no patience so I am trying to figure it out for myself. ;D
Any time frame as to when you think you'd include that feature if it is possible?
Please make it compatible with latest pretty urls mod, if you have time.
Thanks.
Thanks a lot for this mod. Very useful.
Any way to consider tags the same even if written in different UPPER/lower letters?
Thanks
Eros
Quote from: vbgamer45 on May 29, 2008, 08:55:06 PM
That would be cool would need to look into that.
This may be of some help http://sixrevisions.com/ajax/ajax_techniques/
I installed this mod on 1.1.5... the testing phase seemed to be fine.
After I apply the mod, I can see the tags field in Start New topic... (it tells me "Seperate each tag by a comma"... see attached) but I don't notice the tagging system anywhere else in my forum.
I thought I was using the default theme. Should I do manual edits to the theme files?
NM: found out I was on a copy of the default theme. switched to default and it's working now.
Can anyone tell me why I've got two different tags for the same word? ('hong kong')
One has two tags, the other has one.
How do I combine their items?
Link: http://www.kaitech.hk/option,com_smf/Itemid,71/action,tags/ (http://www.kaitech.hk/option,com_smf/Itemid,71/action,tags/)
Does anyone know how to combine threads with "duplicate tags"?
Hello!
I was just wondering if this mod could also be applied to SMF 2.0? How?
Greets, DM
Quote from: kai920 on June 06, 2008, 09:47:02 AM
Can anyone tell me why I've got two different tags for the same word? ('hong kong')
One has two tags, the other has one.
How do I combine their items?
Link: http://www.kaitech.hk/option,com_smf/Itemid,71/action,tags/ (http://www.kaitech.hk/option,com_smf/Itemid,71/action,tags/)
Other seems to have space before word it's " hong kong". Changing it will probably fix it.
Quote from: Niko on June 13, 2008, 11:34:01 AM
Other seems to have space before word it's " hong kong". Changing it will probably fix it.
Thanks, you were right :)
I "accidentally" added an extra space when listing them out, but this is the usual practice correct?
tag1, tag2, tag3
and not
tag1,tag2,tag3
Can we edit the code so that it will strip all spaces immediately
after the comma and
before the first letter of the next tag? I noticed another moderator has added tags, and they too have a white space before each tag.
Quote from: kai920 on June 13, 2008, 11:45:39 AM
Quote from: Niko on June 13, 2008, 11:34:01 AM
Other seems to have space before word it's " hong kong". Changing it will probably fix it.
Thanks, you were right :)
I "accidentally" added an extra space when listing them out, but this is the usual practice correct?
tag1, tag2, tag3
and not
tag1,tag2,tag3
Can we edit the code so that it will strip all spaces immediately after the comma and before the first letter of the next tag? I noticed another moderator has added tags, and they too have a white space before each tag.
This should work
Sources/Post.php
find
$tagcount = 0;
foreach($tags as $tag)
{
Replace with
$tagcount = 0;
foreach($tags as $tag)
{
$tag = trim($tag);
trim is function which removes white-space characters (sucha as space).
Thanks Niko.
Any other word conversions we should make. Would TAG be the same as tag? If different , perhaps we should do a strtolower? (as suggested here (http://www.simplemachines.org/community/index.php?topic=135761.msg1566005#msg1566005))
Quote from: TrueSatan on July 23, 2007, 07:05:07 PM
This issue has been discussed in past postings in this topic...please note it would be appreciated if people would read the whole topic as often they'll find the answers to their questions have already been asked and answered...this mod doesn't, as you have realised, delete tags when a topic is deleted...should you wish to delete the tags you would have to edit them from your database.
care to elaborate on how exactly this is to be done (as it would come in handy since this poses both a problem for members who would be looking for the posts attached to that tag and an irritation for admins who would then have to explain on a constant basis as to why they cannot find the posts)?
thanks
Quote from: DonMateo on June 13, 2008, 04:08:42 AM
Hello!
I was just wondering if this mod could also be applied to SMF 2.0? How?
Greets, DM
Uploaded the SMF 2.0 version to the mod site.
couple of real quick questions - the only permission is "Manage Tags" and says Users can modify the tag settings and add and remove tags. However, without this permission even checked,
1. I noticed that every single member has access to add tags to anyone elses posts, and also delete anyones tags (this is without the permission checked). How can I change it so they can only add tags to their own topics and remove their own tags? (I tested this out with a test account that is in a regular member group)
2. When replies are made to a topic that has been tagged, the tags move down to the reply post and do not stay with the actual post that was tagged. (this happens for only "some" members - tested this out on a test account as well). If a topic has several replies, one would have to literally go to the end of that topic to remove or add a tag to that topic. This also causes a problem when adding tags to topics that dont have any. THe problem being that since the "Add Tag" link is now on the last reply of that topic, adding a tag links it to that post, not the original post.
1. Requires cusotm code.
2. Mod is for tagging of topics not tagging of each post.
Quote from: vbgamer45 on June 15, 2008, 09:00:31 PM
1. Requires cusotm code.
So anyoyne can change, delete, and add tags to anyone elses topics. (not a good idea as that feature would and probably will be abused)
Quote2. Mod is for tagging of topics not tagging of each post.
Yes I know it is supposed to tag the topic not an indivual post. That doesnt answer my question..lol. I need to know why, as replies are made to a topic that has tags, the actual tags keep moving down (to the bottom of the latest reply), instead of staying with the original post in the topic (which is what was tagged). If a topic has multiple replies, you have to go to the very end of the topic (to the last reply) in order to add tags, remove tags, etc. It would be much simpler if the tags stayed put.
I am also curious as to why there is even a permission on each membergroup if theyt can already add and delete a tag on "anyones" topic. (I tested that setting out on a regular test account and nothing changed)
Quote from: Kimmie on June 16, 2008, 12:25:16 AM
If a topic has multiple replies, you have to go to the very end of the topic (to the last reply) in order to add tags, remove tags, etc. It would be much simpler if the tags stayed put.
This is a good point. perhaps simple code can be added so that the tags display
both above and below the entire topic.
When a tagged topic is deleted, the corresponding topic is not deleted from the tags_log (unless something is just borked with my installation).
Quote from: 127.0.0.1 on June 17, 2008, 12:17:41 AM
When a tagged topic is deleted, the corresponding topic is not deleted from the tags_log (unless something is just borked with my installation).
The best way to handle this (I learned the hard way) is to make sure all tags are removed from a topic "before" the topic is deleted. This will also remedy the issue it being the only topic using those specific tags and the tags still showing up in the tag cloud.
Luckily on my site, I dont allow anyone to delete anything (not even staff) which allows me to control both those issues.
Found glitch with the tag cloud, thought I would also mention it here because I am not sure if its a code issue on the cloud or in the mod (also mentioned it on the TP site incase its an issue with the code for the tag cloud)... its not linking the same tag words correctly. If the same exact tag word is put on multiple topics, but not in the same order, it creates duplicate tags in the cloud - and also will not pull correctly when the tag is clicked on.
Example: (3 topics)
1st topics tags: Jokes
2nd topics tags: Comedy, Jokes
3rd Topics tags: Comedy, Jokes
(the "jokes" tag is in the 1st spot on topic 1 and in the 2nd spot on topics 2,3)
There will be 2 seperate tags in the cloud for "jokes". When each tag is clicked on, 1 brings up only 1 topic, the other brings up the other 2 topics. When I changed the order of the tags so that the tag "jokes" was in the 1st spot on all of them, it removed the 2nd tag in the cloud and then when the tag "jokes" was clicked on, all 3 topics then appeared on the list like they are supposed to.
Are you sure you don't have extra space(s) in front of "jokes"?
Quote from: kai920 on June 18, 2008, 04:56:00 AM
Are you sure you don't have extra space(s) in front of "jokes"?
Thanks for the fast response :)
Someone over at TP asked me something similar - wanting to know if the tags were typed in using spaces like this:
Comedy, Jokes <----Space inbetween the comma and Jokes
or like this:
Comedy,Jokes <----- no spaces inbetween the comma and Jokes.
I actually wondered about this being as the mod is not specific in the instructions it labels under the tag box, so what I did was assumed it was set up like pms are set up when sending to mulitiple people (it uses a space after the comma). I will test their theory and see if that is indeed the problem. If it is the case, and if the mod cannot be changed so that it doesnt matter if they are seperated by a space after the comma or not, the instructions when the mod is installed really need to reflect this because most people will assume tht there needs to be one.
I agree 100%, the default behavior should strip spaces in front of and after tags (but not in between).
You just need to look up (http://www.simplemachines.org/community/index.php?topic=135761.msg1578159#msg1578159) a bit... I had already asked about this and Niko provided an easy fix :)
Quote from: kai920 on June 18, 2008, 12:13:21 PM
I agree 100%, the default behavior should strip spaces in front of and after tags (but not in between).
You just need to look up (http://www.simplemachines.org/community/index.php?topic=135761.msg1578159#msg1578159) a bit... I had already asked about this and Niko provided an easy fix :)
I Didnt have time to read thru the whole topic at the time. I will have to try Niko's fix and see if it will work.
I still however, need someone to tell me how to remove the tags once a topic has been deleted. (I have two tags I need to remove - when I was testing out the tags I didnt know it wouldnt delete the tags when you delete a topic and I deleted one)
I also would like to ask if the ability to sort the topics that come up when you click on a tag will ever be added (like you can sort regular topics). Either sorting by Subject or by Started By would be great.
Quote from: Kimmie on June 17, 2008, 10:53:19 AM
Quote from: 127.0.0.1 on June 17, 2008, 12:17:41 AM
When a tagged topic is deleted, the corresponding topic is not deleted from the tags_log (unless something is just borked with my installation).
The best way to handle this (I learned the hard way) is to make sure all tags are removed from a topic "before" the topic is deleted. This will also remedy the issue it being the only topic using those specific tags and the tags still showing up in the tag cloud.
Luckily on my site, I dont allow anyone to delete anything (not even staff) which allows me to control both those issues.
That is too inefficient. Just imagine a scenario where you have to mass delete topics. Repetitious tasks like this should be done automatically. I hope the developer addresses this issue in upcoming versions.
Also I have not tested the following but I wonder how merged or split topics are handled with this mod.
I really like the idea of tagging topics but to add to my list of suggestions for this mod before I start using it:
1. Implement AJAX to add/delete tags.
2. Make necessary deletions from the tag table when a topic is deleted.
PS Including a tool in the admin center to recalculate/repopulate the tag info would be convenient.
Quote from: 127.0.0.1 on June 25, 2008, 06:45:54 PM
Quote from: Kimmie on June 17, 2008, 10:53:19 AM
Quote from: 127.0.0.1 on June 17, 2008, 12:17:41 AM
When a tagged topic is deleted, the corresponding topic is not deleted from the tags_log (unless something is just borked with my installation).
The best way to handle this (I learned the hard way) is to make sure all tags are removed from a topic "before" the topic is deleted. This will also remedy the issue it being the only topic using those specific tags and the tags still showing up in the tag cloud.
Luckily on my site, I dont allow anyone to delete anything (not even staff) which allows me to control both those issues.
That is too inefficient. Just imagine a scenario where you have to mass delete topics. Repetitious tasks like this should be done automatically. I hope the developer addresses this issue in upcoming versions.
Also I have not tested the following but I wonder how merged or split topics are handled with this mod.
I really like the idea of tagging topics but to add to my list of suggestions for this mod before I start using it:
1. Implement AJAX to add/delete tags.
2. Make necessary deletions from the tag table when a topic is deleted.
PS Including a tool in the admin center to recalculate/repopulate the tag info would be convenient.
well although its not to inefficient for me since I dont mass delete anything, I can see your point if someone would need to perform that task.
As for splitting, a tag is attached to the topic not a post so if you split out post(s), that tag will still remain with the original topic it was attached to. If you want the new topic you just made to also have tags you have to add them (its a "new" topic).
As for merging, I just tried it, and there "is" a problem with it. I merged two topics together that each had a tag and the new topic only took on the tag of the first topic made. When I split the post back out, the 2nd tag didnt return to that topic. Whick means, now i have ANOTHER tag out there just floating around..lol
Unfotunately, it doesnt look like the mod creator thought this through all the way before they posted it.
I'm also curious as to what would happen should one uninstall the mod (without manually removing all the tags first).
Quote from: 127.0.0.1 on June 17, 2008, 12:17:41 AM
When a tagged topic is deleted, the corresponding topic is not deleted from the tags_log (unless something is just borked with my installation).
i've fixed this by editing 'RemoveTopic.php' in smf's 'source' folder as follows:
1. append these code at the end of RemoveTopic.php:
function removeTags($topic)
{
global $db_prefix;
//find tagsid
$result = db_query("
SELECT ID_TAG FROM {$db_prefix}tags_log
WHERE ID_TOPIC = $topic", __FILE__, __LINE__);
if (!mysql_num_rows($result))
return;
$tagsid = array();
while ($row = mysql_fetch_assoc($result)){
if ((int)mysql_result(db_query("SELECT COUNT(ID_TAG) FROM {$db_prefix}tags_log WHERE ID_TAG={$row['ID_TAG']}"),0) == 1)
$tagsid[] = $row['ID_TAG'];
}
//delete tags_log
db_query("
DELETE FROM {$db_prefix}tags_log
WHERE ID_TOPIC = $topic", __FILE__, __LINE__);
//delete tags
db_query("
DELETE FROM {$db_prefix}tags
WHERE ID_TAG IN (" . implode(', ', $tagsid) . ")", __FILE__, __LINE__);
}
2. search for 'removeTopics($topic);' in this file, and append 'removeTags($topic);' under it
3. search for '$full_topic = removeMessage($_REQUEST['msg']);' in this file, and append codes below under it:
if ($full_topic)
removeTags($topic);
i've test it on my site and it works fine.
attached is my modified 'RemoveTopic.php', may this help you.
Hi
I cant see any effort of the Permission Manage Tags
Also the Suggest Tags permission in xml, does not appear anywhere
I like to have only some membergroups to be able to add/suggest tags
not the generic user
Suggest tags is not built into the mod yet.
Starting to see issues with this mod. Example, you want to remove a tag and add the same tag only a different spelling (capital versus lower case), its putting the original tag back on.
Example:
Original tag: "books"
You remove that one and add "Books"
It updates and has the original one back on ("books" with lower case B).
This wouldnt be that big of an issue however both show up on the tag cloud and only the topics with the tag "books" show up when you click that tag (and only the topics with "Books" show up when you click on that tag".
Any ideas why this is happening?
Also, the tags page doesnt line up right. The tag cloud is left aligned and the topics section is centered.
FYI - I just downloaded and installed this mod for 2.0 beta 3.1.
After installing, I received an error can not find smf_tags table. I looked in phpmyadmin and sure enough the table wasn't there. (and I am not sure why,.... everything else seemed to install ok)
SO - I manually created the table from the 1.x version...
CREATE TABLE IF NOT EXISTS {$db_prefix}tags
(ID_TAG mediumint(8) NOT NULL auto_increment,
tag tinytext NOT NULL,
approved tinyint(4) NOT NULL default '0',
PRIMARY KEY (ID_TAG))
...It seems to be working fine.
If not, please let me know what I need to do.
Obviously, the 2.0 version creates the table like this....
$columns = array(
array(
'name' => 'id_tag',
'type' => 'mediumint',
'size' => 8,
'null' => false,
'auto' => true,
),
array(
'name' => 'tag',
'type' => 'tinytext',
),
array(
'name' => 'approved',
'type' => 'tinyint',
'size' => 4,
'default' => 0,
'null' => false,
),
);
$indexes = array(
array(
'type' => 'primary',
'columns' => array('id_tag'),
),
);
$smcFunc['db_create_table']($db_prefix . 'tags', $columns, $indexes, array(), 'update_remove');
It looks like I am missing some columns or something...... but I don't know how to manually run the sql command (from the 2.0 mod... to create it!
Thanks in advance for your help!
Yeah the 2.0 version should have been pulled from the mod site it is not supported at this time. 2.0 changed a lot of stuff which will take me a long time to update all my mods.
Quote from: vbgamer45 on July 29, 2008, 07:36:23 PM
which will take me a long time to update all my mods.
:P
How do I change the # of tags it shows on the tag page? Right now its pulling 50 but I want it to pull more.
i've got error
Table 'motolove_forum2.smf_tags' doesn't exist
File: /home/motolove/public_html/Sources/Display.php
Line: 184
any suggest ? i'm using SMF 2.0 Beta 3.1
Quote from: Kimmie on August 02, 2008, 01:37:18 AM
How do I change the # of tags it shows on the tag page? Right now its pulling 50 but I want it to pull more.
See the code in my posting (http://www.simplemachines.org/community/index.php?topic=135761.msg1445068#msg1445068).
Quote from: jacbier on August 07, 2008, 10:44:26 AM
Quote from: Kimmie on August 02, 2008, 01:37:18 AM
How do I change the # of tags it shows on the tag page? Right now its pulling 50 but I want it to pull more.
See the code in my posting (http://www.simplemachines.org/community/index.php?topic=135761.msg1445068#msg1445068).
thanks.. I figured it out already.. however I didnt remove that part of the code entirely I just changed the number. If I removed it and it showed them all, that page would be HUGE with all the tags that are on my topics ..lol.
The only thing I wish is that the page that comes up when you click on a tag (that shows all the topics associated with that tag), it would move to multiple pages once it reached a certain limit. 500 topics coming up on that one page is WAY to much to have on just one page..lol.
Quote from: Kimmie on August 10, 2008, 05:11:08 AM
The only thing I wish is that the page that comes up when you click on a tag (that shows all the topics associated with that tag), it would move to multiple pages once it reached a certain limit. 500 topics coming up on that one page is WAY to much to have on just one page..lol.
Yes, that is one of the things in witch way the mod can be improved.
On my forum I have ordered the tags in a alphabetic way. For a better lay-out I would like that there is a new line for each character off the alphabet.
yeah that would be a helpful feature as well.
Hi,
I'm a newbie struggling my way through... :o
I successfully installed this mod early (before I crashed my install and hadd to start over) but this time I can't get it to work...
QuoteInstallations actions for "Tagging System":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
I went through the manual install stuff and started looking at the file and found that subs.php didn't match (I was unable to find the requested arrays) I'm not sure if that was the only error, though...
I have most of the mods I could make work on my system installed (anything that looked useful went in there - I will only have time to do this once...
Here is a (long) list 8)
Mod Name Version
1. Auto Embed Video/Audio Clips 3.1.2
2. mp3 Flash Player BBC Tag (XHTML Compliant) 1.0
3. SMF Trader System 1.1
4. User Email System 1.3
5. Spam Me Not Mod 1.02
6. Abstract black and white 100 1.0
7. Electric Guitar Avatars 1.0
8. 68 High Quality Avatars depicting occult symbolism old and new 1.0
9. Avatars at Index Mod 1.5
10. Bam Margera Avatars 2 1.0
11. Clickable Avatars 1.0.1
12. Cats Avatars 1.1.2
13. Country Flags 1.1.1
14. Lots-of-Avatars-Pairs 1.0
15. Lots-of-Avatars-Eyes 1.0
16. Lots-of-Avatars-Girls1 1.0
17. Lots-of-Avatars-Animals 1.0
18. Lots-of-Avatars-Animated 1.0
19. Lots-of-Avatars-Boys1 1.0
20. Lots-of-Avatars-Girls2 1.0
21. Lots-of-Avatars-Boys2 1.0
22. Futurama Avatars 1.0
23. Gothic Avatars Set2 1.1.2
24. Gravatar 0.1
25. Horoscope Avatars 1.0
26. Sci-Fi Avatars 1.0
27. The Simpsons Avatars 1.0
28. Tribal Designs 1.0
29. White Magic Symbols 1.0
30. Bookmarks 2.1.1
31. Buy Me A Beer 1.4
32. Drafts (for 1.1.5) 1.07
33. Enhance Recent Post 1.0
34. Images On Board 1.1
35. Password Protect Boards 0.2
36. Pm_Informer 1.0
37. PM On Registration 1.0.2
38. Post_As_An_Alternate_User 2.0
39. Related Topics 1.2.0
40. Add Sitepreviews 1.31
41. SSI_Register_Function 1.0
42. Hide Info Center From Guests 1.0
43. Easy Edit Meta Data 1.0
44. Poll Option in Post 1.0
45. Your Button 1.1
46. Previous and Next Links for Page Index 1.0
47. Post New Poll Link 1.1
48. Select Admin for Notifications 1.2
49. Page Number 2.0
50. Search Topic 1.01
51. nwsw.nwswAdminAttachAnything 1.1 RC3
52. FAQ Tags 0.1
53. Signature Dropdown Choices 1.0
sakura1998
if any of your other mods have edited that file, then it is not going to match. Delete the one you have, redownload it, and try to install it again.
Hi,
QuoteDelete the one you have, redownload it, and try to install it again
What should I delete (the sub.php??) If I do that, I'm going to break other mods and make the system unstable...
If you mean the tagging mod, I've tried that (deleted the package, redownloaded and installed)
Quote from: sakura1998 on August 16, 2008, 07:40:04 PM
Hi,
QuoteDelete the one you have, redownload it, and try to install it again
What should I delete (the sub.php??) If I do that, I'm going to break other mods and make the system unstable...
If you mean the tagging mod, I've tried that (deleted the package, redownloaded and installed)
Yes I am talking about deleting the mod & redownloading it again. If that didnt help, not sure what else it can be thats making it say its corrupt. Normally you mostly get that error when the package-info file doesnt include installing it for 1.1.5 but according to the mod page 1.1.5 is listed, and I was also able to install it on my 1.1.5 forum ok in that aspect.
Only thing I can recommend is a manual install of the entire mod.
Sorry if I'm dredging up an old thread but I can't get this mod to work no matter which theme I'm using.
http://open.thetrenchcoat.com
Any help would be appreciated.
Quote from: trench on September 06, 2008, 08:14:56 PM
Sorry if I'm dredging up an old thread but I can't get this mod to work no matter which theme I'm using.
http://open.thetrenchcoat.com
Any help would be appreciated.
When you try to install it using the package manager, do you get any "Test Failed"'s on any files?
Mmm... hey Guys this MOD is Great, but in the "Recent Post's" show the "native" mame of ADMIN... Example Name ADMIN: "Marcio" and the name in the forum is "MARCO" ok... in the "recent posts" show the REAL name "Marcio" ok look that's image's example "SMF SEO" is the real ADMIN Name
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg139.imageshack.us%2Fimg139%2F382%2Findexjs5.jpg&hash=f6b54aa5c95cc8c69fcdf8502c217382e7d5cd23)
http://img139.imageshack.us/img139/382/indexjs5.jpg
And "Gallery Admin" is the same person but no same name as forum "member"
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg139.imageshack.us%2Fimg139%2F6479%2Findex2zs9.jpg&hash=f276bf0954f8b9ebf8aca082f252b9606d8e49d3)
http://img139.imageshack.us/img139/6479/index2zs9.jpg
them any user can see the Real ADMIN name, can modify this? for the comun user can't see this name? or no any can see this REAL Admin Name??? any can say how?? or where I have to search this?, thanks sorry for my english but I From Argentina and my english is so bad... I hope can modify this, new thanks & regards Guys... Have a Great Time!!! 8).-
Quote from: Kimmie on September 07, 2008, 03:18:58 PM
Quote from: trench on September 06, 2008, 08:14:56 PM
Sorry if I'm dredging up an old thread but I can't get this mod to work no matter which theme I'm using.
http://open.thetrenchcoat.com
Any help would be appreciated.
When you try to install it using the package manager, do you get any "Test Failed"'s on any files?
No, nothing failed. I'm going to do a clean install of SMF and then try installing it again.
also try checking each file the mod edits and make sure it actually "made" those edits. I have come across a few mods where even though the package manager said it made the edit, it really didnt so I still had to do the manual edit before it would work. If you havent done the clean install yet, try that first.
I did and the changes were made. So it's off to the clean install. :)
Released 1.1 for SMF 1.1.x (Fixes And Updates)
+Added all the settings found in the 2.0 edition of the mod.
!Fixed bug showing username instead of display name on tag results and tag main.
!Cleaned up the template a little bit.
!On view topic only shows add tag if they have permission to do so.
Wow... vbgamer45, Thanks for changes is So Cool MOD... Thanks again friend, see you... Regards, have a Great Time 8).-
VB (or anyone for that matter)
I want to make 2 simple edits. I want the TAG tab to say "AKA"
Also i want to edit out the word "TAG" right next to the box where you type in the tags and make it say "AKA".
Maybe i'll edit out all of the other "TAG" references later.
this is all i need.
What files do i need to edit for these two edits?
thanks guys
Themes/default/languages/modifications.english.php should have those references.
thanks VB
New version released for SMF 2.0 Beta4!
+Updated many of the features for better SMF 2.0 support.
!Tags are now removed if the topic is deleted!
Many people (including myself) are still using 1.1.5/1.1.6. Are you going to also update that version so that the tags get removed when the thread gets deleted?
Quote from: Kimmie on September 27, 2008, 05:18:14 PM
Many people (including myself) are still using 1.1.5/1.1.6. Are you going to also update that version so that the tags get removed when the thread gets deleted?
Done just released an updated to remove tags if the thread is deleted.
Got a problem with extra tag sets in my forum (http://www.besteikaiwa.com/forum) I'm currently running 1.1.5
There are two sets of tags showing at the base of the post.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.besteikaiwa.com%2FuploadedFiles%2FtwoTags.jpg&hash=55256d8a106f562ecff1682efed1cf8073a60d62)
If I try to delete the bottom tag, an error will occur (removing the top tag will remove both together)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.besteikaiwa.com%2FuploadedFiles%2FtagError.jpg&hash=472883ba38fb1630da0726eafa452617608b18fd)
If you click 'add tag' (top or bottom), it will take you to the 'add tag window', but you will get an error message. You are, however, able to enter comma separated tags at the time of making the post...
What happened was this...
I had rolled back my forum after a crash. I tried to restore from an incomplete back up and had to reinstall from the original files, restore the most recent back-up and then delete and reinstall each mod.
For some reason, this mod came back with the problems above...
Any suggestions folks :)
I would suggest to uninstall the mod then install the latest version.
You probably will need to modify display.template.php to get rid of the extra set of tags since it installed twice on that file.
Hi,
Thanks for replying :)
I have the latest version for 1.1.x and tried uninstalling/reinstalling without success.
I'm afraid I can't code (at all :S) The best I can do is find seek and change code on instruction and hope nothing breaks...
I've attached the display.template.php to the message, if someone is kind enough to have a quick look at it for me :)
Removed both sets of tag's I would strongly suggest to install the new version.
Hi VB (great Aussie beer, VB... :P)
That's fixed the problem (thank you very much)
I think I probably have the latest version - I deleted and redownloaded all the mods last week...
Oops... (not quite finished after all :S)
I still have two entry boxes in the post window...
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.besteikaiwa.com%2FuploadedFiles%2FtwoEntryBoxes.jpg&hash=7867be82c875eaf5a1aabbdcf77c184d59925953)
Post your post.template.php
OK (attached)
Fixed file attached
Perfect,
Thank you very much :)
Hi guys, I want to put de tagcloud on the index page. How can I do this? What code do I have to put in my main template ? I saw in the forum an explenation but it was to vague. Something about using tinyportal of ad management mod.
iam install manual...and how can install sql
tagsql.php This file should be able to execute standalone.i see that error
QuoteErro na base de dados Table 'smf115.smf_tags_log' doesn't exist
Ficheiro: W:\www\SMFMZ\smf115\Sources\Display.php
Linha: 341
Couple tagsql.php to your forum's root directory then run it should fix that issue.
Earlier i was using 1.1.6 with tagging system.
I have thousands of tags.
All datas and members have been upgraded to new 2.0.4 smf.
I have installed a new copy of tagging system in my 2.0.4.
How to convert the 1.1.6 tags to 2.0.4 smf tags.
Which table i have copy and paste in the 2.0.4 smf table.
You shouldn't have to copy anything when you upgrade your forum. Just use the upgraded SMF Tags for 2.0 and it will work ok.
Quote from: vbgamer45 on October 16, 2008, 07:40:54 PM
You shouldn't have to copy anything when you upgrade your forum. Just use the upgraded SMF Tags for 2.0 and it will work ok.
I got it worked, you are right. But earlier forum folder is forum and new folder at discuss.
So what i did i have installed 2.0.4 - Installed Tags .
went to old table in database, copied the smf_tags and smf_logs_tags and pasted in the new database and it worked fine.
Thanks for this cool Mod Vbgamer45
I have been using this mod for a couple of years and built up a considerable list of tagged topics. I use them to link to topics relating to a specific topic of conversation. I link to the tags from areas of my static site.
Recently I upgraded this mod. Sadly I note that the urls have changed ??? And so all my links into the tags are now of no use.
/forum/?action=tags;id=28
Has now become
forum/index.php?action=tags;tagid=28
Could you advise me if there is anyway I can alter the code to go back to the first url.
I am also about to upgrade Tagging System. My version does not strip spaces after the separator comma - and usually people do put spaces "tag1, tag2" and then the first tag is "tag1 " which is considered different than "tag1".
Quote from: glennk on October 19, 2008, 05:28:03 AM
I have been using this mod for a couple of years and built up a considerable list of tagged topics. I use them to link to topics relating to a specific topic of conversation. I link to the tags from areas of my static site.
Recently I upgraded this mod. Sadly I note that the urls have changed ??? And so all my links into the tags are now of no use.
/forum/?action=tags;id=28
Has now become
forum/index.php?action=tags;tagid=28
Could you advise me if there is anyway I can alter the code to go back to the first url.
That's how it has allways been index.php?action=tags;tagid=28
Even without the index.php that old url would still work.
Thanks for your reply.
The first url just seems to take me to the recently tagged page whereas the second one takes me to the list of topics for tag 28, which is where the first url used to take me.
http://www.whitbyseaanglers.co.uk/forum/?action=tags;id=28
Not sure why this update is creating different urls ?? Could it be anything to do with the update of the pretty url mod ?
Yeah we change the urls from id to tagid because there was an issue with mod_security blocks ;id in the url
Ok. Is there anything I can do to revert to the old syatem, or should I change the links to the new ones and 301 the old ones ?
Thanks Glenn
Quote from: glennk on October 19, 2008, 03:51:53 PM
Ok. Is there anything I can do to revert to the old syatem, or should I change the links to the new ones and 301 the old ones ?
Thanks Glenn
You could modify the code but for each update for the tag system you would need to redo those changes.
I would change the links to the new ones and redirect the olds ones.
I've just finished the upgrade (to 1.1.1) and it works!
However, I had to do some tweaks to the code to suite my needs:
1) it did not put the tags to lower case and trim them. "tag1, tag2" added to the list of tags when creating a new post means creating the second tag as " tag2" with a space before, and will not find if other "tag2" or "Tag2" where entered before.
For these I've modified:
Tags.php:
Inserted:
$tag = trim(strtolower($tag));
after
if (empty($tag))
fatal_error($txt['smftags_err_notag'],false);
Post.php:
Inserted:
$tags = array_map('strtolower', array_map('trim', $tags));
after
$tags = explode(',',htmlspecialchars($_REQUEST['tags'],ENT_QUOTES));
Also, I had to cleanup the duplicates that were previously created, and for these I did these steps:
a) Ran two SQL queries using phpmyadmin:
update {$db_prefix}tagstags set tag=trim(tag)
update {$db_prefix}tagstags set tag=lower(tag)
(this trims and lower cases the tag list).
b) Ran this small script from the folder's directory (this script is not thoroughly tested though, but seems to work for me):
<?php
require "SSI.php";
$result = mysql_query("SELECT * FROM {$db_prefix}tags",$db_connection);
$tags = array();
while ($myrow = mysql_fetch_assoc($result))
{
if (isset($tags[$myrow['tag']]))
{
$previd = $tags[$myrow['tag']];
$currid = $myrow['ID_TAG'];
mysql_query("UPDATE {$db_prefix}tags_log set ID_TAG=$previd WHERE ID_TAG=$currid");
mysql_query("DELETE FROM {$db_prefix}tags where ID_TAG=$currid");
}
else
$tags[$myrow['tag']] = $myrow['ID_TAG'];
}
mysql_free_result($result);
?>
Lastly, I found out that removing a topic from the trash does not also clear its tags from the database (will investigate why) and post back. Also, if you get an error when posting and the forum redirects you back to the post, the value for the subject is kept, but the value for the tags is not kept after the page is reloaded. Will also investigate this and post back.
Quote from: vbgamer45 on October 19, 2008, 03:55:36 PM
Quote from: glennk on October 19, 2008, 03:51:53 PM
Ok. Is there anything I can do to revert to the old syatem, or should I change the links to the new ones and 301 the old ones ?
Thanks Glenn
You could modify the code but for each update for the tag system you would need to redo those changes.
I would change the links to the new ones and redirect the olds ones.
Thanks for your help. I will change the urls to avoid future problems.
Great mod by the way.
Best Regards - Glenn
Spanish Translation
Quote from: NIBOGO on October 23, 2008, 10:06:24 PM
Spanish Translation
I need for spanish_es what can i do?
this works for smf 2.0beta4 ?
Sorry Im novice in this :-[
Quote from: Pwn Kyuubi on October 25, 2008, 11:40:01 PM
Quote from: NIBOGO on October 23, 2008, 10:06:24 PM
Spanish Translation
I need for spanish_es what can i do?
this works for smf 2.0beta4 ?
Sorry Im novice in this :-[
Change the _latin to _es
vbgamer can you add a "search tags" feature??
Not sure whats gone wrong but I am currently unable to add tags and keep getting this error
No topic selected.
Currently getting this error in 2b4
Fatal error: Cannot redeclare autosuggest_search_tags() (previously declared in /home/glennk/public_html/forum/Sources/Subs-Editor.php:1697) in /home/glennk/public_html/forum/Sources/Subs-Editor.php on line 1768
seems to be very useful thx
This mod is very useful but is possible have MORE BLANK space around the TAG WORDS? because having many TAGS these show everybody near and attached there is confusion reading them, some white space around words TAG will be very more nice to view and clean for read
Like an extra space?
yes, as you can see TAGS are all near and words are in confusion , users cannot read them better, may be adding space around words and have more blank space arount them, reading these words will be more clean
look scree
solved my problem look screenshot thx for reply
Viulian is right. There is a bug in 1.1.1 that allows duplicate tags when they are entered through Post.php rather than Tags.php
Tags.php contains the line
$tag = htmlspecialchars(trim($_REQUEST['tag']),ENT_QUOTES);
White space is trimmed out of the beginning and end of the string, but no allowance is made for this in Post.php. The code reads:
$tags = explode(',',htmlspecialchars($_REQUEST['tags'],ENT_QUOTES));
Try the following example. Go to the end of an existing topic and click on Add Tag. Enter the following multiple tags:
test
hi
dream
Now, start a brand new topic and enter the following tags separated by comma:
test, hi, dream
Now, go to the tags page and you will see: test hi dream test hi dream. There are duplicates of the tags because whitespace was not trimmed out of the comma delimited string. Sure, you could insist that the users enter a comma delimited string in the form of:
test,hi,dream
but not many people are going to remember to do this, nor is it natural to do that. Viulian's code that he offered in his post fixes these problems and also addresses upper vs lower case (or mixed case) tags - test, Test, tEst would all be recorded as separate tags in the database. Better to cause the data to be trimmed and uniform in appearance before submitting it to the database.
Thanks for a great module!
Nice mod.
Thanks mate :)
Quote from: edi67 on November 13, 2008, 05:43:41 PM
.......TAGS are all near and words are in confusion , users cannot read them better, may be adding space around words.......
Quote from: edi67 on November 14, 2008, 09:45:59 AM
solved my problem....
edi67, can you share how you did this please :)
Thank you
One solution:
In tags.php look for
// perhaps adjust this title attribute for the things that are tagged
$context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
$context['poptags'] .= '>'.$key.'</a> ';
Right after the last line of the above code, you could add something like this:
$context['poptags'] .= 'whatever you want to separate words goes here';
Hth,
Raklet
Ive noticed duplicate tags on my forum which is really bad as I use tags to link into the forum from my main website when people are wanting to look at topics on a set subject.
For example in my kayak fishing section I use the tags to link to all forum topics on kayak fishing. The problem is there seems to be 2 sets of tags for this keyword.
http://www.whitbyseaanglers.co.uk/forum/index.php?action=tags;tagid=139
http://www.whitbyseaanglers.co.uk/forum/index.php?action=tags;tagid=83
How can I put this right please ??
Quote from: glennk on November 18, 2008, 08:55:06 AM
Ive noticed duplicate tags on my forum which is really bad as I use tags to link into the forum from my main website when people are wanting to look at topics on a set subject.
How can I put this right please ??
Read Viulian's post here (http://www.simplemachines.org/community/index.php?topic=135761.msg1759236#msg1759236). More than likely, you are suffering the same problem. You can fix your code in the manner that he suggests and can use the SSI to clean up duplicates. BUT, there remains a problem that Viulian did not address. He removed duplicate tags from the tags table, but he didn't correct entries in the tags_log table of the database. If tags are deleted from the tags table that are referenced in the tags_log table then there will be errors. To address this, you could run another simultaneous query that changes the values in tags_log.
Thanks for making a post it really is appreciated. I hope you dont find this rude or cheeky as it isnt intended to be. But could you repeat the info as if your talking to a complete novice. I dont understand databses etc so a list of easy steps to follow to correct the problem would be really appreciated.
Will this problem be sorted in the next release ??
Hi anyway this code can have an option where the tag system ads tags using the title of the board ?
I have an example of this r unning on my joomla.
Quote from: glennk on November 18, 2008, 09:24:50 AM
Thanks for making a post it really is appreciated. I hope you dont find this rude or cheeky as it isnt intended to be. But could you repeat the info as if your talking to a complete novice. I dont understand databses etc so a list of easy steps to follow to correct the problem would be really appreciated.
Will this problem be sorted in the next release ??
Not a problem. I didn't know what your technical level was. However, I'm not sure I can walk you through this. You really need to have a basic understanding of php and databases. Sorry.
I'm not the developer of the module. I'm just commenting on it. I don't know what vbgamer's plans are for the next release.
Quote from: raklet on November 17, 2008, 09:16:41 PM
One solution:
In tags.php look for
// perhaps adjust this title attribute for the things that are tagged
$context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
$context['poptags'] .= '>'.$key.'</a> ';
Right after the last line of the above code, you could add something like this:
$context['poptags'] .= 'whatever you want to separate words goes here';
Hth,
Raklet
Thanks mate, worked a treat :)
+k
Is there a way to make words different colours?
Quote from: Sabre™ on November 19, 2008, 02:39:19 AM
Is there a way to make words different colours?
I'm sure there is. This is what I would do. Create an array that associates a color with (for example) the top five words. Then insert that color into the following line
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
while the code is looping through setting the size. The color would go in the "style=" section. I don't have any specific code for this. It is just the general idea.
In error log see this message
Quote
8: Undefined index: smftags_guest
Datoteka: /home/USERNAME/public_html/forum/Sources/Tags.php
Linija: 77
Tags work fine but that message come in log every day
Is there a way to modify this mod so that the Tags only work in a certain board and not the whole forum?
Thanks,
Squall
I have a problem when people are making new topics and adding tags
when a user makes a Topic, and add tags, then post it, nothing shows in the tag section of the forum.
Can you help me?
Quote from: .:{EK}:. Squall on November 26, 2008, 07:48:32 PM
Is there a way to modify this mod so that the Tags only work in a certain board and not the whole forum?
Thanks,
Squall
+1 for this one. Any comments?
hi vbgamer45
i have tow questions:
first i combined this mod and Easy Edit Meta Data (http://custom.simplemachines.org/mods/index.php?mod=1211) and did some changes on them
i want to know can i release this as a new mod? or it is better that i give it to you?
second i tried to add a logAction to this mod:
function DeleteTag()
{
global $db_prefix, $ID_MEMBER, $txt;
$id = (int) $_REQUEST['tagid'];
//Check permission
$a_manage = allowedTo('smftags_manage');
$dbresult = db_query("
SELECT
ID_MEMBER,ID_TOPIC,ID_TAG
FROM {$db_prefix}tags_log
WHERE ID = $id LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($dbresult);
mysql_free_result($dbresult);
if ($row['ID_MEMBER'] != $ID_MEMBER && $a_manage == false)
fatal_error($txt['smftags_err_deletetag'],false);
// Delete the tag for the topic
db_query("DELETE FROM {$db_prefix}tags_log WHERE ID = $id LIMIT 1", __FILE__, __LINE__);
$dbresult = db_query("
SELECT
tag
FROM {$db_prefix}tags
WHERE ID_TAG = $id LIMIT 1", __FILE__, __LINE__);
$row2 = mysql_fetch_assoc($dbresult);
mysql_free_result($dbresult);
// Tag Cleanup
TagCleanUp($row['ID_TAG']);
logAction('Tag Del', array('topic' => $row['ID_TOPIC'], 'Tag' => $row2['tag']));
// Redirect back to the topic
redirectexit('topic=' . $row['ID_TOPIC']);
}
but in logs topics URL saves correctly but tag not displayed
where is problem?
thanks a lot
How to extend it to support "Tag Topic Alert" by email or PM?
Any topic marked with certain tag then could be alerted by email or private message.
I don't mean notification by already posted topic, but by tag (so any future post with certain tag could be notified).
Thanks.
Quote from: HuNTeR@sm on January 05, 2009, 01:08:43 PM
hi vbgamer45
i have tow questions:
first i combined this mod and Easy Edit Meta Data (http://custom.simplemachines.org/mods/index.php?mod=1211) and did some changes on them
i want to know can i release this as a new mod? or it is better that i give it to you?
That would be a cool mod if it takes the tags and uses them as meta tags for a forum
I could of sworn i seen this mentioned somewhere in this thread but cant find it but how can i change the size of the font for the tags in the cloud?
BUMP - no real support on this mod since NOVEMBER............. not good as its now january
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi296.photobucket.com%2Falbums%2Fmm162%2Fnikkkistikkki%2Ftumbleweed.gif&hash=e027449c0e33d617ede4e07847c7b7a5dad56e76)
If you need paid support assistance let me know.
There are settings that control the size of tags under settings
Hi, vbgamer ~
Great mod concept, but I'm having some challenges in applying it to the babylon theme for 1.1.7. Creating the button to link to the tag cloud page wasn't any problem, and I did the automated install, then copied the code from the instructions for a manual installation to the babylon theme's index.template.php and display.template.php files.
No errors are hitting with the index.template.php file modified, but I'm getting an error when I copy the code into the babylon theme display.template.php file:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/babylon/Display.template.php on line 544
535: <tr><td style="padding: 0 0 1px 0;"></td></tr>
536: </table>
537: <a name="lastPost"></a>
538:
539:
540:
541:
542:
543: // Tagging System
544: echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">545: <tr>
546: <td class="windowbg">
547: <b>', $txt['smftags_topic'], '</b>';
548:
Without the display.template.php edits, I don't see any tags at the bottom of the page the way they appear in the screenshot, and when I edit the top post in a test topic I created with tags I can't see any where that I can edit or add them.
What do I need to do to fix this code for the babylon display.template.php file?
// Tagging System
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
//End Tagging System
This will be a great addition to my site if I can get it working so the tags show up and they can be edited later by the thread owner, the admin or a moderator with the proper permission.
Any suggestions would be greatly appreciated.
Thanks!
Edited to add mention that I'd done the initial install through the automated package manager within SMF.
Quote from: vbgamer45 on January 18, 2009, 03:57:46 PM
If you need paid support assistance let me know.
There are settings that control the size of tags under settings
its ok now i worked out the problem
I really do need help in figuring out why the code quoted in the instructions for this mod is causing the error it is. I've continued to work with it, and am not getting anywhere. This is the first time that I've had problems like this in using the code provided with a mod, and it's tremendously frustrating.
I sent a PM to vbgamer45 asking for how much paid support would run, but haven't heard back. I'm going to open the offer now to anyone reading this. Please send me a PM with how much you would charge to fix whatever's causing the error described two messages above.
(http://www.simplemachines.org/community/index.php?topic=135761.msg1884738#msg1884738)
I will accept the first reasonable offer and make whatever the agreed payment would be through PayPal.
Find
<a name="lastPost"></a>
Change to
<a name="lastPost"></a>';
Awesome! Thank you! I kept going over and over and over what was inside the code for the tagging system. It never occurred to me to look just above what I'd inserted.
You, sir, rock.
(and a donation was just sent via PayPal)
Quote from: NightBird on January 21, 2009, 11:30:10 PM
Awesome! Thank you! I kept going over and over and over what was inside the code for the tagging system. It never occurred to me to look just above what I'd inserted.
You, sir, rock.
(and a donation was just sent via PayPal)
Thanks so much. First donation of the year!! w00t
My pleasure! It's completely deserved. I'm thrilled to add this functionality to my site. It's a cooperative writing/roleplaying forum, so this will give a great way for people to find things by genre or content tags. I think it's one of the best enhancements I've been able to offer to date.
Is there any plans to make an rss feed for tags ?
Please, can someone tell me how to edit this mod so that the taggers for each tag are easily stored? I just need the user ID of each tagger stored somewhere so it's easier to find out who tagged what. I'd really really massively appreciate it, and I can't imagine it would take that much work. Thank you.
Quote from: glennk on January 31, 2009, 05:53:21 AM
Is there any plans to make an rss feed for tags ?
no
It would be very useful VB Gamer. How easy would it be for a non coder to create this ?
What I want to do is use feedburner to put a list of the 5 most recent topics for 1 particular tag on my sites static html homepage. I dont have my forum in individual boards and rely on tags to identify particular keyword/topics.
great mod... :)
Quote from: glennk on February 01, 2009, 05:31:05 AM
It would be very useful VB Gamer. How easy would it be for a non coder to create this ?
What I want to do is use feedburner to put a list of the 5 most recent topics for 1 particular tag on my sites static html homepage. I dont have my forum in individual boards and rely on tags to identify particular keyword/topics.
It would be hard to do you need to know how to code.
OK no worries, Its a great mod anyway but it would have been nice to have the use of RSS.
Keep up the good work.
Best wishes - Glenn
I've just installed this mod and am having an issue when I click on the Tags tab. I get the message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5
File: /var/www/users/ltetr/Sources/Tags.php
Line: 104
The code in question is:
ORDER BY l.ID DESC LIMIT " . $modSettings['smftags_set_cloud_tags_to_show'], __FILE__, __LINE__);
Any help? I know nothing about .php.
Thanks!
ETA: I'm using MySQL 5.0.45
I have test this mod but now i've removed cause to more validation issue!
Can you test to fix?
Validation Output: 14 Errors
1. Error Line 1327, Column 6: end tag for "td" omitted, but OMITTAG NO was specified.
</form>
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
2. Info Line 1278, Column 3: start tag was here.
<td class="windowbg">
3. Error Line 1327, Column 6: end tag for "tr" omitted, but OMITTAG NO was specified.
</form>
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
4. Info Line 1277, Column 3: start tag was here.
<tr>
5. Error Line 1327, Column 6: end tag for "table" omitted, but OMITTAG NO was specified.
</form>
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
6. Info Line 1276, Column 23: start tag was here.
<a name="lastPost"></a><table width="100%" cellpadding="0" cellspacing="0" borde
7. Error Line 1327, Column 7: XML Parsing Error: Opening and ending tag mismatch: td line 1278 and form.
</form>
✉
8. Error Line 1735, Column 8: XML Parsing Error: Opening and ending tag mismatch: tr line 1277 and td.
</td>
✉
9. Error Line 1736, Column 7: XML Parsing Error: Opening and ending tag mismatch: table line 1276 and tr.
</tr>
✉
10. Error Line 1737, Column 9: XML Parsing Error: Opening and ending tag mismatch: form line 389 and table.
</table>
✉
11. Error Line 1739, Column 12: XML Parsing Error: Opening and ending tag mismatch: td line 342 and div.
</div>
✉
12. Error Line 1758, Column 9: XML Parsing Error: Opening and ending tag mismatch: tr line 198 and div.
</div>
✉
13. Error Line 1759, Column 7: XML Parsing Error: Opening and ending tag mismatch: table line 197 and body.
</body></html>
✉
14. Error Line 1759, Column 14: XML Parsing Error: Opening and ending tag mismatch: div line 196 and html.
</body></html>
✉
15. Error Line 1759, Column 14: XML Parsing Error: Premature end of data in tag div line 156.
</body></html>
✉
16. Error Line 1759, Column 14: XML Parsing Error: Premature end of data in tag body line 63.
</body></html>
✉
17. Error Line 1759, Column 14: XML Parsing Error: Premature end of data in tag html line 2.
</body></html>
Now (after uninstall) my forum is perfeclty w3c valid.
I had to change this: allowedTo('smftags_add')
to this: allowedTo('smftags_manage')
To have the permission in the Display.template.
Am I missing something regarding the permission? Is it used somewhere else?
I will also try to change the permissions so that topic owners by default are the only ones allowed to manage tags, and then using permission I would also allow other groups to (like moderators/administrators) to remove and add tags.
Does this make sense?
Without totally understanding the 'allowedTo'-thing in my last post, I did the following change:
// Tagging System
echo '<table class="tborder" width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'] , '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if($context['user']['started'] || allowedTo('smftags_manage'))
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if($context['user']['started'] || allowedTo('smftags_manage'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>';
echo '
</td>
</tr>
</table>';
//End Tagging System
Which allows the owner of the topic full control, and any specific group I decide to give the 'manage'-right to.
Comments are welcome.
When a thread is deleted and the tag is not removd, it causes problems on the forum because the tag still lingers on the DB. I need to know where the "cached tags" are stored so I can delete them from the DB. I hae checked both smf_tags and smf_tags_log and they are in neither which means it caches them in a different table.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi39.tinypic.com%2F14ieonl.png&hash=b8263900fe3c7c9e8bee8ece4f05721954c226ae)
When I tell SMF to "fix" the errors, its idea of fixing it is putting the entire thread back on the forum - which you would think would be ok because I could then just remove the tag and then delete the thread - only the tag is no longer on the thread when it gets put back on the site. When I run forum maintenance again, it says those same cached words are causing errors which means they are still on there somewhere.
I also need you to put version 1.0.5 back up on the mod page so I can run it through the parser. Once I get all these other problems cleared up with it, I want the entire mod removed and I cant do that without parsing the mod because I am getting some test faileds on some of the files so I need to know the exact codes to remove. (you really shouldnt remove older versions of mods because people still use them ;))
Thanks.
Help please, when I click '[Add Tag]' on topics, I get a blank screen. (SMF 2.0 RC1, default theme)
I see there has been some discussion about permissions, but I'm rather embarrassed to admit that I can't tell if any of the information above would help with my problem. Would someone please let me know how to fix what I'm dealing with or point me to where it's covered above?
What's happening for me is that only I, the admin, can see the 'Add Tag' text. I have two site mods who have been given permission, and they cannot see the 'Add Tag' text, nor can any of the regular members see the 'Add Tag' text on threads they created.
How do I fix this?
Many thanks!
~ NB
Permissions can be found inside SMF under Admin -> Permissions -> modify a group -> Tagging System
Thank you, vbgamer! That's the way I did the settings, and everyone I enabled access for can see and use the red 'X' to delete a tag, but nobody other than myself as admin can see, thus use the 'Add Tag' text.
Is the mod compatable with 2 rc1 ?
Quote from: glennk on February 22, 2009, 03:50:28 PM
Is the mod compatable with 2 rc1 ?
i have the same question!
Quote from: NightBird on February 22, 2009, 12:24:53 PM
Thank you, vbgamer! That's the way I did the settings, and everyone I enabled access for can see and use the red 'X' to delete a tag, but nobody other than myself as admin can see, thus use the 'Add Tag' text.
Anybody have any ideas how to fix this problem?
Permissions are set to allow most member groups to work with tags, but it's only the admin member group who can see the 'Add Tag' text.
What version of SMF?
Quote from: vbgamer45 on March 01, 2009, 05:15:34 PM
What version of SMF?
1.1.8 - with several mods installed. Let me know if you'd like a list of those, in case that would help.
Is this mod compatible with 2rc1 ?
Quote from: .:{EK}:. Squall on November 26, 2008, 07:48:32 PM
Is there a way to modify this mod so that the Tags only work in a certain board and not the whole forum?
Thanks,
Squall
Yes, you can do something like this. Open tags.xml file and search the following code:
<file name="$themedir/Display.template.php">
<operation>
<search position="before"><![CDATA[<a name="lastPost"></a>';]]></search>
<add><![CDATA[
// Tagging System
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
//End Tagging System
]]></add>
</operation>
</file>
Then add an if statement to the code to only allow the tags to show up in certain boards. There is not an easy to specify board setting in the admin interface. This is something that would have to be programmed and require many dozens of lines of code instead of just a quick change. Look for the added if statement in the below code.
<file name="$themedir/Display.template.php">
<operation>
<search position="before"><![CDATA[<a name="lastPost"></a>';]]></search>
<add><![CDATA[
// Tagging System
if ($context['current_board'] == board number goes here || $context['current_board'] == this is another board || and so on)
{
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
}
//End Tagging System
]]></add>
</operation>
</file>
Hi Vbgamer45, i have used 2.0.4 .
Now updated to 2.0 Rc1.
downloaded tagging system and while install , i got this error.
Table 'itacumen_smf20beta3.tags' doesn't exist
File: /home/sitename/public_html/forum/Packages/temp/tagsql.php
Line: 46
Is there a way to show related tags in the top of the related Boards.
I mean The Tags of Board 1 show at the top of Board 1 (only Board 1). or Can Popular Tags (Tags cloud) show at the Top of the Board.(Every Board)
Sorry for my English.
Quote from: heinandar on March 08, 2009, 07:23:54 AM
Is there a way to show related tags in the top of the related Boards.
I mean The Tags of Board 1 show at the top of Board 1 (only Board 1). or Can Popular Tags (Tags cloud) show at the Top of the Board.(Every Board)
Sorry for my English.
I have the same question. How can i do it? :)
On my SMF 2.0 RC1 I have this error:
QuoteFatal error: Call to undefined function create_control_autosuggest() in .../Sources/Post.php on line 2062
and this
QuoteFatal error: Call to undefined function create_control_autosuggest() in .../Sources/Tags.php on line 248
Can any one help me?
No one? :'( :'( :'(
Anyone? :'(
Help me out, its very urgent.
Hi Vbgamer45, i have used 2.0.4 .
Now updated to 2.0 Rc1.
downloaded tagging system and while install , i got this error.
Table 'itacumen_smf20beta3.tags' doesn't exist
File: /home/sitename/public_html/forum/Packages/temp/tagsql.php
Line: 46
Hi Vbgamer, i have added a new table called tags.
And installed all the files properly.
Now when i click on Add Tags button to new topic or existing topic. It shows,
Fatal error: Call to undefined function create_control_autosuggest() in /home/sitename/public_html/forum/Sources/Tags.php on line 248
Kindly help me out Vbgamer, its very urgent.
This mod looks great! A question:
Does this mod tag TOPICS or POSTS? Is it possible to tag posts individually? I have searched through this thread and haven't found the answer.
My aim is to tag posts as "news" and then use a custom ssi query to pull all posts (not topics) tagged as news onto a "news page"
Will this mod help me with this?
Thanks!
Quote from: A.SK on March 24, 2009, 09:44:42 AM
Hi Vbgamer, i have added a new table called tags.
And installed all the files properly.
Now when i click on Add Tags button to new topic or existing topic. It shows,
Fatal error: Call to undefined function create_control_autosuggest() in /home/sitename/public_html/forum/Sources/Tags.php on line 248
Kindly help me out Vbgamer, its very urgent.
i have a same problem.. :(
Quote from: 4kstore on April 06, 2009, 01:04:04 AM
Quote from: A.SK on March 24, 2009, 09:44:42 AM
Hi Vbgamer, i have added a new table called tags.
And installed all the files properly.
Now when i click on Add Tags button to new topic or existing topic. It shows,
Fatal error: Call to undefined function create_control_autosuggest() in /home/sitename/public_html/forum/Sources/Tags.php on line 248
Kindly help me out Vbgamer, its very urgent.
i have a same problem.. :(
Not sure why vbgamer is not responding for tagging system.
I got hit due to his mod. Now had several issues due to this mod being not installed.
I think he has a site of his own. You might get him on there. Failing that try th general suppoert area of this forum and see if anyone else could help you out.
Quote from: glennk on April 07, 2009, 03:45:06 AM
I think he has a site of his own. You might get him on there. Failing that try th general suppoert area of this forum and see if anyone else could help you out.
I did. Lets hope for the best.
apparently theres lots of problems with this mod and 1.1.8. I used this mod on 1.1.5 and it worked without flaw. I now have 1.1.8 and the permission that you give to staff so that they can add/remove tags on any thread does not work anymore unless they have admin status. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fpatriotgames2.info%2FSmileys%2Fclassic%2FGrrrrr.gif&hash=121da415ccb535bf66f960024992c6e68664efb4)
Seems I'm not the only one with the same issue:
Quote
nobody other than myself as admin can see, thus use the 'Add Tag' text.
QuotePermissions can be found inside SMF under Admin -> Permissions -> modify a group -> Tagging System
This is also not the correct path of the settings. There is no "Tagging System". There is only one setting and its "SMF Tags :Manage Tags"
Quote from: pbarney on April 04, 2009, 01:11:32 PM
This mod looks great! A question:
Does this mod tag TOPICS or POSTS? Is it possible to tag posts individually? I have searched through this thread and haven't found the answer.
My aim is to tag posts as "news" and then use a custom ssi query to pull all posts (not topics) tagged as news onto a "news page"
Will this mod help me with this?
Thanks!
Simple answer - Topics and No. More detailed answer: this was asked several pages back and answered. :)
that means we can not run tagsql.php :) i see only a white page, script can not create its own tables
Im getting this message and it fails to install.
Table 'glennk_forums.tags' doesn't exist
File: /home/glennk/public_html/forum/Packages/temp/tagsql.php
Line: 46
What smf version?
mine is Powered by SMF 2.0 RC1-1, i cant run install.php is it possible to get the sql codes to create the tables ?
Grab the SMF 2.0 version on this page
http://mods.simplemachines.org/index.php?mod=579
Quote from: vbgamer45 on May 29, 2009, 09:15:54 PM
Grab the SMF 2.0 version on this page
http://mods.simplemachines.org/index.php?mod=579
there isnt any database change between rc1 and rc1-1, and i can manually edit the files,and edited, if i ll be able to run the install, i ll have the mod :D
tagsql.php
This file should be able to execute standalone.
but i cant
edit: ok i ll try it again :)
Im on smf 2rc1-1. I have been running this mod on 2b4 so the tables and all data should be in place already
Thankyou for your time.
Quote from: glennk on May 29, 2009, 12:33:50 PM
Im getting this message and it fails to install.
Table 'glennk_forums.tags' doesn't exist
File: /home/glennk/public_html/forum/Packages/temp/tagsql.php
Line: 46
I got the EXACT same error ( just gstek instead glennk ) on
Sms 2.0 rc1 ,, The wrost thing about this mod id it gives error
after complete installation and make your forum unusable due to errors.
Nevertheless there is no uninstaller as it was not complete installed.
I wasted near about 30 minutes to manually remove it and
my forum went down for that 30 minutes....
The error is its not getting TABLE NAME AS USED MY THAT FORUM
TABLE on which its installing rather it guess possible table name.
Quote from: vbgamer45 on May 29, 2009, 09:15:54 PM
Grab the SMF 2.0 version on this page
http://mods.simplemachines.org/index.php?mod=579
Thank you for this excellent update.
I have installed. everything worked fine.
My old tags were still showing, when i click the tag. It takes me to post.
I have one issue.
When i was trying to add an tag to an existing post, it ends up with this error.
Fatal error: Call to undefined function create_control_autosuggest() in /home/site/public_html/discuss/Sources/Tags.php on line 248
My forum doesnt stop working or produce errors but the mod definately wont install even though it passes the test.
Quote from: A.SK on May 30, 2009, 07:06:14 PM
Thank you for this excellent update.
I have installed. everything worked fine.
My old tags were still showing, when i click the tag. It takes me to post.
I have one issue.
When i was trying to add an tag to an existing post, it ends up with this error.
Fatal error: Call to undefined function create_control_autosuggest() in /home/site/public_html/discuss/Sources/Tags.php on line 248
Any update. We could not do any post.
It ends up with error.
SMF version 2.0 RC1-1.
i'm getting the same error A.SK on line 46 :(
Will check it out this weekend.
Quote from: vbgamer45 on June 04, 2009, 01:28:43 PM
Will check it out this weekend.
Thank you and as you know. Tagging systems makes more easier to filter topics tag wise.
any idea when the issue with other groups (ie non post count groups) not being able to see /add tags will be fixed?
@vbgamer45, I'm seeing fatal error.
"Fatal error: Call to undefined function create_control_autosuggest() in /home/simplema/public_html/smf/Sources/Tags.php on line 248"
I'm on 1.1.9, default theme, eng. I installed TaggingSMF1.1Version1.1.1.zip for the first time. It appears to have installed ok, but there is no configuration link. Nothing in the error log either. No tagging options on the forum either.
Any ideas?
Quote from: glennk on May 30, 2009, 05:15:45 AM
Im on smf 2rc1-1. I have been running this mod on 2b4 so the tables and all data should be in place already
Thankyou for your time.
Any news on this one ?
(no offense to him) but I think he is just randomly picking and choosing who he helps ..lol. I would settle for an "I have no idea" on MY issue at this point. Atleast thats something :(
I don't think it works for SMF 2 RC1 yet don't think I updated in on the mod page.
ok so I was wrong. Maybe he doesnt want to give support for folks running 1.x anymore. ::)
Not that no time for free support at the moment
Latest Version:
2.1
Compatible With:
1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 2.0 Beta 3.1 Public, 2.0 Beta 4, 2.0 RC1-1
I lifted this from the mod page, it says compatible with 2 rc1-1. Is this a mis print ?
Thankyou for your assistance.
Yeah that is a misprint
what about 1.1.9? I cannot set it up as I posted a few days ago, above.
Quote from: vbgamer45 on June 11, 2009, 08:37:40 AM
Not that no time for free support at the moment
Ah, ok..... that speaks volumes. Had you said that a few months ago, we wouldnt have kept constantly posting asking for help and getting irritated when you dont answer at all. :) - I recommend updating the original post in this thread to reflect that.
=============================================
Quote from: ciuly on June 11, 2009, 06:22:55 PM
what about 1.1.9? I cannot set it up as I posted a few days ago, above.
ciuly, I will try and help you as best I can. :)
are you sayiing you dont have the "Tags Configuration" link in your admin CP over on the left (like this one)?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi41.tinypic.com%2F1rozlh.png&hash=ce40eeebfb913362513c945df3eda4c814c66c97)
thanks Kimmie
yes, you are correct. that link is not there.
I tried to uninstall it now in order to reinstall , but it says
"Uninstall Actions
Uninstall Actions "Tagging System":
Installing this package will perform the following actions: Type Action Description
1. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
2. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
3. Execute Modification ./index.php Test failed
4. Execute Modification ./Themes/default/index.template.php Test failed
5. Execute Modification ./Themes/default/Post.template.php Test failed
6. Execute Modification ./Sources/ManagePermissions.php Test failed
7. Execute Modification ./Sources/Subs.php Test failed
8. Execute Modification ./Sources/Post.php Test failed
9. Execute Modification ./Sources/Display.php Test failed
10. Execute Modification ./Themes/default/Display.template.php Test failed
11. Execute Modification ./Sources/RemoveTopic.php Test failed
"
what would be the right course of action here?
Quote from: vbgamer45 on June 11, 2009, 05:57:37 PM
Yeah that is a misprint
Ok thanks, that explains why it doesnt work :) ;). Is there anything in the pipe line for 2 rc1-1 ?
Quote from: ciuly on June 12, 2009, 04:21:20 AM
thanks Kimmie
yes, you are correct. that link is not there.
I tried to uninstall it now in order to reinstall , but it says
"Uninstall Actions
Uninstall Actions "Tagging System":
Installing this package will perform the following actions: Type Action Description
1. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
2. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
3. Execute Modification ./index.php Test failed
4. Execute Modification ./Themes/default/index.template.php Test failed
5. Execute Modification ./Themes/default/Post.template.php Test failed
6. Execute Modification ./Sources/ManagePermissions.php Test failed
7. Execute Modification ./Sources/Subs.php Test failed
8. Execute Modification ./Sources/Post.php Test failed
9. Execute Modification ./Sources/Display.php Test failed
10. Execute Modification ./Themes/default/Display.template.php Test failed
11. Execute Modification ./Sources/RemoveTopic.php Test failed
"
what would be the right course of action here?
did you have those same test faileds when you installed it? If so, did you make sure you went back and manually added the codes to those files? (you have to "manually" do it on those). Remember, if you got the test fails on install, and had to manually update those files, you will see those same test faileds on an uninstall, and you have to do the same thing (manually "remove" the codes).
If you didnt get those errors on the install, have you installed any other mods since that one? (that could also explain why you now have test faileds on those files - meaning that the mods you have since installed, also alter those same files). Its common. IN this case, you would have to manuall remove the codes from those files in order to get it fully uninstalled.
The first thing I would do (before trying to uninstall) is try and figure out why you dont have that link in your CP - the easiest way is to go to the mod page, parse the mod, and check every file it edits versus what your files have in them, to make sure "all" the code was added to those files. If it wasnt, add the codes as needed, and then check to see if your link is now there, and everything is now working.
thank you for your help and directions. it seems it was because of the manual edit I made to insert the google analytics code. once I removed that and the index.template.php file was back to it's original state, all the otehr modules, including tag installed successfully (I did however forced their uninstallation)
thank you again ;)
Page Layout problem with custom theme
I used the Enterprise theme
http://custom.simplemachines.org/themes/index.php?lemma=43
The problem is in the layout of the left bottom of the main thread.
Sample page is here:
http://ucdbbs.com/forum/index.php/topic,46.15.html
The normal "PRINT" button and the "previous | next" link should be in the right conner, as appears here:
http://www.tinyportal.net/demo/index.php?demo=enterprise
How to fix this? Which file need to be modified?
Thanks.
Hi all,
I've read EVERY post in this thread, and I've noticed that everytime that someone asks how to add a tag cloud to the index page or to create a block, it's been ignored. If anyone has any information on how to create a tag cloud (based on this great mod) for the index or even a block for Mkportal, I would appreciated it.
vbgamer, I see you've been supporting this as you can for the past few years, kudos to you for keeping it up. being successful can be a pain in the rump, I'm sure.
Thanks folks!
Scruff
Quote from: Patxi on January 22, 2007, 10:34:54 AM
one suggestion to think about:
does it make sense to enhance the "tags" table with a "parent"-tag. That means you could create tags in different levels => TAG-Tree
so if every new tag would be grouped to the right parent-tag than a "forum-table of content" could be generated automatically.
the best would be, if the order of this tree could be edited in the admin-panel.
what do you think? is it to complicated to program?
This is something I'd find incredibly useful!
Quote from: vbgamer45 on June 11, 2009, 05:57:37 PM
Yeah that is a misprint
How will I know that there is a version availabale for 2rc1-1 when it says there already is one although its a misprint ?
Quote from: Slack on January 09, 2007, 02:43:38 PM
Is there a way to get a listing of ALL tags? It seems of you just list "popular" tags -- it leaves things wide open for users to create duplicate tags. What would be nice: when a user clicks "add tag" a picklist of existing tags appears and they can either pick an existing tag or enter a new one.
This would be a great feature
Two suggestions:
1) Pre-defined tags to choose from. Dont want to have someone enter 'pics' another entier ' pics' (that has a space), 'Pics' and all kinds of combinations for the same meaning.
2) Search for multiple tags. Currently you can only search for 1 at a time and I dont see multiple tags showing up in the cloud for specific topics.
Thats the only 2 things currently making me not use this mod. For the custom modders, there is a prefix mod for 1.1 where you choose a pre-defined list of prefixes for a topic. If you can hack that in, that'd be awesome. Just be sure to share xD
Quote from: akbora on June 30, 2009, 08:33:12 PM
Also I see all the time similar error:
"Fatal error: Call to undefined function create_control_autosuggest() in /home/simplema/public_html/smf/Sources/Tags.php on line 248"
What about the obove serious error? Very good mod but doesn't run cause of this error.
i can not run tagsql.php
Fatal error: Function name must be a string in xxxxxxxx tagsql.php on line 46
What SMF Version. If you use 2.0 make sure you use 2.0 version.
My SMF version is RC1-1.
This is the best tagging mod in the world according to me but it has a important error.
I install without problems but when tap the ''add tag'' this error: 'Fatal error: Call to undefined function create_control_autosuggest() in /home/simplema/public_html/smf/Sources/Tags.php on line 248" appears on the screen.
Known issue in the process of udpating the mod
Thanks bro...
How long does it take approximately?
Quote from: vbgamer45 on July 07, 2009, 12:05:48 AM
What SMF Version. If you use 2.0 make sure you use 2.0 version.
Powered by SMF 2.0 RC1-1 | SMF © 2006–2009, Simple Machines LLC
Thanks a lot for this mod. It's working fine and it has a lot of potential.
I have a question, though. I know it might not be easy, but is it possible to include the following section in permissions? Like already happens with the tags management?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg31.imageshack.us%2Fimg31%2F2718%2Fsemttuloren.jpg&hash=0184df53aad6fb329b042d61286dbe477ee8af63)
I don't want everybody to be able to insert tags when they create new topics. That or limiting the insertion of tags to specific boards...
Thanks.
i tried to install this mod and got the following warning:
Table 'themagic_forum2.tags' doesn't exist
File: /home/themagic/public_html/forum/Packages/temp/tagsql.php
Line: 46
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0 RC1.2, while your database is at version 2.0 RC1. The above error might possibly go away if you execute the latest version of upgrade.php.
i am running 2.0 rc1.2, upgraded via package manager. please help!
Hitting the tag link results in the following:
Fatal error: Call to undefined function create_control_autosuggest() in /Sources/Tags.php on line 248
Please advise. Thx
RC 1.2
Hi There, Im getting this immediately after install on 2rc1-1
Database Error
Table 'glennk_forums.tags' doesn't exist
File: /home/glennk/public_html/forum/Packages/temp/tagsql.php
Line: 46
I was running fine on 2 beta 4 but havent been able to reinstall the mod since then
Quote from: timned88 on July 17, 2009, 06:40:00 AM
i tried to install this mod and got the following warning:
Table 'themagic_forum2.tags' doesn't exist
File: /home/themagic/public_html/forum/Packages/temp/tagsql.php
Line: 46
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0 RC1.2, while your database is at version 2.0 RC1. The above error might possibly go away if you execute the latest version of upgrade.php.
i am running 2.0 rc1.2, upgraded via package manager. please help!
same here >:(
Doesn't work for RC1 yet i don't belive.
Any idea when it will be ready for RC 1.2? I love to see this functional. Should I uninstall in the meantime?
Thx
Yes i would uninstall mostly when SMF reaches SMF 2.0 final
Its quite confusing as it always says on the mod page it is compatable upto 2rc1-2
still there are errors.... when tap the 'add tag'
Fatal error: Call to undefined function create_control_autosuggest() in /vhosts/a...............i.com/http/Sources/Tags.php on line 248
Will fix them once SMF 2.0 is released.
Sorry I don't understand now it isn't ready or ready for 2.0 rc 1-1/1-2 without errors above.
Note: This is a scrapped together change and currently only allows ONE tag to be chosen!
For those that want a predefined list of tags to choose from, I got that working. However, you need a second mod (I was to lazy to do it myself). This is also only tested on 1.1.9 but I see absolutely no reason why it shouldnt work on any 1.1.x board.
First, download this mod and install it: http://custom.simplemachines.org/mods/index.php?mod=372
(Thanks to NIBOGO and Boby_ for this part)
Open up post.template.php and find:
if (allowedTo('post_prefix'))
Replace that with:
if ((allowedTo('post_prefix')) && $context['is_first_post'] && $context['current_board'] == 8)
Be sure to edit the number 8 at the end of that! You need to change that to the board you wish to allow tags on. Any board that isnt defined there wont allow tags! To find the board number, go into a board you wish to allow and look at the URL. It should have something like 'board=1.00' The first number is what you need to enter. I havent tested with child forums, but it should be the same concept.
(My parts now)
In post.template.php find the following and remove it:
/ Now show the subject box for this post.
if ((allowedTo('post_prefix')) && $context['is_first_post'] && $context['current_board'] == 1)
{
echo '
<tr>
<td align="right" style="font-weight: bold;" id="post_prefix">
', $txt['post_prefix'], ':
</td>
<td>
<select name="post_prefix" id="post_prefix">
<option value="" />';
$post_prefix = explode(',', $modSettings['post_prefix']);
foreach ($post_prefix as $prefix)
echo '
<option value="', ltrim($prefix), '" >', ltrim($prefix), '</option>';
echo '
</select>
</td>
</tr>';
}
This will disable the prefixes on threads. We dont need those, we need tags!
Find the below code (should be right under the section we just changed)
//Tagging system Mod
if(!isset($context['num_replies']))
{
echo '
<tr>
<td align="right">
<b>', $txt['smftags_topic'], '</b></td>
<td>
<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
</td>
</tr>';
}
//End Tagging system mod
echo '
Replace that with:
//Tagging system Mod
if(!isset($context['num_replies']))
{
echo '
<tr>
<td align="right">
<b>', $txt['smftags_topic'], '</b></td>
<td>
<select name="tags" id="tags">
<option value="" />';
$post_prefix = explode(',', $modSettings['post_prefix']);
foreach ($post_prefix as $prefix)
echo '
<option value="', ltrim($prefix), '" >', ltrim($prefix), '</option>';
echo '
</select>
</td>
</tr>';
}
//End Tagging system mod
echo '
Great, now you have it all set up :)
Just go into your admin panel and setup the tags you want to use in 'Admin-> Posts and topics'. Look for 'List of prefix to show before a post.: ' and add them into the text box afterwards, of course seperating them with a comma (,).
Currently working on changing the tags from a drop-down to checkboxes and allowing for multiple tags to be searched at once.
Quote from: akbora on July 22, 2009, 09:30:15 PM
Sorry I don't understand now it isn't ready or ready for 2.0 rc 1-1/1-2 without errors above.
I think the answer is no. This version is not compatable with smf 2 at the moment, which is a great shame but something we will just have to live with and wait for the new version to come along which could be a considerable wait given that smf 2 is a long way off yet.
Quote from: FragaCampos on July 10, 2009, 12:20:54 PM
Thanks a lot for this mod. It's working fine and it has a lot of potential.
I have a question, though. I know it might not be easy, but is it possible to include the following section in permissions? Like already happens with the tags management?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg31.imageshack.us%2Fimg31%2F2718%2Fsemttuloren.jpg&hash=0184df53aad6fb329b042d61286dbe477ee8af63)
I don't want everybody to be able to insert tags when they create new topics. That or limiting the insertion of tags to specific boards...
Thanks.
I would like to bump this and make another suggestion:
Is it possible to put a new "Tagged by" column in the action,tags page?
I've seen this question before but so far have not seen an adequate answer for... I'm running a HEAVILY modified SMF 1.1.10, everything looks great and works as expected except that permissions seem to fail for post based membergroups, I'm the only one able to create new tags successfully as the admin user? Something is amiss somewhere, no errors in the SMF log, the user is presented with the dialogue to add the tag(s), but when the message is saved there is nothing and users do not see the "Add Tag" button either, have not tested with non-post based membergroups yet. Any suggestions welcome...
Also have a suggestion for new feature in future version of Tagging system, would be handy to have the option in forum maintenance to delete old posts based on whether or not there is a tag on it, just a thought
Does not support Post based groups at this time or additional groups.
i just tried this mod again and got the following error:
Table 'themagic_forum2.tags' doesn't exist
File: /home/themagic/public_html/forum/Packages/temp/tagsql.php
Line: 46
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0 RC1.2, while your database is at version 2.0 RC1. The above error might possibly go away if you execute the latest version of upgrade.php.
Does NOT support SMF 2 RC1
Quote from: vbgamer45 on August 05, 2009, 01:54:30 PM
Does NOT support SMF 2 RC1
No offense but you really need to change this:
1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10, 2.0 Beta 3.1 Public, 2.0 Beta 4, 2.0 RC1-1, 2.0 RC1.2
On the mod page it says 1 & 1.2. People install it only to find out it's not for thier version and end up wasting thier own and your time. I speak from personal experience.
Man, if you'd get the free version of this mod up to snuff, I'd seriously consider donating to your cause, it looks to me like you've spread yourself too thin timewise, great ideas for modules, but too many irons in the fire or not enough outside help to properly support them all in a timely fashion... being a programmer myself, I know what you're faced with if it's a one man show, I have several mods you've created installed and functioning, can't afford a lot, but you're about to get what I can afford at present if you'd work on THIS mod a bit...
Yeah that is part of the problem way too many mods free/paid and many sites too manage plus full time job equals little time.
Quote from: vbgamer45 on August 10, 2009, 07:46:19 PM
Yeah that is part of the problem way too many mods free/paid and many sites too manage plus full time job equals little time.
Yep, I feel ya man, you're a workaholic like me, although things are looking up with my homebased business ventures, I too must work offline at a full-time job for the time being... at my age the all-nite sessions are fewer, I have to be well rested to be of any good for anything,,,
Hi, I installed successfuly this Mod by failed to understand how to use the "suggest a tag" functionality. Thanks.
Suggest a tag is not built into this mod at this time.
Getting this error:
QuoteTable 'pal0905506370903.tags' doesn't exist
File: /home/content/p/a/l/palmbeachpreps/html/Packages/temp/tagsql.php
Line: 46
done...
Shouldn't you as author know if it's compatible with RC 1.2 or not?
It says it is in the mods page, perhaps you should remove that in the compatible section of the mod post.
Would stop others getting the error.
..including me but i uninstalled it.
I also searched for that function thats creating the error and its not even in the mod (unless its hidden elsewhere and i didnt see it).
just my 5 cents worth.
Hello, I am having an issue with this mod. When I try to create a post with any number of tags, my browser will throw a 500 error. This is very nondescript, so to start off I'd like to debug it. Does anyone know how I might go about doing this?
Error --> The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
My details:
Powered by SMF 1.1.10
TinyPortal v1.0 beta 4
Could you suggest a fix - or am I doing something wrong.
I find useful to add a Google search functionnality to my tags as shown here (http://www.exmateria.com/index.php?topic=1445.0). The purpose is to launch a Google search on all tags for a particular message with one clic.
It would be useful to be able to add severals tags and not only one by one when adding tags.
New release!
Adds support for SMF 2.0 RC1
Improves the tag cloud as well Thanks to stefann
RC1.2 also?
Thx
Yes
Excellent news. Installing right now.
superb mod big brother :)
Hi, how do we install the new version, do we need to remove the previous one?
Just uninstall and install the new version.
Are you going to improve this mod by addind random tagging topics ?
Probably not.
Random tagging is a big advantage of vb. Why not implement it in SMF ? :-)
No time really
Quote from: vbgamer45 on August 22, 2009, 05:10:26 PM
No time really
bro please don't mind bt if ur releasing something which is going to use by thousands and lakhs of ppl then u should release a proper better stable version or u should nt waste ur tym on making the mod :)
-meko
When making a new post and entering a tag or two it doesn't show up in the post. Tags can be added after the post is made no problem.
Also, where and when is the tag cloud supposed to show up?
Thx
Tag cloud shows up under http://www.yourforum.com/index.php?action=tags
I see it. Is there any way to get the cloud in a block (ie. simple portal)?
Anything about the tags not showing up during new posts?
Thx
Thankyou I have been waiting patiently for your upgrade. This is a great mod and I really appreciate you updating it.
Thanks for the update, vbgamer45.
What does "Improves the tag cloud"?
And if i uninstal the mod to update it, the tags are keeped, right?
Just a little improved of the most popular tags being displayed in the cloud
I've got strange problem. When i tag post on start tags aren't in /?action=tags , but if i tag them by "Add tag" everything is fine ;X.
Help me please,
haerde
PS. Link to my forum - www.cs-grajkownia.pl
Quote from: haerde on August 24, 2009, 04:01:27 AM
I've got strange problem. When i tag post on start tags aren't in /?action=tags , but if i tag them by "Add tag" everything is fine ;X.
Help me please,
haerde
PS. Link to my forum - www.cs-grajkownia.pl
Same issue I have.
Quote from: plusev on August 24, 2009, 04:08:41 AM
Quote from: haerde on August 24, 2009, 04:01:27 AM
I've got strange problem. When i tag post on start tags aren't in /?action=tags , but if i tag them by "Add tag" everything is fine ;X.
Help me please,
haerde
PS. Link to my forum - www.cs-grajkownia.pl
Same issue I have.
Ditto. The tags wont add when making a new thread and using the add tag box, you have to make the thread first then add the tags :(
I have installed it.
Thanks Vbgamer for spending your time for this update.
I have used it on my old version. After a long time iam installing it on my upgrade 2.0 forum.
Now old tags were showed perfectly including tag cloud.
But when i create a new topic, the tags were not get stored will submitting the post.
And it works when we click on Add Tags and Add each tag manually.
Another suggestion:
When someone clicks on a word of the tag cloud, he/she gets a table with all the topics tagged with that word, but it's ordered from the oldest (top) to the newest (bottom). Is there anyway of inverting this?
Thanks in advance.
Quote from: Kimmie on August 24, 2009, 01:32:06 PM
Quote from: plusev on August 24, 2009, 04:08:41 AM
Quote from: haerde on August 24, 2009, 04:01:27 AM
I've got strange problem. When i tag post on start tags aren't in /?action=tags , but if i tag them by "Add tag" everything is fine ;X.
Help me please,
haerde
PS. Link to my forum - www.cs-grajkownia.pl
Same issue I have.
Ditto. The tags wont add when making a new thread and using the add tag box, you have to make the thread first then add the tags :(
Any idea when this will be fixed?
Maybe sometime next week
Any news on this yet? Thanks
Excellent modification, thanks.
Is it possible to make functions so that users can add tags, but not delete. And so when you type a tag that already exist in the database proposed for commissioning that there are no duplicates in various written and eliminate errors in spelling.
I have added permissions for moderators to manage tags, but they only can delete them and can't add. So I can't solve problem by my self, in table permissions:
ID_GROUP permission addDeny
2 smftags_manage 1
File Modifications.english.php contains variables: $txt['permissionname_smftags_suggest'], $txt['permissionhelp_smftags_suggest'], but as I understand they are not used in the code.
Fixed problem by myself but don't know is it correct or not. Now moderators can add tag (Previously, they had not seen such a button, although if you click on the direct link http://.../forum/index.php?action=tags;sa=addtag;topic=... they can add)
in Display.template.php
find
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
replace
global $topic;
if(!$context['user']['is_guest'])
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
regular users also see delete and add buttons but have no permissions to do.
vbgammer ? :<
I noticed that if 2 or more tags are entered seperated by a comma it ends up as 1 tag with a comma instead of 2 seperate tags.
Great mod! After some quick tests I immediately installed it on my own forum (http://www.jmonkeyengine.com/forum/). We have yet to integrate the 'tag' button in our theme though.
Some feature suggestions:
- The "Add tag" process at the bottom of every thread could could be a lot smoother if replaced by AJAX, e.g. turning the existing tags into one big editable comment box (like when you double click thread titles as admin) or popping up a smaller input box.
- Additionally (and possibly alternatively) it would be nice if you could add several tags by putting commas in between, like suggested above and elsewhere I am sure. It's an accepted and expected norm.
- I would love it if this mod provided me with a few more permissions. Right now I can allow/disallow people to moderate the tags. How about being able to restrict certain usergroups from adding tags all together?
The last one is definitely the biggest priority for me. Will definitely send $10 your way if you could at least address my last request and keep this mod updated :)
Quote from: erlend_sh on September 16, 2009, 11:43:01 PM
- I would love it if this mod provided me with a few more permissions. Right now I can allow/disallow people to moderate the tags. How about being able to restrict certain usergroups from adding tags all together?
I'd like to see this as well - I really don't want every tom, dick and harry adding tags.
Thx
This mod is dead ...
Quote from: haerde on September 17, 2009, 04:58:12 PM
This mod is dead ...
I'm working with vbgamer to make some considerable improvements to this mod, a lot of which have been suggested here. I may post some screenshots later for comments before it's released as there are some fairly major new features, while of course maintaining backwards compatibility.
Please code random tag cloud like in vbseo.
It would be great to be able to display a cloud on any page not just on the Tags page. Even better to be able to put a cloud in a portal block. Thx.
I have a clouds block I believe in ezportal
Simple Portal currently doesn't but can support any php code.
lets talk about portals later. Vbgamer, are u available to make random tagged cloud ?
EDIT: // And please look at this topic: http://www.simplemachines.org/community/index.php?topic=337577.0
Quote from: stefann on September 19, 2009, 09:49:06 PM
Quote from: haerde on September 17, 2009, 04:58:12 PM
This mod is dead ...
I'm working with vbgamer to make some considerable improvements to this mod, a lot of which have been suggested here. I may post some screenshots later for comments before it's released as there are some fairly major new features, while of course maintaining backwards compatibility.
I assume this means you all are working to fix all the bugs first right? (such as the one several of us posted a month ago) :)
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in Display.template.php on line 1093
I'm getting this error when I try to manually install this to a different skin. Can I get some help with this, thanks.
Attach that themes display.template.php to your next post
Quote from: Sabre™ on September 29, 2009, 11:50:26 PM
Attach that themes display.template.php to your next post
I actually figured out what the issue was with that. Fixed it, but the tags still don't show up on the theme. I'll have to take another look at it tomorrow. Nearly 2am now here and I've been looking at codes all afternoon. Perhaps a good nights rest will make things better in the morning XD
It sure will.
Rest well :)
Okay I figured out what I have to do here, but in editing the code for the theme I wish to add the tab to, I got an error on this line of code
echo ($current_action == 'tags' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
It's from this section:
// the [tags] button
echo ($current_action == 'tags' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'tags' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tags">' , $txt['smftags_menu'] , '</a>
</td>' , $current_action == 'tags' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv461%2FJirachiMelee%2FForum%2520Images%2Fth_ScreenTab.jpg&hash=9e4200fb5c65ac145900f3ce84328910e1e6e953) (http://img.photobucket.com/albums/v461/JirachiMelee/Forum%20Images/ScreenTab.jpg)
This is the skin I'm working on, and as you can see at the very top I don't have the tab for the tags. I have the tagging system itself now working on the skin, but no way of looking at what tags are in place without the tab. I already added in the 'tag' part to this:
$current_action = 'admin';
if (in_array($context['current_action'], array(
Besides the line of code that isn't working, what other files would I have to edit on a particular skin to get this mod to work?
Okay, I have everything now in place, I can even see the tab now on my new skin. However, when I click the tab I'm redirected to the index.
So I still kind of need a little help please.
I just noticed that in the tag cloud it show the user's name rather than the display name. Could that be changed in the next update? Thx
Just wanted to say after my own tweaking I finally got it to work. I don't even know how I fixed the problem. My only problem now is cosmetic. I have one tag properly in place that looks fine next to my home button. Doesn't work LOL. Then next to my logout button, if you squint your eyes really hard you can just make up the text "Tags" in dark gray. Hardly viewable on my forums skin. But "hey" at least it works, lol.
If someone would care to take a look at what I mean:
www.vortexshadow.com
I would like to know how to fix this LOL
If your user doesn't set tags then you should use this code for tag creation from subject:
// if no tags
if($_REQUEST['tags']=='' && !isset($_REQUEST['num_replies']) && isset($_POST['subject']))
{
$tags = explode(' ',htmlspecialchars($_POST['subject'],ENT_QUOTES));
$tagcount = 0;
$new_tags = array();
foreach($tags as $tag)
{
if($tagcount <= $modSettings['smftags_set_maxtags'] && !empty($tag) && strlen($tag) >= $modSettings['smftags_set_mintaglength'] && strlen($tag) <= $modSettings['smftags_set_maxtaglength'])
{$new_tags[] = $tag;
$tagcount= $tagcount +1;
}
}
if ($tagcount>0)
{
$_REQUEST['tags'] = implode (',', $new_tags);
}
}
You can insert into source/post.php before:
// Tagging System
if(isset($_REQUEST['tags']) && !isset($_REQUEST['num_replies']))
{
Quote from: tarat on October 04, 2009, 03:43:50 PM
If your user doesn't set tags then you should use this code for tag creation from subject:
That's a nifty snippet! Thanks! 8)
I was getting an error with the above snippet - I believe it SHOULD be....
$tags = explode(' ',htmlspecialchars($_POST['subject'],ENT_QUOTES));
$tagcount = 0;
$new_tags = array();
if($_REQUEST['tags']=='' && !isset($_REQUEST['num_replies']) && isset($_POST['subject']))
{
foreach($tags as $tag)
{
if($tagcount <= $modSettings['smftags_set_maxtags'] && !empty($tag) && strlen($tag) >= $modSettings['smftags_set_mintaglength'] && strlen($tag) <= $modSettings['smftags_set_maxtaglength'])
{$new_tags[] = $tag;
$tagcount= $tagcount +1;
}
}
if ($tagcount>0)
{
$_REQUEST['tags'] = implode (',', $new_tags);
}
}
Why do you put tags, tagcount and new_tags before if?
You will create this 3 variable always.
This line
if($_REQUEST['tags']=='' && !isset($_REQUEST['num_replies']) && isset($_POST['subject']))
checks the relevance: New topic without tags. So it should be the first otherwaise you will create 3 unnecessary variables.
You are right... and I am still getting the error...
8: Undefined index: tags
File: /users/Sources/Post.php
Line: 1670
This is what I have online 1670.....
if($_REQUEST['tags']=='' && !isset($_REQUEST['num_replies']) &&
Any idea how I can fix that?
TAGS button with problem.
bump....
I sure would like my error log to stop filling up! Can someone please help me figure out why I am getting the error mentioned above?
Thanks in advance.
Quote from: Rhyme on September 30, 2009, 09:24:00 PM
Just wanted to say after my own tweaking I finally got it to work. I don't even know how I fixed the problem. My only problem now is cosmetic. I have one tag properly in place that looks fine next to my home button. Doesn't work LOL. Then next to my logout button, if you squint your eyes really hard you can just make up the text "Tags" in dark gray. Hardly viewable on my forums skin. But "hey" at least it works, lol.
If someone would care to take a look at what I mean:
www.vortexshadow.com
I would like to know how to fix this LOL
still looking to fix this problem.
Rhyme your problem is not in mod but in manual instalation with custom theme, so you are in wrong topic.
Can you send me index.template.php in PM I will try to help.
Find
if($_REQUEST['tags']=='' && !isset($_REQUEST['num_replies'])
Change to
if(@$_REQUEST['tags']=='' && !isset($_REQUEST['num_replies'])
Which file in it?
Quote from: vbgamer45 on October 12, 2009, 10:44:28 PM
Find
if($_REQUEST['tags']=='' && !isset($_REQUEST['num_replies'])
Change to
if(@$_REQUEST['tags']=='' && !isset($_REQUEST['num_replies'])
Awesome - THANKS!
I cannot seem to find this edit when doing this manually
FIND in display.template
echo '
</div>
</div>
</div>';
I cannot seem to find that edit?, If somone can take a look at my display.template.php and maybe add this bit where needed that would be great, has everythings working but cannot find this edit?
Display.template attachted to message below, thanks
Paul
8)
I tried to add this and i think i added in wrong place, and always got errors and couldnt access tagging in admin, but then when i take the edits off i works but doesnt show the add tag part?
I hope you can edit my display.template.php to get this working, thanks
Paul
Also when i try to post a post iam also getting this error!
Fatal error: Call to undefined function create_control_autosuggest() in /home/reptiles/public_html/Sources/Post.php on line 1811
Ive double cheaked all edits and everything seems fine, i hope your able to help me, thanks paul
Make sure you grab the latest version
Also what version of SMF are you using ?
Iam manually installing the latest version from smf hacks.
Because its not letting me prase the ones from here, iam also using smf 2 rc 1-1?
I managed to get this code added to show the ADD TAG, But when this is clicked to add a tag i get this error!
Fatal error: Call to undefined function create_control_autosuggest() in /home/reptiles/public_html/Sources/Tags.php on line 248
When posting a post now it now works, but this error is shown when trying to add tags!, Hope you can fix this.
Could you take a look at this and fix the display.template.php so the mod will operate properly?
regards,
Paul
Update !!
I got this working, What i had to do is rename tags2.php to tags.php and same with the template file.
And all seems to be working fine now 8)
Thanks for the help anyways :)
Glad you got it working
A little question.....
how can i make the tags box accept more text.
when i try to add thease to a tag by clicking ADD TAG in post its not allowing me.
Reptile Forum, Snake Forum, Lizard Forum, Amphibian Forum, Turtles & Tortoise Forum, Spiders and Invert Forum, DWA Species, Reptile Genetics Forum, Reptile Morph Forum, Reptile Breeding Forum, Reptile Classifieds Forum, Reptiles for Sale, Reptile & Herp Chat, Reptile Caresheets, Reptile Shows, Reptile Breeder Meetings, Reptile Competitions, Reptile Courier Service, Reptile Shops Forum, Reptile Photography, Reptile Videos, Reptile Books Forum, Reptile Breeders, Reptile Classifieds, Reptile Community, Reptile Caresheets
Its not letting me has the box isnt big enough for the text to be pasted in. Can this be changed has i would liked all my tags to be that above!
Ive managed to change when creating a new post but not when clicking Add tag in a post witch has already been posted!
Hope somone can help, thanks
Paul
Quote from: meehan09 on October 15, 2009, 07:31:26 AM
A little question.....
how can i make the tags box accept more text.
when i try to add thease to a tag by clicking ADD TAG in post its not allowing me.
Reptile Forum, Snake Forum, Lizard Forum, Amphibian Forum, Turtles & Tortoise Forum, Spiders and Invert Forum, DWA Species, Reptile Genetics Forum, Reptile Morph Forum, Reptile Breeding Forum, Reptile Classifieds Forum, Reptiles for Sale, Reptile & Herp Chat, Reptile Caresheets, Reptile Shows, Reptile Breeder Meetings, Reptile Competitions, Reptile Courier Service, Reptile Shops Forum, Reptile Photography, Reptile Videos, Reptile Books Forum, Reptile Breeders, Reptile Classifieds, Reptile Community, Reptile Caresheets
Its not letting me has the box isnt big enough for the text to be pasted in. Can this be changed has i would liked all my tags to be that above!
Ive managed to change when creating a new post but not when clicking Add tag in a post witch has already been posted!
Hope somone can help, thanks
Paul
You can do that by going to your Tags Settings page (Configuration > Tag Configuration) and adjusting the entries for "Maximum Tag Length", and "Max number of tags per topic"
Also, dont forget that when you add tags to a thread by clicking on the "Add Tag" link, you have to add them
one at a time, you cannot add multiple tags (copy and paste all of that in one box). As soon as vbgamer45 gets all the bugs worked out of the mod, you will be able to go back to adding multiple tags when a thread is initially created. (thats one of the problems with the mod, that feature does not work).
Oh i see, its allowing me to add 5 or 6 at a time, but then after that have to add 6 more :(
Ive already gone into settings and adjusted this so i can add more, but iam not able to copy and paste all into one like you have said!, But yes if adding say 6 at time it works fine i beleave!
Will it be possible or is there a edit i can do to change this and have it so i can copy and paste them tags i shown above into each post when clicking add tag? Has it lets me copy and paste into a topic i create ?
Thanks and Regards,
Paul
Quote from: meehan09 on October 15, 2009, 01:45:44 PM
Oh i see, its allowing me to add 5 or 6 at a time, but then after that have to add 6 more :(
Ive already gone into settings and adjusted this so i can add more, but iam not able to copy and paste all into one like you have said!, But yes if adding say 6 at time it works fine i beleave!
Will it be possible or is there a edit i can do to change this and have it so i can copy and paste them tags i shown above into each post when clicking add tag? Has it lets me copy and paste into a topic i create ?
Thanks and Regards,
Paul
When you are adding them via the Add Tag link at the bottom of the thread, you dont want to copy and paste them all in at once. If you do that, it will add them as all ONE tag, not seperate tags. It only posts them as individual tags when you add them when you are first creating the thread - and unfortunately that cannot be done right now because there is a problem with that part of the mod - your only option at this point is to add them one at a time on that page until they fix it.
Ok understood, Hopfully this will be able to be done in a later version off mod.
Thanks,
Paul
no problem :)
That has been an issue for a while now (2 months for me), but I think someone is helping him work on the mod now, so hopefully there will be a fixed version soon.
Mod installed with no error on the star wars theme on 2.0 rc1-2
Is there a way of adding older topics onto the tag bar?
NOTE: The parse button does not work for this mod.
There is not auto tagging system to go back retag topics that would be hard to make.
I added some tags to the tag bar before finalising my post.
Went to look at the Tag tab in the menu and nothing shows.
Check your tag settings to see how they are set.
Minimum Tag Length 10
Maximum Tag Length 30
Max number of tags per topic 20
Tag Cloud Settings
Number of tags to show in tag cloud 100
Number of tags to show per row 5
Max tag cloud font size in percent 250
Min tag cloud font size in percent 100
Tagging System For Topics smf2.0.RC1-2 problem
August
English = when added new subjet with tagging, it can't be add.
Turkish = Yeni konu ile birlikte eklediğimiz etiketleri konu açıldığında eklememektedir.
http://custom.simplemachines.org/mods/index.php?mod=579
Do you get an error?
Have managed to get the mod working.
Is there a way of just showing the tags and NOT the topics?
Will not install on 2.0 Beta 3.1 Public :( very sad, it could have saved me a lot of time and energy.
Quote from: zushiba on November 05, 2009, 06:47:47 PM
Will not install on 2.0 Beta 3.1 Public :( very sad, it could have saved me a lot of time and energy.
The best thing you can do is an upgrade to the most recent version.
And I would if it were possible but the main function of the RP Board I'm operating for my girlfriend is the aliases mod that is only designed for 2.0 Beta 3.1 Public. I'm stuck with this version unfortunately.
I've also spent the last 2 weeks working out the bugs and kinks in this version to work with the custom form mod and the custom action mod. No going back now. (or forward as the case may be)
Have you tried the parser?
A manual edit may be the only step.
The aliases mod is just so massive I don't think I could handle it. I could probably do the Tag mod as well but reading this thread so far I've seen 1 person who's had a real tough time doing so and since the board is active I can't risk pulling it down for editing.
I'll clone the board and have a go at modding the tagging system myself. Hopefully I can get it to work without too much fuss. I did take a cursory glance at the differences between the Display.template.php for 2.0 Beta 3.1 Public vs the latest RC but the change isn't very clear so it's hard to tell exactly what needs to be edited.
The part that's failing is in Display.template.php
Find
echo '
</div>
</div>
</div>';
replace with
echo '
</div>
</div>
';
// Tagging System
if ($message['id'] == $context['first_message'])
{
echo '
<div class="clearfix ', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', ' largepadding">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'] && allowedTo('smftags_del'))
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>';
echo '
</div>';
}
// End Tagging System
echo '</div>';
meehan09 said he had the same problem (http://www.simplemachines.org/community/index.php?topic=135761.msg2306827#msg2306827)as well back 1 page and then had some sort of issue with a tag file of some sort but didn't go into enough detail on how he managed to fix the problem (http://www.simplemachines.org/community/index.php?topic=135761.msg2308222#msg2308222)
I wonder just how much the forum would protest if I replaced Display.template.php with the latest version all together Hmmmm...
Hows it looking for a fix on the issue where you cannot add tags when creating a new thread? Its been a couple of months now, and I just wanted to get an update (for myself as well as everyone else) on when the fix will be released?
thanks
Do you have an upgrade to 2.0 RC2 in progress?
Not yet
Is it possible to tag posts that were posted before installing this addon ? If it is possible, how ?
What would really be neat is for a fancy shmansy 3D twirling tag cloud when you get to working on SMF 2.0 RC2 update...
Quote from: bperry921 on November 23, 2009, 05:41:54 PM
What would really be neat is for a fancy shmansy 3D twirling tag cloud when you get to working on SMF 2.0 RC2 update...
Also been meaning to say something else which I believe I suggested for this mod quite some time back... it would be a big help for a large system if there was an option in the admin maintenance section to be able to delete old posts based on whether it is tagged or not in addition to whether is stickied or not, follow me?
I might get to upgrading this mod for RC2 sometime this week hopefully
Quote from: vbgamer45 on November 23, 2009, 08:20:03 PM
I might get to upgrading this mod for RC2 sometime this week hopefully
I really hate to keep harping on this but is there any way you can fix the issues with the current version first so that we can start adding tags when a new thread is made - like the mod is supposed to do?
thanks
Will check it out when I do the upgrade.
Released 2.2.1 of the tagging system for SMF 2.0 RC2
Fixed a bug with the SMF 2.0 version that did not allow adding tags on new topic
Thanks for the RC2 update!
wont allow edit of tags.
You can't edit tags. You can only add and remove.
Quote from: vbgamer45 on November 26, 2009, 12:16:36 PM
Released 2.2.1 of the tagging system for SMF 2.0 RC2
Fixed a bug with the SMF 2.0 version that did not allow adding tags on new topic
What about for those of us who are running SMF 2.0 RC1.2?
I have an error message when I click on the tag in the top menu
QuoteUtilisation invalide de la clause GROUP
Fichier: /home/www/sospc/www/smf/Sources/Tags2.php
Ligne: 101
Quote from: Kimmie on November 27, 2009, 01:27:19 AM
Quote from: vbgamer45 on November 26, 2009, 12:16:36 PM
Released 2.2.1 of the tagging system for SMF 2.0 RC2
Fixed a bug with the SMF 2.0 version that did not allow adding tags on new topic
What about for those of us who are running SMF 2.0 RC1.2?
Should be fixed for that too
Do I have to make a Manual Install for a custom template in RC1 ?
Yes if the template has a custom Display.template.php file
great mod ! I Love it.
I'm using Portamx and want to add Popular Tags in a Portamx block so Popular Tags seen in every pages
how is the code to do that ?
thx
No prebuilt standalone tag cloud codes I do have a block built into ezportal you might be able to grab that code and place it in another portal
Quote from: vbgamer45 on November 27, 2009, 10:36:30 AM
Quote from: Kimmie on November 27, 2009, 01:27:19 AM
Quote from: vbgamer45 on November 26, 2009, 12:16:36 PM
Released 2.2.1 of the tagging system for SMF 2.0 RC2
Fixed a bug with the SMF 2.0 version that did not allow adding tags on new topic
What about for those of us who are running SMF 2.0 RC1.2?
Should be fixed for that too
ok sooooo.. is this an "upgrade"? Do we need to uninstall our current version and then install the new version? If we do have to uninstall, will the DB retain all the information so we do not lose the current tags when we install the new version?
Yes uninstall then install the latest version. Uninstall does not remove the data or tags
Quote from: vbgamer45 on November 27, 2009, 03:52:15 PM
No prebuilt standalone tag cloud codes I do have a block built into ezportal you might be able to grab that code and place it in another portal
I cannot find your block code for ezportal.
btw, I make this code and try it. it's work
global $sourcedir, $txt, $context, $scripturl;
require_once($sourcedir . '/Tags2.php');
ViewTags();
if (isset($context['poptags']))
echo $context['poptags'];
is that code correct or not ?
how to make it center align ?
I really hate to keep bugging you because I have bugged you on this for 3 months now..lol
Unfortunately, there is no place to parse the old tag mod so I cannot get the codes for that mod removed from my custom themes. Is there anyway you can simply post the changes here that you made regarding the issue of tags not being able to be added when a new thread is created so that I can go in and make them manually to all my themes?
Since I will not be able to get the codes removed properly, I know of no other solution and I didnt want to run the risk of the old code causing problems.
Thanks
Just parse the new version and replace the code with the updated code.
Quote from: vbgamer45 on November 26, 2009, 12:16:36 PM
Released 2.2.1 of the tagging system for SMF 2.0 RC2
Fixed a bug with the SMF 2.0 version that did not allow adding tags on new topic
Appreciate your dedication towards the update.
Good Work
http://forum.com/index.php?topic=35631.0
Apply Filter: Only show the errors with the same message
8: Undefined index: can_approve_posts
Apply Filter: Only show the errors from this file
File: /home/forum/Themes/default/GenericControls.template.php (main sub template - eval?)
Line: 826
That does not look like part of the Tagging System
Thanks for this Mod.
After installation i have this error if i open one topic:
Unknown column 't.tag' in 'field list'
File: /home/macrofor/public_html/Sources/Display.php
Riga: 205
The line 205 is: t.id_member_started, t.id_first_msg, t.id_last_msg, t.approved, t.unapproved_posts,
// Get all the important topic info.
$request = $smcFunc['db_query']('', '
SELECT
t.num_replies, t.num_views, t.locked, ms.subject, t.is_sticky, t.id_poll,
t.id_member_started, t.id_first_msg, t.id_last_msg, t.approved, t.unapproved_posts,
' . ($user_info['is_guest'] ? 't.id_last_msg + 1' : 'IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1') . ' AS new_from
' . (!empty($modSettings['recycle_board']) && $modSettings['recycle_board'] == $board ? ', id_previous_board, id_previous_topic' : '') . '
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)' . ($user_info['is_guest'] ? '' : '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = {int:current_topic} AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = {int:current_board} AND lmr.id_member = {int:current_member})') . '
WHERE t.id_topic = {int:current_topic}
LIMIT 1',
array(
'current_member' => $user_info['id'],
'current_topic' => $topic,
'current_board' => $board,
)
);
Thanks
Antonio
Quote from: Bruno36 on November 27, 2009, 03:09:09 AM
I have an error message when I click on the tag in the top menu
QuoteUtilisation invalide de la clause GROUP
Fichier: /home/www/sospc/www/smf/Sources/Tags2.php
Ligne: 101
http://www.scooter-chinois-4t.com/index.php?action=tags
Quote from: A.SK on November 28, 2009, 11:57:24 PM
http://forum.com/index.php?topic=35631.0
Apply Filter: Only show the errors with the same message
8: Undefined index: can_approve_posts
Apply Filter: Only show the errors from this file
File: /home/forum/Themes/default/GenericControls.template.php (main sub template - eval?)
Line: 826
Quote from: vbgamer45 on November 28, 2009, 11:58:56 PM
That does not look like part of the Tagging System
You are right vbgamer45.
Solved here http://www.simplemachines.org/community/index.php?topic=49410.msg2391302#msg2391302
Quote from: vbgamer45 on November 26, 2009, 05:22:51 PM
You can't edit tags. You can only add and remove.
Can I edit tags directly in the smf_tags table? (will it cause any issues in the frontend?)
I think that would be fine.
Quote from: stefann on September 19, 2009, 09:49:06 PM
Quote from: haerde on September 17, 2009, 04:58:12 PM
This mod is dead ...
I'm working with vbgamer to make some considerable improvements to this mod, a lot of which have been suggested here. I may post some screenshots later for comments before it's released as there are some fairly major new features, while of course maintaining backwards compatibility.
stefann, were you able to make any improvements to this mod?
Quote from: erlend_sh on September 16, 2009, 11:43:01 PM
Great mod! After some quick tests I immediately installed it on my own forum (http://www.jmonkeyengine.com/forum/). We have yet to integrate the 'tag' button in our theme though.
Some feature suggestions:
- The "Add tag" process at the bottom of every thread could could be a lot smoother if replaced by AJAX, e.g. turning the existing tags into one big editable comment box (like when you double click thread titles as admin) or popping up a smaller input box.
- Additionally (and possibly alternatively) it would be nice if you could add several tags by putting commas in between, like suggested above and elsewhere I am sure. It's an accepted and expected norm.
- I would love it if this mod provided me with a few more permissions. Right now I can allow/disallow people to moderate the tags. How about being able to restrict certain usergroups from adding tags all together?
?
These 3 are very good suggestions also.
vbgamer, are you adding any new features? are you looking for any development help?
Here's a dumb question... when doing the db insert, could you use a TRIM command to take out the leading and trailing spaces? Would this not take care of the scenario when users enter tags with unwanted spaces, such as
google, gmail , google phone , etc
// Insert into Tags table
$smcFunc['db_query']('', "INSERT INTO {db_prefix}tags
(tag, approved)
VALUES (TRIM('$tag'),1)");
No scenarios immediately come to mind of a tag that must have leading and trailing space(s).
Trimming would be good if it not done already.
kai920 don't have time at the moment to add features
Unfortunately this is not working for my SMF version 1.1.11 .
It is failing at excution:
8. Execute Modification ./Sources/Post.php Test failed
any help is appreciated
Quote from: vbgamer45 on December 16, 2009, 12:02:09 PM
Trimming would be good if it not done already.
ok, i think i got that fixed. no more spaces before and after tags :)
next up i'm gonna try getting the addtag subaction to take multiple tagS, separated by comma, instead of just one tag.
Anyway to get the tag cloud to display on index page in SMF 2 RC2 ?
Not yet but would be a good feature request
Consider it requested then.
Only problem with tag clouds is having to trust users to spell the tags right. Have been discussing exactly this with the makers of a new forum script over at http://forum.esotalk.com/49/tag-cloud/
As I say there the only solution to that would be a 'show popular tags' option like in WordPress or auto complete using Ajax like when putting in recipients name in a PM on SMF.
Quote from: carbonize on December 24, 2009, 02:02:00 PM
Consider it requested then.
Only problem with tag clouds is having to trust users to spell the tags right. Have been discussing exactly this with the makers of a new forum script over at http://forum.esotalk.com/49/tag-cloud/
As I say there the only solution to that would be a 'show popular tags' option like in WordPress or auto complete using Ajax like when putting in recipients name in a PM on SMF.
Interesting, if you decide to implement his suggestion vbgamer, don't forget about when the user chooses to "Add" a tag, you could restrict the user with a drop down box of the "available" tags (possibly even an option to add a new tag which would be permission based)
Just a thought I had after scanning the last few messages in this thread...
installed and works like its supposed to, but i would like to show the tag template elsewhere. how can i include it say on boardindex.template?
Check the modsite you can download the edit instructions to modify the theme and make changes to other themes if needed
SMF 1.1.11
Hi I had this mod installed yesterday. I added permissions for my moderators to be able to add and delete tags. Well it seems that the only ones who can go to any topic and add tags is Admin.
None of my mods can add tags to a topic unless they start a new topic.
How can this be fixed. Checking it in permissions does not give anyone any permissions to do anything.
Thanks in advance
I have this installed on 1.1.11, and is there a setting to allow only the administrator to remove tags?
Also, can I create a benchmark to allow members have to get to, like 100 posts before having this ability?
It seems that a member has the ability to spam the site with zero posts, working through the tag system , accomplishing what they are set out for.
Cannot find settings for this issue.
Currently those settings do not exist in this mod at this time.
Quote from: kai920 on December 16, 2009, 03:32:22 AM
stefann, were you able to make any improvements to this mod?
As you can probably guess by the slow reply, unfortunately I got a bit caught up with other things over the break. While I have already made some improvements that I'm using on my own site, I haven't been able to tidy them up and integrate them in to the other changes yet.
I do need to rewrite these modifications anyway as I'll be moving my site to SMF2 soon and tagging is an integral part of it, so they will get done.
Quote from: stefann on January 02, 2010, 08:40:03 PM
Quote from: kai920 on December 16, 2009, 03:32:22 AM
stefann, were you able to make any improvements to this mod?
As you can probably guess by the slow reply, unfortunately I got a bit caught up with other things over the break. While I have already made some improvements that I'm using on my own site, I haven't been able to tidy them up and integrate them in to the other changes yet.
I do need to rewrite these modifications anyway as I'll be moving my site to SMF2 soon and tagging is an integral part of it, so they will get done.
What changes did you make, and are any of them viewable on your public site? :)
Unfortunately my forum is private, and I do not have the changes set up on any public sites, but a simple run down is:
- (option to) change tag entry from a single editbox to an array of checkboxes to simplify tag selection on some forums where it's suitable, using a nested tree structure with javascript
- pretty icons on board index and message index for tagged topics
- revamped permissions to allow more flexibility
- a lot of little cosmetic changes
and what I still need to get done:
- finish suggestion of tags and new tags
- create the moderation page (to add new tags, modify tree structuring of tags and whether parent tags are autotagged or even taggable, approve suggestions, etc)
- improve appearance of action=tags page to conform with the rest
- and more that I've probably forgotten
So I've done most of the major work I wanted to do, it's now mostly the little UI things. All of this is written for 1.1 too so things will need to be changed to make it to 2.0 release, which hopefully vbgamer will be able to assist with once I get a chance to actually do this.
Edit: WYSIWIG editor fail
Nice Mod
Here is an Error
old
<file name="$themedir/Display.template.php">
<operation>
<search position="replace"><![CDATA[// Show the lower breadcrumbs.]]></search>
<add><![CDATA[
// Tagging System
echo '
<div class="clearfix windowbg largepadding">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'] && allowedTo('smftags_del'))
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>';
echo '
</div>';
// End Tagging System
// Show the lower breadcrumbs.</div>';
]]></add>
</operation>
</file>
new
<file name="$themedir/Display.template.php">
<operation>
<search position="replace"><![CDATA[// Show the lower breadcrumbs.]]></search>
<add><![CDATA[
// Tagging System
echo '
<div class="clearfix windowbg largepadding">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'] && allowedTo('smftags_del'))
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>';
echo '
</div>';
// End Tagging System
// Show the lower breadcrumbs.]]></add>
</operation>
</file>
I can't find that code in tags.xml or tags2.xml are you using a modified tagging system mod?
I use the version 2.2.1 from the smf download page.
The error is in the tags2rc2.xml row 328.
Fixed reuploaded the mod.
Followed manual steps to add to tags in menu bar of dilbermc them. Alignment is not proper. See attachment. Pls suggest
-------
Steps followed:
./Themes/default/index.template.php
Find: [Select]
$current_action = 'admin';
if (in_array($context['current_action'], array(
Add After: [Select]
'tags',
Find: [Select]
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
Add After: [Select]
// the [tags] button
echo ($current_action == 'tags' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'tags' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tags">' , $txt['smftags_menu'] , '</a>
</td>' , $current_action == 'tags' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
Your theme probably has different menu formatting copy a normal dilbermc menu link and change it to tags to fix
Your other mods like download are working fine with this menu bar. Any suggestion.
And I think gallery is also your mod only, see in attached image it is fine.
Yeah wrong code you have cause aligment is bad you need to modify and copy another button then adjust to point to tags
Hey vb, any chance on enabling your RSS feed poster mod to be able to pick up and attach tags from THIS mod to it's imported feed postings?
What I understand from your reply is
1. Code is wrong
2. Need to make button
Concern here is why other things are working fine like download and gallery with just adding the button code.
Pls suggest as I am unable to do what you are saying like copy button and change code etc...
I am not in hurry for this. But need help as I am unable to do what you are saying.
Quote from: vbgamer45 on January 15, 2010, 10:03:38 PM
Yeah wrong code you have cause aligment is bad you need to modify and copy another button then adjust to point to tags
Are there any chances to show the Popular Tag Box (Tag Cloud) on the board index? I haven't found any options for this... :(
None yet but I plan to do that in the future.
Ok, thanks for this info! :)
how to change
href="' . $scripturl . '?action=tags;tagid=
to
href="' . $scripturl . '?action=tags;nameofthetag=
someone help me?
SunKing,
Thanks for help via pm. Provided code is not working. It is not showing tags in menu bar.
Attached modified index file for your reference.
You may also want to check that the mod's text strings are in place. I'll have a look at the attached file and see if it's something in there.
EDIT: Right away I notice the $txt['tags'] example is still in the file. I used that as a reference to where the text string would go.
The code for the button in the index.template.php for your theme (DilberMC) should look like this: // Show the [tags] button
echo '
<td align="center" class="menubg' , $current_action == 'tags' ? '2' : '' , '">
<a href="', $scripturl, '?action=tags">' , $txt['smftags_menu'] , '</a>
</td>';
I have also attached the modified index.template.php to reflect this for your convenience.
Thank You. It is working now in one shot.
Have a good day !
Quote from: SunKing on January 25, 2010, 07:04:55 PM
You may also want to check that the mod's text strings are in place. I'll have a look at the attached file and see if it's something in there.
EDIT: Right away I notice the $txt['tags'] example is still in the file. I used that as a reference to where the text string would go.
The code for the button in the index.template.php for your theme (DilberMC) should look like this: // Show the [tags] button
echo '
<td align="center" class="menubg' , $current_action == 'tags' ? '2' : '' , '">
<a href="', $scripturl, '?action=tags">' , $txt['smftags_menu'] , '</a>
</td>';
I have also attached the modified index.template.php to reflect this for your convenience.
Glad you got it working!
Thanks for the fantastic mod. We really like it.
How to Keep Guests from Using Tags?
Under the guest group's permissions, there are no permissions aloud for tags. But guests are still able to tag. Under the board permissions, the boards that are available to guests do not have the option of disabling the tags.
Any advice?
Also, I second the motion of providing a cloud of the most popular tags, or a drop down or something. That'd help.
Have used this mod on a previous forum I owned.
The mod installed with no errors yet when going to post the tag box under the topic subject line doesn't show.
Quote from: Bruno36 on November 29, 2009, 03:27:28 AM
Quote from: Bruno36 on November 27, 2009, 03:09:09 AM
I have an error message when I click on the tag in the top menu
QuoteUtilisation invalide de la clause GROUP
Fichier: /home/www/sospc/www/smf/Sources/Tags2.php
Ligne: 101
http://www.scooter-chinois-4t.com/index.php?action=tags
help
Any tag or a specific tag?
Still looking for some help with guests tagging.
Quote from: mabley on February 01, 2010, 05:20:06 PM
Thanks for the fantastic mod. We really like it.
How to Keep Guests from Using Tags?
Under the guest group's permissions, there are no permissions aloud for tags. But guests are still able to tag. Under the board permissions, the boards that are available to guests do not have the option of disabling the tags.
Any advice?
Also, I second the motion of providing a cloud of the most popular tags, or a drop down or something. That'd help.
Also, I think there's a glitch:
A single identical tag is being represented in two Tag IDs therefore showing up in the cloud as two different lists. What's going on here?
The mod has permissions. At least on SMF 1.1.11 version. You can set permissions on groups' permission at admin panel.
If you have two identical tags in the cloud tag, make sure you don't have spaces before or after the tag. That happens a lot and makes two tags seemingly identical to be different...
Updated for SMF 2.0 RC3!
Quote from: vbgamer45 on March 08, 2010, 07:14:02 PM
Updated for SMF 2.0 RC3!
Yeah, first thanks by me. ;D
Quote from: FragaCampos on March 01, 2010, 02:57:24 PM
The mod has permissions. At least on SMF 1.1.11 version. You can set permissions on groups' permission at admin panel.
If you have two identical tags in the cloud tag, make sure you don't have spaces before or after the tag. That happens a lot and makes two tags seemingly identical to be different...
Thank you! For the most part, I've been able to eliminate duplicate tags by ensuring there were no spaces after. However sometimes I just couldn't get a tag to match no matter what.
As for permissions in RC2, there are permissions for all membergroups, but the default guest membergroup did not have tagging involved in their permission set at all. Any word on that?
Thank for your mod!
Could you add the search function for this mod. Mean users can search tags as an option of SMF search screen.
thanks!
Quote from: mabley on March 11, 2010, 03:55:46 PM
As for permissions in RC2, there are permissions for all membergroups, but the default guest membergroup did not have tagging involved in their permission set at all. Any word on that?
I'm using SMF 1.1.11... maybe mod's author can help you :P
Where can I find a list of the tags?
I imagine it's buried behind the scenes somewhere, but I'm looking for a list of tagid=1 is "cake", tagid=2 is "mushrooms", etc.
You can see the list in phpmyadmin. That's how i do it...
Thanks, Fraga! Just what I needed.
I´ve been edit the template file for work with the new default theme.
Look at the attachments.
@ vbgamer45
If you need it. PM me.
Did you change the style for curve with the tagging system Eclipse16V?
Quote from: Bruno36 on February 20, 2010, 12:41:53 PM
Quote from: Bruno36 on November 29, 2009, 03:27:28 AM
Quote from: Bruno36 on November 27, 2009, 03:09:09 AM
I have an error message when I click on the tag in the top menu
QuoteUtilisation invalide de la clause GROUP
Fichier: /home/www/sospc/www/smf/Sources/Tags2.php
Ligne: 101
http://www.scooter-chinois-4t.com/index.php?action=tags
Please help, something has broken taggingsystem installed on my board. The Tags button has dissappeared from the Menu bar. Tags can be added top posts till though.
I've tried uninstalling and I get the following: -
Uninstall Actions "Tagging System":
Installing this package will perform the following actions:
Type Action Description
1. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
2. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
3. Execute Modification ./index.php Test successful
4. Execute Modification ./Themes/default/index.template.php Test failed
5. Execute Modification ./Themes/default/Post.template.php Test successful
6. Execute Modification ./Sources/ManagePermissions.php Test failed
7. Execute Modification ./Sources/Subs.php Test successful
8. Execute Modification ./Sources/Post.php Test successful
9. Execute Modification ./Sources/Display.php Test successful
10. Execute Modification ./Themes/default/Display.template.php Test successful
11. Execute Modification ./Sources/RemoveTopic.php Test successful
12. Execute Code UnInstall.php
Theses are the mods I have installed: -
Mod Name Version
1. Auto Refresh Who Index 1.0 [ Uninstall ] [ List Files ] [ Delete ]
2. Reply Button in All Posts 1.1 [ Uninstall ] [ List Files ] [ Delete ]
3. Search Focus Dropdown 1.44 [ Uninstall ] [ List Files ] [ Delete ]
4. Karma Buttons 1.1 [ Uninstall ] [ List Files ] [ Delete ]
5. Board Viewers Mod 1.2.1 [ Uninstall ] [ List Files ] [ Delete ]
6. Reason For Editing Mod 2.3.2 [ Uninstall ] [ List Files ] [ Delete ]
7. Thank-O-Matic 1.2.5 [ Uninstall ] [ List Files ] [ Delete ]
8. Treasury 1.04 [ Uninstall ] [ List Files ] [ Delete ]
9. SMF Multi Quote 1.1.2 [ Uninstall ] [ List Files ] [ Delete ]
10. Pretty URLs 1.0RC [ Uninstall ] [ List Files ] [ Delete ]
11. Aeva Media 1.1b [ Uninstall ] [ List Files ] [ Delete ]
12. Unread and Replies Tabs in Main Menu 2.0.1 [ Uninstall ] [ List Files ] [ Delete ]
13. Ad Managment 2.3.6.1 [ Uninstall ] [ List Files ] [ Delete ]
14. Attachments in Topics 1.0 [ Uninstall ] [ List Files ] [ Delete ]
15. AutoKeywords 1.3 [ Uninstall ] [ List Files ] [ Delete ]
16. Tagging System 2.2.1 [ Uninstall ] [ List Files ] [ Delete ]
17. SMF Sitemap 1.2.2 [ Uninstall ] [ List Files ] [ Delete ]
18. Hack's Park Shoutbox 2.0.2 [ Uninstall ] [ List Files ] [ Delete ]
Quote from: Bruno36 on February 20, 2010, 12:41:53 PM
Quote from: Bruno36 on November 29, 2009, 03:27:28 AM
Quote from: Bruno36 on November 27, 2009, 03:09:09 AM
I have an error message when I click on the tag in the top menu
QuoteUtilisation invalide de la clause GROUP
Fichier: /home/www/sospc/www/smf/Sources/Tags2.php
Ligne: 101
+1!
How to solve a problem?
I have an error message when I click on the tag in the top menu
QuoteUtilisation invalide de la clause GROUP
Fichier: /home/www/sospc/www/smf/Sources/Tags2.php
Ligne: 101
http://www.scooter-chinois-4t.com/index.php?action=tags
Not getting an error for me what mysql version?
MySQL: 4.1.22
Feature Request :
* Default Tags for This Board :
* Auto Tagger ( based on Topic title & posts ) ( like this : Auto Tagger (http://www.vbulletin.org/forum/showthread.php?t=234026) )
every new topic in that board get those tags
Hi!
There seems to be a problem with guest permissions in the latest release 2.2.1. I have removed the "Add Tags to Own Topics" permission from the guest group, but guest still can add tags to new created topics.
*Edit*
And another problem. I get this error in my forumlogs:
Quote
http://www.example.com/forum/
8: Undefined index: smftags_popular
File: /forum/Sources/Tags2.php
Line: 93
I think thats because i'm using german-utf8 as my default language and the Tags2.php loads only the english languagefile:
loadlanguage('Tags','english');
Any hints how i can fix this so the Tags2.php loads the english or the german-utf8 file? Thanks in advance for a reply.
Quote from: Bruno36 on April 12, 2010, 11:03:34 AM
I have an error message when I click on the tag in the top menu
QuoteUtilisation invalide de la clause GROUP
Fichier: /home/www/sospc/www/smf/Sources/Tags2.php
Ligne: 101
http://www.scooter-chinois-4t.com/index.php?action=tags
Has there been a fix for this? I'm getting the same thing with MySQL 4.1.22:
QuoteInvalid use of group function
File: /home/hillrunr/public_html/forums_test/Sources/Tags2.php
Line: 101
http://www.hillrunner.com/forums_test/index.php?action=tags
Playing around with the SQL that appears at that line a bit. The issue is with the count in the order by clause, which apparently isn't allowed in MySQL 4.1.22. Looking at the code, initially, I'm not sure of a workaround. Any thoughts?
Here's what I currently have for the code I'm running through phpMyAdmin. If I take the count out of the order by, it works. If I don't, it produces the error in question.
SELECT t.tag AS tag
, l.id_tag
, COUNT(l.id_tag) AS quantity
FROM smf_tags as t
, smf_tags_log as l
WHERE t.id_tag = l.id_tag
GROUP BY t.tag
, l.id_tag
ORDER BY COUNT(l.id_tag) DESC
, RAND()
LIMIT 20
UPDATE:
Find:
ORDER BY COUNT(l.id_tag) DESC
Replace with:
ORDER BY quantity
Try changing
ORDER BY COUNT(l.id_tag)
to
ORDER BY quantity
I see I didn't get my update there in time. I found that to work and was trying to update my post before anyone spent too much time trying to figure it out.
Hello,
is there anyway we cam make this tagging system work with pretty urls, or any other sef url
i want to achieve this thing
Current url structure is these
yourforumsite.com/index.php?action=tags;tagid=1
yourforumsite.com/index.php?action=tags;tagid=2
yourforumsite.com/index.php?action=tags;tagid=3
i want tag url to be like these
yourforumsite.com/tags/tag1
yourforumsite.com/tags/tag2
yourforumsite.com/tags/tag3
is there any way to do this?
Impossible to do.
mybb simple tag plugin has these feature ,i dont think it is impossible ,on the other side mybb simple tag plugin is inspire by these mod
I don't think it's possible for me todo maybe hire a coder?
maybe looking at mybb simple tag plugin source code help you a bit , ;D
It's not *impossible* on its own. Just not possible with this mod, and not possible without slowing your forum down where tags are applicable.
I have it done few things code wise are impossible but easier to respond that way otherwise they will ask for it since it is not built in.
hello :)
thanks for this very nice mod vb
here is the french translation
for the modification file :
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Configuration des Tags';
$txt['smftags_settings'] = 'Paramètres';
$txt['smftags_addtag'] = '[Ajouter un Tag]';
$txt['smftags_addtag2'] = 'Ajouter un Tag';
$txt['smftags_seperate'] = 'Séparer les tags par une virgule';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissiongroup_simple_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Proposer des Tags';
$txt['permissionhelp_smftags_suggest'] = 'Les utilisateurs peuvent proposer des tags.';
$txt['cannot_smftags_suggest'] = 'Vous n\'êtes pas autorisé à proposer des tags.';
$txt['permissionname_smftags_add'] = 'Ajouter des tags à ses propres sujets';
$txt['permissionhelp_smftags_add'] = 'Les utilisateurs peuvent ajouter des tags';
$txt['cannot_smftags_add'] = 'Vous n\'êtes pas autorisé à rajouter des tags.';
$txt['permissionname_smftags_del'] = 'Supprimer les tags de ses propres sujets';
$txt['permissionhelp_smftags_del'] = 'Les utilisateurs peuvent supprimer les tags de leurs propres sujets';
$txt['cannot_smftags_del'] = 'Vous n\'êtes pas autorisé à supprimer ces tags';
$txt['permissionname_smftags_manage'] = 'Gestion des tags';
$txt['permissionhelp_smftags_manage'] = 'Les utilisateurs peuvent modifier les parametres des tags et ajouter ou supprimer n\'importe quel tag. Attention! Cette permission est normalament attribuée aux administrateurs uniquement!';
$txt['cannot_smftags_manage'] = 'Vous n\'êtes pas autorisé à gérer les tags.';
//END Tagging System Strings
for the tags file
Quote<?php
/*
Tagging System
Version 1.0
by:vbgamer45
http://www.smfhacks.com
*/
//Tags text strings
$txt['smftags_tags'] = 'Tags';
$txt['smftags_tagtosuggest'] = 'Tag To Suggest:';
$txt['smftags_popular'] = 'Tags populaires';
$txt['smftags_latest'] = 'Derniers tags postés';
$txt['smftags_resultsfor'] = 'Résultats pour ';
$txt['smftags_suggest'] = 'Proposer un Tag';
$txt['smftags_addtag'] = '[Ajouter un Tag]';
$txt['smftags_deletetag'] = '[Supprimer le Tag]';
$txt['smftags_addtag2'] = 'Ajouter un Tag';
$txt['smftags_tagtoadd'] = 'Tag à ajouter';
//Tags Admin Settings
$txt['smftags_set_mintaglength'] = 'Longueur minimum du Tag';
$txt['smftags_set_maxtaglength'] = 'Longueur maximale du Tag';
$txt['smftags_set_maxtags'] = 'Nombre maximum de tags par sujet';
$txt['smftags_tagcloud_settings'] = 'Paramètres du nuage de Tags';
$txt['smftags_set_cloud_tags_to_show'] = 'Nombre de Tags à montrer dans le nuage de Tags';
$txt['smftags_set_cloud_tags_per_row'] = 'Nombre de Tags à montrer par ligne';
$txt['smftags_set_cloud_max_font_size_precent'] = 'Taille de caractères maximum en pourcentage';
$txt['smftags_set_cloud_min_font_size_precent'] = 'Taille de caractères minimum en pourcentage';
$txt['smftags_err_deletetag'] = 'Vous n\'avez pas la permission de supprimer ce tag.';
$txt['smftags_err_notopic'] = 'Aucun sujet selectionné.';
$txt['smftags_err_notag'] = 'Vous devez inscrire un tag.';
$txt['smftags_err_mintag'] = 'Le tag est plus petit que la longueur minimum de ';
$txt['smftags_err_maxtag'] = 'Le tag est plus grand que la longueur maximum de ';
$txt['smftags_err_toomaxtag'] = 'Nombre maximum de Tag par sujet dépassé.';
$txt['smftags_err_permaddtags'] = 'Vous n\'êtes pas autorisé à ajouter des tags sur ce sujet.';
$txt['smftags_err_alreadyexists'] = 'Ce Tag existe déjà pour ce sujet.';
$txt['smftags_settings'] = 'Paramètres des tags';
$txt['smftags_pages'] = 'Pages: ';
$txt['smftags_savesettings'] = 'Sauvegarder les paramètres';
///Results Display
$txt['smftags_subject'] = 'Sujet';
$txt['smftags_startedby'] = 'Auteur';
$txt['smftags_replies'] = 'Réponses';
$txt['smftags_views'] = 'Vues';
$txt['smftags_guest'] = 'Invité';
?>
I have a question if anyone could help me with this.
As I'm a total beginner in php, the only thing I can offer is translations in french.
But I'd like to make them neat and nice.
So far I'm directly translating in
modifications.englishBut I guess the best thing would be to make changes in
modifications.frenchHow and where do I tell the mod to look for my translation ?
Thanks.
Just making a a modifications.french file will make SMF automatically check for that file.
Quote from: vbgamer45 on May 13, 2010, 07:51:15 AM
Just making a a modifications.french file will make SMF automatically check for that file.
great !! It's magic 8)
thanks a lot
do these tags also get indexed by SEs?
They could be yes they are
Is there a way to have smf's search function only search through the list of tags?
Additionally, is it possible to add tags to boards? I have a forum in which a board has a specific topic, and the threads inside are relevant to that topic, and I won't be able to use the plugin if I can't add tags to the containing board.
Thanks,
Legostrat
Not built into the search function. Tags are only part of topics
Help me!!!
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
File: /home/vol4/byethost12.com/b12_5242114/forum.worldvn.net/htdocs/Sources/Tags2.php
Line: 313
Quote from: lwbbs on October 16, 2007, 07:15:49 PM
The mods can't work in East Asian UTF8 Language. When you try to add a tag, you will get the following error:
Illegal mix of collations (latin1_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
To solve this issue, you need change the tables. Or before you install it, change the tagsql.php file:
<?php
//SMFHacks.com
//Table SQL
global $db_character_set;
if ($db_character_set == "utf8")
{
$char_set = " DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci";
}
//Create Tags Table
db_query("CREATE TABLE IF NOT EXISTS `{$db_prefix}tags`
(`ID_TAG` mediumint([img alt=8)]http://www.simplemachines.org/community/Smileys/simple/cool.gif[/img] NOT NULL auto_increment,
`tag` tinytext NOT NULL,
approved tinyint(4) NOT NULL default '0',
PRIMARY KEY (`ID_TAG`)) TYPE=MyISAM $char_set", __FILE__, __LINE__);
//Create Tags Log
db_query("CREATE TABLE IF NOT EXISTS `{$db_prefix}tags_log`
(`ID` int(11) NOT NULL auto_increment,
`ID_TAG` mediumint([img alt=8)]http://www.simplemachines.org/community/Smileys/simple/cool.gif[/img] unsigned NOT NULL default '0',
ID_TOPIC mediumint([img alt=8)]http://www.simplemachines.org/community/Smileys/simple/cool.gif[/img] unsigned NOT NULL,
`ID_MEMBER` mediumint([img alt=8)]http://www.simplemachines.org/community/Smileys/simple/cool.gif[/img] unsigned NOT NULL default '0',
PRIMARY KEY (`ID`)) TYPE=MyISAM $char_set", __FILE__, __LINE__);
//Insert the settings
db_query("REPLACE INTO {$db_prefix}settings VALUES ('smftags_set_mintaglength', '3')", __FILE__, __LINE__);
db_query("REPLACE INTO {$db_prefix}settings VALUES ('smftags_set_maxtaglength', '30')", __FILE__, __LINE__);
db_query("REPLACE INTO {$db_prefix}settings VALUES ('smftags_set_maxtags', '10')", __FILE__, __LINE__);
?>
I was change it, but can't !!!
i used 2.0 rc3
<?php
/*
Tagging System
Version 2.2
by:vbgamer45
http://www.smfhacks.com
*/
global $db_character_set;
if ($db_character_set == "utf8")
{
$char_set = " DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci";
}
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
require_once(dirname(__FILE__) . '/SSI.php');
// Hmm... no SSI.php and no SMF?
elseif (!defined('SMF'))
die('<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');
$smcFunc['db_query']('', "CREATE TABLE IF NOT EXISTS {db_prefix}tags
(id_tag mediumint(8) NOT NULL auto_increment,
tag tinytext NOT NULL,
approved tinyint(4) NOT NULL default '0',
PRIMARY KEY (id_tag))");
// Create the tags Log
$smcFunc['db_query']('', "
CREATE TABLE IF NOT EXISTS {db_prefix}tags_log
(id int(11) NOT NULL auto_increment,
id_tag mediumint(8) unsigned NOT NULL default '0',
id_topic mediumint(8) unsigned NOT NULL default '0',
id_member mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (id)) TYPE=MYISAM");
You will have to change them manually using phpmyadmin
Quote from: vbgamer45 on June 14, 2010, 01:25:11 PM
You will have to change them manually using phpmyadmin
How to convert 2 table (tags and tags_log) from latin1 to utf-8 with phpadmin ???
You have to change the table I think under options and you might have to the columns too
I am also looking to remove guest tagging. They seem to confuse them with topic descriptions.
Minor Bugfix
!Fixed issue with MySQL 5.5 since it no longer supports the Type for create tables uses Engine instead
Greetings!
I just installed SMF 2.0 RC3 and am (at this moment) using the default Curve theme.
In re-installing this (wonderful) mod, I received this error:
QuoteExecute Modification ./Sources/Subs.php Test failed
1. Replace ./Sources/Subs.php Test successful
2. Replace ./Sources/Subs.php Test failed
How can I fix?
You would have to make those two changes manually to the file check the modsite for manual install instructions
Aha! Just what I needed to hear. Thank you, problem solved. ;D
Glad you got it solved
Nice mod, but is there any easy way to add tags to existing topics? I mean older topics (created before mod install), with replies.
Yeah there should be just an Add tag link at the end of the topic
nm Got it fixed.
Is there an external syntax (like via SSI) to display tags by topic id?
Not currently built
Hum, I see. So you can't give me a php + sql code to output tags by the topic / message id, right? :(
No sorry don't have anything made to do that.
This may have already been asked so forgive me for not going back through 35 pages of posts :)
Is there a way to change how they are laid out on the Tags Page so that they dont all run together? Possibly an up and down list of sorts where they are spaced out better?
Example:
Tag 1 Tag 2 Tag 3 Tag 4 Tag5
Tag 6 Tag 7 Tag 8 Tag 9 Tag 10
You mean the latest tags on top of the overview?
Open the /Sources/Tags.php and search for:
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
Replace it with the following:
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="margin-left: 12px; margin-right: 12px; font-size: '.$size.'%"';
Nothing special, done with CSS.
Hi vbgamer
I noticed that you released a new version 2.2.2 but i see no change logs. I have 2.2.1 installed on my SMF 1.1.11. Do i need to update?
Probably not
really nice mod but in membergroups settings i didnt click on regular users can add tags
but they stil can
how do i switch it of that only admins can tag ?
Can they really add a tag? Or does it say not allowed when they click add tag
they can add a tag without any problems
Double check under regular members for permissions make sure manage tags and add tag are not allowed
admin >>>members>>>permissions>>general permissions>> regular members >>> didnt checked the 3 boxes for the tagging
but they can stil tag
ediyt i just noticed that also didnt check the boxes for removing own topic and with my test acount on regular users i could remove my topic i just made to test out the tagging
i've got this problem. so please tell me where i can remove one of the 2 bars.
are that users in additional membergroups?
maybe post-based membergroups? (specific rights enabled for post-based membergroups?)
Quote from: chilly on July 28, 2010, 05:08:15 AM
are that users in additional membergroups?
maybe post-based membergroups? (specific rights enabled for post-based membergroups?)
i got it fixed i made in some usergroups (newbie etc etc ) the stupid mistake to chance to unique permissions and it screwed up the whole permission thing hahaha
(fixed my problem ty for the replay's people )
Great work vbgamer45! ;)
Is it possible to use the tag cloud in a SimplePortal block? It would be nice that way :)
Possible yes. I added one to ezportal I belive so could be copied to SP as well
Quote from: vbgamer45 on August 02, 2010, 07:19:52 PM
Possible yes. I added one to ezportal I belive so could be copied to SP as well
Thanks! I have checked and SP has already an PHP blocks ... just need to try it.
Could I suggest a feature for this system? It would be nice to set by default the name of the board. This way even if the user didn't define any tag, it will use the board name as default. It was nice for systems, like mine, that the board name is the name of the tag :)
Quote from: jpaulino on August 02, 2010, 08:02:22 PM
Could I suggest a feature for this system? It would be nice to set by default the name of the board. This way even if the user didn't define any tag, it will use the board name as default. It was nice for systems, like mine, that the board name is the name of the tag :)
What you think about this?
Btw I found a bug/problem: if you use the same tag with different caps, it shows the two (in the picture you can see "java" and "JAVA") and I have two times "vb.net" because one has a space in the beginning.
PS: This is in a test environment
Posted an update that will always make the tags lowercased to fix the different cases issue.
Quote from: vbgamer45 on August 05, 2010, 09:48:35 AM
Posted an update that will always make the tags lowercased to fix the different cases issue.
Thanks vbgamer45! ;)
Just confirming that there's no way to actually search for tagged topics aside from wading through the tag cloud? :-\
That's correct
vbgamer45, could you please fix the following bug:
in the post editor, when typing in a list of tags related to the post, if i leave a space after the comma, then the tags are not recognized.
for example: jazz, rock, pop, classic (all tags are not recognized, except for the first one)
and in this format, the list works just fine: jazz,rock,pop,classic
the problem in this case is that most people type the correct way, so they always add a space after the comma.
can you make it, such that if a person includes a space after the comma, or not, the tags will still work.
I want you to notice that there is a bug here:
<file name="$themedir/Post.template.php">
<operation>
<search position="before"><![CDATA[<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
</td>
</tr>]]></search>
<add><![CDATA[
';
//Tagging system Mod
if(!isset($context['num_replies']))
{
echo '
<tr>
<td align="right">
<b>', $txt['smftags_topic'], '</b></td>
<td>
<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
</td>
</tr>';
}
//End Tagging system mod
echo '
]]></add>
</operation>
the maxlength not be fixed ("80") but the result of:
$modSettings['smftags_set_maxtaglength']*$modSettings['smftags_set_maxtags']
If it remains at 80, that has meant the panel and the management of the number and length of the tags?
Because even if I put the maximum number of tags at 1000.000 and length of each tag in 1000, always and only 80 characters I can use.
I changed this and it works:
<file name="$themedir/Post.template.php">
<operation>
<search position="before"><![CDATA[<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="',$modSettings['smftags_set_maxtaglength']*$modSettings['smftags_set_maxtags'],'" />
</td>
</tr>]]></search>
<add><![CDATA[
';
//Tagging system Mod
if(!isset($context['num_replies']))
{
echo '
<tr>
<td align="right">
<b>', $txt['smftags_topic'], '</b></td>
<td>
<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
</td>
</tr>';
}
//End Tagging system mod
echo '
]]></add>
</operation>
</file>
I think the tags don't should be more than 80 characters, even 80 is big! It supposed to be a tag don't a title
I think...
Quote from: distante on August 12, 2010, 07:19:23 PM
I think the tags don't should be more than 80 characters, even 80 is big! It supposed to be a tag don't a title
I think...
The panel then becomes useless ... you set certain numbers but you is always limited to 80 characters, no sense ....
but you can set a limit to 30 for example.
Tags (for seo use) should be someting like: "PHP" "Love" "matematic problems", etc.
Quote from: distante on August 13, 2010, 02:23:13 AM
but you can set a limit to 30 for example.
Tags (for seo use) should be someting like: "PHP" "Love" "matematic problems", etc.
I'm not saying you're wrong, but if one has a panel, claiming that it works
Remove "80" and place the multiplication would not hurt anyone
I would like the tag list to appear at the top of the thread, rather than the bottom. Perhaps beneath the line that displays Pages and before the line that has the Reply buttons.
Pages [1] [2] Go Down <<Previous Next>>
Tags: Tag [ x] Tag [ x] Tag [ x]
Reply Add Poll Notify
Author Topic: Topic Title
Seems simple, but I don't know anything. :)
This is a great mod!
I used it at SFM 1.1 forum and now Iám using is at my new SFM 2.0 RC3 forum.
In the tag cloud the tags are sorted by quantity
ORDER BY COUNT(l.ID_TAG) DESC, RAND() LIMIT " . $modSettings['smftags_set_cloud_tags_to_show']);
Does anyone know how the tags will be sorted alphabetically
In other words, how do I change the above line from Tags2.php
Thanks for all your hard work with this mod, vbgamer45. However, there is a serious feature that is missing from your tag system. I have a big forum running on SMF 1.1.11, using the default theme, where i have been using your mod for years! So, it has accumulated quite a lot of tags. But when clicking on any tag description from the tag menu (found in the top part of the forum where you get the "calendar, members, logout" buttons, the list is HUGE!! I have about 5000 tagged topics for each of the tag terms. So when i click on any of those term, there is a REALLY LONG list of topics that scroll down, usually this freezing my browser as well. Can you PLEASE add an option to limit the number of displayed topics to, say, 50 tagged topics listed per page? And there should be page numbers that can be clicked to access the rest of the tagged topics, just like for the normal topics listed in boards. That would be really great. Thank you very much.
Hmm so some kind of paging system is needed on topic list for tags will add it. Anything else?
Quote from: jacbier on August 26, 2010, 05:30:31 PM
In the tag cloud the tags are sorted by quantity
ORDER BY COUNT(l.ID_TAG) DESC, RAND() LIMIT " . $modSettings['smftags_set_cloud_tags_to_show']);
Does anyone know how the tags will be sorted alphabetically
In other words, how do I change the above line from Tags2.php
A friend of mine has given to me the following solution
ORDER BY tag ASC LIMIT " . $modSettings['smftags_set_cloud_tags_to_show']);
This works fine. :D
Quote from: vbgamer45 on September 02, 2010, 03:42:42 PM
Hmm so some kind of paging system is needed on topic list for tags will add it. Anything else?
When viewing the main "tag" menu (after clicking on "Tags" from the top forum menu), the page shows a "cloud" of tags and then right under it, there is "Latest Tagged Posts". There you have these columns: Subject Started by Replies Views
What is missing, is obviously the Tags column! :)
When viewing the list of "Latest Tagged Posts", it is really useful (and expected), to see which tags have been associated with these latest tagged posts. Then the member will find it more useful to decide if he/she wants to click on that tagged topic based on the tags listed next to it, which should be in a column on the immediate right to the "Subject" column.
Also, the cloud of tags should be allowed to be bigger and more customizable. It would be best to have some settings in the admin panel for this great mod, where we could control how many tags would appear in the cloud and what is the minimum number of topics with the tag would make the tag eligible to be listed in the cloud. I mean, the popularity of the tag should be left to the admin, depending on the size of their forum. On my forum, the smallest tag in the cloud has "210 things tagged", but it would be nice to have some slightly less popular (but more interesting) tags listed. And also, a setting to disable or exclude some of the more "common/general" tags from the cloud ONLY, without being forced to remove these tags from the tag system entirely.
Did the first part you added more later on :)
2.4 Release
+Added paging for tag results
+Added tag column for recent tags on tags index
!Fixed some border issues removed border on areas to look nicer
Do I have to uninstall the previous versions first? The tags will remain intacts?
Quote from: vbgamer45 on September 02, 2010, 06:17:19 PM
Did the first part you added more later on :)
2.4 Release
+Added paging for tag results
+Added tag column for recent tags on tags index
!Fixed some border issues removed border on areas to look nicer
Thanks for the upgraded release, mate. I have tested this on a fresh SMF 1.1.11 installation with default theme.
My test forum doesn't have as many tags to test the new paging system. So, if you don't mind, you have set how many tagged topics to be listed per page?
However, i noticed a few bugs.
1. In the tags index page, the tags column has no title.
2. When modifying a topic or posting a new topic, under "Subject", there is no "Tags" field.
3. In the error log, there are several of these:
http://www.forum.com/test/index.php?action=tags
8: Undefined index: smftags_topictag
File: /home/user/public_html/test/Themes/default/languages/Tags.english.php (main sub template - eval?)
Line: 46
4. When viewing a topic, and scrolling to the bottom of that topic, there is the [Add Tag] link, when clicked, allows adding tags. However there is a severe limitation to this system, as it allows to enter only one tag at a time, so the member is forced to click on the [Add Tag] link for every tag to be added, which can be tedious and time consuming if several tags are to be added to the topic. Even if the following format is used to enter a series of tags: forum,smf,tag -- the current tag system oddly identifies that line of tags as a single tag together. It should instead automatically separate the tags. Several tags should also be able to be entered as: forum, smf, tag (notice the space after each comma). In the latter, the tags line is also considered as single tag by the tag system. Basically, the tag system should ignore any number of spaces (if any) after a comma, and consider any text in between these commas to be a separate tag. Some members often end their tag or list of tags with a dot (.) so these should also be accounted for in the algorithm to be ignored.
is there any SEO benefit??? i mean it is a full tagging system???
By default the mod does 25 topics per page on tags result
New update: 2.4.1
+Now supports comma splitting and trims space on add tag page
!Fixed title of tag column on tag index page
Now supports comma splitting?! That means
Tag, taggy, taggle, boomstick
Works now?!
It should check it out!
Quote from: vbgamer45 on September 03, 2010, 12:26:03 PM
By default the mod does 25 topics per page on tags result
New update: 2.4.1
+Now supports comma splitting and trims space on add tag page
!Fixed title of tag column on tag index page
Thanks for the release, mate.
Here some fixes that could make this great piece of code the best mod yet:
1. In the tag index page, if more than one tag is added (let's say, 3 tags) to a single topic, then the same topic is repeated 3 times in the "Subject" column, with each different tag, next to the 3 times repeated topic title, in the "Tag" column.
Instead of repeatedly listing the same topic, the topic listing in the tag index page should display the topic only one time, with a list of all the different tags associated with that topic next to it, each tag separated by a comma and a space after each comma (for the sake of correct punctuation).
2. When creating a new topic, under "Subject:", there is the "Tags:" text which is misaligned with the blank text box area next to it. The "Tags:" text should be moved a little bit higher, to be exactly adjacent to the text box, like for the "Subject:" text. Also, the text right under tag text bar reads: "
Seperate each tag by a comma" which should be "
Separate each tag by a comma".
3. The [Add Tag] link found at the bottom of the page when viewing a topic should be kept unchanged, as it allows a nice spot to list all the different tags used in that topic,
but it lacks visibility as it is found way down the page, so many members forget about using that feature
when modifying their topics. Adding tags to a new topic is easy as the "Tags:" text field is clearly visible and accessible right under the "Subject:" text. But when modifying a topic, most members do not know how to remove or add new tags to their topics, as they usually just click on the "Modify" link and use the post editor panel for all their post modifying needs.
To allow easy access to adding more tags after posting the topic, a new link called "Add Tag" should be added at the top-right of the first post in the topic, alongside: "Quote", "Modify", "Remove", etc. Since only the topic starter can add tags to his/her topic, it is justified to have the new "Add Tag" link visible only to the topic starter (other than moderators and admins). The existing [Add Tag] link at the bottom of the topic page should not be changed or removed. But an extra "Add Tag" link next to the "Modify" link when viewing the first post in the topic, would make usage of tags on the forum much more widespread and popular.
Another way (probably the best solution) to tackle the poor visibility of the [Add Tag] link found at the bottom of the topic page, is to add it directly into the post editor panel, so that it displays the same way as it does under the topic page, but in the post editor, it should appear right under the "Subject:" text area.
For example, when modifying an existing topic with tags, this is how it should look:
Subject: I love SMF and Tags!
Tags: test [X] smf [X] tag [X] [Add Tag]
Message icon:
The above example is actually more appropriate, as when making a new topic, the "Tags:" text field is already situated under the "Subject:" text field, so the topic starter would normally expect to see the "Tags:" field again at the same spot, when doing any topic modification.
Wow! Nice update, really!
One more wish: It is pissible add a list tags, pre-defined by board administrator, instead chaotic user descriptions (by me, some users add four and more absolutley ineeded tags, which littering tag cloud), or system raising popular tags, and putting down garbage?
Thanks!
I am actually working with another forum member who has made some impressive updates hoping to get those rolled into this tagging system.
Sounds very cool! Be wait!
In order to make the best of the good will of vbgamer45, here's my request:
it would be great to implement a board selection field, where we could choose the boards where members could add tags.
I think that is coming too if not I can add it there is some really cool stuff coming hopefully that will make this mod stand out.
I just can't wait for the next release! It's starting to feel like Christmas all over again. :D
Hi!
Since the update to the 2.4 branch of the Tagging System (i have 2.4.1 running), i get this error in my errorlog:
Quote
8: Undefined index: total
File: /forum/Sources/Tags2.php
Line: 73
Line 73 is this code:
$numofrows = $totalRow['total'];
Any hints how i can fix this? Thanks in advance for a reply.
Fixed just posted an update to fix that issue Fisch.666
Thanks for your quick reply, the error is gone. ;D
vbgamer45, i suppose that the next major version is going to take some time to release, so maybe you could fix these in the meantime:
1. The list of topics in the Tags index page with a list of tags next to each topic, so that the same topic is not repeated x times for x number of tags associated with it.
2. Also, add this new feature to the Tags index page: The list of authorized tags to be used on the forum, which is set by the admin in the admin panel. This is crucial as it gives a reference to all members about the list of tags that should be used, rather than currently have each member set his own tags to his topics. There is no system where unauthorized tags are rejected, so there should at least be a display of which tags are allowed on the forum, and the best place to display that would be on the Tags index page itself.
Would it be wise to use this mod together with Googe Tagged (http://custom.simplemachines.org/mods/index.php?mod=1245)?
You can try they do two different things
Can I use this mod purely for search engine optimization? Or is it not really meant for that purpose?
This mod is not meant for SEO at all
commas in some other languages doesn't work with the seperation
for example using chinese comma will result 2 tags stick together
if i wanna add support for other types of comma what should i edit and how
thx
Quote from: sharks on September 03, 2010, 02:39:40 AM
3. In the error log, there are several of these:
http://www.forum.com/test/index.php?action=tags
8: Undefined index: smftags_topictag
File: /home/user/public_html/test/Themes/default/languages/Tags.english.php (main sub template - eval?)
Line: 46
i have just upgraded to the newest version V2.4.2 but i get this Error too. i tried to create a Tags.german.php hoping to fix ist, but the error still exists. Any solution for that?
.. and also i would like to use the cloud in a PortaMX. Is it possible to get just the cloud into a block of PortaMX?
regards Rob
vbgamer45, any news about the next major release with all the improvements and new features? :)
I am still waiting to hear back from someone if I can roll the updates in.
the package says it installed properly but I don't have a "tags" menu or a place to add them in posts or anything. Is there something I need to do to activate it?
Are you using a custom theme? If so you may need to make the edits to that custom manually.
yes, but it doesn't work even when i switch to the default theme. it also offered me an install for my custom theme and said that was successful.
Sounds like the mod didn't install. Check your forum's error log for any relevant errors.
I checked the error logs and didn't see anything. It shows as installed in the package manager, so I thought I would uninstall it and try again. When I clicked to uninstall it said:
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
Uninstall Actions "Tagging System"
Installing this package will perform the following actions:
Type Action Description
1. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
2. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Test successful
3. Execute Modification ./index.php Test failed
1. Replace ./index.php Test failed
4. Execute Modification ./Themes/default/Post.template.php Test failed
1. Replace ./Themes/default/Post.template.php Test failed
5. Execute Modification ./Sources/ManagePermissions.php Test failed
1. Replace ./Sources/ManagePermissions.php Test failed
6. Execute Modification ./Sources/Subs.php Test failed
1. Replace ./Sources/Subs.php Test failed
2. Replace ./Sources/Subs.php Test failed
7. Execute Modification ./Sources/Post.php Test failed
1. Replace ./Sources/Post.php Test failed
8. Execute Modification ./Sources/Display.php Test failed
1. Replace ./Sources/Display.php Test failed
9. Execute Modification ./Themes/default/Display.template.php Test failed
1. Replace ./Themes/default/Display.template.php Test failed
10. Execute Modification ./Sources/Admin.php Test failed
1. Replace ./Sources/Admin.php Test failed
11. Execute Modification ./Sources/RemoveTopic.php Test failed
1. Replace ./Sources/RemoveTopic.php Test failed
12. Execute Modification ./Sources/Subs-Editor.php Test failed
1. Replace ./Sources/Subs-Editor.php Test failed
2. Replace ./Sources/Subs-Editor.php Test failed
It looks like it did not modify those files that's why it is saying failed. I would recheck the file permissions then uninstall and try to reinstall.
Quote from: vbgamer45 on September 04, 2010, 07:01:15 PM
I am actually working with another forum member who has made some impressive updates hoping to get those rolled into this tagging system.
I'm guessing that'd be me. Sorry about the delays guys, I finish my exams mid November, and this is fairly high on my list of coding tasks to get done before the end of the year :) Unfortunately it's very much incomplete and needs a lot of tidying up, as well as currently only supporting SMF1.1, so there is a fair bit for vbgamer and myself to get done.
The "list tags" option I've written is intended to generate a nested checkbox tree, including much more detailed permissions such as suggesting/approving the creation of tags, as well as suggesting/approving/applying tags to topics on creation or otherwise.
Great work guys!
Can't wait to see the results :)
Well, stefann, it's good to finally know it's you the collaborator vbgamer has been mentioning. :)
It has been a long wait for the next major version of this mod. Hopefully, now you'll be able to release it soon. I'll be happy to do any beta testing.
Looking forward to the updates. I have a little problem though, how do I enter an apostrophy as part of the tag?(eg. Baker's)
Right now, the apostrophy is shown as html-entities. in the tags listed underneath the message.
Well, it has been a very long time since the new improved/fixed version of this mod has been announced. I am still waiting, like several others, to hear on any news on the new releases. Is that going to happen soon?
Thanks for the work.
Haven't heard anything doubt anytime soon
Quote from: vbgamer45 on November 03, 2010, 02:51:13 PM
Haven't heard anything doubt anytime soon
Since you are the original creator of this mod, maybe you could just release frequent/minor updates in the meantime. A permissions system is an important feature for this mod, as it will enable only allowed membergroups to see and use the tags feature.
I don't have the time sorry.
Quote from: vbgamer45 on November 03, 2010, 09:21:02 PM
I don't have the time sorry.
I'm sorry to hear that. :( This mod has great potential.
Anyway, could you please help me to remove the "Tag" link in the top forum menu, where there are the buttons: Calendar, Members, etc.
What file and what edits to make? I just want to remove that link only, while retaining the tags functionality.
You just need to edit the index.template.php of the theme I would do a search for tags and just remove the related button code that is for SMF 1.1.x
Quote from: sharks on November 03, 2010, 01:44:29 PM
Well, it has been a very long time since the new improved/fixed version of this mod has been announced. I am still waiting, like several others, to hear on any news on the new releases. Is that going to happen soon?
I have just finished my uni exams, and intend to get this done in collaboration with vbgamer over the new year break. I'd hope to have a beta available for SMF1.1 by the end of the year at the latest, but at this stage I'm not certain whether I'll be doing the SMF2.0 rewrite myself, or if someone will be able to do it for me.
It's good to see people enthusiastic about my improvements, it's just a pity I've had too many other distractions recently to put any time in to it.
I installed it on my RC 2.03, problem is, i am able to add tags but if i want to delete a Tag if gives me an Error saying:
QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
File: /home/powerlaw/public_html/forum/Sources/Tags2.php
Line: 491
What is this error about?
Quote from: stefann on November 06, 2010, 12:27:23 AM
Quote from: sharks on November 03, 2010, 01:44:29 PM
Well, it has been a very long time since the new improved/fixed version of this mod has been announced. I am still waiting, like several others, to hear on any news on the new releases. Is that going to happen soon?
I have just finished my uni exams, and intend to get this done in collaboration with vbgamer over the new year break. I'd hope to have a beta available for SMF1.1 by the end of the year at the latest, but at this stage I'm not certain whether I'll be doing the SMF2.0 rewrite myself, or if someone will be able to do it for me.
It's good to see people enthusiastic about my improvements, it's just a pity I've had too many other distractions recently to put any time in to it.
I can do the code changes for SMF 2.0 as long as the code for SMF 1.1.x it is pretty easy to update
Quote from: vbgamer45 on November 06, 2010, 11:32:30 AM
Quote from: stefann on November 06, 2010, 12:27:23 AM
Quote from: sharks on November 03, 2010, 01:44:29 PM
Well, it has been a very long time since the new improved/fixed version of this mod has been announced. I am still waiting, like several others, to hear on any news on the new releases. Is that going to happen soon?
I have just finished my uni exams, and intend to get this done in collaboration with vbgamer over the new year break. I'd hope to have a beta available for SMF1.1 by the end of the year at the latest, but at this stage I'm not certain whether I'll be doing the SMF2.0 rewrite myself, or if someone will be able to do it for me.
It's good to see people enthusiastic about my improvements, it's just a pity I've had too many other distractions recently to put any time in to it.
I can do the code changes for SMF 2.0 as long as the code for SMF 1.1.x it is pretty easy to update
I expect/hope it will be, but as changes have been gradual, and am only now putting in to SVN, we'll just have to wait and see.
Quote from: stefann on November 06, 2010, 12:27:23 AM
It's good to see people enthusiastic about my improvements, it's just a pity I've had too many other distractions recently to put any time in to it.
Hi stefann
It's great to have you back! Like many many others, i also believed that you had given up.
Now, let's see what you can do with the distractions gone. ;) Very eagerly awaiting the future releases. If i can help with beta testing, please let me know.
hi,
are there any option to change order of the taged topics?
I mean I have many topics taged by information of countries.
I would like to order them to ABC.
Have you got any idea?
By the way, thanks for the creator of this fantastic mod.
thanks!
Portuguese
2.x
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Tagging System Text Strings translate candidosa2 for smfpt
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Configuração do Tags';
$txt['smftags_settings'] = 'Configurações';
$txt['smftags_addtag'] = '[Adicionar Tag]';
$txt['smftags_addtag2'] = 'Adicionar Tag';
$txt['smftags_seperate'] = 'Separar cada tag por uma vírgula';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissiongroup_simple_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Sugerir um Tags';
$txt['permissionhelp_smftags_suggest'] = 'Os utilizadores podem sugerir tags para adicionar';
$txt['cannot_smftags_suggest'] = 'Você não tem permissão para sugerir tags.';
$txt['permissionname_smftags_add'] = 'Adicionar tags nos Tópicos próprios';
$txt['permissionhelp_smftags_add'] = 'Os utilizadores podem adicionar tags';
$txt['cannot_smftags_add'] = 'Você não tem permissão para adicionar tags nos tópicos';
$txt['permissionname_smftags_del'] = 'Apagar meus Tags no Tópicos';
$txt['permissionhelp_smftags_del'] = 'Os utilizadores podem apagar os tags a partir de temas que abrem';
$txt['cannot_smftags_del'] = 'Você não tem permissão para apagar este tags';
$txt['permissionname_smftags_manage'] = 'Gerir Tags';
$txt['permissionhelp_smftags_manage'] = 'Os utilizadores podem modificar as configurações do tag e para adicionar e remover quaisquer tags. Essa permissão é dada normalmente para os administradores únicos do fórum!';
$txt['cannot_smftags_manage'] = 'ocê não tem permissão para gerenciar as tags.';
//END Tagging System Strings
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Tagging System Text Strings translate candidosa2 for smfpt
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Configuração do Tags';
$txt['smftags_settings'] = 'Configurações';
$txt['smftags_addtag'] = '[Adicionar Tag]';
$txt['smftags_addtag2'] = 'Adicionar Tag';
$txt['smftags_seperate'] = 'Separar cada tag por uma vírgula';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissiongroup_simple_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Sugerir um Tags';
$txt['permissionhelp_smftags_suggest'] = 'Os utilizadores podem sugerir tags para adicionar';
$txt['cannot_smftags_suggest'] = 'Você não tem permissão para sugerir tags.';
$txt['permissionname_smftags_add'] = 'Adicionar tags nos Tópicos próprios';
$txt['permissionhelp_smftags_add'] = 'Os utilizadores podem adicionar tags';
$txt['cannot_smftags_add'] = 'Você não tem permissão para adicionar tags nos tópicos';
$txt['permissionname_smftags_del'] = 'Apagar meus Tags no Tópicos';
$txt['permissionhelp_smftags_del'] = 'Os utilizadores podem apagar os tags a partir de temas que abrem';
$txt['cannot_smftags_del'] = 'Você não tem permissão para apagar este tags';
$txt['permissionname_smftags_manage'] = 'Gerir Tags';
$txt['permissionhelp_smftags_manage'] = 'Os utilizadores podem modificar as configurações do tag e para adicionar e remover quaisquer tags. Essa permissão é dada normalmente para os administradores únicos do fórum!';
$txt['cannot_smftags_manage'] = 'ocê não tem permissão para gerenciar as tags.';
//END Tagging System Strings
]]></add>
</operation>
</file>
1.1.x
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Tagging System Text Strings translate candidosa2 for smfpt
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Configuração de Tags';
$txt['smftags_addtag'] = '[Adicionar Tag]';
$txt['smftags_seperate'] = 'Separar cada tag por uma vírgula';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Sugerir Tags';
$txt['permissionhelp_smftags_suggest'] = 'Os utilizadores podem sugerir tags para adicionar';
$txt['cannot_smftags_suggest'] = 'Você não tem permissão para sugerir tags.';
$txt['permissionname_smftags_manage'] = 'Gerir Tags';
$txt['permissionhelp_smftags_manage'] = 'Os utilizadores podem modificar as configurações dos tags e adicionar e remover tags';
$txt['cannot_smftags_manage'] = 'Você não tem permissão para gerenciar as tags.';
//END Tagging System Strings
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin Tagging System Text Strings translate candidosa2 for smfpt
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Configuração de Tags';
$txt['smftags_addtag'] = '[Adicionar Tag]';
$txt['smftags_seperate'] = 'Separar cada tag por uma vírgula';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Sugerir Tags';
$txt['permissionhelp_smftags_suggest'] = 'Os utilizadores podem sugerir tags para adicionar';
$txt['cannot_smftags_suggest'] = 'Você não tem permissão para sugerir tags.';
$txt['permissionname_smftags_manage'] = 'Gerir Tags';
$txt['permissionhelp_smftags_manage'] = 'Os utilizadores podem modificar as configurações dos tags e adicionar e remover tags';
$txt['cannot_smftags_manage'] = 'Você não tem permissão para gerenciar as tags.';
//END Tagging System Strings
]]></add>
</operation>
</file>
Thanks for the translation!
Did a fresh install of SMF 2.0 RC4 and added in this tagging mod. (We really like this mod and use it extensively!)
There's something strange that's come up that I didn't see before and it isn't quite working right:
When you create a new topic, there is the text area to enter tags: this works as usual.
When you modify the first post, this box is still present, but not functional: what's up with that?
In the past, modifying the post wouldn't display that box. But now it displays but does nothing.
I don't quite understand why the [Add Tag] link is at the very bottom of the topic view page. Most of my members overlook it and it is quite hard to find when adding tags to an existing topic. Can someone please explain how to move that [Add Tag] link up to the top of the topic, so that is a button along: Reply | Notify | Mark unread | Send this topic | Print
When modifying a post, the tag field is shown empty below the subject field, even if there are tags. Adding tags in this field does not add them to the database.
Any chance of getting this one to work on the Classic theme? My custom theme is a modified version of that.
I was doing a manual install of this mod and realized that some of the code to search for doesn't exist in the index.template.php and post.template.php
Does it also show the tags as meta tags to search engines on each topic?
no
Ok, thanks
I'm here to ask if Yagiz has permission to merge a function from your mod into his Google Tagged mod (http://custom.simplemachines.org/mods/index.php?mod=1245). I asked if he could add in the ability to let users tag posts themselves like yours has. I'd like to install them both, but that would cause major trouble. :P I just want the control of tags yours has with his Google SEO stuff.
I got an error message like this after post in SMF
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
File: /forum/Sources/Post.php
Make sure all your table have same collations either latin1 or utf8 to fix that issue check in phpmyadmin
Quote from: sharks on November 24, 2010, 07:01:16 AM
I don't quite understand why the [Add Tag] link is at the very bottom of the topic view page. Most of my members overlook it and it is quite hard to find when adding tags to an existing topic. Can someone please explain how to move that [Add Tag] link up to the top of the topic, so that is a button along: Reply | Notify | Mark unread | Send this topic | Print
Any chance someone could explain how to do that? :(
Quote from: vbgamer45 on December 23, 2010, 01:32:37 AM
Make sure all your table have same collations either latin1 or utf8 to fix that issue check in phpmyadmin
Thank for your answer
But I have one more question, maybe it don't have relation with my problem with this mod. It's about the problem with phpmyadmin. Do I have to change the collation of the table 1 by 1 or do you know anyway that I can change all tables for just one command or click?
Thank you very much
You have to do it 1 by 1
Quote from: vbgamer45 on December 23, 2010, 10:31:13 AM
You have to do it 1 by 1
LOL... Looks like i'm getting ignored! :D
I am not updating the mod at this time waiting for other changes to be done.
Quote from: vbgamer45 on December 23, 2010, 10:31:13 AM
You have to do it 1 by 1
Still have the same problem after change collation 1 by 1 using phpmyadmin. It's okie when I use tagging system with English, but It's seem to be having a problem when I use with UTF-8
You may also have to check the table columns as well for the tags table.
Quote from: vbgamer45 on December 23, 2010, 10:56:52 AM
I am not updating the mod at this time waiting for other changes to be done.
FWIW I'm behind schedule but still on track with that, and should have a beta or at worst an incomplete alpha for SMF1.1 available in the next week. Once that's done, you can start working on a SMF2.0 conversion as well :)
If anyone would like to express interest in running this tagging beta for SMF1.1 only, please send me a PM (http://www.simplemachines.org/community/index.php?action=pm;sa=send;u=110236) and I'll get back to you with details if selected. While the beta will add to the tagging database structure, it will be completely forwards and backwards compatible with the current stable release, with the exception of the permissions which have been changed almost entirely to allow for more flexibility.
Quote from: stefann on December 25, 2010, 02:57:56 AM
FWIW I'm behind schedule but still on track with that, and should have a beta or at worst an incomplete alpha for SMF1.1 available in the next week. Once that's done, you can start working on a SMF2.0 conversion as well :)
If anyone would like to express interest in running this tagging beta for SMF1.1 only, please send me a PM (http://www.simplemachines.org/community/index.php?action=pm;sa=send;u=110236) and I'll get back to you with details if selected. While the beta will add to the tagging database structure, it will be completely forwards and backwards compatible with the current stable release, with the exception of the permissions which have been changed almost entirely to allow for more flexibility.
I've been wondering what you were up to, stefann. I almost forgot that you were a developer in this mod also due to your inactivity. I wonder if you will keep your word this time. :)
I'm willing to help as this mod is being seriously ignored but could be a real asset to SMF. I already have a copy of my huge SMF 1.1 forum set up just for beta testing purposes ;)
PM sent.
Quote from: vbgamer45 on December 24, 2010, 12:49:31 AM
You may also have to check the table columns as well for the tags table.
Problem solved
Thank you very muck!
HAPPY NEW YEAR 2011!
http://www.diendannhatban.info/Events/HappyNewYear2011
Way too cool. I didnt even know this mod existed.
I had to add icons to "add" and "delete" instead of links. Im too picky :P
Vb,
I couldnt find the word "things" when hovering the tags in the language file. Where is this hidden? lol
I want to change it to "articles". :P
Thanks for this feature, love it.
Is there any way to edit a tag? Some of the tags were added to our forum with CAPS LOCK on, and after that any subsequent tags with that word are also listed with CAPS. This only changes if I delete all of the occurencies of that particular tag.
I'd also like an ability to merge two tags, so that two different wordings of the same thing could be joined as one.
Also, it would be nice to be able to organize the word cloud so that it's in alphabetical order. I personally don't like it being sorted by the frequency, since that's already clear from word size. Maybe also the possibility to sort in random order, so that you don't always end up with the same list - might help in getting people to find new topics.
And then one bug report: When I click the tag listing page open, it lists topic starters by their user names, not their display names. User names are normally not viewable for non-admin users, and it's also a bit confusing, so a fix for this would be nice.
Is there some place for changing the options for this mod?
Quote from: Ihmeliö on January 10, 2011, 02:05:35 AM
Is there any way to edit a tag? Some of the tags were added to our forum with CAPS LOCK on, and after that any subsequent tags with that word are also listed with CAPS.
I'd also like an ability to merge two tags, so that two different wordings of the same thing could be joined as one.
Also, it would be nice to be able to organize the word cloud so that it's in alphabetical order. I personally don't like it being sorted by the frequency, since that's already clear from word size.
And then one bug report: When I click the tag listing page open, it lists topic starters by their user names, not their display names. User names are normally not viewable for non-admin users, and it's also a bit confusing, so a fix for this would be nice.
Is there some place for changing the options for this mod?
There isn't yet, the next release already has all 4 of these issues addressed (as well as icons similar to those posted by bluedevil) :)
I've given 3 options for tag cloud sorting in the admin panel: alphabetical, tag count, or random - and also the ability to control where the new images appear, if at all
Once I get more things finalised, I'll post some screenshots here
Wonderful, looking forward to that!
Hmm... I noticed that with bigger fonts, there's no clear space between some of the words. This also seems to cause problems with line breaking. Could this be fixed?
I noticed that there was duplicate instances of one particular tag. One was in CAPS, one was in smallcase letters. I tried removing both, checked that the tab listing didn't list them any more, and then added a new one with CAPS (since it's an abbreviation - appropriate to be in caps). However, it stays smallcase.
What to do?
I just need to add a permission setting to this tag mod, and i really hope someone will help me out with this. I am using SMF 1.1.12 with default theme.
I just want to add a permission setting to allow/deny membergroups from being able to see or use the tag system. Meaning, if i deny access to a membergroup (for example, Guests) then the Tags button at top of the forum menu should not appear and if the member has saved the direct link, then it should show an error.
Thanks to anyone who can help me to make the necessary code edits. The next major version is going to take a long time yet to come out, and i really need this new feature now to be able to keep the tagging system on my forum, as i do not want unauthorised membergroups from viewing and using the Tagging system.
Quote from: stefann on January 10, 2011, 02:10:09 AM
Quote from: Ihmeliö on January 10, 2011, 02:05:35 AM
Is there any way to edit a tag? Some of the tags were added to our forum with CAPS LOCK on, and after that any subsequent tags with that word are also listed with CAPS.
I'd also like an ability to merge two tags, so that two different wordings of the same thing could be joined as one.
Also, it would be nice to be able to organize the word cloud so that it's in alphabetical order. I personally don't like it being sorted by the frequency, since that's already clear from word size.
And then one bug report: When I click the tag listing page open, it lists topic starters by their user names, not their display names. User names are normally not viewable for non-admin users, and it's also a bit confusing, so a fix for this would be nice.
Is there some place for changing the options for this mod?
There isn't yet, the next release already has all 4 of these issues addressed (as well as icons similar to those posted by bluedevil) :)
I've given 3 options for tag cloud sorting in the admin panel: alphabetical, tag count, or random - and also the ability to control where the new images appear, if at all
Once I get more things finalised, I'll post some screenshots here
wow... It's going to be the BEST MOD of this year with these options. Have a nice work! Thanks!
ps.: sorry for asking that I have some opinions.
- bigger fonts
- space between the tags
- and the last one: is it possible to select two tags to order the topics? If it would be... I would be more than happy.
It would be good if regular users could edit, or at least delete, the tags they have entered themselves. Is this possible?
Also, what about logging who has entered/deleted a particular tag?
Tagging SystemBy: vbgamer45
http://www.smfhacks.com
QuoteError in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
Quote
1. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english.php Test successful
2. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
* 3. Execute Modification ./index.php Test successful
1. Add After ./index.php Test successful
* 4. Execute Modification ./Themes/default/Post.template.php Test successful
1. Add After ./Themes/default/Post.template.php Test successful
* 5. Execute Modification ./Sources/ManagePermissions.php Test successful
1. Add After ./Sources/ManagePermissions.php Test successful
* 6. Execute Modification ./Sources/Subs.php Test failed
1. Replace ./Sources/Subs.php Test successful
2. Replace ./Sources/Subs.php Test failed
* 7. Execute Modification ./Sources/Post.php Test successful
1. Replace ./Sources/Post.php Test successful
* 8. Execute Modification ./Sources/Display.php Test successful
1. Add After ./Sources/Display.php Test successful
* 9. Execute Modification ./Themes/default/Display.template.php Test successful
1. Replace ./Themes/default/Display.template.php Test successful
* 10. Execute Modification ./Sources/Admin.php Test successful
1. Add Before ./Sources/Admin.php Test successful
* 11. Execute Modification ./Sources/RemoveTopic.php Test successful
1. Add Before ./Sources/RemoveTopic.php Test successful
* 12. Execute Modification ./Sources/Subs-Editor.php Test successful
1. Replace ./Sources/Subs-Editor.php Test successful
2. Add Before ./Sources/Subs-Editor.php Test successful
13. Extract File ./Sources/Tags2.php
14. Extract File ./Themes/default/Tags2.template.php
15. Extract File ./Themes/default/languages/Tags.english.php
16. Extract File ./Themes/default/languages/Tags.english-utf8.php
17. Execute Code tagsql2.php
Installed Packages
1. reCAPTCHA for SMF 0.9.8 [ Uninstall ]
2. Aeva Media 1.4 [ Uninstall ]
3. SimplePortal 2.3.3 [ Uninstall ]
I am Using
Version Information:
Forum version: SMF 2.0 RC4
Current SMF version: SMF 2.0 RC4
Taggign System Version 2.4.2
Please help to solve the problem. Tahnks.
Install then do the failed operations manually.
Quote from: vbgamer45 on January 28, 2011, 02:21:07 PM
Install then do the failed operations manually.
Thanks for your reply.
2 questions.
Qn1: To make it clear, you want me to modify the subs.php file as per the manual instruction?
Qn2:
Will I be able to auto uninstall if I want at later stage? Or I have to remove manually?
Advance. Thanks.
in subs.php; the code which is to be indicated to be replaced is given as below
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
Where as I found the following code (as simple portal is installed in my forum)
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
),
'portal' => array(
'title' => $txt['sp-adminCatTitle'],
'href' => $scripturl . '?action=admin;area=portalconfig',
'show' => allowedTo(array('sp_admin', 'sp_manage_settings')),
'is_last' => true,
),
I presume this difference is what makes the install to fail in subs.php, as I stated above,
During uninstall also the same subs.php fails. Is there a remedy that will eliminate this?
Thanks.
I installed in a test forum by manually editing subs.php and it works fine.
Easy. Uninstall Simple Portal. Install Tagging System first and then install Simple Portal. Works without any error.
When U want to uninstall, uninstall Simple Portal and uninstall Tagging System. [Then, if you want, reinstall portal package] ;)
Can anyone lend me simple portal block for tag cloud. The one listed in the Simple Portal site produces only blank block. Thanks.
Tag block...
I use this one my TinyPortal site...
global $db_prefix, $scripturl, $txt;
$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 RAND() LIMIT 50";
$result = tpdb_query($query, __FILE__, __LINE__);
$tags = array();
$tags2 = array();
while ($row = mysql_fetch_array($result))
{
$tags[$row['tag']] = $row['quantity'];
$tags2[$row['tag']] = $row['ID_TAG'];
}
if(count($tags2) > 0)
{
// change these font sizes if you will
$max_size = 250; // max font size in %
$min_size = 95; // min font size in %
// get the largest and smallest array values
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));
// find the range of values
$spread = $max_qty - $min_qty;
if (0 == $spread)
{ // we don't want to divide by zero
$spread = 1;
}
// determine the font-size increment
// this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);
// loop through our tag array
$poptags = '';
$row_count = 0;
foreach ($tags as $key => $value)
{
$row_count++;
// calculate CSS font-size
// find the $value in excess of $min_qty
// multiply by the font-size increment ($size)
// and add the $min_size set above
$size = $min_size + (($value - $min_qty) * $step);
// uncomment if you want sizes in whole %:
// $size = ceil($size);
// you'll need to put the link destination in place of the #
// (assuming your tag links to some sort of details page)
$poptags .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
// perhaps adjust this title attribute for the things that are tagged
$poptags .= ' title="'.$value.' things tagged with '.$key.'"';
$poptags .= '>'.$key.'</a> ';
if ($row_count > 6)
{
$poptags .= '<br />';
$row_count =0;
}
}
}
echo "<center>" . $poptags . "</center></div>";
I use this one on my Simpleportal site...
global $context, $txt, $mbname,$scripturl, $user_info, $smcFunc, $modSettings;
// Tag cloud
$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 " . $modSettings['smftags_set_cloud_tags_to_show']);
// here we loop through the results and put them into a simple array:
// $tag['thing1'] = 12;
// $tag['thing2'] = 25;
// etc. so we can use all the nifty array functions
// to calculate the font-size of each tag
$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)
{
// change these font sizes if you will
$max_size = $modSettings['smftags_set_cloud_max_font_size_precent']; // max font size in %
$min_size = $modSettings['smftags_set_cloud_min_font_size_precent']; // min font size in %
// get the largest and smallest array values
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));
// find the range of values
$spread = $max_qty - $min_qty;
if (0 == $spread)
{ // we don't want to divide by zero
$spread = 1;
}
// determine the font-size increment
// this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);
// loop through our tag array
$context['poptags'] = '';
$row_count = 0;
foreach ($tags as $key => $value)
{
$row_count++;
// calculate CSS font-size
// find the $value in excess of $min_qty
// multiply by the font-size increment ($size)
// and add the $min_size set above
$size = $min_size + (($value - $min_qty) * $step);
// uncomment if you want sizes in whole %:
// $size = ceil($size);
// you'll need to put the link destination in place of the #
// (assuming your tag links to some sort of details page)
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
// perhaps adjust this title attribute for the things that are tagged
$context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
$context['poptags'] .= '>'.$key.'</a> ';
if ($row_count > ($modSettings['smftags_set_cloud_tags_per_row']-1))
{
$context['poptags'] .= '<br />';
$row_count =0;
}
// notice the space at the end of the link
}
}
// Find Results
$dbresult = $smcFunc['db_query']('', "
SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,m.poster_name,m.subject,m.id_topic,m.poster_time, t.id_board
FROM ({db_prefix}tags_log as l,{db_prefix}boards AS b, {db_prefix}topics as t, {db_prefix}messages as m)
WHERE b.ID_BOARD = t.id_board AND l.ID_TOPIC = t.id_topic AND t.approved = 1 AND t.id_first_msg = m.id_msg AND " . $user_info['query_see_board'] . " ORDER BY l.ID DESC LIMIT 20");
$context['tags_topics'] = array();
while ($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$context['tags_topics'][] = array(
'id_member' => $row['id_member'],
'poster_name' => $row['poster_name'],
'subject' => $row['subject'],
'id_topic' => $row['id_topic'],
'poster_time' => $row['poster_time'],
'num_views' => $row['num_views'],
'num_replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($dbresult);
echo'
<div id="intro_blurbss"><div><img src="http://www.bluedevilcustoms.com/Themes/blue/images/custom/populartags.png" title="popular tags" />
<hr>
<br />
<div style="width: 100%; height: 220px; overflow: auto;"><div align="center">';
if (isset($context['poptags']))
echo $context['poptags'];
echo'
</div></div></div></div>';
Thanks bluedevil. It works.
Thanks bluedevel for the portal codes.
Quote from: vbgamer45 on February 04, 2011, 10:34:13 AM
Thanks bluedevel for the portal codes.
No proble bro. I happened to have these on my sites ;)
Hi
Have I understood everything correctly that the simple portal messes up the installation of the tagging system but that I can run around this by uninstalling SP again install the tagging system and then reinstall SP? :o
That might be the case I would try that.
Quote from: totaltutankoll on February 05, 2011, 01:02:45 PM
Hi
Have I understood everything correctly that the simple portal messes up the installation of the tagging system
Not messing up but reports fail message during the tagging mod installation/uninstallation. [which in turn forces us to do manual edit of subs.php.]
Quote from: totaltutankoll on February 05, 2011, 01:02:45 PM
but that I can run around this by uninstalling SP again install the tagging system and then reinstall SP? :o
Yes.
To Install Tagging system when you have simple portal mod enabled in your forum:
Uninstall Simple portal, Install tagging system and install simple portal again.
To Uninstall Tagging system mod when you have simple portal mod enabled in your forum:
Uninstall simple portal, uninstall tagging system and install simple portal again.
Simply putting it, you should not have simple portal mod installed when you are installing or uninstalling Tagging System mod.I followed this in my forum without any error.
Would it also be possible to implement a tag search?
Yes it would be possible if I get around to it.
This works fine for me except the menu item didn't show up. There weren't any errors in the install. Which parse is the menu?
What SMF Version if 1.1.x you need to modify index.template.php to include a menu button
2.0RC4
That's unusual normally with 2.0 should auto be added.The menu file for 2.0 is stored in Sources/Subs.php
Yeah, it missed one of the edits in there. Maybe I just missed it in the install. Works now.
Some more suggestions for future versions: It would be wonderful to be able to browse a full alphabetical list of all tags given - this would make it easy to see if there are two tags that are almost the same, and one could be changed to match the other. Also, the ability to edit the tags directly from that kind of a list would be wonderful.
I have so many suggestions for improvement... (I'll be seriously considering a small donation if my requests get implemented). Ok, there's the "Number of tags to show per row" setting. When there's a lot of tags, the font size differs quite a lot, so 6 big tags is quite different from 6 small tags. What is that was replaced with just a width setting instead: How many pixels in a row.
thanks :)
in posts the tagged words used should be linked to the tag.. i have seen it on wordpress.
Thanks for this great mod. I would like to know where the tag cloud is shown. I can't see it anywhere after installing this mod. My previous GoogleTagged mod is able to show it below the last post.
You would need to copy the tag cloud from the template and the source file and call it on the page that you need it on.
Hi I'm getting this error.
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/domain.com/httpdocs) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs/:/tmp/) in /var/www/vhosts/domain.com/httpdocs/Settings.php on line 62
Parse error: syntax error, unexpected ',' in /var/www/vhosts/domain.com/httpdocs/Sources/Subs.php on line 4017
Mysql 5 and rc5
in settings.php line 62
if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt'))
in subs line 4017
),
Ok I fixed it by removing the ), BUT see the screen capture. This is what I get.
and when I click on P or H it opens a new screen and says in the URL
http://www.domainname.com/P
I am using SMF Gallery
Tagging System
SimplePokes
Show Your Social Networks
Remove Index From Title
Contact Page
Custom Copyright
Effectively Remove SMF logo
EnOtify
Ad Management Mod.
Basically I'm a vbgamer45 whore.
ERROR LOGS
http://www.domainname.com/index.php?
Apply Filter: Only show the errors with the same message
2: Invalid argument supplied for foreach()
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/domainname.com/httpdocs/Themes/default/BoardIndex.template.php (body_above sub template - eval?)
Line: 439
http://www.domainname.com/index.php?
Apply Filter: Only show the errors with the same message
2: Invalid argument supplied for foreach()
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/domainname.com/httpdocs/Sources/Subs.php
Line: 4199
http://www.domainname.com/index.php?action=admin;area=logs;sa=errorlog;desc
Apply Filter: Only show the errors with the same message
2: Invalid argument supplied for foreach()
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/domainname.com/httpdocs/Themes/default/Errors.template.php (body_above sub template - eval?)
Line: 439
http://www.domainname.com/index.php?action=admin;area=logs;sa=errorlog;desc
Apply Filter: Only show the errors with the same message
2: Invalid argument supplied for foreach()
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/domainname.com/httpdocs/Sources/Subs.php
Line: 4199
So no help on this mod? Should I just remove it since it is incompatible with RC5?
It works with RC5
Hello,
Thanks for the work on the mod, it's working perfectly for me on 2.0 RC5, but I'm a complete newbie to SMF and pretty much green when it comes to PHP and I want to be able to retrieve specific posts based on a tag and display them on a homepage which is separate from the main forum. I've been using SSI to pull out some posts as laid out in the ssi examples and that's all pretty straight forward, but I can't figure out how I could run searches and pull out the content of that search from the tags.
Can anyone help?
Thanks in advance for your time!
I am having an issue that when I am modifying a post, I can't add new tags by placing them in the box (tag1, tag2,...). Is there a way I can get it where that happens or do have to keep adding the tags manually at the bottom of the thread?
Currently you have to add them manually to the bottom we are working on update the tagging system.
okay. thanks. I will keep trucking along.
Havent made any changes to my site in probably over a year now and I all of a sudden started getting errors when I try to remove a tag and when I try to go to the tag cloud page. This is the error:
Fatal error: require_once() [function.require]: Failed opening required '/home/*****/public_html/Sources/Tags2.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/index.php on line 386
Any ideas what caused this and what to do to fix it??
Your missing a critical mod file Tags2.php in your sources folder download the zip and extract it to your sources folde.r
I just ftp'd in (cpanel is currently down), and both the tags.php file and the tags2.php file are there. Should I try and do a repair on the file once CPAnel comes back up or just go ahead and replace it?
Side question>>> I am still running RC3 and if I update to RC5 that means I will need to uninstall all my mods first. Will I lose all the tags from all the threads or will the data remain intact on the database and then they will reappear once I reinstall it? (its been so long since I have done an upgrade I cant remember lol)
Thanks
Tags data remains in database
Make sure your file is called Tags2.php the case matters.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi55.tinypic.com%2F23kwydw.png&hash=0addd2c8db3b5cdb3b63d67a97936659b1bb437b)
We love this mod and have been using it for a long time now. Thank you!
Issues:
+ If a completely new tag is added to an existing thread with the [Add Tag] button in thread view, the tag is in all lowercase, no matter if its entered in uppercase letters. Cheese Whiz turns into cheese whiz. The only way to add a new tag to an existing thread and maintain the capitalization is to add the tag in a reply.
+ You can only add one tag at a time in the [Add Tag] button in thread view. We'd like to be able to add many, just like in post view.
+ Tags cannot be added in the Modify view. There is still the text box, but it doesn't take. Either remove the text box, or allow it to add tags.
+ Punctuation in tags is buggy. Ampersands and apostrophes (& ') are showing up as the html codes. Punctuation shows up when a new tag is created when creating a new thread, but trying to add that same tag to other threads brings back the code-y version.
Thanks again! I'm glad to hear you are working on updates. :)
Hello all,
I am looking for a tag cloud mod for SMF and am trying to suggest to the online currency Bitcoin community forum (bitcoin.org/smf/) to use it as a tagging system to easily label items for sale.
More specifically, I'd like it so that:
- users can only tag in the Marketplace category and nowhere else;
- Members can then click on "Tag" (or rename it to "Marketplace") in the menubar to see the items for sale;
- We can eventually create an external widget so that other sites can have the tags/marketplace on their own website.
Your help would be greatly appreciated and could be compensated by Bitcoin dollars! :)
Regards,
Switzer
Quote from: Kimmie on March 30, 2011, 12:03:38 AM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi55.tinypic.com%2F23kwydw.png&hash=0addd2c8db3b5cdb3b63d67a97936659b1bb437b)
Just noticed that I am using version 2.2.1 of this mod, but you dont have that one listed anymore. Will it matter that I will be uploading the one that is in your current version which is 2.4.2?
Shouldn't matter
Quote from: vbgamer45 on March 31, 2011, 09:50:55 PM
Shouldn't matter
K I ftp'd in, deleted the one that was there, and uploaded the new one. Its giving a new error now. The file is CHMOD 644. DOes it need to be something else?
Fatal error: require_once() [function.require]: Failed opening required '/home/*****/public_html/Themes/default/Tags2.template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/Sources/Load.php on line 2155
I have a feeling it matters, and I just screwed up the mod..lol. I have added my Load.php file so you can look at it. Tried downloading my Tags2.template file so I could also add it but I am getting this issue from my ftp program:
550 Can't open Tags2.template.php: Permission denied
ERROR:> [4/2/2011 1:23:24 AM] Requested action not taken (e.g., file or directory not found, no access).
Couldnt even edit it. Its CHMOD is 600. Does it need to be something else? (I have a feeling that my host screwed this up when they moved us to a new server)
I also just noticed that in the "owner" category on that file it shows "99"?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi51.tinypic.com%2F1hqeeq.png&hash=6aef38b347d49ffb75668e46713268b719c69ca1)
No idea what that even means. Could that be the issue?
EDIT: After doing some research on the "99", I found out that that means the permissons were changed on it and now there is basically NO owner on that file and the only one that can fix it is my host so I have contacted them and I hope for a resolution soon. I will post back here once they change it and let you know if that resolved my issue or if there are other problems with it
I didn't want Guests to see or access tags so I changed
'tags' => array(
'title' => $txt['smftags_menu'],
'href' => $scripturl . '?action=tags',
'show' => true,
'sub_buttons' => array(
),
to this
'tags' => array(
'title' => $txt['smftags_menu'],
'href' => $scripturl . '?action=tags',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
Hope that helps somewhat.
Do we have the options to tag users? I mean we can tag the forum members and they will get notification by PM when their username being tagged. Impossible eh?
Thanks in advance
Quote from: waruna on April 04, 2011, 04:33:01 PM
Do we have the options to tag users? I mean we can tag the forum members and they will get notification by PM when their username being tagged. Impossible eh?
Thanks in advance
Nice thought but wrong kinda tag system here ;)
Ok thanks CL. It's just a thought anyway :D
Is there any way that I can get the tags arranged by alpha order instead of by amount used? I really like how that is an option with the cloud works on live journal.
Quote from: mabley on March 30, 2011, 01:20:31 PM
+ You can only add one tag at a time in the [Add Tag] button in thread view. We'd like to be able to add many, just like in post view.
I'm able to add multiples, are you separating by commas?
having a problem with permissions, anyone allowed to manage tags is only allowed to delete them, they can not add tags.
they can however put in the url /index.php?action=tags;sa=addtag;topic=1 and it will let them, but the [add tag] button does not show.
this happens on all themes.
Ok fixed my problem.
change original
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
to
if(!$context['user']['is_guest'] && allowedTo('smftags_manage'))
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_manage'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
- does not look like there is a smftags_add permission setting
- why on earth let the guest view the del button?? (even tho they may not be able to) best to just hide that anyway.
Happy to share a modification to this mod (used on 1.1.13, I might provide the changes for 2.0 later). I was upset with the permission system being if it is ON then you can delete and add, so I setup another permission where the original is changed to delete, and my new one is add only. you must have both on to do both.
function AddTag()
{
global $context, $txt, $mbname, $db_prefix, $ID_MEMBER;
// Get the Topic
$topic = (int) $_REQUEST['topic'];
if (empty($topic))
fatal_error($txt['smftags_err_notopic'],false);
// Check permission
$a_manage = allowedTo('smftags_manage');
function AddTag()
{
global $context, $txt, $mbname, $db_prefix, $ID_MEMBER;
// Get the Topic
$topic = (int) $_REQUEST['topic'];
if (empty($topic))
fatal_error($txt['smftags_err_notopic'],false);
// Check permission
$a_manage = allowedTo('smftags_manage_add');
$txt['permissionname_smftags_manage'] = 'Manage Tags';
$txt['permissionhelp_smftags_manage'] = 'Users can modify the tag settings and add and remove tags';
$txt['cannot_smftags_manage'] = 'You are not allowed to manage tags.';
$txt['permissionname_smftags_manage'] = 'Manage Tags';
$txt['permissionhelp_smftags_manage'] = 'Users can modify the tag settings and add and remove tags';
$txt['cannot_smftags_manage'] = 'You are not allowed to manage tags.';
$txt['permissionname_smftags_manage_add'] = 'Add Tags';
$txt['permissionhelp_smftags_manage_add'] = 'Users can add tags';
$txt['cannot_smftags_manage_add'] = 'You are not allowed to add tags.';
do the above with utf8 if you must.
'smftags_manage' => false
'smftags_manage' => false
'smftags_manage_add' => false
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
if(!$context['user']['is_guest'] && allowedTo('smftags_manage'))
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_manage_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
most importantly this does not allow the creation of tags on new topics, unless with permission:
//Tagging system Mod
if(!isset($context['num_replies']))
//Tagging system Mod
if(!isset($context['num_replies']))
if(!$context['user']['is_guest'] && allowedTo('smftags_manage_add'))
Quote from: TGB on April 20, 2011, 06:52:57 PM
Quote from: mabley on March 30, 2011, 01:20:31 PM
+ You can only add one tag at a time in the [Add Tag] button in thread view. We'd like to be able to add many, just like in post view.
I'm able to add multiples, are you separating by commas?
D'oh! Thanks for the bonk. It works after all!
Glad you got it figured out.
Hey guys.
Well this is my problem:
http://img121.imageshack.us/img121/8673/problemanl.jpg
shouldnt be like this:
http://custom.simplemachines.org/mods/index.php?action=download;mod=579;id=22935;image
Where is the problem?
help :$
help!!! :S
Not needed. I fixed it : D
Glad you got it working
Excellent mod.
For moderated users, though, it seems that tags for unapproved posts still show up in the tag cloud. Can this be confirmed/fixed?
Thanks!
using v 2.2.1 of this mod. All of a sudden it stopped recognizing captial letters. ANy idea why?
Also, since you have another version of the mod out did you include an upgrade feature with it or do we have to completely uninstall the entire thing from all the themes and then reinstall it to all of them again? If a full uninstall is required, will that cause all tags to be lost from the database or will it remember what tags are on each thread? I ask this because I have over 50,000 threads that have 1 (or more) tags on them.
And lastly, since there is no changelog on the mod page, is there one inside the mod so that I can see what changes were made?
thanks
full uninstall will not remove the database.
We made all the keywords lowercase when inputed so no longer case sensitive.
Has anybody translate it to turkish?
I can, if needed.
Does it give out any problems with Turkish characters?
1.1.13
Update:
Actually here is the Turkish Translation:
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Etiketler';
$txt['smftags_admin'] = 'Etiket Ayarlari';
$txt['smftags_addtag'] = '[etiket ekle]';
$txt['smftags_seperate'] = 'Etiketleri Virgul ile Ayiriniz';
$txt['smftags_topic'] = 'Etiketler: ';
$txt['permissiongroup_smftags'] = 'SMF Etiketler';
$txt['permissionname_smftags_suggest'] = 'Etiket Oner';
$txt['permissionhelp_smftags_suggest'] = 'Kullanicilar Etiket Onerebilir';
$txt['cannot_smftags_suggest'] = 'Etiket Onermeye Izniniz Yok.';
$txt['permissionname_smftags_manage'] = 'Etiketleri Yonet';
$txt['permissionhelp_smftags_manage'] = 'Kullanicilar etiket ayarlarini degistirebilir, etiket ekleyebilir ve etiketleri silebilirler';
$txt['cannot_smftags_manage'] = 'Etiketleri yonetmeye izniniz yok.';
//END Tagging System Strings
Do you think you can just add it to the installation?
How to integrate with Pretty URL mod? i think it will useful. U can upgrade new to new version?
Thanks and nice day.
Thanks for the wonderful MOD.
One problem though, when I try to nake tags with Hebrew letters, its not getting created. just ignored, nothing happens.
I changed the table encoding to UTF 8, but it didnt help.
I manually inserted in the table a new tag in hebrew, it displayed fine in phpmyadmin, but it appeard on the site as "question marks".
any help would be greatly appreciated.
+++++
Some people asked for a way to edit existing tags, it can easily be done in phpmyadmin.
Ooh encoding problems.
Polish translation:
Tags.polish-utf8.php
<?php
/*
Tagging System
Version 1.0
by:vbgamer45
http://www.smfhacks.com
*/
//Tags text strings
$txt['smftags_tags'] = 'Tagi';
$txt['smftags_tagtosuggest'] = 'Sugerowane tagi:';
$txt['smftags_popular'] = 'Popularne tagi';
$txt['smftags_latest'] = 'Najnowsze tagi';
$txt['smftags_resultsfor'] = 'Wyniki dla ';
$txt['smftags_suggest'] = 'Zaproponuj tag';
$txt['smftags_addtag'] = '[Dodaj tag]';
$txt['smftags_deletetag'] = '[Usuń tag]';
$txt['smftags_addtag2'] = 'Dodaj tag';
$txt['smftags_tagtoadd'] = 'Tag do dodania';
//Tags Admin Settings
$txt['smftags_set_mintaglength'] = 'Minimalna długość tagu';
$txt['smftags_set_maxtaglength'] = 'Maksymalna długość tagu';
$txt['smftags_set_maxtags'] = 'Maksymalna ilość tagów dla wątku';
$txt['smftags_tagcloud_settings'] = 'Ustawienia chmury tagów';
$txt['smftags_set_cloud_tags_to_show'] = 'Liczba tagów do pokazania w chmurze';
$txt['smftags_set_cloud_tags_per_row'] = 'Ilość tagów na wiersz';
$txt['smftags_set_cloud_max_font_size_precent'] = 'Maksymalny rozmiar czcionki (w procentach)';
$txt['smftags_set_cloud_min_font_size_precent'] = 'Minimalny rozmiar czcionki (w procentach)';
$txt['smftags_err_deletetag'] = 'Nie posiadasz uprawnień do usuwania tagów.';
$txt['smftags_err_notopic'] = 'Nie wybrano wątku.';
$txt['smftags_err_notag'] = 'Musisz wpisać tag.';
$txt['smftags_err_mintag'] = 'Podany tag jest za krótki';
$txt['smftags_err_maxtag'] = 'Podany tag jest za długi';
$txt['smftags_err_toomaxtag'] = 'Limit tagów osiągnięty.';
$txt['smftags_err_permaddtags'] = 'Nie posiadasz uprawnień do dodawania tagów w tym wątku.';
$txt['smftags_err_alreadyexists'] = 'Taki tag już istnieje.';
$txt['smftags_settings'] = 'Ustawienia tagów';
$txt['smftags_pages'] = 'Strony: ';
$txt['smftags_savesettings'] = 'Zapisz ustawienia';
///Results Display
$txt['smftags_subject'] = 'Temat';
$txt['smftags_startedby'] = 'Zaczęty przez';
$txt['smftags_replies'] = 'Odpowiedzi';
$txt['smftags_views'] = 'Wyświetleń';
$txt['smftags_guest'] = 'Gość';
$txt['smftags_topictag'] = 'Tag';
?>
Tags.polish.php
<?php
/*
Tagging System
Version 1.0
by:vbgamer45
http://www.smfhacks.com
*/
//Tags text strings
$txt['smftags_tags'] = 'Tagi';
$txt['smftags_tagtosuggest'] = 'Sugerowane tagi:';
$txt['smftags_popular'] = 'Popularne tagi';
$txt['smftags_latest'] = 'Najnowsze tagi';
$txt['smftags_resultsfor'] = 'Wyniki dla ';
$txt['smftags_suggest'] = 'Zaproponuj tag';
$txt['smftags_addtag'] = '[Dodaj tag]';
$txt['smftags_deletetag'] = '[Usuń tag]';
$txt['smftags_addtag2'] = 'Dodaj tag';
$txt['smftags_tagtoadd'] = 'Tag do dodania';
//Tags Admin Settings
$txt['smftags_set_mintaglength'] = 'Minimalna długo¶ć tagu';
$txt['smftags_set_maxtaglength'] = 'Maksymalna długo¶ć tagu';
$txt['smftags_set_maxtags'] = 'Maksymalna ilo¶ć tagów dla w±tku';
$txt['smftags_tagcloud_settings'] = 'Ustawienia chmury tagów';
$txt['smftags_set_cloud_tags_to_show'] = 'Liczba tagów do pokazania w chmurze';
$txt['smftags_set_cloud_tags_per_row'] = 'Ilo¶ć tagów na wiersz';
$txt['smftags_set_cloud_max_font_size_precent'] = 'Maksymalny rozmiar czcionki (w
procentach)';
$txt['smftags_set_cloud_min_font_size_precent'] = 'Minimalny rozmiar czcionki (w
procentach)';
$txt['smftags_err_deletetag'] = 'Nie posiadasz uprawnień do usuwania tagów.';
$txt['smftags_err_notopic'] = 'Nie wybrano w±tku.';
$txt['smftags_err_notag'] = 'Musisz wpisać tag.';
$txt['smftags_err_mintag'] = 'Podany tag jest za krótki';
$txt['smftags_err_maxtag'] = 'Podany tag jest za długi';
$txt['smftags_err_toomaxtag'] = 'Limit tagów osi±gnięty.';
$txt['smftags_err_permaddtags'] = 'Nie posiadasz uprawnień do dodawania tagów w tym
w±tku.';
$txt['smftags_err_alreadyexists'] = 'Taki tag już istnieje.';
$txt['smftags_settings'] = 'Ustawienia tagów';
$txt['smftags_pages'] = 'Strony: ';
$txt['smftags_savesettings'] = 'Zapisz ustawienia';
///Results Display
$txt['smftags_subject'] = 'Temat';
$txt['smftags_startedby'] = 'Zaczęty przez';
$txt['smftags_replies'] = 'Odpowiedzi';
$txt['smftags_views'] = 'Wy¶wietleń';
$txt['smftags_guest'] = 'Go¶ć';
$txt['smftags_topictag'] = 'Tag';
?>
Modifications.polish-utf8.php
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Tagi';
$txt['smftags_admin'] = 'Konfiguracja tagów';
$txt['smftags_settings'] = 'Ustawienia';
$txt['smftags_addtag'] = '[Dodaj tag]';
$txt['smftags_addtag2'] = 'Dodaj tag';
$txt['smftags_seperate'] = 'Oddziel każdy tag przecinkiem';
$txt['smftags_topic'] = 'Tagi wątku: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissiongroup_simple_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Proponowanie tagów';
$txt['permissionhelp_smftags_suggest'] = 'Użytkownicy mogą proponować tagi do dodania';
$txt['cannot_smftags_suggest'] = 'Nie posiadasz uprawnień do proponowania tagów.';
$txt['permissionname_smftags_add'] = 'Dodawanie tagów do własnych wątków';
$txt['permissionhelp_smftags_add'] = 'Użytkownicy mogą dodawać tagi do własnych wątków';
$txt['cannot_smftags_add'] = 'Nie posiadasz uprawnień do dodawania tagów do wątków';
$txt['permissionname_smftags_del'] = 'Usuwanie tagów z własnych wątków';
$txt['permissionhelp_smftags_del'] = 'Użytkownicy mogą usuwać tagi z własnych wątków';
$txt['cannot_smftags_del'] = 'Nie posiadasz uprawnień do usuwania tagów';
$txt['permissionname_smftags_manage'] = 'Zarządzanie tagami';
$txt['permissionhelp_smftags_manage'] = 'Użytkownicy mogą zmieniać ustawienia tagów, dodawać nowe oraz usuwać istniejące tagi. Te uprawnienia mają zazwyczaj tylko administratorzy forum!';
$txt['cannot_smftags_manage'] = 'Nie posiadasz uprawnień do zarządzania tagami.';
//END Tagging System Strings
Modifications.polish.php
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Tagi';
$txt['smftags_admin'] = 'Konfiguracja tagów';
$txt['smftags_settings'] = 'Ustawienia';
$txt['smftags_addtag'] = '[Dodaj tag]';
$txt['smftags_addtag2'] = 'Dodaj tag';
$txt['smftags_seperate'] = 'Oddziel każdy tag przecinkiem';
$txt['smftags_topic'] = 'Tagi w±tku: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissiongroup_simple_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Proponowanie tagów';
$txt['permissionhelp_smftags_suggest'] = 'Użytkownicy mog± proponować tagi do dodania';
$txt['cannot_smftags_suggest'] = 'Nie posiadasz uprawnień do proponowania tagów.';
$txt['permissionname_smftags_add'] = 'Dodawanie tagów do własnych w±tków';
$txt['permissionhelp_smftags_add'] = 'Użytkownicy mog± dodawać tagi do własnych w±tków';
$txt['cannot_smftags_add'] = 'Nie posiadasz uprawnień do dodawania tagów do w±tków';
$txt['permissionname_smftags_del'] = 'Usuwanie tagów z własnych w±tków';
$txt['permissionhelp_smftags_del'] = 'Użytkownicy mog± usuwać tagi z własnych w±tków';
$txt['cannot_smftags_del'] = 'Nie posiadasz uprawnień do usuwania tagów';
$txt['permissionname_smftags_manage'] = 'Zarz±dzanie tagami';
$txt['permissionhelp_smftags_manage'] = 'Użytkownicy mog± zmieniać ustawienia tagów,
dodawać nowe oraz usuwać istniej±ce tagi. Te uprawnienia maj± zazwyczaj tylko
administratorzy forum!';
$txt['cannot_smftags_manage'] = 'Nie posiadasz uprawnień do zarz±dzania tagami.';
//END Tagging System Strings
Thanks for the translation!
What code I need to use to show 'tag cloud' in board index? (I want to show it in Info Center as last table)
I would like to show topic tags on message.index.php
Anybody done this succesfully?
Quote from: hillrunr on May 04, 2010, 03:47:34 PM
Playing around with the SQL that appears at that line a bit. The issue is with the count in the order by clause, which apparently isn't allowed in MySQL 4.1.22. Looking at the code, initially, I'm not sure of a workaround. Any thoughts?
Here's what I currently have for the code I'm running through phpMyAdmin. If I take the count out of the order by, it works. If I don't, it produces the error in question.
SELECT t.tag AS tag
, l.id_tag
, COUNT(l.id_tag) AS quantity
FROM smf_tags as t
, smf_tags_log as l
WHERE t.id_tag = l.id_tag
GROUP BY t.tag
, l.id_tag
ORDER BY COUNT(l.id_tag) DESC
, RAND()
LIMIT 20
UPDATE:
Find:
ORDER BY COUNT(l.id_tag) DESC
Replace with:
ORDER BY quantity
I try to run this query but i get this error again:
Invalid use of group function
File: /home/farmaceu/public_html/forum/Sources/Tags2.php
Line: 118
and once more:
This code :
http://www.simplemachines.org/community/index.php?topic=135761.msg2938361#msg2938361 gives me an error:
Fatal error: Call to undefined function tpdb_query() in /home/farmaceu/public_html/forum/Sources/Load.php(2160) : eval()'d code(114) : eval()'d code on line 7
tpdb_query() is a function defined in Tiny Portal.
Quote from: ph4ntom on July 06, 2011, 12:55:02 PM
What code I need to use to show 'tag cloud' in board index? (I want to show it in Info Center as last table)
That's a good question. I am interested in.
Doing it cross theme properly can be a pain in the rear end.
Hi I am getting an error installing this mod. I am on 2.0 and installing the latest version of this mod. Please see the attachment
Quote from: Farmacija on July 06, 2011, 05:07:19 PM
Quote from: hillrunr on May 04, 2010, 03:47:34 PM
Playing around with the SQL that appears at that line a bit. The issue is with the count in the order by clause, which apparently isn't allowed in MySQL 4.1.22. Looking at the code, initially, I'm not sure of a workaround. Any thoughts?
Here's what I currently have for the code I'm running through phpMyAdmin. If I take the count out of the order by, it works. If I don't, it produces the error in question.
SELECT t.tag AS tag
, l.id_tag
, COUNT(l.id_tag) AS quantity
FROM smf_tags as t
, smf_tags_log as l
WHERE t.id_tag = l.id_tag
GROUP BY t.tag
, l.id_tag
ORDER BY COUNT(l.id_tag) DESC
, RAND()
LIMIT 20
UPDATE:
Find:
ORDER BY COUNT(l.id_tag) DESC
Replace with:
ORDER BY quantity
I try to run this query but i get this error again:
Invalid use of group function
File: /home/farmaceu/public_html/forum/Sources/Tags2.php
Line: 118
to reply to myself:
Also Sources/Tags2.php should be edited (not just database):
Find:
ORDER BY COUNT(l.id_tag) DESC
Replace with:
ORDER BY quantity
Will think about that fix it might work but have to see if it returns the same data.
great mod. I'm using 2.0 final. Was wondering if I could remove the "Tags" link from the main menu and put it in the footer. How would I go about doing this?
You would need to edit Sources/Subs.php and remove the the tags code then edit index.template.php and include an html link for it.
Useful mod, thanks!
Is there anyway to call the tag cloud in SSI.php so I can use it on my web pages?
Hi!
Quote from: digitalmikey on August 03, 2011, 11:34:43 PM
Is there anyway to call the tag cloud in SSI.php so I can use it on my web pages?
You can use this code to use the tag-cloud on your webpage:
<?php
require_once($sourcedir . '/Tags2.php');
ViewTags();
if (isset($context['poptags']))
echo $context['poptags'];
?>
Works fine as a portamx-block.
Could you please create an option (with new user permission) for users to add/remove new/old tags to the content (any)? "Add Tags to Any Topics" and "Delete Tags From Any Topics" would be so cool!
Because right now only topic creator and moderators/admins can do that (because giving permission to everybody would likely cause a huge problem with tag-deleters, whom cannot be controlled nor punished (the lack of logs)). And, as it usually is, the topic creator forgets tagging the content. But moderators are way too busy to tag every single topic. But if every reader would be able to add tags, most certainly somebody does tagging (and if problem occurs, topic starter or moderators can easily delete incorrect tags).
Mikser's idea is a great one, a permission for non-thread starters to add tags to the thread would be very helpful.
Tags aren't showing at all in my forum. Installation was successful. I put tags in a thread, save, and come back and they are gone. Also, nothing is showing in the tag cloud.
What settings do you have for the tag cloud
Default settings. Now tags are only showing for new topics. If I try to input tags for older topics they won't show. Is this supposed to happen?
Also, tags don't stay in the tag field after you input them on a post and go back to modify it, is this also intended?
Great mod though. Anything to help with SEO is great!
reinstalled the updated mod after I upgraded to SMF 2.0 Gold last week and I am having an issue.
I have it to where folks can only add/remove tags to their own posts (the setting called Moderate Tags is UNchecked).. but I am seeing some people adding tags to other peoples posts. Is there another setting I am missing somewhere?
Thanks :)
Also, is there any way we can get the tags on the tag cloud page to where they can be lined up like in columns instead of being all crammed together? That sure would make them alot easier for folks to see each indivual tag
quick question. is there any way to automatically set as topic meta tags, the tags that are set for that specific topic?
Quote from: katmai on October 07, 2011, 12:57:16 PM
quick question. is there any way to automatically set as topic meta tags, the tags that are set for that specific topic?
Not at the moment but you can code it.
Quote from: Kimmie on September 18, 2011, 12:04:35 AM
reinstalled the updated mod after I upgraded to SMF 2.0 Gold last week and I am having an issue.
I have it to where folks can only add/remove tags to their own posts (the setting called Moderate Tags is UNchecked).. but I am seeing some people adding tags to other peoples posts. Is there another setting I am missing somewhere?
Thanks :)
Also, is there any way we can get the tags on the tag cloud page to where they can be lined up like in columns instead of being all crammed together? That sure would make them alot easier for folks to see each indivual tag
I see you still like to skip over and pick and choose who you answer. Would appreciate an answer on these things as they were posted a month ago.
Regards
There is only permissions for settings
2. Would require coding.
Generally answer the ones that I can come with a quick answer the others I skip since it would take me a while to figure out.
Thanks for a great mod!
I'd like to see a list of existing tags on the post page, so that clicking a word would add it to the list. Is there already a code for that?
Also, it would be useful to have an option to add tags only when creating a new topic.
[X] and [Add] texts should be shown only if user has the priviledge to remove or add tags.
can we have tag suggestion feature?? Which means: when we are adding tags it should suggest previously used tags.
Thanks
BUG: Tags page shows username, should show displayname (real_name in db)
Quote from: Guillelmus on November 20, 2011, 06:17:43 AM
BUG: Tags page shows username, should show displayname (real_name in db)
I don't see that in the code which SMF version and Tags version
Quote from: !RFAN on October 22, 2011, 06:42:16 AM
can we have tag suggestion feature?? Which means: when we are adding tags it should suggest previously used tags.
Thanks
+1
I would like to enable users to select tags from a list. Any tips on how to do this?
No way to do it currently would need to be built.
Actually, there is this developer who has been working on this mod for a long time now and he has added a whole lot of features. Maybe all of you could leave him a PM and motivate (i don't mean harass!) him to release a beta soon. :)
http://www.simplemachines.org/community/index.php?action=profile;u=110236
Quote from: vbgamer45 on November 20, 2011, 10:46:39 AM
Quote from: Guillelmus on November 20, 2011, 06:17:43 AM
BUG: Tags page shows username, should show displayname (real_name in db)
I don't see that in the code which SMF version and Tags version
Tagging system 2.4.2, SMF 2.0.1
Tags2.php
Line 77 SELECT t.num_replies,t.num_views,m.id_member,m.poster_name,m.subject,m.id_topic,m.poster_time, t.ID_BOARD
Should fetch real_name from members table for poster_name.
Ok will fix that in next update.
Can anyone tell me where the "Tag Cloud" string is?
I'd like to change the title in the Info Center of my forum. I've looked in index.template.php, modifications.english.php., subs.php,et. al....I can't seem to locate it.
Thanks.
-s.w
Might be in Tags.english.php
Quote from: vbgamer45 on November 29, 2011, 12:54:00 PM
Might be in Tags.english.php
Nope.
I used Firebug to get this (regarding both the image and the text string:)
<span class="ie6_header floatleft">
<img class="icon" alt="Tag Cloud" src="http://******forum.tk/Themes/Prince_of_Darkness_201/images/stats_replies.gif">
Tag Cloud
</span>
I can test edit that "Tag Cloud" and it responds; I just need to find that <span> tag (I think.)
-s.w
Hmm check themes/default/tags.template.php shouldn't be hardcoded though
I found it.
It was in my Cumulus.english.php file. Thanks vbgamer. Very nice mod.
-s.w
Thanks glad you enjoy it.
Quote from: vbgamer45 on November 28, 2011, 12:50:55 PM
Ok will fix that in next update.
This is like music to me. This mod badly needs bug fix update. Even a minor one, just to keep it up-to-date.
How do I add capital letters? All my tags are in lower case and I'm too dumb to try to fix it myself.
Any help in this matter is appreciated.
-s.w
Here is what I have noticed about capitol letters and punctuation.
- If you FIRST CREATE the tag WHEN YOU CREATE THE POST or in a REPLY, the capitalization and punctuation will be entered just like you want.
- The ORIGINAL capitalization will now PERSIST even if you add tags with different capitalization.
- If you first create the tag in the [Add Tag] thing at the bottom of the thread, then it will IGNORE CAPITALIZATION and that will persist for any new entries of that tag.
- Apostrophes ' like in O'Malley or Sarah's Socks will DIE HORRIBLE DEATHS if you add the tag in the topic view. [Add Tag] Even if they were originally entered correctly in the Post View, they will still die if you try to add it in the topic view.
If you want to change a tag to capital letters you have to go find all the lowercase tags, delete them all, and create a NEW tag with the proper capitals in the Post View.
Quote from: studiowi33 on November 30, 2011, 12:20:40 PM
How do I add capital letters? All my tags are in lower case and I'm too dumb to try to fix it myself.
Any help in this matter is appreciated.
-s.w
The mod is built to make everything lowercase to avoid duplicate tags for the same word.
QuoteApostrophes ' like in O'Malley or Sarah's Socks will DIE HORRIBLE DEATHS if you add the tag in the topic view. [Add Tag] Even if they were originally entered correctly in the Post View, they will still die if you try to add it in the topic view
The data isn't escaped prior to going in the database.
Workaround: Escape it yourself. Thus, an apostrophe shooed get a backslash prepended to it, like this:
\'
What do you mean, Live627?
I could enter Sarah\'s Socks and it'd go in right? Or what?
U guys are AWEsome!
Thanks mabley, vbgamer, and live627.
Much better tags.
-s.w
Quote from: mabley on November 30, 2011, 05:45:14 PM
What do you mean, Live627?
I could enter Sarah\'s Socks and it'd go in right? Or what?
Yes. And it would appear correctly, too. Sarah\'s socks => Sarah's socks.
Quote from: live627 on November 30, 2011, 09:29:35 PM
Quote from: mabley on November 30, 2011, 05:45:14 PM
What do you mean, Live627?
I could enter Sarah\'s Socks and it'd go in right? Or what?
Yes. And it would appear correctly, too. Sarah\'s socks => Sarah's socks.
But (with my forum) this only works with tags entered in the Tags box directly under the Title of a POST or REPLY. It doesn't work with the [Add Tag] thing at the bottom of a thread.
-s.w
vbgamer45, is there an ETA for the next bug fix release?
I am waiting on receiving the code for the updated version of tagging system have a sent a pm waiting for a reply.
Just had this installed today..awesome mod!!!! Since I run Simple Portal, I am having my tags show up in a block that I created, so.....can I remove the menu button that the mod automatically installs without messing anything up? I don't need it now. Thanks!
Quote from: Lolafish on December 03, 2011, 08:14:06 PM
Just had this installed today..awesome mod!!!! Since I run Simple Portal, I am having my tags show up in a block that I created, so.....can I remove the menu button that the mod automatically installs without messing anything up? I don't need it now. Thanks!
Do you mind sharing your block code, I might use it if thats ok.
Quote from: jswift on November 25, 2011, 01:00:42 AM
I would like to enable users to select tags from a list. Any tips on how to do this?
You may test this
In Post.template.php replace the portion "// Tagging system Mod" to "//End Tagging system mod" with the following
// Tags mod with cloud
if(!isset($context['num_replies']))
{
echo '
<dt>
<b>', $txt['smftags_topic'], '</b>
</dt>
<dd>
<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
</dd>
<script language="JavaScript" type="text/JavaScript">
function AddItem(ItemId)
{
document.postmodify.tags.value = document.postmodify.tags.value + ItemId + \',\';
}
</script>';
require_once('Tags2.php');
ViewTags();
foreach ($context['alltags'] as $key => $value) echo '<a href="#" onclick="AddItem(\''.$key.'\')">'.$key.'</a> ';
}
//End Tagging system mod
In Tags2.php add this to somewhere
$context['alltags'] = $tags;
for example after the text // loop through our tag array
BUG REPORT:
In Post.template.php
if(!isset($context['num_replies']))
should be replaced with
if(!isset($context['previous_posts']))
-> Show tags only when posting a new message. Currently shows also when replying, but this makes no sense.
Quote from: TGB on December 04, 2011, 02:09:00 PM
Quote from: Lolafish on December 03, 2011, 08:14:06 PM
Just had this installed today..awesome mod!!!! Since I run Simple Portal, I am having my tags show up in a block that I created, so.....can I remove the menu button that the mod automatically installs without messing anything up? I don't need it now. Thanks!
Do you mind sharing your block code, I might use it if thats ok.
I don't own the code...got it from the Simple Portal website, but it works perfectly:
Quoteglobal $context, $txt, $mbname,$scripturl, $user_info, $smcFunc, $modSettings;
// Tag cloud from http://www.prism-perfect.net/archive/php-tag-cloud-tutorial/
$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 " . $modSettings['smftags_set_cloud_tags_to_show']);
// here we loop through the results and put them into a simple array:
// $tag['thing1'] = 12;
// $tag['thing2'] = 25;
// etc. so we can use all the nifty array functions
// to calculate the font-size of each tag
$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)
{
// change these font sizes if you will
$max_size = $modSettings['smftags_set_cloud_max_font_size_precent']; // max font size in %
$min_size = $modSettings['smftags_set_cloud_min_font_size_precent']; // min font size in %
// get the largest and smallest array values
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));
// find the range of values
$spread = $max_qty - $min_qty;
if (0 == $spread)
{ // we don't want to divide by zero
$spread = 1;
}
// determine the font-size increment
// this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);
// loop through our tag array
$context['poptags'] = '';
$row_count = 0;
foreach ($tags as $key => $value)
{
$row_count++;
// calculate CSS font-size
// find the $value in excess of $min_qty
// multiply by the font-size increment ($size)
// and add the $min_size set above
$size = $min_size + (($value - $min_qty) * $step);
// uncomment if you want sizes in whole %:
// $size = ceil($size);
// you'll need to put the link destination in place of the #
// (assuming your tag links to some sort of details page)
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
// perhaps adjust this title attribute for the things that are tagged
$context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
$context['poptags'] .= '>'.$key.'</a> ';
if ($row_count > ($modSettings['smftags_set_cloud_tags_per_row']-1))
{
$context['poptags'] .= '<br />';
$row_count =0;
}
// notice the space at the end of the link
}
}
// Find Results
$dbresult = $smcFunc['db_query']('', "
SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,m.poster_name,m.subject,m.id_topic,m.poster_time, t.id_board
FROM ({db_prefix}tags_log as l,{db_prefix}boards AS b, {db_prefix}topics as t, {db_prefix}messages as m)
WHERE b.ID_BOARD = t.id_board AND l.ID_TOPIC = t.id_topic AND t.approved = 1 AND t.id_first_msg = m.id_msg AND " . $user_info['query_see_board'] . " ORDER BY l.ID DESC LIMIT 20");
$context['tags_topics'] = array();
while ($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$context['tags_topics'][] = array(
'id_member' => $row['id_member'],
'poster_name' => $row['poster_name'],
'subject' => $row['subject'],
'id_topic' => $row['id_topic'],
'poster_time' => $row['poster_time'],
'num_views' => $row['num_views'],
'num_replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($dbresult);
echo'
<center>';
if (isset($context['poptags']))
echo $context['poptags'];
echo'
</center>';
Quote from: Lolafish on December 04, 2011, 07:31:03 PM
Quote from: TGB on December 04, 2011, 02:09:00 PM
Quote from: Lolafish on December 03, 2011, 08:14:06 PM
Just had this installed today..awesome mod!!!! Since I run Simple Portal, I am having my tags show up in a block that I created, so.....can I remove the menu button that the mod automatically installs without messing anything up? I don't need it now. Thanks!
Do you mind sharing your block code, I might use it if thats ok.
I don't own the code...got it from the Simple Portal website, but it works perfectly:
More simply put:
global $sourcedir, $txt, $context, $scripturl;
require_once($sourcedir . '/Tags2.php');
ViewTags();
if (isset($context['poptags'])) echo $context['poptags'];
Don't you wanna make a Tagging System For POSTS mod too? :) It would be just wonderful, if I click on a tag, and then see all of the posts (date sorted and) tagged with that tag :)
Quote from: Grimedth on December 06, 2011, 11:51:59 AM
Don't you wanna make a Tagging System For POSTS mod too? :) It would be just wonderful, if I click on a tag, and then see all of the posts (date sorted and) tagged with that tag :)
Maybe one day.
I have a problem with this mod.
I installed it and it showed me after I wanted to reply to a topic:
QuoteTemplate Parse Error!
There was a problem loading the /Themes/default/Post.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.
You may want to try to refresh this page or use the default theme.
Parse error: syntax error, unexpected T_STRING in .../Themes/default/Post.template.php on line 206
197: echo '
198: <dt>
199: <span', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">', $txt['subject'], ':</span>
200: </dt>
201: <dd>
202: <input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" class="input_text" />
203: </dd>';
204: ';
205: // Tagging system Mod
206: if(!isset($context['num_replies']))
207: {
208: echo '
209: <dt>
210: <b>', $txt['smftags_topic'], '</b>
What can I do to fix this error? I already deleted the mod but nothing has changed.
Line 204 should be cleared
Quote from: live627 on December 09, 2011, 07:26:33 PM
Line 204 should be cleared
Thank you for the help.
But now it shows me this error:
QuoteParse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/Post.template.php on line 246
237: }
238:
239:
240: //End Tagging system mod
241: echo '
242:
243:
244:
245:
246: $boards = !empty($modSettings['topic_descriptions_boards']) ? explode(",", $modSettings['topic_descriptions_boards']) : array();
247: if (!empty($modSettings['topic_descriptions_enable']) && $context['is_first_post'] && !in_array($context['current_board'], $boards)) {
248: echo ' <dt>
249: <span id="caption_description">' . $txt['topic_descriptions_post_desc'] . '</span>
250: </dt>
Remove
Quote
240: //End Tagging system mod
241: echo '
Quote from: vbgamer45 on December 10, 2011, 10:39:56 AM
Remove
Quote
240: //End Tagging system mod
241: echo '
Thank you! That helped me!
Glad to help.
Sorry for reply, but i spent last 4 hours to find where is problem on my SMF 2.0.1., and this is my last option.
I was install "Tagging System For Topics" , and after that i delete it..
After next instalation of Tagging System For Topics , i got 2 [ADD TAG] button on post page.
After clicking on ADD TAG button, on "?action=tags;sa=addtag" , i had two fields for Tag to Add, but i fix it (now is OK).
Everything is working fine now, but....
In bottom of post, i have 2 ADD TAG button :)
Where i can find this error , to delete one row?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ffotkica.com%2Fimgs3%2F1_69660652_tag.jpg&hash=e4bb397ba2be73c7ae81cddd9f9b1d8b2174b203)
P.S. I translate button AFTER error.
Thanks
A classic case of code duplication. Not fun. Maybe it'll get fixed if you ininstall?
Quote from: live627 on December 10, 2011, 05:56:13 PM
A classic case of code duplication. Not fun. Maybe it'll get fixed if you ininstall?
I tryed to uninstal, but i still have word
Tags, one row, but without [Add Tag] button on bottom of post..
I forgoth to say, when i type come TAG word in first field, automaticly same word from first row is in seccond row.
Duplicate code in the display.template.php I would get the manual install instructions from the modsite then remove any duplicate entries in the files.
vbgamer45 Tnx.
Problem resolved, in Display.template.php i miss one duplicated CODE ( // Tagging System )
Thanks a lot.
In case this is useful for anyone:
We use the tags mod on our country blues music site running SMF 2.0.2, and it's become indispensable, kudos to the developers.
Because of the nature of the site we use tags more like a book index, and the cloud concept doesn't really do it for us.
We needed a full alphabetical tags index sorted vertically, like a book index. Check it out. The path contains 'yabbse' but we've been SMF for a long time:
http://weeniecampbell.com/yabbse/index.php?page=tagsindex (http://weeniecampbell.com/yabbse/index.php?page=tagsindex)
Plus we didn't want it changing title case to lower case so we took that out.
Here's the code. It's implemented as a Simple Portal page, type is PHP, accessed via a custom button (another mod). Alternatively you could use the custom action mod and plug it in that way.
If it's useful for your site, or the developers want to incorporate it into the mod somehow, please feel free to grab the code. Note that if you want to use it for SMF 1 versions one of the column names in one of the tag tables changed; you'd have to mod the code, I seem to recall it was a column named "id" previously that changed to "id_tag" at some point.
global $scripturl, $db_prefix;
// put a 'Top' jump-to destination
echo '<a name="Top">';
// start the top table
echo '<table border="0" width="100%" cellspacing="1" cellpadding="4" class="tborder"><tr>';
// output the helpful hint cell
echo '<td class="catbg3" width="70%">Tagging helps to preserve and organize the content posted on the site. Before tagging a post or topic please check here to see if there is already a tag running that is appropriate for your post. Use the same format, capitalization and spelling to ensure your entry is grouped within the existing tag. <a href="put your own url to a post on the forum about it">Click here</a> for more details.<br><br></td><td align="right" valign="top" width="30%"><b>';
// output the ABC jump index cell and close off the top table
for ($i=65; $i<=90; $i++) {
$x = chr($i);
echo ' <a href="#' . $x .'"\>' . $x . '</a>';
}
echo "</b></td></tr></table>";
// build array of tags; loading tag list into an array simplifies outputting alphabetically vertically
// ===================================================================================================
// note: to get more or fewer cols across page change value of $nbrCols
$nbrCols = 6;
$arCellContent = array();
$nbrTags = 0;
$colWidth = 100 / $nbrCols;
// prep the SQL
$query = "SELECT id_tag, tag FROM " .$db_prefix."tags ORDER BY TRIM(UPPER(tag))";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// read til eof, load html into array
while ($row = mysql_fetch_array($result)) {
$nbrTags++;
$cellContent = '';
// if the initial char has changed add a jump anchor destination for the ABC index, and the visual block letter cue
$thisLetter = strtoupper(substr(trim($row[tag]) ,0 ,1));
if (strcmp($thisLetter, $currentLetter) <> 0) {
$currentLetter = $thisLetter;
$cellContent = '<a name="'.$currentLetter.'"><b><span style="background-color:#ac7b2b; color:#fff3cf;"> '.$currentLetter.' </span></b> ';
}
// set the tag destination url, concatenating in case there's stuff in $cellContent already
$cellContent = $cellContent."<a href=\"$scripturl?option=com_smf&action=tags;tagid={$row["id_tag"]}\">{$row[tag]}</a>";
$arCellContent[$nbrTags] = $cellContent;
}
// close the previous sql result set
mysql_free_result($result);
$nbrTagsActual = $nbrTags;
// do some intermediate things
// ===========================
// add dummy null array entries until # of elements is evenly divisible by the
// number of columns(i.e. table is rectangular), greatly simplifies the output logic
while ($nbrTags % $nbrCols <> 0) {
$nbrTags++;
$arCellContent[$nbrTags] = '';
};
// calc the vertical length of all columns, after which x axis = $nbrCols and y = $nbrRows
$nbrRows = $nbrTags / $nbrCols;
// calc the array offsets for each column's start index and put in array(nbrCols)
$workInt = 1;
$arColOffset = array($nbrCols);
$arColOffset[1] = 1;
for ($currentIndex = 2; $currentIndex <= $nbrCols; $currentIndex++) {
$workInt = $workInt + $nbrRows;
$arColOffset[$currentIndex] = $workInt;
}
// output main table html in n table columns across the page
// =========================================================
echo '<table border="0" width="100%" cellspacing="1" cellpadding="4" class="tborder">';
// process tag list array in columns
// outer loop, output until all rows done
for ($currentRow = 1; $currentRow <= $nbrRows; $currentRow++) {
// inner loop, build a row and output
echo '<tr>';
for ($colCount = 1; $colCount <= $nbrCols; $colCount++) {
$ix = $arColOffset[$colCount];
echo '<td class="windowbg" valign="middle" width=".$colWidth.%">'.$arCellContent[$ix].'</td>';
$arColOffset[$colCount] = $ix + 1;
}
echo '</tr>';
}
// close off the main tags table
echo '</table>';
// create the stats table and Top jump
// ===================================
$query = "SELECT COUNT(DISTINCT id_topic) AS topicCount FROM ".$db_prefix."tags_log";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// get the nbr of assigned topics value and create the stats string
$row = mysql_fetch_array($result);
$stats = $nbrTagsActual.' tags in the system over '.$row['topicCount'].' topics';
// close the previous sql result set
mysql_free_result($result);
// output the stats and a link to jump to top of page, that's all
echo '<table border="0" width="100%" cellspacing="1" cellpadding="4" class="tborder">';
echo '<tr><td class="catbg3">'.$stats.'</td><td align="right"><a href="#Top"><b>Top</b></a></td></tr></table>';
Biggest wish-list item at present is the ability to merge tags. It would make life a lot easier for the tag mods group we've set up. I see that was mentioned as a future enhancement a few pages back in January 2011, but I'd guess the developers have had their hands pretty full with SMF 2 going GA this year.
Thank you Rivers for the php function maybe helpful for users.
Hi vbgamer,
Will this mod use a lot of server resources? If I use this MOD, will it affect the speed of my forum?
How does the mod affect my position in search engine?
Thanks.
Does not use a lot of resources. Adds one query on certain pages.
Does not affect search engine rankings.
Thanks vbgamer. I don't want my forum title to appear on the Tagid page. I want each tag to stand alone without the forum title. How shall I edit it?
Look into Sources/Tags.php file that file contains the page title settings
Hi all,
I am now using smf2.0.2 it was 2.0.1 but I installed the patch through the package manager. among the mods I have installed is tag system. I recently changed my host.
now I found out that when I try to delete a tag from topic I get this error, yet I have no problem with adding a tag.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
File: /Sources/Tags2.php
Line: 491
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.2, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.
does this sound familiar to you. I contacted the new server guy and he repaired the table for me but that did not fix the problem. I was gonna upload upgrade.php and run it on my server and I think I also need to upload .sql files along. I have one question do you think I need to do this after installing the patch?
also if so do I need to uninstall all mods then reinstall them?
oh and I forgot to say I have tagging system 2.4.2 but I think this mod was updated once after I installed it but still the same version number.
thanks
Hey VB. I installed this mod about 2 weeks ago and love it. Everything seems to be working correctly, but my error log is getting flooded with a couple of errors. I need help correcting them.
First off, I'm using SMF 2.0 RC5 and Simple Portal 2.3.4. Here are my error codes.
8: Use of undefined constant tag - assumed 'tag'
File: /home/*****/public_html/Sources/PortalBlocks.php(3562) : eval()'d code
Line: 57
8: Use of undefined constant tag - assumed 'tag'
File: /home/*****/public_html/Sources/PortalBlocks.php(3562) : eval()'d code
Line: 49
Those are the only 2 I see. But I have several thousand pages of errors. Thanks for your time!
Are you using tagging portal block?
You know, I was using a special block that I deactivated this morning. I haven't had any errors since. I bet that was it. I will get back to you in a few days to tell you if that was it. Thanks for reminding me about that. (and you didn't even know it) LOL
Yeah if it is a block post the block code I can try to look at it and see what is up.
This mod is well overdue for a major update. The future of this mod is beginning to look bleak now, despite having a huge potential. :(
vbgamer, if it's any motivation, you could offer Tagging System Pro and i would definitely buy it in a blink, as well as other members i'm sure.
Possibly I am working with another person on the next update.
Currently moving offices then I plan to hire more developers once things settle down and have the new sales team ready so I think I can move some resources towards these mods will take a while to get people to up to speed though.
Quote from: sharks on February 01, 2012, 11:01:01 AM
vbgamer, if it's any motivation, you could offer Tagging System Pro and i would definitely buy it in a blink, as well as other members i'm sure.
I second that.
How about a teaser then? :)
I've been slowly working on improving this mod in my increasingly rare spare time. I have finally got what I hope is pretty the final pre-release code base for SMF 1.1, which hopefully means the port for 2.0 is not much further away thanks to vbgamer45.
So, here are some screenshots from the 1.1 version - note the ability to toggle the manual (editbox) tagging and the list (checkbox tree) tagging independently
It looks very good, stefann. :D I hope to see it released soon.
That looks great! I hope the upgrade don't be too hard!
Wow, looks like a great job, I bet it will be awesome.
Thanks for all your work and for keeping us posted.
And please, provide us with a paypal account where we can contribute in some way. I 'm sure some of us won't mind to help.
Is there a way to add a seperator to the tags? For example;
[ tag1 ] [ tag2 ] instead of tag1 tag2
Quote from: wolfetundra on February 12, 2012, 03:40:32 PM
Is there a way to add a seperator to the tags? For example;
[ tag1 ] [ tag2 ] instead of tag1 tag2
For the next release: yes and no.
For manual tagging display on the topic pages, you will be able to choose a delimiter for input and display, which in the screenshots is ~ but defaults to , which is configurable in the admin settings.
For list tagging text display on the topic pages, it defaults to a little · character to separate the tags which is configurable in the language files, but it's a separator only, you couldn't add brackets around each tag without changing the code.
For the tag cloud itself there is no separator, however the links will be underlined when hovered over which helps, and more tags are applied the chances that two tags of similar quantity are next to each other reduce quite rapidly.
The tag cloud behaviour is changed in 3 ways:
- automatic wrapping to best fit the page, without breaking in the middle of tags
- configurable sorting order, defaults to count, but convention is alphabetical
- the database query is improved to show the optimal tags, and will randomise the last tags if there are several tags drawing for "last place" on the cloud
I hope one of those answers your question, as I'm not sure which one exactly you were asking about :)
You nailed it. You even answered some questions for me that I didn't even ask so double points!
I know there's not currently a way to search the tags. Could you point me in the direction of a way to achieve it? The basics are there, I'm just not sure how to get them.
Quote from: wolfetundra on February 12, 2012, 11:21:33 PM
I know there's not currently a way to search the tags. Could you point me in the direction of a way to achieve it? The basics are there, I'm just not sure how to get them.
If the list tags option is enabled by the administrator, this will show anyone with the ability to suggest/edit tags the list of all the tags available, using the tree hierarchy. Otherwise, if you want a linear list, the best that is intended for the next release is the viewall page as attached above, which allows those with the "Manage Tags" permission (intended only for moderators) to view all the tags in a full screen table.
It would not be incredibly hard to code a search for tags, ideally at the database level. This is one of the many things brainstormed for future releases, but is probably unlikely to happen any time soon, unless someone wants to contribute it of course :)
I have a search feature that half works.
First, I created a new table joining messages, tags, and tags_log
CREATE TABLE search_tags
AS (SELECT tags.id_tag, messages.subject, tags.tag, tags_log.id_topic
FROM messages, tags, tags_log);
Next, I created a search script (search.php);
<h2>Search</h2>
<form name="search" method="post" action="<?=$PHP_SELF?>">
Seach for: <input type="text" name="find" /> in
<Select NAME="field">
<Option VALUE="tag">tag</option>
</Select>
<input type="hidden" name="searching" value="yes" />
<input type="submit" name="search" value="Search" />
</form>
<?
$field = $_POST['field'] ;
$find = $_POST['find'] ;
$searching = $_POST['searching'] ;
//This is only displayed if they have submitted the form
if ($searching =="yes")
{
echo "<h2>Results</h2><p>";
//If they did not enter a search term we give them an error
if ($find == "")
{
echo "<p>You forgot to enter a search term";
exit;
}
mysql_connect("host", "user", "password") or die(mysql_error());
mysql_select_db("database") or die(mysql_error());
// We preform a bit of filtering
$find = strtoupper($find);
$find = strip_tags($find);
$find = trim ($find);
//Now we search for our search term, in the field the user specified
$data = mysql_query("SELECT * FROM search_tags WHERE upper($field) LIKE'%$find%'");
//And we display the results
while($result = mysql_fetch_array( $data ))
{
echo " ";
echo "Topic ID: {$result['id_topic']}";
echo "<br>";
Print "<a href=/index.php?topic={$result['id_topic']} target=new>{$result['subject']}</a>";
echo "<br>";
echo "<br>";
}
//This counts the number or results - and if there wasn't any it gives them a little message explaining that
$anymatches=mysql_num_rows($data);
if ($anymatches == 0)
{
echo "Sorry, but we can not find an entry to match your query<br><br>";
}
//And we remind them what they searched for
echo "<b>Searched For:</b> " .$find;
}
?>
It works, but I need a way to update "search_tags" table each time the form is accessed or a way to do it automatically every x amount of time. Also, you get duplicates from Subject and RE:Subject. Otherwise, it works. What do you think?
Hi there. I installed SubAccounts and now Tagging System is no longer working.
The Tags page does nothing but show us the index page of the forum. Preexisting tags still show and lead to urls like http://infinity.cyanfire.net/index.php?action=tags;tagid=19 but, we still see forum homepage. :/
We can't add new tags anymore either. :/ We didn't remove anything. ARe the two plugins incompatable? If so, how can I fix it? Thanks.
Hi all,
I dont know if this issue just me or all. when I forbid members to add tags to their topics they still able to add tags when creating new topic or edit old topics, yet the add tag option at the bottom of the topic is gone!
I too have this issue. Permissions to member groups are not being honored.
vbgamer45, is there any news of the release of the long-awaited next version of this great mod? There are so many issues, at least a bug fix release would allow to wait for next major release, without experiencing too many complications in the meantime.
Been really busy last couple of weeks buying new house etc.
Will the next release include autotagger that can use the subject or post contents?
Not sure still in development hopefully get something out in the a couple weeks
Waiting with bated breath... 8)
It's been "a couple of weeks".
Waiting... waiting... waiting... Forever!
Such huge potential in this mod, poured down the drain.
I have hired some help to work on this.
The issue here is really I have to find all the edits that the mod has made to normal SMF's files then package it up.
Quote from: vbgamer45 on April 16, 2012, 12:16:33 PM
Not sure still in development hopefully get something out in the a couple weeks
OK. Thanks.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg204.imageshack.us%2Fimg204%2F6633%2F31388662.jpg&hash=6f714792df2e062c6e4441efc6d5d7b1443995d6)
---->
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg36.imageshack.us%2Fimg36%2F6003%2F13760115.jpg&hash=5541f206db9e5fa96ff89d2b1de41d1c086ee2fd)
how do I ?
I've tried. but I can not run
<script type="text/javascript">
function displayResult(browser)
{
document.getElementById("result").value=browser
}
</script>
<script type="text/javascript">
function divYap(){
var yeni = document.createElement("div");
yeni.innerHTML = document.getElementById("result").value
yeni.className = "ornekSinif";
return yeni;
}
function appendChild_ile_ekle() {
var div = document.getElementById("ornekDiv");
div.appendChild( divYap() );
}
</script>
<input type="radio" name="browser" onclick="displayResult(this.value)" value="Internet Explorer">Internet Explorer<br />
<input type="radio" name="browser" onclick="displayResult(this.value)" value="Firefox, ">Firefox<br />
<input type="radio" name="browser" onclick="displayResult(this.value)" value="Opera, ">Opera<br />
<input type="radio" name="browser" onclick="displayResult(this.value)" value="Google Chrome, ">Google Chrome<br />
<input type="radio" name="browser" onclick="displayResult(this.value)" value="Safari, ">Safari<br /><br />
<input id="result" />
<input type="button" value="Tür Ekle" onClick="appendChild_ile_ekle()" />
<div id="ornekDiv" style="padding:3px;">
</div>
Or...
<script type="text/javascript">
function displayResult(browser)
{
document.getElementById("result").value=browser
}
</script>
<input type="checkbox" name="browser" onclick="displayResult(this.value)" value="Internet Explorer">Internet Explorer<br />
<input type="checkbox" name="browser" onclick="displayResult(this.value)" value="Firefox, ">Firefox<br />
<input type="checkbox" name="browser" onclick="displayResult(this.value)" value="Opera, ">Opera<br />
<input type="checkbox" name="browser" onclick="displayResult(this.value)" value="Google Chrome, ">Google Chrome<br />
<input type="checkbox" name="browser" onclick="displayResult(this.value)" value="Safari, ">Safari<br /><br />
<td width="28%" class="windowbg2" align="right"><span class="gen"><b>', $txt['smftags_tagtoadd'], '</b></span></td>
<td width="72%" class="windowbg2"><input type="text" id="result" name="tag" size="64" maxlength="100" /></td>
</tr>
Not sure what you are asking? The code above is not from the modification
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.anitr.com%2Fresim%2Fimages%2Ftur3.jpg&hash=84a3529e57bab0de892c26ec040d427016f64cd2)
I managed to ^. ^
Hi vbgamer,
I think I've accidentally installed the Tagging System package twice, so the tags appear twice. See screenshot. I've tried uninstalling and re-installing the package, but that doesn't work. (When I uninstall, it completely removes the entire Tagging System package. When I reinstall, it adds back the double tagging). Can you help me fix this?
Looking at using this as a base for my new redesign to feed the home page, i.e. topics are tagged and then with a few new ssi features can be pulled out as required, will require a fair bit of stripping down though to remove the tag list and cloud etc as the queries used for them could do with some optimisation. With 286,000 entries in smf_tag_logs, the tags action resulted in a query that ran for over 60 seconds before I killed it. Similar for clicking on a tag in a topic listing. Not a biggie for me as I will be removing those anyway as all I want it the ability to add tags to a topic and pull them out using ssi.php.
When I've added my ssi.php stuff I'll contribute it back in case it is useful to anyone else.
Do you know what the exact query was?
Here is what I would do to speed it up
ALTER TABLE smf_tags_log add index ID_MEMBER (ID_MEMBER);
ALTER TABLE smf_tags_log add index ID_TOPIC (ID_TOPIC);
This will make those queries process extremely fast.
Still had it installed so queries below. Adding those indexes doesn't help, still takes over 200 seconds.
action=tags
SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,
m.poster_name,m.subject,m.id_topic,m.poster_time,
t.id_board, g.tag, g.ID_TAG
FROM (yabbse_tags_log as l, yabbse_boards AS b, yabbse_topics as t, yabbse_messages as m)
LEFT JOIN yabbse_tags AS g ON (l.ID_TAG = g.ID_TAG)
WHERE b.ID_BOARD = t.id_board AND l.ID_TOPIC = t.id_topic AND t.approved = 1 AND t.id_first_msg = m.id_msg AND 1=1 ORDER BY l.ID DESC LIMIT 20
"id";"select_type";"table";"type";"possible_keys";"key";"key_len";"ref";"rows";"Extra"
"1";"SIMPLE";"b";"index";"id_board";"id_board";"2";NULL;"29";"Using index; Using temporary; Using filesort"
"1";"SIMPLE";"t";"ref";"PRIMARY,firstMessage,ID_BOARD,approved,last_message_sticky,board_news";"board_news";"2";"rawk_forum.b.id_board";"2698";"Using where"
"1";"SIMPLE";"l";"ref";"ID_TOPIC";"ID_TOPIC";"3";"rawk_forum.t.id_topic";"1";""
"1";"SIMPLE";"g";"eq_ref";"PRIMARY";"PRIMARY";"3";"rawk_forum.l.id_tag";"1";""
"1";"SIMPLE";"m";"eq_ref";"PRIMARY";"PRIMARY";"4";"rawk_forum.t.id_first_msg";"1";""
?action=tags;tagid=1
SELECT count(*) as total
FROM (yabbse_tags_log as l, yabbse_boards AS b, yabbse_topics as t, yabbse_messages as m)
WHERE l.ID_TAG = 1 AND b.ID_BOARD = t.ID_BOARD AND l.ID_TOPIC = t.id_topic AND t.approved = 1
AND t.ID_FIRST_MSG = m.ID_MSG AND 1=1
"id";"select_type";"table";"type";"possible_keys";"key";"key_len";"ref";"rows";"Extra"
"1";"SIMPLE";"b";"index";"id_board";"id_board";"2";NULL;"29";"Using index"
"1";"SIMPLE";"t";"ref";"PRIMARY,firstMessage,ID_BOARD,approved,last_message_sticky,board_news";"board_news";"2";"rawk_forum.b.id_board";"2698";"Using where"
"1";"SIMPLE";"l";"ref";"ID_TOPIC";"ID_TOPIC";"3";"rawk_forum.t.id_topic";"1";"Using where"
"1";"SIMPLE";"m";"eq_ref";"PRIMARY";"PRIMARY";"4";"rawk_forum.t.id_first_msg";"1";"Using index"
Hmm lets try an order change try this
SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,
m.poster_name,m.subject,m.id_topic,m.poster_time,
t.id_board, g.tag, g.ID_TAG
FROM (yabbse_tags_log as l, yabbse_boards AS b, yabbse_topics as t, yabbse_messages as m)
LEFT JOIN yabbse_tags AS g ON (l.ID_TAG = g.ID_TAG)
WHERE l.ID_TOPIC = t.id_topic AND t.id_first_msg = m.id_msg AND b.ID_BOARD = t.id_board AND t.approved = 1 AND 1=1 ORDER BY l.ID DESC LIMIT 20
Also one more index
ALTER TABLE smf_tags_log add index id_tag (id_tag);
Just checking up on this mod. I have it installed and it's used quite a bit. I've changed the "look" the entry and stats/cloud screen to match 2.0.2 headers etc... but there are a few things that I don't have the skill to do.... and I was wondering if they are on the "list" of improvements?
First off, some punctuation isn't parsing right and comes out as the code for said punctuation (comma, ampersand, more likely).
Secondly, this mod is SCREAMING for a javascript/some other way to enter the tag on the fly without having to load a separate page and/or reload the page... similar to Vbulletins tags...
Thanks!
I have a developer assigned to work on this mod. Hopefully either end of this month or next month.
Hello,
The text Tags: not showing on new post pages. Please help me to make that showing vbgamer45
Should be in your themes/default/languages/modifications.english.php
If you have a custom theme with a modifications.english.php it would need to be copied their too
And also to any modifications.*.php in your default theme languages folder.
Please give me the steps? Your reply so pro. I'm totally beginner
Me copied modifications.english.php to the using themes language folder but not showing. Still waiting for reply
IF SMF 2.0 try to clear cache under forum maintenance.
Quote from: SMFHacks.com Team on June 22, 2012, 01:46:56 AM
IF SMF 2.0 try to clear cache under forum maintenance.
Not working! Cleared cache too
Using theme is Inferno Design By DzinerStudio
I'm also getting 250+ error logs when starting a new posts.
http://mysite.com.com/index.php?pretty;action=admin&area=logs;sa=errorlog;desc8:
Undefined index: smftags_setting
Uninstall for now. We hope to have a new version in the next couple of months.
Thanks dude
Hello,
Firstly, thank you that 2.4.2 works perfect in my smf 2.0.2, so far.
However, I need some helps.
I would like to limit Tag system in one Category only, not entire forum. If possible i also want to predefine the tags (users cant type their own tags instead of selecting predefined words).
Please let me know if it is possible and how to? My coding knowledge is sub-zero, so kindly provide me very basic and step-by-step explanation.
Sorry if it is just an old issue, as it is hard to come across all 50 previous pages of the topic.
Thank you very much.
:)
was looking for something like this, I have searched the topic and have not found an answer so if i missed it i apologize.
I have installed the mod but when i edit a message the tags field is empty, don´t know if thats how its supposed to work and if so, is there a way to load the topics tags and edit them when modifying a topic?
thx great mod.
Quote from: vbgamer45 on June 22, 2012, 01:06:27 PM
Uninstall for now. We hope to have a new version in the next couple of months.
Any update on the ETA for this update?
Thanks!
Not at the moment no time.
So I have the Tagging System mod installed correctly. However, I don't like how there is a Tags button in the navigation bar. Anyway know how to remove it? The tags will still work the same right?
Anyone?
I'm having a little trouble installing this mod and wondered if anyone can help me?
When I go to install the package it brings up the error
Database Error
SQL logic error or missing database
near "NOT": syntax error
File: /home/a8409673/public_html/Packages/temp/tagsql2.php
Line: 20
I have installed this mode on my SMF2 forum
seems like its not working on Persian language forums
creating a new topic with some tag words, gives an error but posts the thread, yet doesn't show the tagged words
Quote from: ESLLOL on October 04, 2012, 06:10:50 AM
I'm having a little trouble installing this mod and wondered if anyone can help me?
When I go to install the package it brings up the error
Database Error
SQL logic error or missing database
near "NOT": syntax error
File: /home/a8409673/public_html/Packages/temp/tagsql2.php
Line: 20
Are you using MySQL?
Quote from: PersianDeveloper on October 04, 2012, 08:30:48 AM
I have installed this mode on my SMF2 forum
seems like its not working on Persian language forums
creating a new topic with some tag words, gives an error but posts the thread, yet doesn't show the tagged words
Make sure the SMF tags tables are utf8
Quote from: vbgamer45 on October 04, 2012, 12:28:58 PM
Quote from: ESLLOL on October 04, 2012, 06:10:50 AM
I'm having a little trouble installing this mod and wondered if anyone can help me?
When I go to install the package it brings up the error
Database Error
SQL logic error or missing database
near "NOT": syntax error
File: /home/a8409673/public_html/Packages/temp/tagsql2.php
Line: 20
Are you using MySQL?
I don't think I am, is there anyway of going back and changing to MySQL. Sorry I'm a complete noob at forum building, appreciate your patience.
I believe you would need to remake the forum and select mysql
Quote from: vbgamer45 on October 04, 2012, 12:41:36 PM
Quote from: PersianDeveloper on October 04, 2012, 08:30:48 AM
I have installed this mode on my SMF2 forum
seems like its not working on Persian language forums
creating a new topic with some tag words, gives an error but posts the thread, yet doesn't show the tagged words
Make sure the SMF tags tables are utf8
made the utf8, yet the same error is there!
Quote from: vbgamer45 on October 04, 2012, 07:58:05 PM
I believe you would need to remake the forum and select mysql
Awesome, done and intalled,thanks for your help.
One more questions, is their anyway to get the tag cloud in a box using ADKPortal?
Thanks for any help :-)
For ADKPortal would require a code you can check ezportal's tag block code probably can be adapted for adk portal too.
Hi.
<meta name="keywords" content="tag1, tag2, tag3" />
How to thread tags?
You would have to query the tags table and the tags_log table in the database and match it based on the topic id.
Code?
Thanks.
No code sorry
Before I install this, is this good for SEO? I know that may sound stupid but I read awhile back that Google can penalize your site if you just bunch words together (especially if they're within image alt tags) so wouldn't want to risk Google removing my site from their index or anything.
Doesn't do anything for SEO just adds extra links back to topics/words
Installed and working nicely. Thanks for your hard work.
Thanks for the feedback and support!
Is there any way to line break using a <br /> at the end of a tag? Even though I have it set to 10 tags per row the tags won't line break and have 'escaped' the forum. My forum is 800px wide but the tags go all the way to the right creating a scroll bar at the bottom of the page.
I'm using DilberMC on 1.1.16.
You would need to modify the tag display in the themes/default/display.template.php
// Tagging System
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'], '</b>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
//End Tagging System
I've tried changing the width to 800px, 700px, 80% etc. but it seems to have no effect.
Change echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
To
echo '<br><a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
Now they're all on individual lines which better but I'd still rather have 10 on each row, if you have a topic with 15 tags for example its quite a long list.
You would have to do some kind loop with a counter if it exceeds enter a newline html character.
Is there any way I could put it into a dropdown spoiler tag?
VBGamer... wasn't there mention of this mod being updated "very soon" at one point? Is that still going to happen by chance?
Not likely do not have time to work on it.
Hi,
after digging through my mysql slow query log i found out that the smf_tags_log was missing some indexes and just wanted this but found that this is already posted:
Quote from: vbgamer45 on June 13, 2012, 07:11:09 PM
Here is what I would do to speed it up
ALTER TABLE smf_tags_log add index ID_MEMBER (ID_MEMBER);
ALTER TABLE smf_tags_log add index ID_TOPIC (ID_TOPIC);
This will make those queries process extremely fast.
Thanks for posting this!
Will using this MOD slow down the page load of the forum? Any SEO advantage so far?
Anything that you add will slowdown the forum.
No real SEO advantage.
I have similiar problem with this mod and mysql
Quote
In addition, I could see that the MySQL service in the server is associated with a lot of queries that require "copying to tmp table". For instance, see the sample logs pasted below:
---
| 640 | farmaceu_testi | localhost | farmaceu_far | Query | 13 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
FROM smf_tags as t, smf_tags_log as l WHERE t.ID_TAG = l.ID_TAG
GROUP BY l.ID_TAG
ORDER BY quantity , RAND() LIMIT 50
| 703 | farmaceu_testi | localhost | farmaceu_far | Query | 4 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
FROM smf_tags as t, smf_tags_log as l WHERE t.ID_TAG = l.ID_TAG
GROUP BY l.ID_TAG
ORDER BY quantity , RAND() LIMIT 50
| 792 | farmaceu_testi | localhost | farmaceu_far | Query | 0 | Copying to tmp table | SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,
m.poster_name,m.subject,m.id_topic,m.poster_time,
t.id_board, g.tag, g.ID_TAG
FROM (smf_tags_log as l, smf_boards AS b, smf_topics as t, smf_messages as m)
LEFT JOIN smf_tags AS g ON (l.ID_TAG = g.ID_TAG)
WHERE b.ID_BOARD = t.id_board AND l.ID_TOPIC = t.id_topic AND t.approved = 1 AND t.id_first_msg = m.id_msg AND (FIND_IN_SET(-1, b.member_groups) != 0) ORDER BY l.ID DESC LIMIT 20 |
---
Please note that all the "selects" that involve data copying into the temporary table (tmp table), are very resource intensive and can slow down your operations to a great extent. I would suggest you to check the database table structures and these "select queries" to make sure that the indexes you have in your DB tables correspond to the select operations which you're trying to run. When select/order_by/group_by/join operations are performed on tables with incorrect indexes, MySQL will be forced to create a new temporary table, copy data into it and perform these sorting operations on a temporary table. Such operations might take significant amount of CPU and Disk I/O bandwidth and can dramatically reduce performance of your sites!
Look at Fisch.666
Thanks, it works.
2.4.3
Released new version to add some mysql indexes
I again some problem:
Quote
29 | farmaceu_testi | localhost | farmaceu_far | Query | 33 | Locked | SELECT
c.id_cat, b.name AS bname, b.description, b.num_topics, b.member_groups,
b.id_parent, |
| 32 | farmaceu_testi | localhost | farmaceu_far | Query | 17 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
FROM smf_tags as t, smf_tags_log a |
| 33 | farmaceu_testi | localhost | farmaceu_far | Query | 17 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
FROM smf_tags as t, smf_tags_log a |
| 34 | farmaceu_testi | localhost | farmaceu_far | Query | 17 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
FROM smf_tags as t, smf_tags_log a |
| 36 | farmaceu_testi | localhost | farmaceu_far | Query | 10 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
---
I would need to see the full query
Well, this is all I get from my hosting support:
Quote
However, the following "copying to tmp table" query is present in the server. It is taking up the server resources. The query is being executed under the user "farmaceu", the database farmaceu_testi.
---
29 | farmaceu_testi | localhost | farmaceu_far | Query | 33 | Locked | SELECT
c.id_cat, b.name AS bname, b.description, b.num_topics, b.member_groups,
b.id_parent, |
| 32 | farmaceu_testi | localhost | farmaceu_far | Query | 17 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
FROM smf_tags as t, smf_tags_log a |
| 33 | farmaceu_testi | localhost | farmaceu_far | Query | 17 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
FROM smf_tags as t, smf_tags_log a |
| 34 | farmaceu_testi | localhost | farmaceu_far | Query | 17 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
FROM smf_tags as t, smf_tags_log a |
| 36 | farmaceu_testi | localhost | farmaceu_far | Query | 10 | Copying to tmp table | SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
---
Need the full query
This?
Quote/usr/sbin/mysqld, Version: 5.1.65-cll (MySQL Community Server (GPL)). started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
Time Id Command Argument
# Time: 121205 18:43:18
# User@Host: eximstats[eximstats] @ localhost []
# Query_time: 32.438922 Lock_time: 0.189678 Rows_sent: 0 Rows_examined: 372
use eximstats;
SET timestamp=1354729398;
update smtp INNER JOIN sends ON (sends.msgid=smtp.msgid) set smtp.processed=3 where smtp.transport_is_remote=1 and sends.user IN ('-remote-','root','mailman') and smtp.processed=0;
# Time: 121205 18:43:27
# User@Host: farmaceu_wrdp1[farmaceu_wrdp1] @ localhost []
# Query_time: 36.903788 Lock_time: 0.436326 Rows_sent: 1 Rows_examined: 479
use farmaceu_wrdp1;
SET timestamp=1354729407;
SELECT post_modified_gmt FROM wp_posts WHERE post_status = 'publish' AND post_type IN ('post', 'page', 'attachment') ORDER BY post_modified_gmt DESC LIMIT 1;
# Time: 121205 18:44:25
# User@Host: farmaceu_testi[farmaceu_testi] @ localhost []
# Query_time: 13.242244 Lock_time: 0.000219 Rows_sent: 20 Rows_examined: 96663
use farmaceu_far;
SET timestamp=1354729465;
SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,m.poster_name,m.subject,m.id_topic,m.poster_time, t.id_board
FROM (smf_tags_log as l,smf_boards AS b, smf_topics as t, smf_messages as m)
WHERE b.ID_BOARD = t.id_board AND l.ID_TOPIC = t.id_topic AND t.approved = 1 AND t.id_first_msg = m.id_msg AND (FIND_IN_SET(-1, b.member_groups) != 0) ORDER BY l.ID DESC LIMIT 20;
# Time: 121205 18:48:56
# User@Host: farmaceu_testi[farmaceu_testi] @ localhost []
# Query_time: 23.837889 Lock_time: 0.000188 Rows_sent: 20 Rows_examined: 98485
SET timestamp=1354729736;
SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,m.poster_name,m.subject,m.id_topic,m.poster_time, t.id_board
FROM (smf_tags_log as l,smf_boards AS b, smf_topics as t, smf_messages as m)
WHERE b.ID_BOARD = t.id_board AND l.ID_TOPIC = t.id_topic AND t.approved = 1 AND t.id_first_msg = m.id_msg AND (FIND_IN_SET(0, b.member_groups) != 0 OR FIND_IN_SET(10, b.member_groups) != 0 OR FIND_IN_SET(34, b.member_groups) != 0) ORDER BY l.ID DESC LIMIT 20;
# Time: 121205 19:01:23
# User@Host: farmaceu_testi[farmaceu_testi] @ localhost []
# Query_time: 19.636132 Lock_time: 0.000159 Rows_sent: 25 Rows_examined: 1690
SET timestamp=1354730483;
SELECT t.id_topic
FROM smf_topics AS t
INNER JOIN smf_messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN smf_members AS memf ON (memf.id_member = mf.id_member)
WHERE t.id_board = 113
ORDER BY is_sticky, IFNULL(memf.real_name, mf.poster_name) DESC
LIMIT 73, 25;
# Time: 121205 19:02:05
# User@Host: farmaceu_testi[farmaceu_testi] @ localhost []
# Query_time: 11.413952 Lock_time: 0.000203 Rows_sent: 20 Rows_examined: 98485
SET timestamp=1354730525;
SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,m.poster_name,m.subject,m.id_topic,m.poster_time, t.id_board
FROM (smf_tags_log as l,smf_boards AS b, smf_topics as t, smf_messages as m)
WHERE b.ID_BOARD = t.id_board AND l.ID_TOPIC = t.id_topic AND t.approved = 1 AND t.id_first_msg = m.id_msg AND (FIND_IN_SET(0, b.member_groups) != 0 OR FIND_IN_SET(8, b.member_groups) != 0 OR FIND_IN_SET(34, b.member_groups) != 0) ORDER BY l.ID DESC LIMIT 20;
# Time: 121205 19:07:21
# User@Host: farmaceu_testi[farmaceu_testi] @ localhost []
# Query_time: 51.642454 Lock_time: 0.249581 Rows_sent: 0 Rows_examined: 54354
SET timestamp=1354730841;
INSERT IGNORE INTO smf_tmp_log_search_topics
(id_topic)
SELECT t.id_topic
FROM smf_topics AS t
INNER JOIN smf_log_search_subjects AS subj1 ON (subj1.id_topic = t.id_topic)
WHERE subj1.word LIKE '%ferrovin%'
AND t.id_board IN (52, 36, 90, 134, 139, 115, 137, 111, 116, 25, 114, 27, 53, 71, 9, 61, 103, 11, 57, 31, 43, 44, 96, 105, 121, 33, 104, 15, 106, 123, 127, 128, 129, 130, 131, 132, 133, 17, 19, 50, 118, 119, 20, 55, 80, 86, 98, 23, 81, 107, 28, 135, 7, 72, 82, 83, 64, 74, 65, 68, 21, 49, 54, 84, 94, 122, 47, 18, 4, 22, 76, 77, 100, 79, 75, 110, 108, 109, 113, 117, 136)
LIMIT 6000;
# Time: 121205 19:12:37
# User@Host: farmaceu_testi[farmaceu_testi] @ localhost []
# Query_time: 316.316822 Lock_time: 0.000302 Rows_sent: 0 Rows_examined: 178222
SET timestamp=1354731157;
INSERT IGNORE INTO smf_log_search_results
(id_search, relevance, id_topic, id_msg, num_matches)
SELECT
21,
1000 * (30 * COUNT(*) / (MAX(t.num_replies) + 1) + 25 * CASE WHEN MAX(m.id_msg) < 172099 THEN 0 ELSE (MAX(m.id_msg) - 172099) / 73758 END + 20 * CASE WHEN MAX(t.num_replies) < 200 THEN MAX(t.num_replies) / 200 ELSE 1 END + 15 * 0 + 10 * CASE WHEN MIN(m.id_msg) = MAX(t.id_first_msg) THEN 1 ELSE 0 END + 0 * MAX(t.is_sticky)) / 100 AS relevance,
t.id_topic,
MAX(m.id_msg) AS id_msg,
COUNT(*) AS num_matches
FROM smf_topics AS t
INNER JOIN smf_messages AS m ON (m.id_topic = t.id_topic)
WHERE m.body LIKE '%ferrovin%'
AND m.id_board IN (52, 36, 90, 134, 139, 115, 137, 111, 116, 25, 114, 27, 53, 71, 9, 61, 103, 11, 57, 31, 43, 44, 96, 105, 121, 33, 104, 15, 106, 123, 127, 128, 129, 130, 131, 132, 133, 17, 19, 50, 118, 119, 20, 55, 80, 86, 98, 23, 81, 107, 28, 135, 7, 72, 82, 83, 64, 74, 65, 68, 21, 49, 54, 84, 94, 122, 47, 18, 4, 22, 76, 77, 100, 79, 75, 110, 108, 109, 113, 117, 136)
GROUP BY t.id_topic
ORDER BY null
LIMIT 6000;
# Time: 121205 19:12:59
# User@Host: farmaceu_testi[farmaceu_testi] @ localhost []
# Query_time: 335.025944 Lock_time: 313.717690 Rows_sent: 0 Rows_examined: 178222
SET timestamp=1354731179;
INSERT IGNORE INTO smf_log_search_results
(id_search, relevance, id_topic, id_msg, num_matches)
SELECT
22,
1000 * (30 * COUNT(*) / (MAX(t.num_replies) + 1) + 25 * CASE WHEN MAX(m.id_msg) < 172099 THEN 0 ELSE (MAX(m.id_msg) - 172099) / 73758 END + 20 * CASE WHEN MAX(t.num_replies) < 200 THEN MAX(t.num_replies) / 200 ELSE 1 END + 15 * 0 + 10 * CASE WHEN MIN(m.id_msg) = MAX(t.id_first_msg) THEN 1 ELSE 0 END + 0 * MAX(t.is_sticky)) / 100 AS relevance,
t.id_topic,
MAX(m.id_msg) AS id_msg,
COUNT(*) AS num_matches
FROM smf_topics AS t
INNER JOIN smf_messages AS m ON (m.id_topic = t.id_topic)
WHERE m.body LIKE '%ferrovin%'
AND m.id_board IN (52, 36, 90, 134, 139, 115, 137, 111, 116, 25, 114, 27, 53, 71, 9, 61, 103, 11, 57, 31, 43, 44, 96, 105, 121, 33, 104, 15, 106, 123, 127, 128, 129, 130, 131, 132, 133, 17, 19, 50, 118, 119, 20, 55, 80, 86, 98, 23, 81, 107, 28, 135, 7, 72, 82, 83, 64, 74, 65, 68, 21, 49, 54, 84, 94, 122, 47, 18, 4, 22, 76, 77, 100, 79, 75, 110, 108, 109, 113, 117, 136)
GROUP BY t.id_topic
ORDER BY null
LIMIT 6000;
I try to install the newest version but i get this error :
Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY id_tag (id_tag),
KEY id_topic (id_topic),
KEY id_member (id_member)
) Eng' at line 7
File: /home/farmaceu/public_html/forum/Packages/temp/tagsql2.php
Line: 36
Quote from: Farmacija on December 08, 2012, 06:06:52 AM
I try to install the newest version but i get this error :
Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY id_tag (id_tag),
KEY id_topic (id_topic),
KEY id_member (id_member)
) Eng' at line 7
File: /home/farmaceu/public_html/forum/Packages/temp/tagsql2.php
Line: 36
Fixed reuploaded new version
Even if I uninstall i still have this in MySQL Process List
QuoteSELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,m.poster_name,m.subject,m.id_topic
If that is a part of the mod double check the mod was not installed twice in the files it edited.
No, it isn't.
After so much struggle.... I solved all problems .. Now quote function fine....and facebook also with RSS ...
but now when i want to add tags... This error coming :
what should i do ??
Unknown column 'approved' in 'field list'
File: /home/u670750288/public_html/forum/Sources/Tags2.php
Line: 352
i have Reinstalled and restored my database..
I have the same problem. Any solutions?
Did you have any other previous mods installed that might have done anything with tagging?
Regular members can add tags to their topics in spite of having zero permissions on 'SMF Tags'.
Is it possible to fix this?
Thanks.
Quote from: vbgamer45 on December 31, 2012, 10:56:14 PM
Did you have any other previous mods installed that might have done anything with tagging?
Nope...
Can I install the update over my current 2.4.2 mod or do I have to remove the old before installing the new?
When editing the tag is not added
Quote from: Inter on January 30, 2013, 12:20:21 PM
When editing the tag is not added
What SMF version?
2.0.3
Thai Translate
Modifications.thai-utf8.php
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'แท็ก';
$txt['smftags_admin'] = 'ระบบแท็ก';
$txt['smftags_settings'] = 'ตั้งค่า';
$txt['smftags_addtag'] = 'เพิ่มแท็ก';
$txt['smftags_addtag2'] = 'เพิ่มแท็ก';
$txt['smftags_deletetag'] = 'ลบแท็ก';
$txt['smftags_seperate'] = 'แยกแต่ละแท็กโดยคั่นด้วยคอมม่า (,)';
$txt['smftags_topic'] = 'แท็ก: ';
$txt['permissiongroup_smftags'] = 'แท็ก';
$txt['permissiongroup_simple_smftags'] = 'แท็ก';
$txt['permissionname_smftags_suggest'] = 'แนะนำแท็ก';
$txt['permissionhelp_smftags_suggest'] = 'แนะนำแท็ก';
$txt['cannot_smftags_suggest'] = 'คุณยังไม่ได้รับอนุญาตให้แนะนำแท็ก.';
$txt['permissionname_smftags_add'] = 'เพิ่มแท็กหัวข้อของตัวเอง';
$txt['permissionhelp_smftags_add'] = 'ผู้ใช้สามารถเพิ่มแท็ก';
$txt['cannot_smftags_add'] = 'คุณยังไม่ได้รับอนุญาตให้เพิ่มแท็กให้กับหัวข้อ';
$txt['permissionname_smftags_del'] = 'ลบแท็กหัวข้อของตัวเอง';
$txt['permissionhelp_smftags_del'] = 'ผู้ใช้สามารถลบแท็กจากหัวข้อที่พวกเขาเปิด';
$txt['cannot_smftags_del'] = 'คุณยังไม่ได้รับอนุญาตให้ลบแท็กนี้';
$txt['permissionname_smftags_manage'] = 'จัดการแท็ก';
$txt['permissionhelp_smftags_manage'] = 'ผู้ใช้สามารถปรับเปลี่ยนการตั้งค่าแท็กและเพิ่มและลบแท็กใดๆ สิทธิ์นี้จะได้รับตามปกติโดยผู้ดูแลฟอรั่มเท่านั้น!';
$txt['cannot_smftags_manage'] = 'คุณยังไม่ได้รับอนุญาตให้จัดการแท็ก.';
//END Tagging System Strings
Tags.thai-utf8.php
<?php
/*
Tagging System
Version 1.0
by:vbgamer45
http://www.smfhacks.com
*/
//Tags text strings
$txt['smftags_tags'] = 'แท็ก';
$txt['smftags_tagtosuggest'] = 'แท็กแนะนำ:';
$txt['smftags_popular'] = 'แท็กยอดนิยม';
$txt['smftags_latest'] = 'แท็กล่าสุด';
$txt['smftags_resultsfor'] = 'ผลการค้นหา ';
$txt['smftags_suggest'] = 'แนะนำแท็ก';
$txt['smftags_addtag'] = 'เพิ่มแท็ก';
$txt['smftags_deletetag'] = 'ลบแท็ก';
$txt['smftags_addtag2'] = 'เพิ่มแท็ก';
$txt['smftags_tagtoadd'] = 'แท็กที่จะเพิ่ม';
//Tags Admin Settings
$txt['smftags_set_mintaglength'] = 'ขนาดตัวอักษรความยาวต่ำสุดของแท็ก';
$txt['smftags_set_maxtaglength'] = 'ขนาดตัวอักษรความยาวสูงสุดของแท็ก';
$txt['smftags_set_maxtags'] = 'จำนวนสูงสุดของแท็กต่อหัวข้อ';
$txt['smftags_tagcloud_settings'] = 'การตั้งค่าแท็ก';
$txt['smftags_set_cloud_tags_to_show'] = 'จำนวนของแท็กที่จะแสดง';
$txt['smftags_set_cloud_tags_per_row'] = 'จำนวนของแท็กที่จะแสดงต่อแถว';
$txt['smftags_set_cloud_max_font_size_precent'] = 'ขนาดตัวอักษรสูงสุดของแท็ก (%)';
$txt['smftags_set_cloud_min_font_size_precent'] = 'ขนาดตัวอักษรต่ำสุดของแท็ก';
$txt['smftags_err_deletetag'] = 'คุณไม่ได้รับสิทธิ์ให้ลบแท็ก.';
$txt['smftags_err_notopic'] = 'ไม่มีหัวข้อที่เลือก.';
$txt['smftags_err_notag'] = 'ยังไม่ได้ใส่แท็ก.';
$txt['smftags_err_mintag'] = 'ตัวอักษรขั้นต่ำของแท็ก ';
$txt['smftags_err_maxtag'] = 'ตักอักษรสูงสุดของแท็ก ';
$txt['smftags_err_toomaxtag'] = 'จำกัดแท็กต่อหัวข้อ.';
$txt['smftags_err_permaddtags'] = 'คุณยังไม่ได้รับอนุญาตให้เพิ่มแท็กให้กับหัวข้อ.';
$txt['smftags_err_alreadyexists'] = 'แท็กสำหรับหัวข้อมีอยู่แล้ว.';
$txt['smftags_settings'] = 'ตั้งค่าแท็ก';
$txt['smftags_pages'] = 'หน้า: ';
$txt['smftags_savesettings'] = 'บันทึกการตั้งค่า';
///Results Display
$txt['smftags_subject'] = 'หัวข้อ';
$txt['smftags_startedby'] = 'เริ่มโดย';
$txt['smftags_replies'] = 'ตอบ';
$txt['smftags_views'] = 'อ่าน';
$txt['smftags_guest'] = 'บุคคลทั่วไป';
$txt['smftags_topictag'] = 'แท็ก';
?>
Thank you for the translation.
Is there a way to disable guests from viewing the tags button? I don't mind members having access to them, but I'd like to avoid guest viewing that specific page.
Can someone advise?
Thanks.
danny, you have your answer here:
http://www.simplemachines.org/community/index.php?topic=135761.msg3008949;topicseen#msg3008949
I installed this mod in SMF 2.0.4, but I detected a problem, tags don't accept special characters. How can I solve this?
Ok, I just realized it does accept special characters, what it doesn't accept is dots.
Any ideas?
You use dots in keywords? Do you have an example?
For example: "2.ª Guerra Mundial" or "1.ª Guerra Mundial".
"2.ª" is the abbreviation of "second" and "1.ª" is the abbreviation of "first".
This was working fine in SMF 1.1.x but not in SMF 2.
I already had 164 tags with "2.ª Guerra Mundial" as you can see here (http://www.docspt.com/index.php?action=tags;tagid=164).
I stumbled upon a strange problem. The mod works fine but everytime someone enters the reply/edit/post new page (Post.display.php) I get two errors:
Quote
2: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed
Plik: /Themes/default/languages/Tagging.polish-utf8.php (main sub template - eval?)
Linia: 407
AND
8: Undefined index: tags_news
Plik: /Themes/default/languages/Tagging.polish-utf8.php (main sub template - eval?)
Linia: 407
I checked my Polish-utf8 file 10 times I see nothing wrong with it... Do you guys have any idea on how to fix it?
Disable Template eval to find the true error line.
Ok, so it seems to be in Post.template.php -
line 407: $context['editTags'] = implode(' ', $_REQUEST['tags_news']);
Quote from: Harvest on March 02, 2013, 04:05:15 PM
Ok, so it seems to be in Post.template.php -
line 407: $context['editTags'] = implode(' ', $_REQUEST['tags_news']);
That code does not seem to be part of my tagging system.
Sorry, my bad :/ I mixed up the tagging mods.
i started using this tag mod today :D but i have over 14k untagged :-[posts.
Any easy way to tag them all ?
Quote from: johnpaul2k2 on March 05, 2013, 01:24:59 AM
i started using this tag mod today :D but i have over 14k untagged :-[posts.
Any easy way to tag them all ?
Not at the moment no.
thank you!
Quote from: FragaCampos on February 15, 2013, 02:15:20 PM
danny, you have your answer here:
http://www.simplemachines.org/community/index.php?topic=135761.msg3008949;topicseen#msg3008949
I installed this mod in SMF 2.0.4, but I detected a problem, tags don't accept special characters. How can I solve this?
It will not let me install this mod on my 2.0.4 smf site. I get this:
"The package you are trying to download or install is either corrupt or not compatible with this version of SMF."
What would you do if you had this happen?
Use the advanced link below the list of mods.
What?
is it on this page http://custom.simplemachines.org/mods/index.php?mod=3579 This is what i tried to install
TheWhich version smf do you use?
I used to have the necessary link but silly me removed it.
2.0.4.
Emanuele updated me fully on the new version a few weeks ago! :)
QuoteGroovy I have asked my colleagues for the necessary link I am trying to find you.
Posting the same details in more than one place is not a good idea though.
:)
I have already asked on 1 post which smf version you use. SOLVED Thanks
Once I get a reply from the teamies I will get back to you (if someone hasn't beaten me to it).
I posted this in another of your posts as a reply.
Thank you so much! It is this beautiful looking mod that I am trying to make work:
http://custom.simplemachines.org/mods/index.php?mod=3579
Okay, I am back. I have been trying to install it and it keeps telling me it is corrupt. I am on a 2.0.4 site trying to install 2.0.4 mod. Someone advised me to try and emulate another version. What version would you try?
I installed this and it screwed my entire site up. Now I can't even post to the site I intalled it on. Errors everywhere...can anyone help?
This mod possible makes tags automatically from topic names? So making tagging is diffucult for the members and me about new or old topics. Thanks.
No, you have to insert them manually when creating a new topic or add to an existing one.
I am trying to install this and both the auto and manual installations failed. I tried emulating and it still failed.
I would find code similar to areas that failed and try to add it manually that way
That's what I did. It not only didn't work but it effectively disabled the site.
Should I try it again and post all the errors that happen here? Maybe then someone could help walk me through it as I work?
I don't know I don't have time at the moment to really look in depth.
I could, but it'd take a few hours so I just need to know something would come of it.
We also have a problem of remnant code on the site interfering with it from when someone tried to install tags for us a year ago. But we need a working tag system...pretty badly.
We need it ASAP. I tried to install it, I failed, now I don't know where to go or what to do.
I love this. I'd like to officially request two Admin settings.
I'm sure others have mentioned, so please just add my name to the list...
1.) Admin option to allow all users to add tags to all threads, not just thread starter. So someone can add tags to a thread if the original author didn't.
2.) Admin option to limit the number of tags a user can have for a single thread. For example, user should be able to only add 1 tag to the thread, not the entire maximum amount allowed for the thread.
Of course it'd be nice if those numbers were chosen by Admin. So you could allow 30 tags on a thread, but users can only add 4 each to that thread.
how to use in meta keywords??
any possibility?
Meta keywords not built in but could be possible would require you to write the code though
This is possible?
<meta name="keywords" content="', $context['page_title'], '
foreach ($context['topic_tags'] as $i => $tag)
{
echo '' . $tag['tag'] . ', ';
}
echo '' . $context['meta_keywords'] . '" />
Only if $context['topic_tags'] is defined already on the page.
this works fine
<meta name="keywords" content="';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '' . $tag['tag'] . ', ';
}
echo '', !empty($context['meta_keywords']) ? '' . $context['meta_keywords'] . '' : '' ,'" />
but has in error logs this
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F61uQReL.png&hash=c4f1269ac90863227effd726eeed20d014807cf7)
any suggestions
Change to
<meta name="keywords" content="';
if (isset($context['topic_tags']))
foreach ($context['topic_tags'] as $i => $tag)
{
echo '' . $tag['tag'] . ', ';
}
echo '', !empty($context['meta_keywords']) ? '' . $context['meta_keywords'] . '' : '' ,'" />
thanks vbgamer45, perfect works ;)
Glad to help
Hello ; There is a problem:
Sample ; Normal user No check : Add tag - delete tag - manage tag
post.template.php :
Normal user : I can see why?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FG3wHi8D.jpg&hash=e0c5c5ca9a83644689c3924cdc47de1fad5916f4)
// Tagging system Mod
if(!isset($context['num_replies']))
{
echo '
<dt>
<b>', $txt['smftags_topic'], '</b>
</dt>
<dd>
<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
</dd>';
}
//End Tagging system mod
ok ok
Solved :
Quoteif(!isset($context['num_replies']))
Change
Quoteif(!isset($context['num_replies']))
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
I've been trying to install the SMFSimple tagging system since it has some pretty / flashy display settings however I just can't get it to install right.
Can't wait to get home from the station tonight and try this one.
Is there a way to disable the CLOUD and just have a listing of the TAGs
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi42.tinypic.com%2F2whpglt.jpg&hash=9db806fa44e33586fab22057174d2f3f6f1e03ea)
As well as make the tags show on the bottom of the posts with a little flash and dash to them.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi41.tinypic.com%2Fa9oimt.jpg&hash=84ff3536bdbcc40d4a3e4f6b610c88496ae268c7)
MechSpecs that is a different mod than this.
Quote from: vbgamer45 on July 23, 2013, 08:56:28 PM
MechSpecs that is a different mod than this.
Yes, I am aware of that. I was asking if this mod had similar features abilities. I like the look of the other mod however it is nonfunctional. If this mod is functional can be it be tailored to output data the same way?
Maybe I honestly prefer the other mod myself for 2.0
Quote from: vbgamer45 on July 23, 2013, 08:59:39 PM
Maybe I honestly prefer the other mod myself for 2.0
Wish I could get it working properly. Have a few issues with it and I've posted the errors/bugs yesterday. Just awaiting a response.
In the mean time I can play with this I guess since I do have a sandbox server.
Is Tagging of individual posts possible?
There is a field called Tag: but after posting nothing done (nothing saved).
I want to make a problem and answer forum for Mathematics.
I am tagging all thread as subjects like geometry, triangle, etc...
And allow people post solution and their helping ideas that they used euclides, complex numbers, etc.
Individual posts are not supported the mod would have to be customized to support for each post
For some reason unticking "Manage Tags" in permissions will stop members adding tags but doesn't stop them deleting them? Anyway to do this?
There is also a SMF Tags Delete permission as well you can assign and unassign.
Ok just tried to delete a tag with a dummy account and it says you don't have permission so that's good. Is there a way to remove the [X] from members who don't have permission like how it appears for guests?
2 Issues:
1. When adding tags using the "Add Tag" option at the bottom of the post, why does it revert to all lower case even if you use Capital Letters? How can I fix that?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FTMvkOPX.png&hash=22817491667ef930a1018f9c87b26f8d4d1c569c)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fz9Otpqi.png&hash=323246c92db3a55958028a4be8bdf8448ad6589d)
2. When modifying a post, I have the option at the top to add more tags, but when I do, they do not show up. How can I fix this?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FLSscgcG.png&hash=1d0b81ce69fa4b54cacad6cc01c852ba88c16f23)
EDIT: It seems that it reverting to all lower case happens on all tags except the initial tag. How can I fix this?
Does anyone know how to fix my issue?
1. Was done on purpose all tags should be lowercase this done due to issues with mixed case tags.
Quote from: vbgamer45 on September 24, 2013, 11:39:19 AM
1. Was done on purpose all tags should be lowercase this done due to issues with mixed case tags.
That doesn't make any sense. If all tags are supposed to revert to all lower case, why is that only happening when you use the Add Tag link?
When I add tags while the thread is being created, they casing stays at how I type it
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F3FqHZMD.png&hash=3d9cb616a467f1513d2b9c24a2fd80dcc492a7ff)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FO9qn7Av.png&hash=b89e0b3af03f19b97f73e107588bf3457d1e8587)
But if I need to add more tags (and I would want them to match casing), This is not possible. When I add a 3rd tag to this same thread, this is what happens (the tag was typed in as "Test Tag 3")
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FQfdXnpz.png&hash=89ef63858c74421cfd306a33e97a67580fec45c2)
This needs to be fixed so that it will accept both upper and lower just like it does when you initially create the thread. Why would you want additional tags to not match the ones it already has? Especially since tags with at least one capital letter stand out better on the cloud
Probably a bug but not working on the tagging system at the moment.
Quote from: vbgamer45 on September 27, 2013, 01:34:13 PM
Probably a bug but not working on the tagging system at the moment.
ok so can you just tell me what code I need to change to fix it?
Would have to look but do not have time
Would it be possible to include to filter by multiple tags?
I would like to see topics that share 2 or 3 common tags.
Thanks.
Periodically (not always), when my global moderators go to remove a tag it gives them this error and automatically logs them completely out of the sight.
Is there a fix for this?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F5SHiZXI.png&hash=e8d5abccb31ded52d7c50b47be2a9c137efdc78a)
They have the permissions set
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FI8xf9JT.png&hash=1f6454adbb49f7be6eca2a3515b7b8aa3943c668)
Hello!
When I write tag does not register.
make a try:
http://www.scooter-chinois-4t.com/board/support/
SMF's word filter is not working on any of the tags or tag pages. We have pages of cuss words appearing fully uncensored. How can I make the mod come under SMF's word censor?
You would need to edit the code in the Sources/tags.php
thank you so much for the reply!
How would I change the code? Like what would it be changed to? Where in this file does the code need to be changed and to what?
in installation process,....it shows warning !!
http://i.imgur.com/F3TXfKk.jpg
You will need to make that change to that file manually.
Not working on this theme : http://custom.simplemachines.org/themes/index.php?lemma=2755
Kindly fix it. :-*
Install it manually on your theme that is only way to fix
Quote from: vbgamer45 on March 28, 2014, 12:10:35 AM
Install it manually on your theme that is only way to fix
Ok,..thanks for your precious reply,.
Moreover disable your online hide status... :-*
I was able to install the mod easily on 2.0.7
Couple of bugs I have run in to....
Bug #1: Even without the three checkmarks Registered members are able to add tags
Bug #2: Everyone but me is able to add tags with capital letters in it. I am an administrator and my friend is also an administrator. He can make "Freelancer" and I can only make "freelancer" no matter how I enter them into the box.
What do you mean by checkmark? for #1 It should be based on the Add Tag permission for membergorups.
#2. All tags should be lowercase uppercase not allowed but will look into it
Quote from: vbgamer45 on April 13, 2014, 10:38:23 AM
What do you mean by checkmark? for #1 It should be based on the Add Tag permission for membergorups.
Yes, my REGISTERED USERS have none of those three permissions checked and yet are still able to add tags.
"Add Tags to Own Topics" <--- empty
"Delete Tags to Own Topics" <--- empty
"Manage Tags" <--- empty
Quote
#2. All tags should be lowercase uppercase not allowed but will look into it
All my tags are lowercase but my fellow admins are not. I use FF and he uses Chrome, not sure if that makes a difference.
3.0
Requires full uninstall and install of new version to update.
!Fixed bug with tags not be lowercase when entering from creation of new topic.
!Fixed bug with permissions for showing the inputbox to add new tags on creation of a topic.
Quote from: Guillelmus on December 05, 2011, 03:13:27 AM
More simply put:
global $sourcedir, $txt, $context, $scripturl;
require_once($sourcedir . '/Tags2.php');
ViewTags();
if (isset($context['poptags'])) echo $context['poptags'];
This code is working with Simple Portal, I can see the cloud tags but I get a lot of errors in SMF log:
http://www.mydomain.com/index.php?
8: Undefined index: smftags_popular
File: /homeXXXX..X/mydomain.com/Sources/Tags2.php
Line: 110
Is there any way to solve this?
Hi,
had the same problems some time ago:
http://www.simplemachines.org/community/index.php?topic=135761.msg2595602#msg2595602
and just noticed that i didn't posted the solution. Just use the following code which should fix this:
global $sourcedir, $txt, $context, $scripturl;
if (loadlanguage('Tags') == false)
loadLanguage('Tags','english');
require_once($sourcedir . '/Tags2.php');
ViewTags();
if (isset($context['poptags']))
echo $context['poptags'];
Thank you Fisch.666, that worked well, no more errors on my smf log
Is there any way to get the tags to line up (like in columns) on the tag cloud? They all run together and it is hard to tell where one tag ends and another one starts.
Thanks.
Quote from: Kimmie on May 19, 2014, 01:26:38 AM
Is there any way to get the tags to line up (like in columns) on the tag cloud? They all run together and it is hard to tell where one tag ends and another one starts.
Thanks.
The code would need to be changed to use a table instead of the current display method.
Quote from: raklet on November 17, 2008, 09:16:41 PM
One solution:
In tags.php look for
// perhaps adjust this title attribute for the things that are tagged
$context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
$context['poptags'] .= '>'.$key.'</a> ';
Right after the last line of the above code, you could add something like this:
$context['poptags'] .= 'whatever you want to separate words goes here';
Hth,
Raklet
This works good on the tags page, but can you tell me how to add that to my portal code? Thanks. Code is below
function display_tags_block()
{
// For TaggingSystem2.4.3
// System created by vbgamer45
global $txt, $smcFunc, $modSettings, $scripturl, $context, $user_info;
if (!isset($modSettings['smftags_set_cloud_tags_to_show']))
echo 'There are no tags to show...';
echo '
<div align="justify">';
$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 {int:limit}',
array(
'limit' => $modSettings['smftags_set_cloud_tags_to_show'],
)
);
$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 = $modSettings['smftags_set_cloud_max_font_size_precent'];
$min_size = $modSettings['smftags_set_cloud_min_font_size_precent'];
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));
$spread = $max_qty - $min_qty;
if (0 == $spread)
$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);
// uncomment if you want sizes in whole %:
// $size = ceil($size);
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: ' . $size . '%" title="' . $value . ' things tagged with ' . $key . '">' . $key . '</a> ';
if ($row_count > ($modSettings['smftags_set_cloud_tags_per_row'] - 1))
{
$context['poptags'] .= '<br />';
$row_count = 0;
}
}
}
if (isset($context['poptags']))
echo $context['poptags'];
echo '
</div>';
}
display_tags_block();
That code should work in portal block
If people cannot add tags to other peoples posts, how is it happening?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F5lYGgUf.png&hash=40597d18e891ff449940520d6820a797370c20e2)
Permission issue? Admin tags permission or other permission given to them?
Just ran a few tests with some reg member accounts. They don't have the permission to add them, but they still can. looks like a problem within the mod to me.
These are the permissions on all reg groups
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FnmkdYRB.png&hash=146ccd407c2895a0aedf8195d3dacc463edc4e5b)
What SMF version and using latest tags version?
SMF 2.07 Mod Version 2.4.2. I see there is an update to the mod. Does it fix this problem?
Quote from: Kimmie on June 15, 2014, 07:32:32 PM
SMF 2.07 2.08 Mod Version 2.4.2. I see there is an update to the mod. Does it fix this problem?
?? Any news on how to fix this yet?
Haven't looked into it yet.
So I will assume the answer to my question above, is no. The update does not fix this major problem.
yes
I'm also having an issue where people can tag / delete tags despite having no permissions. Any idea on a fix?
Nevermind. Had permissions inherited from a group that caused the issue. Fixed now!
Did find another error though. If I use an apostrophe, I get "'" in the tag instead of the apostrophe.
Also, has the full list of tags option been considered?
Hi There! Just install this great mod and I noticed something, the button "add tag" appears for all users and not just the author of the post.
I have already reviewed the permissions and not I found nothing, It is possible to make that button only be visible to users, authors of the post?
An image of what I want to do:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F4CJW359.png%3F1&hash=1019e321aef3b8607a53f16e2c8c2671791034e7)
Thanks!!
Quote from: Michael Pfaff on August 07, 2014, 11:47:28 AM
I'm also having an issue where people can tag / delete tags despite having no permissions. Any idea on a fix?
Nevermind. Had permissions inherited from a group that caused the issue. Fixed now!
Unfortunately, this did not resolve my issue. I have no groups with inherited permissions. Any other ideas on this?
Can someone tell me the difference between 2.42 and 3.0? There is nothing on the mod page showing what the changes are. Thanks.
Two minor fixes to Post.php and Post.template.php
One to make tags lowercase and the other not to show add tags if they don't have permission for it.
Quote from: vbgamer45 on August 14, 2014, 11:45:12 PM
Two minor fixes to Post.php and Post.template.php
One to make tags lowercase and the other not to show add tags if they don't have permission for it.
That sounds like it may resolve my issue. Will give it a try tomorrow. Thanks.
Hello!
I have recently installed tagging system for Topics. I've gone through and checked and double checked that all member groups (except guests and banned), gave the permissions. "Add Tags to Own topics," and "Delete Tags to Own Topics."
As an administrator with several non admin accounts, I've added tags to my own post as well--with success. But I have one member who says that Tags aren't saving for them if they try and add Tags while writing a post/Tags section right under "Subject," for a post. They say that if they scroll all the way down to the bottom of a post; it works. But no matter what they do, they can't get tags to stick while writing a post/using the area for tags under Subject line.
I've installed this on a forum that is 2.0.8 with a lot of mods--can list them if needed. But anyone have any general clue as to why they can't save tags in a certain area?
@VBgamer45
I keep trying to send you my copy of Downloads2.php at your support site but there is some glitch it keeps telling me to log in ... I've got this tagging module working perfectly with the Downloads keywords AND also just finished fixing so that if posting a download to one of the forums, it'll transfer the download description into the new forum post instead of only just the image as it is in the default module...
You'll have to come to my site if you want it now dude... and btw audience, Google just loves this module lol
Hello, When I tried install this mod I encountered one error in ./Themes/default/Post.template.php - "test failed". After clicking on error log I received this:
Quote
<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" class="input_text" />
</dd>
';
// Tagging system Mod
if(!isset($context['num_replies']) && allowedTo('smftags_add') )
{
echo '
<dt>
<b>', $txt['smftags_topic'], '</b>
</dt>
<dd>
<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
</dd>';
}
//End Tagging system mod
echo '
I have SMF 2.0.8 with Simple Portal 2.3.5. Could you help me with installing this mod? Really I don't know how to solve this problem on my own. If the whole mentioned file is needed I will upload it here.
Thank you in advance ;D
Upload the whole file here if you can.
Here is the whole file "Themes/default/Post.template.php"
I hope you will be able to help 8)
Updated file attached
Quote from: vbgamer45 on September 12, 2014, 12:43:45 AM
Updated file attached
Thank you, but still it is not working. :( When I try install the mod with the new file, there is still the same error as before. (Only difference is that with your updated file additional form would appear between subject and message icon when posting or replying in the forum). It looks like the space for tags :o - but the mod was not installed yet. ???
Yeah you will need to install the mod just ignore that error when installing since i updated the file for you.
Quote from: vbgamer45 on September 12, 2014, 09:54:52 AM
Yeah you will need to install the mod just ignore that error when installing since i updated the file for you.
Should I replace file before installation or install the mod with the original file and then replace it?
Quote from: martin9870 on September 12, 2014, 12:04:32 PM
Quote from: vbgamer45 on September 12, 2014, 09:54:52 AM
Yeah you will need to install the mod just ignore that error when installing since i updated the file for you.
Should I replace file before installation or install the mod with the original file and then replace it?
Install, then replace...
It works fine now. Thank you for your help ;D
Glad it is working for you
Is there a way to limit this just to one board? Like an IF staement with the boardID on displaytemplate.php so [Add Tag] is only seen on that one board.
Yeah that would work.
Quote from: vbgamer45 on September 29, 2014, 08:11:51 AM
Yeah that would work.
Thanx, gonna give it a shot, along with other ides.
A Couple of requests, and I'll try and tackle some of them, and supply edits.
*Board name, where the listed topic name, started by, views & replies are listed on the Tags page. I think having the Board location in that row would be nice too.
*Last Replied on, in that list would be nice too. Not sure if it'd require to much. Gonna try it
*separate tags more clearly, with something like brackets. [tag1] [tag2]
EDIT:
Quote*separate tags more clearly, with something like brackets. [tag1] [tag2]
Have made this work.
Sources/Tags2.php
Find
$context['poptags'] .= '>'.$key.'</a> ';
Replace with
$context['poptags'] .= '>['.$key.']</a> ';
Quote from: hcfwesker on September 29, 2014, 01:03:42 AM
Is there a way to limit this just to one board? Like an IF staement with the boardID on displaytemplate.php so [Add Tag] is only seen on that one board.
Just sharing for those who care ...
Display.template.php
Wrap the entire code for Tagging that is added, with
global $board;
if(( isset($_REQUEST['board']) && $_REQUEST['board'] == '1' ) || ( isset($board) && $board == '1' )){
< TAGGING SYSTEM CODE ADDED IN THIS FILE >
}
( isset($board) && $board == '1' )
Change 1 to the board id, and you can add more to have 1 or more selected boards for Tagging Only.
EX.
if(( isset($_REQUEST['board']) && $_REQUEST['board'] == '1' ) || ( isset($board) && $board == '3' ) || ( isset($board) && $board == '5' )){
To show only in Boards 3 & 5
Use at your own risk ;)
** Haven't made changes to Post template, to stop Tags from being added there, yet. But it's pretty much the same setup.
Quote from: hcfwesker on September 29, 2014, 06:12:05 PM
A Couple of requests, and I'll try and tackle some of them, and supply edits.
*Board name, where the listed topic name, started by, views & replies are listed on the Tags page. I think having the Board location in that row would be nice too.
I've got this request resolved, this only displays the board name, it is not a clickable link, requires editing several files, see attached...
Quote from: Bob Perry on September 30, 2014, 12:43:23 AM
I've got this request resolved, this only displays the board name, it is not a clickable link.
That's good enough for me. Thanx, bud. I'll check em out soon. :)
Thanx, I got the link to the board to work.
Next task is to reorder topic list when [tag is clicked] by most recently updated topic (if not then by number of replies). [ DONE :) ]
Hello!
Or find the translation French please
I don't see a french translation attached? Or are you looking for one?
You can also make one by translating tags.english.php and text added to modificatoins.english.php
Quote from: Bruno36 on October 27, 2014, 05:22:36 AM
Hello!
Or find the translation French please
French translation :
http://www.simplemachines.org/community/index.php?topic=135761.msg2626135;topicseen#msg2626135
:)
Thanks for the translation
tag field is not visible to all users
The add tag field is only visible to the topic creator.
how to set permission for all users
Admin -> permissions -> modify the membergroup and find the permission for tags
no such option in admin
There should be. It adds a whole section in SMF permissions called SMF Tags
Here is What i can see related to tags
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FPNbVwqY.jpg&hash=bcd306de852d98229b64443a46a6516440242fa4)
You are not in the right area. Go to admin then find the permissions area for your entire forum. Under Permissions in the sidebar
Got It..Thanku So Much For Your Help ;D ;D
Glad to help.
Hi.
I have this mod working fine :)
I have a Tiny Portal side block that lists all tags. It picks up new tags and all details as I would expect. BUT the tags all link to the main tags page rather than to individual tags. Do I need to change the bit as indicated in Red ?
Thanks
global $scripturl, $smcFunc;
$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 t.tag LIMIT {int:limit}',
array('limit' => 100)
);
$tags = array();
$tags2 = array();
while ($row = $smcFunc['db_fetch_assoc']($result))
{
$tags[$row['tag']] = $row['quantity'];
$tags2[$row['tag']] = $row['id_tag'];
}
$smcFunc['db_free_result']($result);
if(count($tags2) > 0)
{
// change these font sizes if you will
$max_size = 100; // max font size in %
$min_size = 100; // min font size in %
// get the largest and smallest array values
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));
// find the range of values
$spread = $max_qty - $min_qty;
if (0 == $spread)
{ // we don't want to divide by zero
$spread = 1;
}
// determine the font-size increment
// this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);
// loop through our tag array
$poptags = '';
$row_count = 1;
foreach ($tags as $key => $value)
{
$row_count++;
// calculate CSS font-size
// find the $value in excess of $min_qty
// multiply by the font-size increment ($size)
// and add the $min_size set above
$size = $min_size + (($value - $min_qty) * $step);
// uncomment if you want sizes in whole %:
// $size = ceil($size);
[color=red]// you'll need to put the link destination in place of the #
// (assuming your tag links to some sort of details page)[/color]
$poptags .= '<a href="' . $scripturl . '?action=tags;id=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
// perhaps adjust this title attribute for the things that are tagged
$poptags .= ' title="'.$value.' things tagged with '.$key.'"';
$poptags .= '>'.$key.'</a> ';
if ($row_count > 1)
{
$poptags .= '<br />';
$row_count =1;
}
}
}
echo $poptags;
(except of course it is not red in the code box! )
Using this for a while now and really like the features it provides, although I do have 2 Ideas/Suggestions for this Mod..
1) Portal Block Integration
(small version of tag cloud)
can be added to portal block by adding {}show_tagcloud to a PHP block or something similar..
.. I'd personally use this in place of having the whole page for tags.
2) #hashtag feature
- any use of #wordhere gets added to the tag cloud
alike the hashtag feature used in popular social media sites..
Kind Regards
Check out this post on a portal block I have one built into ezportal but here is one for tinyportal that may work for others as well
http://www.smfhacks.com/index.php/topic,8601.msg37056.html#msg37056
hashtag would be harder would have to scan the post at creation time but it a nice idea to do one day.
Hi,
see: http://portamx.com/1331/tagging-system-block-code for PortaMx
I have installed the mod ""Tagging System For Topics" - http://custom.simplemachines.org/mods/index.php?mod=579
But this feature seems to be only available for admin and not for ordinary members of the forum. They doesnt get the feature when they try to post a new thread1
Any way I could enable it for all members?
You have to set permissions for all membergroups under admin -> permissions then modify the membergroups
Thanks, That did the job.
Glad to help
When can we expect support for #hashtags and trends? As twitter
Never as it is not really what this mod is about.
Quote from: gorbi on April 28, 2015, 03:11:49 AM
When can we expect support for #hashtags and trends? As twitter
Yall, ya know I have not been monitoring support very closely, but I did quite a while back have an idea and really haven't followed thru very well with studying the results of what i did, but at one point i had my system set up with twitter "outgoing" and just manually used the hash tag feature for posts that got imported from my system "out" to twitter (and will do so again when the new 2.1 release of SMF is finally out there to use), but anyway, what i did was just use smftags with "manually" done Twitter hashtags?? Like i said, never studied what the results of that did or how effective it was, but what the hell, it won't hurt a damn thing to do it anyway right, a hash tag is just a hash tag, yes?
Installed this mod fine, but when trying to modify an old topic, and add tags, the tags are not added (saved), what gives?
Tags are saved, and everything seems to work fine on new topics... I believe someone else has been having the same problem.
Oh, and btw it's separate - not seperate. 8)
what about tagging system for posts?
Not built in. Only does the topic overall.
Quote from: vbgamer45 on December 16, 2015, 10:42:10 AM
Not built in. Only does the topic overall.
Dev's you ought to build this feature in. A topic can have hundreds of posts - each with their unique content. I wanted members to tag them so it's quicker to search for shizzle via tags. But still vbgamer45 great mod, in fact you've developed some pretty awesome mods man. I am impressed :laugh:.
If I had time I would. But kind of just waiting for SMF 2.1 at this point.
Hi vbGamer, I'd like to understand the usefulness of this mod. Is this specific to searching for tags within the site or for SEO purposes with search engines? I ask because I've tried every variation of SEO standards with the tags and I can't find any of my topics on the web by tag criteria. They only seem to work searching within the forum itself.
Thanks, any info is greatly appreciated.
Just within the site mainly not for seo. For people to find other related topics.
Could anyone help adding a limit of say... 4 tags per line then it automatically drops to a new line?
I'm finding topics with a lot of tags can stretch themes, especially in a small screens!
Many thanks in advance! O:)
Kind Regards
Quote from: Wellwisher on December 16, 2015, 10:04:20 AM
what about tagging system for posts?
Quote from: vbgamer45 on December 16, 2015, 10:42:10 AM
Not built in. Only does the topic overall.
Quote from: Wellwisher on December 16, 2015, 12:15:07 PM
Dev's you ought to build this feature in. A topic can have hundreds of posts - each with their unique content. I wanted members to tag them so it's quicker to search for shizzle via tags. But still vbgamer45 great mod, in fact you've developed some pretty awesome mods man. I am impressed :laugh:.
Quote from: vbgamer45 on December 16, 2015, 12:19:33 PM
If I had time I would. But kind of just waiting for SMF 2.1 at this point.
To add to what Wellwisher said, there can also be topics with THOUSANDS of posts. Here is an example:
https://www.livebusinesschat.com/smf/index.php?topic=5632.0
Discussions of such size can be "on topic", while also being more finely nuanced across a diverse range subtopics at the individual post level. As such, I propose that "topic tags" should be separate from "post tags", but perhaps post tags can also be treated as "sub-topic tags", especially if they occur frequently. Then, it might be possible to intelligently discern ontological and semantic meaning from the tags. I believe tags might eventually become nearly as important as forum categories, for organizing information.
Hello,
I installed this mod but on the posts, even when I add the tags, they do not appear under the op topic.
Hoping someone can point me to the problem? Thank you. :)
This is what i cant see on my theme devs:
I dont see "tags" "member added tags" or "add tag" option on op topics! I set correct permissions. Everything else works as advertised.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FiaQg5lG.jpg&hash=7f76bb9c6a5b3fcea6de7b5135c8c88d8a5fae46)
NEVERMIND SOLVED IT, ADDED CODE ./Themes/default/Display.template.php to my own custom theme. ;D ;D
Glad you have it working!
I got a question:
I want our members to be able to add tags but NOT delete existing ones (only people with permission/ Admins should do that). How can I solve this pickle?
Other than that things are awesome; been using smf tags for a good few weeks now, really well made mod so thank you for developing this. Not had any problems.
Quote from: Wellwisher on August 20, 2016, 05:44:41 PM
I got a question:
I want our members to be able to add tags but NOT delete existing ones (only people with permission/ Admins should do that). How can I solve this pickle?
Other than that things are awesome; been using smf tags for a good few weeks now, really well made mod so thank you for developing this. Not had any problems.
Solved it for those interested:In default theme (or whatever theme you use) open display.template.php
Find:
if(!$context['user']['is_guest'] && allowedTo('smftags_del'))
Replace with:
if($context['user']['is_admin'])
It's a simple work-around. Above modification will only let admins delete tags, whilst enabling members to freely add topic tags to *any* topic and be unable to delete own tags or others. Of course if members know the delete smf tag urls, they will be able to delete any tag (i think).
Just to add to my message above, Illori helped me figure this out. You can exchange that code for below. This will mean Admins and mods only can delete tags but members are still free to add tags to any topics. A MUCH better fix.
if(!$context['user']['is_guest'] && allowedTo('moderate_board'))
Not related to above, but i thought i would share what I achieved with a little editing design wise:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FTwhoflT.jpg&hash=547dfc5395ba58f895271a771098bd1c898a3233)
is there a way to only alow tags on a specific board? i have a story board and only want to use tags for that.
and is there a way to delete the Tags menu button on the top of the site?
Not at the moment.
oke is it coming soon?
and is there a way to delete the Tags menu button on the top of the site?
not likely.
To delete the menu you would have to modify sources/subs.php and remove the reference to tags in the menu code
Oke thanks will look into that then. looking for a way to only get it on story board. that they can see the tags on the story to see what its about.
3.0.1
!Fixed a minor spelling typo requires uninstall then install the new version.
i installed it but it gives this error
An Error Has Occurred!
You are not allowed to manage tags.
Under admin -> permissions give each membergroup the tagging permissions needed.
yes worked thanks
Glad to help.
if use english language tag. it ok.
when use my language it error.
can you help me.
You have to change all the database tables to match the same collation type.
Thank for your help. It ok now.
:D
now i change collation to be utf8_general_ci all table
I wonder why it be latin1_swedish_ci (instead of utf8_general_ci) in several table?
probably on install doesn't check table types.
thank you :)
Is there a way to get the tags to show up on the message index?
Not at the moment.
Great mod, I like it a lot and it works fine! ;)
Glad you enjoy it!
vbgamer45 and SMFHacks.com Team, Thanks a lot for the mod. Wanted to ask if it recounts the tag and or remove tags not used for current threads.
We delete many number of old threads and now the tags section show wrong number of posts currently available linked to them.
Regards
Which methods do you delete topics? I will check that it takes those in account.
Quote from: vbgamer45 on July 13, 2017, 09:06:14 AM
Which methods do you delete topics? I will check that it takes those in account.
I'm using auto purge old topics (http://custom.simplemachines.org/mods/index.php?mod=2171) to remove old topics.
That mod calls out to SMF's master remove topics function, as it should. I assume this mod connects to that too.
Hi Guys,
I don't know why can not i setup the mod Tagging System.
It says that can not modify the file Sources/Admin.php
Please have a look at the picture attached.
Thank you so much guys.
Proceed with the install
Then make the file change to that file manually in a simliar spot
https://www.smfhacks.com/smf-package-parser.html
Hi Bro Vbgamer45
Thank you so much for your help.
Have a good night.
Hi Everyone,
It seems not work, no error log.
What should i do?
Thank you guys.
what part
There"s a slight problem with the tags page. Tag system creates the latest tag list from messages table and uses poster_name for author. That might not be the actual poster name if the poster has changed their display name.
Is there a good way to parse the correct author from members table?
This isn"t a huge issue, everything else works just fine.
What version are you using?
Any chance to display tags on message index (aka topic listing)?
Not out of the box would require edits to do so
Would you be so kind to do this? I have totally no idea how to do it.
I just don't have time to do so.
Hello everyone:
Has anyone managed to make this wonderful MOD work on the "HELIOS_MULTI" theme? (for smf 1.1.21)
I can not find where to modify the files index.template.php and display.template.php
Thank you !!
62 pages to read thru, ohhh - can I just ask can it be restricted to membergroups
Yes, it can be though Admin -> Permissions.
Very cool bruh! But i had to dress it up a bit to make it look purdy with css https://www.idesignsmf.com/index.php/topic,547.0.html
Looks way better there. Well even the topic layout looks like a web page verus a topic neat.
Quote from: vbgamer45 on September 11, 2018, 06:40:18 PM
Looks way better there. Well even the topic layout looks like a web page verus a topic neat.
Well hell, it seems I used this mod in the past. I just installed it and I already have a bunched of topics already tagged lol, my brain is fried lol
How can remove taggingSystem mod for guest's? ???
Under the SMF permissions you can disable options such as adding tags
I cannot see other options to remove tags from main menu for guest's. :-\
It's not under admin -> permisions modify the guest membergroup?
Just make sure those options are not checked.
Then they won't have permission to add tags
They are not checked in guests permissions and still tags are displayed in main menu.
There is no permission that shows if tags are visible or not.
Only permissions are add tags, remove tags, admin to manage tags.
There is a tags in the main menu and also guests can add tags.
How can I disable these options?
http://mkreef.com
Tags in the main menu do you want to remove for everyone? you would remove the menu entry from sources/subs.php
Guests shouldn't be able to add tags unless they have permission. Did you try as a guest to add a tag?
I want to remove tags from the main menu only for guest's, not for everyone. Members are allowed to use tags in menu. Hpw can I solve this issue?
I had disabled adding tags for guest's and that's fine.
You would need to alter menu item code in sources/subs.php an add a line that checks if the user is not guest in the permission property
Some updates for smf 2.1?
For final yes
Is this a tagging system exclusive to inside the website only. or also external on the web for SEO purposes?
Just on the forum. just adds tags to topics. Zero SEO benefit it is more for easy of user navigation for users to find related topics.
Quote from: vbgamer45 on May 22, 2019, 12:53:58 PM
Just on the forum. just adds tags to topics. Zero SEO benefit it is more for easy of user navigation for users to find related topics.
Thank you for the explanation. Very much appreciated.
Hey bruh, do you have a block for popular tags laying around?
I have this from ezportal
echo '<div align="center">';
// Pass all the parematers
// Show latest Tags
// Tag cloud from http://www.prism-perfect.net/archive/php-tag-cloud-tutorial/
$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,t.tag AS tag
ORDER BY l.ID DESC LIMIT " . $modSettings['smftags_set_cloud_tags_to_show']);
// here we loop through the results and put them into a simple array:
// $tag['thing1'] = 12;
// $tag['thing2'] = 25;
// etc. so we can use all the nifty array functions
// to calculate the font-size of each tag
$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)
{
// change these font sizes if you will
$max_size = $modSettings['smftags_set_cloud_max_font_size_precent']; // max font size in %
$min_size = $modSettings['smftags_set_cloud_min_font_size_precent']; // min font size in %
// get the largest and smallest array values
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));
// find the range of values
$spread = $max_qty - $min_qty;
if (0 == $spread)
{ // we don't want to divide by zero
$spread = 1;
}
// determine the font-size increment
// this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);
// loop through our tag array
$context['poptags'] = '';
$row_count = 0;
foreach ($tags as $key => $value)
{
$row_count++;
// calculate CSS font-size
// find the $value in excess of $min_qty
// multiply by the font-size increment ($size)
// and add the $min_size set above
$size = $min_size + (($value - $min_qty) * $step);
// uncomment if you want sizes in whole %:
// $size = ceil($size);
// you'll need to put the link destination in place of the #
// (assuming your tag links to some sort of details page)
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
// perhaps adjust this title attribute for the things that are tagged
$context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
$context['poptags'] .= '>'.$key.'</a> ';
if ($row_count > ($modSettings['smftags_set_cloud_tags_per_row']-1))
{
$context['poptags'] .= '<br />';
$row_count =0;
}
// notice the space at the end of the link
}
}
if (isset($context['poptags']))
echo $context['poptags'];
echo '</div>';
@vbgamer Thanx bro, i did figured it out. Also, I tested your code and it returned with "Function name must be a string" error. Just a heads up.
Depending on the portal it might need global $smcFunc; in the block too. Not all portals work the same way.
Here's mine. Just need to dress it up with some sweet css.
global $scripturl, $smcFunc;
$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 t.tag LIMIT {int:limit}',
array('limit' => 50)
);
$tags = array();
$tags2 = array();
while ($row = $smcFunc['db_fetch_assoc']($result))
{
$tags[$row['tag']] = $row['quantity'];
$tags2[$row['tag']] = $row['id_tag'];
}
$smcFunc['db_free_result']($result);
if(count($tags2) > 0)
{
// change these font sizes if you will
$max_size = 100; // max font size in %
$min_size = 100; // min font size in %
// get the largest and smallest array values
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));
// find the range of values
$spread = $max_qty - $min_qty;
if (0 == $spread)
{ // we don't want to divide by zero
$spread = 1;
}
// determine the font-size increment
// this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);
// loop through our tag array
$poptags = '';
$row_count = 1;
foreach ($tags as $key => $value)
{
$row_count++;
// calculate CSS font-size
// find the $value in excess of $min_qty
// multiply by the font-size increment ($size)
// and add the $min_size set above
$size = $min_size + (($value - $min_qty) * $step);
// uncomment if you want sizes in whole %:
// $size = ceil($size);
// you'll need to put the link destination in place of the #
// (assuming your tag links to some sort of details page)
$poptags .= '<a href="' . $scripturl . '?action=tags;id=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
// perhaps adjust this title attribute for the things that are tagged
$poptags .= ' title="'.$value.' things tagged with '.$key.'"';
$poptags .= '>'.$key.'</a> ';
if ($row_count > 1)
{
$poptags .= '<br />';
$row_count =1;
}
}
}
echo $poptags;
Alright bro, Im trying to figure out to display either random or popular tags. As it is, it's showing the last tags.
Any ideas?
global $context, $txt, $mbname,$scripturl, $user_info, $smcFunc, $modSettings;
// Tag cloud from http://www.prism-perfect.net/archive/php-tag-cloud-tutorial/
$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 " . $modSettings['smftags_set_cloud_tags_to_show']);
// here we loop through the results and put them into a simple array:
// $tag['thing1'] = 12;
// $tag['thing2'] = 25;
// etc. so we can use all the nifty array functions
// to calculate the font-size of each tag
$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)
{
// change these font sizes if you will
$max_size = $modSettings['smftags_set_cloud_max_font_size_precent']; // max font size in %
$min_size = $modSettings['smftags_set_cloud_min_font_size_precent']; // min font size in %
// get the largest and smallest array values
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));
// find the range of values
$spread = $max_qty - $min_qty;
if (0 == $spread)
{ // we don't want to divide by zero
$spread = 1;
}
// determine the font-size increment
// this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);
// loop through our tag array
$context['poptags'] = '';
$row_count = 0;
foreach ($tags as $key => $value)
{
$row_count++;
// calculate CSS font-size
// find the $value in excess of $min_qty
// multiply by the font-size increment ($size)
// and add the $min_size set above
$size = $min_size + (($value - $min_qty) * $step);
// uncomment if you want sizes in whole %:
// $size = ceil($size);
// you'll need to put the link destination in place of the #
// (assuming your tag links to some sort of details page)
$context['poptags'] .= '<i class="fas fa-circle"></i> <a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
// perhaps adjust this title attribute for the things that are tagged
$context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
$context['poptags'] .= '>'.$key.'</a> ';
if ($row_count > ($modSettings['smftags_set_cloud_tags_per_row']-1))
{
$context['poptags'] .= '<br />';
$row_count =0;
}
// notice the space at the end of the link
}
}
// Find Results
$dbresult = $smcFunc['db_query']('', "
SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,m.poster_name,m.subject,m.id_topic,m.poster_time, t.id_board
FROM ({db_prefix}tags_log as l,{db_prefix}boards AS b, {db_prefix}topics as t, {db_prefix}messages as m)
WHERE b.ID_BOARD = t.id_board AND l.ID_TOPIC = t.id_topic AND t.approved = 1 AND t.id_first_msg = m.id_msg AND " . $user_info['query_see_board'] . " ORDER BY l.ID DESC LIMIT 20");
$context['tags_topics'] = array();
while ($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$context['tags_topics'][] = array(
'id_member' => $row['id_member'],
'poster_name' => $row['poster_name'],
'subject' => $row['subject'],
'id_topic' => $row['id_topic'],
'poster_time' => $row['poster_time'],
'num_views' => $row['num_views'],
'num_replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($dbresult);
echo '
<br />
<div class="mod-intro">
<div class="wrapper">
<h3>Our Most Popular Tags</h3>
<div class="mods">';
if (isset($context['poptags']))
echo $context['poptags'];
echo'
</div>
</div>
</div>';
Do you have a solution to my problem?
'sitetable.t.tag' isn't in GROUP BY
Dosya: /sites/httpdocs/Sources/Tags2.php
Satır: 119
// Tag cloud from http://www.prism-perfect.net/archive/php-tag-cloud-tutorial/
$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
[color=red]ORDER BY COUNT(l.ID_TAG) DESC, RAND() LIMIT " . $modSettings['smftags_set_cloud_tags_to_show']);[/color]
I have used smf version 2.1 rc 2
Php version: 5.5 or 5.6
You would have to change
GROUP BY l.ID_TAG
To
GROUP BY l.ID_TAG, t.tag AS tag
Quote from: vbgamer45 on December 04, 2019, 11:35:15 AM
You would have to change
GROUP BY l.ID_TAG
To
GROUP BY l.ID_TAG, t.tag AS tag
She gave this warning
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AS tag
ORDER BY COUNT(l.ID_TAG) DESC, RAND() LIMIT 5' at line 4
Sorry was tired change it to
GROUP BY l.ID_TAG, t.tag
Quote from: vbgamer45 on December 04, 2019, 02:32:12 PM
Sorry was tired change it to
GROUP BY l.ID_TAG, t.tag
Thanks solved the problem
Dying to get this brilliant mod running again. Couple of problems though:
Tag cloud page says this:
QuoteExpression #1 of ORDER BY clause is not in SELECT list, references column 'cookd.l.ID' which is not in SELECT list; this is incompatible with DISTINCT
File: /var/www/cookdandbombd.co.uk/forums/Sources/Tags2.php
Line: 193
And tags with apostrophes are showing as eg
test'
Instead of
test'
For the first error are you on the latest version?
Yeah, all updated, we got that one fixed by making a small edit to the script.
Still getting the problem with apostrophes, which I seem to remember being down to the encoding or something used for the database...? Any ideas what exactly needs fixed there?
I believe we encode with htmlspecialchars on tag input.
3.0.2
!Fixed a groupby error on SMF 2.0.x for some configurations of MySQL
Thanks SMFHacks team! I've installed mod manually for SMF2.1 RC2, it works perfectly!
Nice! Did you do any changes?
Yes, I did some changes to emulate with 2.1 and it works fine! ;)
Between, is there still missing ", t.tag" in Tag2.php on your lasted updated mod?
Quote from: vbgamer45 on December 04, 2019, 02:32:12 PM
Sorry was tired change it to
GROUP BY l.ID_TAG, t.tag
That should have been fixed in
3.0.2
!Fixed a groupby error on SMF 2.0.x for some configurations of MySQL
If there is a tag on the deleted topic, those tags are not deleted from the table.
Yes, That should be fixed at some point.
Quote from: vbgamer45 on May 11, 2020, 06:51:26 AM
Yes, That should be fixed at some point.
I hope something is done for this
slight issue....
installed this onto a heavily modified 2.0.17 with a modified default theme
it mostly works.....one issue though, when editing a post and placing tags into the whatsitwhoisit field box thingie :p
tags do not save
after editing the post I can click underneath on the add tags and it'll add tags
and a side note....any way to make the tags urls work with pretty urls?
so it'd be something like url/tags/TAGNAME
still haven't fixed the above issue but a few modifications if anyone's interested
on the tags page removed the list of latest tagged threads, you can still click on a tag and see all threads with that tag
in Tags2.template.php
find and remove
<br />
<table border="0" cellpadding="0" cellspacing="0" align="center" width="95%">
<tr>
<td align="center" class="catbg">',$txt['smftags_latest'], '
</td>
</tr>
<tr>
<td align="center" class="windowbg2">
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr>
<td class="catbg3">',$txt['smftags_subject'],'</td>
<td class="catbg3" width="11%">',$txt['smftags_topictag'],'</td>
<td class="catbg3" width="11%">',$txt['smftags_startedby'],'</td>
<td class="catbg3" width="4%" align="center">',$txt['smftags_replies'],'</td>
<td class="catbg3" width="4%" align="center">', $txt['smftags_views'], '</td>
</tr>';
foreach ($context['tags_topics'] as $i => $topic)
{
echo '<tr>';
echo '<td class="windowbg2"><a href="' . $scripturl . '?topic=' . $topic['id_topic'] . '.0">' . $topic['subject'] . '</a></td>';
echo '<td class="windowbg2"><a href="' . $scripturl . '?action=tags;tagid=' . $topic['ID_TAG'] . '">' . $topic['tag'] . '</a></td>';
echo '<td class="windowbg"><a href="' . $scripturl . '?action=profile;u=' . $topic['id_member'] . '">' . $topic['poster_name'] . '</a></td>';
echo '<td class="windowbg2">' . $topic['num_replies'] . '</td>';
echo '<td class="windowbg2">' . $topic['num_views'] . '</td>';
echo '</tr>';
}
echo '
</tr>
</table>
</td></tr></table>
remove the popular tags header (as I'm displaying all tags on the page)
find and remove
<tr>
<td align="center" class="catbg">',$txt['smftags_popular'], '
</td>
</tr>
since I'm displaying all tags, change the page title from Popular Tags to just Tags
in Tags2.php
find
$context['page_title'] = $mbname . ' - ' . $txt['smftags_popular'];
replace with
$context['page_title'] = $mbname . ' - ' . $txt['smftags_menu'];
and let's add some customization to the tags
still in Tags2.php
find
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
replace with
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" class="tags" style="font-size: '.$size.'%"';
in index.css
add
.tags {
list-style-type: none;
display: inline-block;
text-align: center;
background: none;
border-radius: 5px;
background-color: #000;
padding: 5px 15px;
margin: 5px;
font-weight: bold;
}
.tags:hover {
background-color: #fff;
color: #000;
}
play with to however you like
to add the customization to the tags in threads
in Display.template.php
find
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a> ';
replace with
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '" class="tags">' . $tag['tag'] . '</a> ';
now just need to figure out how to display the tags in the topic listing on the messageindex.template.php
The tagging function for pretty urls is addon part of extras package https://www.smfhacks.com/index.php/topic,9675.0.html
thank you
Hi there.
I use this mod for several years and I did some changes here and there to adjust to my forum.
Although it's an older version than the present one, it works ok, but it has a major problem: guests can add tags, although the permission is set otherwise in the admin panel.
Since I'm very wary about installing the most recent version, can this be solved just by changing some part of the code?
Yes it could be by using is_not_guest logic
Sorry, I wrote "guests" by I wanted to write "regular users".
I would compare the code of the old version and new version and check the addtag logic to see if anything changed permission wise.
All permissions should be controlled by the membergroup level permissions.
New update:
4.0
+New setting to show tags on message index underneath topic subject
You can control the number of tags that are shown on message index
+New CSS tag icon option that displays the tags as css tag icons instead of just text.
You can control color of the text and the color of the tag itself
This update requires uninstall of old version to take affect.
Thank you for the update. Are the tags in message index clickable leading to a page displaying topics with the same tags? Thank you
Yes they are.
Are there any breaking changes between this and v3.0.2 which warrant this major bump?
No data related changes just extra features for this which requires a full reinstall since there are changes to the message index template.
4.0
+New setting to show tags on message index underneath topic subject
You can control the number of tags that are shown on message index
+New CSS tag icon option that displays the tags as css tag icons instead of just text.
You can control color of the text and the color of the tag itself
Is there some way to select from a predefined list of Tags? Any typo creates new tags and it is difficult to maintain all the typos....
Not at the moment.
Will there be an update for SMF 2.1?
An option to list the tags alphabetically via the settings in the administration screen would also be appreciated.
1. Is there some way to list all the Tags that have been used, except for the "Popular Tags" listing?
2. Are regular members supposed to be able to Tag their own Posts? They can't; only Admin can Tag posts!
3. Can I disable the Tag feature, or do I have to uninstall it?
Quote from: vbgamer45 on January 18, 2022, 11:43:12 PMNot at the moment.
Any plans to add this functionality?
Not planned just mainly doing basic bug fixes/style changes.
Bump! No plans to make this compatible with 2.1.x forums then?
My users absolutely adored this mod and I've never been able to find anything as good, or like it.
Would it be possible to install it and get it working in compatibility mode, or something?
At some point unless someone makes a better version. No estimate on timeline.
Compatibility not likely as there are a lot of changes to theme files.
Appreciate the reply! My users have been going on about it for years now, so hopefully it will return at some point. Thanks.
What version of tags mod and what SMF version?
That's a good question! :-) I'm on SMF 2.1.3 now, and we were using the tagging mod back in like 2013 and for a few years afterwards.
Quote from: vbgamer45 on January 18, 2022, 11:43:12 PMNot at the moment.
I really miss the plugin. I am willing to pay a small amount for the upgrade to SMF 2.1.3. Maybe there are more members who want that.
your wonderful tag mod is sorely missed in 2.1
i used it to assist searching for a covid info database we provided for patients and other practitioners as and when new info & terminology occurred (great clickable cloud view provided an eclectic entry for info so many thx)
was just setting up a database for a young student hoping to organise research papers that can be pretty dry and hoped to use your system as an alternative search and sort option, when i realised it no longer installs on 2.1 (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.soul-trade.com%2Fimages%2FScreen%2520Shot%25202023-06-27%2520at%252016.51.09.png&hash=04caf930a02d2e6b592166e2781f2a3dd558224f)
Planned at some point for 2.1
@stog @jacbier Version 4.1
Updated for SMF 2.1
Reduced file edits for 2.1 version uses 5 hooks.
Added hook to delete tag log if a topic is deleted new for 2.1
Improved template display in 2.0
Just installed on my test forum, but if I click on "Tags" button in the main menu, I get this error message:
Database Error
'bulataka_test.t.tag' isn't in GROUP BY
File: /home/bulataka/public_html/test/Sources/Tags2.php
Line: 105
Forum details:
Forum version: SMF 2.1.4 (more detailed)
Current SMF version: SMF 2.1.4
GD version: bundled (2.1.0 compatible)
MySQL engine: MariaDB
MySQL version: 10.6.14-MariaDB-log
SMF file based caching: 2.1.4
SQLite3 database based caching: 3.7.17
PHP: 8.2.7 (more detailed)
Server version: Apache
@Speed King try now posted another update.
Thanks, the error is gone :)
But now another error occurs:
Warning: Undefined array key "tags" in /home/bulataka/public_html/BNF/Themes/default/Post.template.php on line 970
I see this error in full editor, when I reply to some topic.
Quote from: Speed King on July 01, 2023, 07:53:36 AMBut now another error occurs:
Warning: Undefined array key "tags" in /home/bulataka/public_html/BNF/Themes/default/Post.template.php on line 970
I see this error in full editor, when I reply to some topic.
Problem solved for now, by editing
Post.template.php file...
I just replaced Tagging system 4.1 code with old 4.0 version code (I have this version installed on another SMF 2.0.19 forum)
Find:
// Tagging system Mod
if(!isset($context['num_replies']) && allowedTo('smftags_add') )
{
$context['posting_fields']['tags'] = array(
'label' => array('html' => '<label for="tags" id="caption_tags">' . $txt['smftags_topic'] . '</label>'),
'input' => array('html' => '<input type="text" id="tags" name="tags" value="' . $context['tags'] . '" size="80" maxlength="80" required><br /><span class="smalltext">', $txt['smftags_seperate'], '</span>')
);
}
// End Tagging system mod
Replace with:
// Tagging system Mod
if(!isset($context['num_replies']) && allowedTo('smftags_add') )
{
echo '
<dt>
<b>', $txt['smftags_topic'], '</b>
</dt>
<dd>
<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
</dd>';
}
//End Tagging system mod
Hi, I installed this Mod but I don't see a tag cloud on the index page or under topic index anywhere. Please can you tell me if I should be seeing these, and if not, is there a way to make a tag cloud display on the board index (in a cloud)? I thought I saw a screenshot somewhere showing this mod producing that on index page but I don't get one at all, only if you click on "Tags" from the main menu
thanks
Currently it is only on the tags section. We do not have an option the index page.
@Speed King posted and update to fix
4.1b
The tags input field for SMF 2.1.x should not be required.
Quote from: vbgamer45 on July 01, 2023, 01:24:01 AM@stog @jacbier
Version 4.1
Updated for SMF 2.1
Reduced file edits for 2.1 version uses 5 hooks.
Added hook to delete tag log if a topic is deleted new for 2.1
Improved template display in 2.0
It's great that this mod is back.
Because there were big problems with the forum Hobbybrouwen.nl I couldn't install the mod earlier. I'm so happy because I missed this mod so much.
In the earlier version I had made some adjustments to the display of the tag cloud. The tags were arranged alphabetically and there was a comma between the tags. That makes the tag cloud more readable. There are tags that consist of two words.
It may be a lot to ask, but is it possible for the mod to be modified at this point.
Again, many thanks that the mod is now available for SMF 2.1
Possibly i just need list of changes to see what was done.
Quote from: vbgamer45 on July 12, 2023, 09:48:40 AMPossibly i just need list of changes to see what was done.
I'm afraid I don't understand exactly what you mean. (English is not my native language.)
I didn't see how to change this in the mod's settings. Or do you mean this is something you're going to change.
I mean you can always request features just it is a less priority for me then bug fixes.
Quote from: vbgamer45 on July 12, 2023, 10:06:38 AMI mean you can always request features just it is a less priority for me then bug fixes.
I understand that. The change I'm talking about makes the mod much more useful because it allows you to create an index of the topics for your visitors. They can therefore see at a glance which topics have been the subject of much writing.
thx
@vbgamer45 just installed
just the 1 error after install (which i've deleted)
2: Undefined array key "smftags_menu"
all seems to work fine with no errors thx again
many thx for your work
much appreciated
all working ok
but guest error messages 2:Trying to access array offset on value of type null
eg index.php?action=tags;tagid=1
& /index.php?action=tags;tagid=2
Sources/Tags2.php (Line 64)
there were 2 test tags which were then deleted if that helps
Have posted an update for the last error message
Many thx
great mod