News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Tagging System For Topics

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

Previous topic - Next topic

GK777

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>


vbgamer45

Remove
Quote
240:       //End Tagging system mod
241:       echo '
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

GK777

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!

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

Grumf

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?



P.S. I translate button AFTER error.

Thanks

live627

A classic case of code duplication. Not fun. Maybe it'll get fixed if you ininstall?

Grumf

#926
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.

vbgamer45

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.
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

Grumf

#928
vbgamer45 Tnx.
Problem resolved, in Display.template.php i miss one duplicated CODE ( // Tagging System )
Thanks a lot.

Rivers

#929
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:

hxxp:weeniecampbell.com/yabbse/index.php?page=tagsindex [nonactive]

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.

vbgamer45

Thank you Rivers for the php function maybe helpful for users.
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

humbleworld

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.

vbgamer45

Does not use  a lot of resources. Adds one query on certain pages.
Does not affect search engine rankings.
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

humbleworld

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?

vbgamer45

Look into Sources/Tags.php file that file contains the page title settings
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

BaghdadGhost

#935
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

keith021773

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!

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

keith021773

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

vbgamer45

Yeah if it is a block post the block code I can try to look at it and see what is up.
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

Advertisement: