The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How can I add System Tags / Keywords in topics?

4 posters

Go down

Solved How can I add System Tags / Keywords in topics?

Post by Van-Helsing March 9th 2014, 1:13 am

Hi all,
How can I add System Tags / Keywords in topics like this style http://prntscr.com/2z5dbv ? My forum version is phpbb2.

Best Regards,
Dark-Avenger


Last edited by Dark-Avenger on March 10th 2014, 12:34 am; edited 1 time in total
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I add System Tags / Keywords in topics?

Post by Kite Trojan March 9th 2014, 1:49 am

I don't know how to do that, but there is a suggestion about it: https://help.forumotion.com/t63906-search-tags-for-posts
Kite Trojan
Kite Trojan
Forumember

Male Posts : 823
Reputation : 19
Language : English

http://galacticda.forumotion.com/

Back to top Go down

Solved Re: How can I add System Tags / Keywords in topics?

Post by JScript March 9th 2014, 1:25 pm

@Dark-Avenger
Hello,
I made this code to your forum now, but we can improve it according to your need ok?

Administration Panel > Modules > HTML/JavaScript > JavaScript Management > Create a new script
Title : Tags Search
Placement : In topics

And add this code:
Code:

/***
 * Application: Tags Search
 * Made and Optimizations by JScript - 2014/03/03
 * View more in: http://punbb.forumeiros.com
 * Copyright (c) 2013 JScript <jscriptbrasil at live dot com>
 * This work is free. You can redistribute it and/or modify it
 * under the terms of the WTFPL, Version 2
 */
jQuery(function () {
    var sCSS =
        '<style>' +
        '.ipsTag {' +
            'background: url("http://i55.servimg.com/u/f55/18/17/62/92/tag_bg10.png") repeat scroll 0 0 rgba(0, 0, 0, 0);' +
            'border-radius: 0 3px 3px 0;' +
            'color: #FFFFFF !important;' +
            'display: inline-block;' +
            'font-size: 11px;' +
            'height: 20px;' +
            'line-height: 20px;' +
            'margin: 5px 5px 0 0;' +
            'padding: 0 7px 0 15px;' +
            'text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);' +
        '}' +
        '</style>';
        jQuery(sCSS).insertBefore('body');
        
    var tags = jQuery('h1.cattitle:first').text().split(' ');

    /* Sets tag search... */
    $('td.nav').parent().parent().parent().before('<span id="tags_search" style="display: block; margin-bottom: 20px; margin-top: 20px;"></span>');
    jQuery.each(tags, function(index, data) {
        if(data.length > 4) {
            $('#tags_search').append(
                '<a id="tag_search_' + index + '" class="ipsTag" title="Find more content with the tag ' + data + '" href="/search?search_keywords=' + data + '">' +
                '    <span>' + data + '</span>' +
                '</a>'
            );
        }
    });
    
});

Result:
How can I add System Tags / Keywords in topics? Tag_bg11



There is an error in your forum see:
Spoiler:


So long,

JS
JScript
JScript
Forumember

Male Posts : 741
Reputation : 175
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Solved Re: How can I add System Tags / Keywords in topics?

Post by Van-Helsing March 9th 2014, 1:48 pm

How can I add the text "Tags" before the tags?
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I add System Tags / Keywords in topics?

Post by JScript March 9th 2014, 1:53 pm

Try this:

Code:

/***
 * Application: Tags Search
 * Made and Optimizations by JScript - 2014/03/03
 * View more in: http://punbb.forumeiros.com
 * Copyright (c) 2013 JScript <jscriptbrasil at live dot com>
 * This work is free. You can redistribute it and/or modify it
 * under the terms of the WTFPL, Version 2
 */
jQuery(function () {
    var sCSS =
        '<style>' +
        '.ipsTag {' +
            'background: url("http://i55.servimg.com/u/f55/18/17/62/92/tag_bg10.png") repeat scroll 0 0 rgba(0, 0, 0, 0);' +
            'border-radius: 0 3px 3px 0;' +
            'color: #FFFFFF !important;' +
            'display: inline-block;' +
            'font-size: 11px;' +
            'height: 20px;' +
            'line-height: 20px;' +
            'margin: 5px 5px 0 0;' +
            'padding: 0 7px 0 15px;' +
            'text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);' +
        '}' +
        '</style>';
        jQuery(sCSS).insertBefore('body');
       
    var tags = jQuery('h1.cattitle:first').text().split(' ');

    /* Sets tag search... */
    $('td.nav').parent().parent().parent().before('<span style="display: block; margin-bottom: 20px; margin-top: 20px;" id="tags_search"><span>Tags search: </span></span>');
    jQuery.each(tags, function(index, data) {
        if(data.length > 4) {
            $('#tags_search').append(
                '<a id="tag_search_' + index + '" class="ipsTag" title="Find more content with the tag ' + data + '" href="/search?search_keywords=' + data + '">' +
                '    <span>' + data + '</span>' +
                '</a>'
            );
        }
    });
   
});

Result:
How can I add System Tags / Keywords in topics? 3ZWBbYo

So long,

JS
JScript
JScript
Forumember

Male Posts : 741
Reputation : 175
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Solved Re: How can I add System Tags / Keywords in topics?

Post by Van-Helsing March 9th 2014, 2:13 pm

Hi JS,
How can I add a background image with border in text "Tags Search" and change the font color? Can we separate the javascript and CSS in two different codes because the javascript with css is very "heavy"

Best Regards,
Dark-Avenger
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I add System Tags / Keywords in topics?

Post by JScript March 9th 2014, 3:55 pm

Dark-Avenger wrote:How can I add a background image with border in text "Tags Search" and change the font color?
You do not think which would be better if you want to specify everything you wish in a single post?

Dark-Avenger wrote:Can we separate the javascript and CSS in two different codes because the javascript with css is very "heavy"
Just remove this piece of code:
Code:

    var sCSS =
        '<style>' +
        '.ipsTag {' +
            'background: url("http://i55.servimg.com/u/f55/18/17/62/92/tag_bg10.png") repeat scroll 0 0 rgba(0, 0, 0, 0);' +
            'border-radius: 0 3px 3px 0;' +
            'color: #FFFFFF !important;' +
            'display: inline-block;' +
            'font-size: 11px;' +
            'height: 20px;' +
            'line-height: 20px;' +
            'margin: 5px 5px 0 0;' +
            'padding: 0 7px 0 15px;' +
            'text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);' +
        '}' +
        '</style>';
        jQuery(sCSS).insertBefore('body');

And add this into your CSS:
Code:

.ipsTag {
    background: url("http://i55.servimg.com/u/f55/18/17/62/92/tag_bg10.png") repeat scroll 0 0 rgba(0, 0, 0, 0);
    border-radius: 0 3px 3px 0;
    color: #FFFFFF !important;
    display: inline-block;
    font-size: 11px;
    height: 20px;
    line-height: 20px;
    margin: 5px 5px 0 0;
    padding: 0 7px 0 15px;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
}

So long,

JS
JScript
JScript
Forumember

Male Posts : 741
Reputation : 175
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Solved Re: How can I add System Tags / Keywords in topics?

Post by Van-Helsing March 10th 2014, 12:33 am

Thank you very much its working perfect JS.

Best Regards,
Dark-Avenger
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: How can I add System Tags / Keywords in topics?

Post by SLGray March 10th 2014, 12:34 am

Topic Solved & Archived


How can I add System Tags / Keywords in topics? Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51576
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum