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.

Topic prefix

View previous topic View next topic Go down

Solved Topic prefix

Post by mmägi on December 1st 2014, 12:38 am

hello

i got one code its punbb working well but in phpbb2 isnt working

if it dose on you some 1 give me know

Code:
       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);
                  });
              }
            });

previwe :



and can i have then the phpbb2 code?


Last edited by mmägi on December 1st 2014, 10:02 am; edited 1 time in total

mmägi
Forumember

Male Posts : 402
Reputation : 3
Language : Estonia

http://royal.forumc.net/

Back to top Go down

Solved Re: Topic prefix

Post by SLGray on December 1st 2014, 2:16 am

Did you check In All Pages?  It worked on my forum when I check that.


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


SLGray
Administrator
Administrator

Male Posts : 36648
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Topic prefix

Post by mmägi on December 1st 2014, 10:00 am

ohh it worked now thanks! Can u make that into the tutorial list do its nice thing if u don't have it there.

mmägi
Forumember

Male Posts : 402
Reputation : 3
Language : Estonia

http://royal.forumc.net/

Back to top Go down

Solved Re: Topic prefix

Post by SLGray on December 1st 2014, 10:19 am

Which tutorial are you referring to?


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


SLGray
Administrator
Administrator

Male Posts : 36648
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Topic prefix

Post by mmägi on December 1st 2014, 10:19 am

from this code make tutorials for others

mmägi
Forumember

Male Posts : 402
Reputation : 3
Language : Estonia

http://royal.forumc.net/

Back to top Go down

Solved Re: Topic prefix

Post by SLGray on December 1st 2014, 10:21 am

Please post the link to this tutorial.


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


SLGray
Administrator
Administrator

Male Posts : 36648
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Topic prefix

Post by mmägi on December 1st 2014, 10:22 am

ohh i am so bad english i see :S i ment that i posted here that code dose forumotion have that kind thing in the tutorials do?

mmägi
Forumember

Male Posts : 402
Reputation : 3
Language : Estonia

http://royal.forumc.net/

Back to top Go down

Solved Re: Topic prefix

Post by SarkZKalie on December 1st 2014, 11:36 am

I found this from http://diendan.chinhphuc.info/t20181-topic may it same with that code you shared, @mmägi Very Happy

SarkZKalie
Forumember

Male Posts : 448
Reputation : 78
Language : English

http://rotavn.nstars.org/

Back to top Go down

Solved Re: Topic prefix

Post by mmägi on December 1st 2014, 12:12 pm

i dont even know that page Very Happy i took it from 1 page and this is solved that should be locked already

mmägi
Forumember

Male Posts : 402
Reputation : 3
Language : Estonia

http://royal.forumc.net/

Back to top Go down

Solved Re: Topic prefix

Post by APE on December 1st 2014, 5:45 pm

Topic solved and archived




APE
Manager
Manager

Male Posts : 8615
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

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