The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How can I add System Tags / Keywords in topics on PunBB?

View previous topic View next topic Go down

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

Post by Van-Helsing on March 12th 2014, 12:45 am

Hi all,
I want to transfer the code of this issue http://help.forumotion.com/t131396-how-can-i-add-system-tags-keywords-in-topics?highlight=tags in PunBB version. Can you help me please?

Best Regards,
Dark-Avenger

Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

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

Post by JScript on March 12th 2014, 3:25 am

For all versions:
Code:

/***
 * Application: Tags Search
 * Description: This application can displays tags for searching.
 * Version: 1.09032014-jq1.9.1 - Thoth (Ermoúpoli -> Eshmunen)
 * Made and Optimizations by JScript - 2014/03/09
 * 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 () {
    /***
    * User Definition Variables
    ***/
    /* Put here the limit of tag length!!! */
    var iTagLength = 4;
    /* Put here your tags tool tip!!! */
    var sTagTitle = 'Procurar por:';
    /* Put here your widget title!!! */
    var sTagToolTip = 'Localizar mais conteúdo com a tag';
    /* END */

    /***
    * System Defined Variables - Do not edit if you don't know!
    ***/
    var oConfig = {
        sInfo:
            '<!--' +
            '* Application: Tags Search' +
            '* Description: This application can displays tags for searching.' +
            '* Version: 1.09032014-jq1.9.1 - Thoth (Ermoúpoli -> Eshmunen)' +
            '* Made and Optimizations by JScript - 2014/03/09' +
            '* View more in: http://punbb.forumeiros.com/forum & http://ajuda.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' +
            '-->',       
        sContent:
            '<span id="tags_search"><span>' + sTagTitle + ' </span></span>',
        sCSS:
            '<style>' +
            '#tags_search {' +
                'display: block;' +
                'margin-bottom: 20px;' +
                'margin-top: 20px;' +
            '}' +
            '.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>',
        sTarget: ''
    };
   
    jQuery(oConfig.sCSS).insertBefore('body');

    /* Forum versions! */
    var phpBB2 = jQuery('.bodyline');
    var phpBB3 = jQuery('#wrap');
    var punbb = jQuery('#pun-intro');
    var invision = jQuery('#ipbwrapper');
   
    if (phpBB2.length) {
        $('td.nav').parent().parent().parent().before(oConfig.sInfo + oConfig.sContent);
        oConfig.sTarget = 'h1.cattitle:first';
    } else if(phpBB3.length) {
        $('#main-content .post:first').before(oConfig.sInfo + oConfig.sContent);
        oConfig.sTarget = 'h1.page-title';
    } else if(punbb.length) {
        $('#main-content .main.paged').before(oConfig.sInfo + oConfig.sContent);
        oConfig.sTarget = 'p.crumbs strong:last';
    } else if(invision.length) {
        $('#main-content .borderwrap:first').before(oConfig.sInfo + oConfig.sContent);
        oConfig.sTarget = 'div.maintitle.floated h3';
    };

    var tags = jQuery(oConfig.sTarget).text().split(' ');

    jQuery.each(tags, function(index, data) {
        if(data.length > iTagLength) {
            $('#tags_search').append(
                '<a id="tag_search_' + index + '" class="ipsTag" title="' + sTagToolTip + ' ' + data + '" href="/search?search_keywords=' + data + '">' +
                '    <span>' + data + '</span>' +
                '</a>'
            );
        }
    });
});

So long,

JS

JScript
Forumember

Male Posts : 741
Reputation : 167
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 on PunBB?

Post by Van-Helsing on March 12th 2014, 12:54 pm

Good evening JS thanks its solved.

Best Regards,
Dark-Avenger

Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

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

Post by SLGray on March 12th 2014, 4:36 pm

Topic Solved & Archived


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


SLGray
Administrator
Administrator

Male Posts : 35672
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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