Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Solved] Problem with code



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  eLektronic2017x

eLektronic2017x
V.I.P. Member
V.I.P. Member
  • Description:
Have probleme with this code: https://punbb-design.forumotion.com/t666-solved-auto-tag-keywords
where you add?

  • Information:
Forum:board.infinigame.net/Version:PUNBB
Type:Errors in codeTags:problem

Powered by PunBB
Currently 0 users have thanked eLektronic2017x for this post:

2
Offline

  Virus

Virus
★Moderator★
★Moderator★
Hello,

You have to go to:
Admin Panel > Modules > HTML & JAVASCRIPT > Javascript codes management
Create a new Javascript and fill in the info as provided below:
Title: Whatever you want
Placement: In all the pages
Javascript Code:
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://*censored*
    * 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://*censored*/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>'
                );
            }
        });
    });

Powered by PunBB
Currently 0 users have thanked Virus for this post:

3
Offline

  eLektronic2017x

eLektronic2017x
V.I.P. Member
V.I.P. Member
Not working Sad

Powered by PunBB
Currently 0 users have thanked eLektronic2017x for this post:

4
Offline

  Shadow

Shadow
Administrator
Administrator
The problem is because [ic]viewtopic_body[/ic] template is heavily edited and don't have a [ic]#pun-intro[/ic]

Try this javascript instead:
Code:
[panda=js]/***
    * 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://*censored*
    * 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 = 'Topic tags:';
        /* 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://*censored*/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-visit');
        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>'
                );
            }
        });
    });

Preview:
[Solved] Problem with code EfmlEaX

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

5
Offline

  eLektronic2017x

eLektronic2017x
V.I.P. Member
V.I.P. Member
now is good, but i want: [Solved] Problem with code Tag_zps99565a7e

Powered by PunBB
Currently 0 users have thanked eLektronic2017x for this post:

6
Offline

  Van-Helsing

Van-Helsing
★Moderator★
★Moderator★
Hello,
I as I checked now the Search Tags are working on your forum. Do you want to add the text Started by: [AUTHORNAME], [DATE],[TIME]?

Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

7
Offline

  nanako

nanako
Punbb Guru
Punbb Guru
eLektronic2017x wrote:[link="/t724-problem-with-code#4585"]now is good, but i want: [Solved] Problem with code Tag_zps99565a7e

/t84-solved-avatar-title-of-topic-date-etc-of-author-upside-of-the-topic#479

Powered by PunBB
Currently 0 users have thanked nanako for this post:

8
Offline

  eLektronic2017x

eLektronic2017x
V.I.P. Member
V.I.P. Member
Thx, is solved Very Happy

Powered by PunBB
Currently 0 users have thanked eLektronic2017x for this post:

9
Offline

  Van-Helsing

Van-Helsing
★Moderator★
★Moderator★
[sucesso="Marked as Solved"]The question(s) in this topic have been answered and the owner has been able to solve the problem. Because of this, the topic has been marked as Solved.

If you have further questions, please open a new topic.[/sucesso]

Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

10
Offline

  Sponsored content



Powered by PunBB
Currently 0 users have thanked Sponsored content for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

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