Tagging System For Topics

Started by SMFHacks.com Team, December 19, 2006, 10:59:20 AM

Previous topic - Next topic

Irythros

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.

glennk

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.

FragaCampos

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?


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?

Bob Perry of Web Presence Consulting

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...
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Bob Perry of Web Presence Consulting

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
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

vbgamer45

Does not support Post based groups at this time or additional groups.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

timned88

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.

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

plusev

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.

Bob Perry of Web Presence Consulting

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...
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

vbgamer45

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.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Bob Perry of Web Presence Consulting

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,,,
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

PatriiickEmin

Hi, I installed successfuly this Mod by failed to understand how to use the "suggest a tag" functionality. Thanks.

vbgamer45

Suggest a tag is not built into this mod at this time.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

PalmBeachPreps

Getting this error:
QuoteTable 'pal0905506370903.tags' doesn't exist
File: /home/content/p/a/l/palmbeachpreps/html/Packages/temp/tagsql.php
Line: 46

Perrin

done...

Dermot


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.



papaprinny

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?

Gobo

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.

PatriiickEmin

I find useful to add a Google search functionnality to my tags as shown here. The purpose is to launch a Google search on all tags for a particular message with one clic.

Advertisement: