Tags System For Topics(?)

Go down

Solved Tags System For Topics(?)

Post by J0k3R^ on April 22nd 2014, 5:55 pm

Hello  Hello 
how to use tags system for topics? [HTML], [TUTORIAL], [CSS] etc

avatar
J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by Luffy on April 22nd 2014, 6:22 pm

You want the normal ones or the ones provided on the image you set. Because i know the code where you can add the tags as the default ones. Showing

[HTML] Topic title
[TUTORIAL] Topic title.

If you want them with colors then i don't know!



avatar
Luffy
Manager
Manager

Male Posts : 5414
Reputation : 590
Language : Greek, English
Location : Greece

https://www.crossroadz.net

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by J0k3R^ on April 22nd 2014, 6:34 pm

give it a try and we will see  Smile
avatar
J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by Luffy on April 22nd 2014, 6:37 pm

For the default ones the code is this:

Code:
var prefixes = ["Perfix1","Perfix2","Perfix3","Perfix4"];
   var _pm = false;
    var chk = false;
    function toMenu(a) {
      var htmlpre = '<select style="margin-right:5px" id="prefix" size="1"><option value="">(Χωρίς)</option>';
      for (i in a)
      htmlpre += '<option value="' + a[i] + '">' + a[i] + '</option>';
      htmlpre += '</select>';
      return htmlpre;
    }
    function checkpre(ar, input) {
      for (i in ar) {
          var p = new RegExp("\\" + ar[i], "g");
          var title = input.substr(0, input.indexOf(']'));
          if (p.test(title)) return ar[i];
      }
      return "";
    }
    $(function () {
      if (_pm) chk = /\privmsg/.test(location.href);
      if (/\/post/.test(location.href) || chk) {
          $(toMenu(prefixes)).insertBefore("input[name=subject][type=text]");
          var mw = $("#prefix").width() + 5;
          $("input[name=subject]").css("width", $("input[name=subject]").width() - mw);
          var t = $("[name=subject]").val();
          var cur = checkpre(prefixes, t);
          if (cur != "") {
            $("[value=" + cur + "]").attr("selected", "selected");
            $("input[name=subject]").val(t.replace('[' + cur + ']', '').trim());
          }
          $("input[name=post]").click(function () {
            var sub = $("input[name=subject]").val().trim();
            if (sub != "" && $("#prefix").val() != "")
                $("input[name=subject]").val("[" + $("#prefix").val() + "]" + sub);
          });
      }
    });

Εdit: Sorry i forgot to say that this code goes in the Javascript, in all pages and you change the names in th first line where it says Perfix1,2,3,4 and you add more the same way as the first 4.
avatar
Luffy
Manager
Manager

Male Posts : 5414
Reputation : 590
Language : Greek, English
Location : Greece

https://www.crossroadz.net

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by J0k3R^ on April 22nd 2014, 6:48 pm

unfortunately, didnt work
avatar
J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by SLGray on April 22nd 2014, 9:46 pm

Create images with those texts and add them here:

Administration Panel > Display > Colors & Pictures > Pics Management
Advanced Mode
Topic Icons Tab


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43154
Reputation : 3060
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by J0k3R^ on April 23rd 2014, 7:14 am

This is working but the images are not displayed in the homepage on last topics' posts. thats what i want, like the image i mean Smile
i think its about css
avatar
J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by J0k3R^ on April 24th 2014, 11:43 am

Bump ↑
avatar
J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by Luffy on April 24th 2014, 11:44 am

The code i gave you works. I am currently using it and it works fine. Something in your Javascript does not allow it to work.. Try removing the unnecessary Javascripts so this one will work..



avatar
Luffy
Manager
Manager

Male Posts : 5414
Reputation : 590
Language : Greek, English
Location : Greece

https://www.crossroadz.net

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by Pizza Boi on April 24th 2014, 11:45 am

Hi Very Happy

Hmm... is it appearing in a topic list already? Let me see if I can style it.

Regards,
Pizza Boi
avatar
Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by J0k3R^ on April 24th 2014, 11:51 am

Marios94 wrote:The code i gave you works. I am currently using it and it works fine. Something in your Javascript does not allow it to work.. Try removing the unnecessary Javascripts so this one will work..

show me  blackeye
avatar
J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by Luffy on April 24th 2014, 3:21 pm

Marios94 wrote:For the default ones the code is this:

Code:
var prefixes = ["Perfix1","Perfix2","Perfix3","Perfix4"];
   var _pm = false;
    var chk = false;
    function toMenu(a) {
      var htmlpre = '<select style="margin-right:5px" id="prefix" size="1"><option value="">(Χωρίς)</option>';
      for (i in a)
      htmlpre += '<option value="' + a[i] + '">' + a[i] + '</option>';
      htmlpre += '</select>';
      return htmlpre;
    }
    function checkpre(ar, input) {
      for (i in ar) {
          var p = new RegExp("\\" + ar[i], "g");
          var title = input.substr(0, input.indexOf(']'));
          if (p.test(title)) return ar[i];
      }
      return "";
    }
    $(function () {
      if (_pm) chk = /\privmsg/.test(location.href);
      if (/\/post/.test(location.href) || chk) {
          $(toMenu(prefixes)).insertBefore("input[name=subject][type=text]");
          var mw = $("#prefix").width() + 5;
          $("input[name=subject]").css("width", $("input[name=subject]").width() - mw);
          var t = $("[name=subject]").val();
          var cur = checkpre(prefixes, t);
          if (cur != "") {
            $("[value=" + cur + "]").attr("selected", "selected");
            $("input[name=subject]").val(t.replace('[' + cur + ']', '').trim());
          }
          $("input[name=post]").click(function () {
            var sub = $("input[name=subject]").val().trim();
            if (sub != "" && $("#prefix").val() != "")
                $("input[name=subject]").val("[" + $("#prefix").val() + "]" + sub);
          });
      }
    });

Εdit: Sorry i forgot to say that this code goes in the Javascript, in all pages and you change the names in th first line where it says Perfix1,2,3,4 and you add more the same way as the first 4.

This is the code i use and it is working perfectly..
avatar
Luffy
Manager
Manager

Male Posts : 5414
Reputation : 590
Language : Greek, English
Location : Greece

https://www.crossroadz.net

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by J0k3R^ on April 25th 2014, 7:45 am

i found it

*Solved*
avatar
J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Tags System For Topics(?)

Post by Ange Tuteur on April 25th 2014, 9:08 am

Topic solved and archived
avatar
Ange Tuteur
Forumaster

Male Posts : 13195
Reputation : 2911
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Back to top


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