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.

Topic Prefix Help, Please?

4 posters

Go down

Topic Prefix Help, Please? Empty Topic Prefix Help, Please?

Post by Sakura Zero May 1st 2014, 2:32 pm

Hey! I'm new here. But I've been using Forumotion for ages now. I was wondering if you can help me with something. It won't take long, I think.

So, I want topic prefixes for my forum, something that IPB has. I believe it is possible, see the image below:

Topic Prefix Help, Please? KUKjJyP

Yes, I know this is one of the countless, annoying and stupid threads of its kind. But all of them are unsolved. I would like this to be a solved thread nonetheless, not one of the other threads.



var prefixes = ["prefix1","prefix2","prefix3","prefix4"]; 
   var _pm = false;
    var chk = false;
    function toMenu(a) {
      var htmlpre = '<select style="margin-right:5px" id="prefix" size="1"><option value="">(None)</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);
          });
      }
    });
This Code ain't working!


Already tried this, too. Can you make it work for the English version?
I really need this to be solved and worked out. Help me out guys! Please?



Details, details:


Sakura Zero
Sakura Zero
New Member

Male Posts : 18
Reputation : 1
Language : English

http://chaotic.great-forum.com

Back to top Go down

Topic Prefix Help, Please? Empty Re: Topic Prefix Help, Please?

Post by Rhino.Freak May 1st 2014, 5:01 pm

Rhino.Freak
Rhino.Freak
Helper
Helper

Male Posts : 1248
Reputation : 104
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Topic Prefix Help, Please? Empty Thanks a bunch

Post by Sakura Zero May 2nd 2014, 6:38 am

Rhino.Freak wrote:Hi!

Have you tried this code?

http://www.fmcodes.com/t930-add-prefixes-for-your-topics-list

Smile
Thanks a bunch but, I don't know how to use it.

Here's da code:

Code:
$(document).ready(function(){$('img[src="IMAGELINK"]').replaceWith('<span class="imageA">TitleA</span>')});


  1. you will change ImageLink with the image that you have set in the ACP

  2. you will change titleA with the text you want to show

  3. you will change class="imageA" if you want to have more than one (the class must be unique)




Need help with this.
Sakura Zero
Sakura Zero
New Member

Male Posts : 18
Reputation : 1
Language : English

http://chaotic.great-forum.com

Back to top Go down

Topic Prefix Help, Please? Empty Re: Topic Prefix Help, Please?

Post by Rhino.Freak May 2nd 2014, 7:28 am

As far as I understand this,
First you have to add topic icons by
ACP > Display > Pics Management > Topic Icons
Then add new topic icon, copy that image's URL.. that is your ImageLink

TitleA would be TUTORIAL in your example image
imageA would be the class used to style the text "TUTORIAL"
Do it by adding this in CSS :
Code:
.imageA { background: blue; border: 1px solid black; }

Please report back of it works Smile

What it will do is replace the image url provided by topic icon with your text...
Rhino.Freak
Rhino.Freak
Helper
Helper

Male Posts : 1248
Reputation : 104
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Topic Prefix Help, Please? Empty Re: Topic Prefix Help, Please?

Post by SocialAcademy May 2nd 2014, 8:30 am

check same problem here Topic Prefix
SocialAcademy
SocialAcademy
Forumember

Male Posts : 145
Reputation : 11
Language : JavaScript, CSS, Html, JQuery, C#, C++, Php, Python
Location : Forumotion

http://www.socialacademy.biz

Back to top Go down

Topic Prefix Help, Please? Empty Thanks

Post by Sakura Zero May 3rd 2014, 6:41 am

SocialAcademy wrote:check same problem here  Topic Prefix
Thanks for that! Not working, though.
Sakura Zero
Sakura Zero
New Member

Male Posts : 18
Reputation : 1
Language : English

http://chaotic.great-forum.com

Back to top Go down

Topic Prefix Help, Please? Empty Re: Topic Prefix Help, Please?

Post by Sakura Zero May 3rd 2014, 6:52 am

Rhino.Freak wrote:As far as I understand this,
First you have to add topic icons by
ACP > Display > Pics Management > Topic Icons
Then add new topic icon, copy that image's URL.. that is your ImageLink

TitleA would be TUTORIAL in your example image
imageA would be the class used to style the text "TUTORIAL"
Do it by adding this in CSS :
Code:
.imageA { background: blue; border: 1px solid black; }

Please report back of it works Smile

What it will do is replace the image url provided by topic icon with your text...


Topic Prefix Help, Please? Test
No luck with this one.



Topic Prefix Help, Please? Test2
Here is what a thread looks like. No luck.


Again, thanks for helping me out!
Sakura Zero
Sakura Zero
New Member

Male Posts : 18
Reputation : 1
Language : English

http://chaotic.great-forum.com

Back to top Go down

Topic Prefix Help, Please? Empty Re: Topic Prefix Help, Please?

Post by Jophy May 3rd 2014, 7:51 am

Topic moved to the correct section.
Jophy
Jophy
ForumGuru

Male Posts : 17924
Reputation : 836
Language : English
Location : Somewhere

Back to top Go down

Topic Prefix Help, Please? Empty Re: Topic Prefix Help, Please?

Post by Rhino.Freak May 3rd 2014, 4:58 pm

umm.. :/ sorry then.
Did you try SocialAcademy's link ?? its a completely different method..
Rhino.Freak
Rhino.Freak
Helper
Helper

Male Posts : 1248
Reputation : 104
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Back to top

- Similar topics

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