1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  1. Nick

    Nick Well-Known Member

    Nick submitted a new resource:

    Tags - Tags

    Read more about this resource...
     
    Last edited by a moderator: Oct 22, 2014
    davidshq likes this.
  2. davidshq

    davidshq Member

    How are you handling multiple word tags? e.g. "software as a service", "michael arrington", "hard drive"?
    Dave.
     
  3. Nick

    Nick Well-Known Member

    Anything before the next comma is considered part of the same word, so software as a service, michael arrington, hard drive is three tags. The downside is that if someone doesn't use commas, it all becomes one long tag.
     
  4. davidshq

    davidshq Member

    hmm...maybe it would make sense to add a prompt if people enter tags over x (3?) words long, "Did you know you need to separate your keywords with a comma? Press Yes if you are happy with your tags or no if want add commas to your keywords"
    Dave
     
  5. JonH

    JonH Admin & Design

    I noticed there isn't a max character count in the textarea for version 0.6. but if you put too many it does give you an error message on submit step 3.

    I seen "max_tags" in tags.php but couldn't figure out where to change it in admin - my tags plugin doesn't have a settings page.
     
  6. Nick

    Nick Well-Known Member

    The Tags plugin adds a "Maximum characters" option to the Submit settings page. When you say error, do you mean a real error, or the red notice that you've used too many tags?
     
  7. JonH

    JonH Admin & Design

    It was the red notice. :)
     
  8. JonH

    JonH Admin & Design

  9. Nick

    Nick Well-Known Member

    I opened a ticket for this, looked into it and decided it's not a bug, but a feature! ;) The reason those tags don't show up is because it defaults to the "Popular" tab, but those tags (and categories, too) don't yet have "popular" posts because the site is so new. You can see them by clicking the "Latest" or "All" sort tabs. It should make more sense when the site has more content.

    I guess we could change it to default to the "All" tab, but I quite like presenting the best quality posts first, though it does suck if there aren't any!
     
  10. JonH

    JonH Admin & Design

    I was thinking that myself but wasn't sure.
     
  11. JonH

    JonH Admin & Design

    I wanted the tags to show on the story page (minus the display:none) style so I used this snippet from tags.php plugin:

    Code:
    <?php $tags = explode(',', $hotaru->post->vars['tags']);
    
    				echo $hotaru->lang["submit_show_tags"] . ": \n";
    					foreach ($tags as $tag) {
    						echo "<a href='" . $hotaru->url(array('tag' => str_replace(' ', '_', trim($tag)))) . "'>" . trim($tag) . "</a>&nbsp;\n";
    					}
    				?>
    It seems to work fine. Is this the preferred way?
     
  12. Nick

    Nick Well-Known Member

    That would work Jon, but it's an ugly block of code that shouldn't really be in a template.

    Here's a hack. If it works well, I'll put it in the next version of the plugin:

    1. Open tags.php and replace the submit_show_post_extras function with this:

    PHP:
         /**
         * List of tags
         */
        
    public function submit_show_post_extras($vars)
        {
            
    $tags explode(','$this->hotaru->post->vars['tags']);
        
            if ((
    $vars[0] == "tags") && ($vars[1] == "raw")) {
                
    $raw true;
            } else {
                
    $raw false;
            }
            
            if (!
    $raw) {
                echo 
    "<div class='show_tags' style='display: none;'>\n";
                echo 
    "<ul>" $this->lang["submit_show_tags"] . ": \n";
            }
            
            foreach (
    $tags as $tag) {
                echo 
    "<a href='" $this->hotaru->url(array('tag' => str_replace(' ''_'trim($tag)))) . "'>" trim($tag) . "</a>&nbsp;\n";
            }
            
            if (!
    $raw) {
                echo 
    "</ul>\n";
                echo 
    "</div>\n";
            }
        }
    Now, in any of your templates, just put this hook:

    PHP:
    <?php $hotaru->plugins->pluginHook('submit_show_post_extras'true'tags', array('tags','raw')); ?>
    That should give you just the tags without any wrapper block or "Tags:" text.
     
  13. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    Updated v.1.6 2010/04/14 - Nick - Top stories page name changed from "index" to "popular" [Hotaru 1.2]
     
  14. flyabroad

    flyabroad New Member

    not word with Submit 2.6, please update
     
  15. Nick

    Nick Well-Known Member

  16. mabujo

    mabujo Designer

    Is it possible anywhere to define stop words - words that you do not want to become tags?

    I have stuff that is coming in from people's blogs like 'Uncategorized' and 'frontpage' and would like to get rid...
     
  17. Nick

    Nick Well-Known Member

    In your case mabujo, the tags are being inserted via AutoReader so I shall pass you over there. :eek:
     
  18. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    I made a small change to the Tags plugin which allows you to select tags you dont want to be shown on the post or list pages. It doesnt actually delete the tags from the database, but just filters them out.

    It might take me a bit more time to make the change in autoreader, but that would probably help you more for 'uncategorized' tags which are coming in from wordpress categories.

    http://hotarucms.org/showthread.php?76-Tags-1.8
     
  19. Jojo

    Jojo New Member

    Stop Word List - To exlude words from tags

    As shibuya said tags which are already filled in to the DB will not be deleted from the database after you included them to the "exclusion words list".

    So I think it is handy for everyone to fill in the words from the following list in advance or maybe they can be included by default to a future release of the plugin...

    http://www.textfixer.com/resources/common-english-words.txt
     
  20. cecilporter

    cecilporter Donor Donor

Share This Page