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.

Tags System For Topics(?)

View previous topic View next topic Go down

Solved Tags System For Topics(?)

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

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


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!






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.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 seeSmile

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.

Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.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

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.


SLGray
Administrator
Administrator

Male Posts : 35634
Reputation : 2372
Language : English
Location : United States

http://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

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 ↑

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..






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.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

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 meblackeye

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..

Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.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*

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

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.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